r23221 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Fri Sep 27 09:26:41 UTC 2019


Author: jghali
Date: Fri Sep 27 09:26:41 2019
New Revision: 23221

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23221
Log:
Code style fixes

Modified:
    trunk/Scribus/scribus/ui/prefs_userinterface.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp

Modified: trunk/Scribus/scribus/ui/prefs_userinterface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23221&path=/trunk/Scribus/scribus/ui/prefs_userinterface.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_userinterface.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_userinterface.cpp	Fri Sep 27 09:26:41 2019
@@ -47,12 +47,12 @@
 	themeComboBox->addItem("");
 	themeComboBox->addItems(styleList);
 	QStringList iconSetList;
-	iconSetList=IconManager::instance().nameList(ScQApp->currGUILanguage());
+	iconSetList = IconManager::instance().nameList(ScQApp->currGUILanguage());
 	iconSetComboBox->addItems(iconSetList);
 
 	connect(languageComboBox, SIGNAL(activated(const QString &)), this, SLOT(setSelectedGUILang(const QString &)));
 	connect(storyEditorFontPushButton, SIGNAL(clicked()), this, SLOT(changeStoryEditorFont()));
-	connect(storyEditorFontColorPushButton, SIGNAL(clicked()), this, SLOT(changeStoryEditorFontColor()));
+	connect(storyEditorFontColorPushButton, SIGNAL(clicked()) , this, SLOT(changeStoryEditorFontColor()));
 }
 
 Prefs_UserInterface::~Prefs_UserInterface() = default;

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23221&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Fri Sep 27 09:26:41 2019
@@ -3366,22 +3366,22 @@
 	if (Do_new())
 	{
 		EditorBar->setRepaint(false);
-		QString LoadEnc = "";
-		QString fileName = "";
+		QString loadEnc;
+		QString fileName;
 		PrefsContext* dirs = prefsManager.prefsFile->getContext("dirs");
 		QString wdir = dirs->get("story_load", prefsManager.documentDir());
 		CustomFDialog dia(this, wdir, tr("Open"), tr("Text Files (*.txt);;All Files (*)"), fdExistingFiles | fdShowCodecs | fdDisableOk);
 		if (dia.exec() != QDialog::Accepted)
 			return;
-		LoadEnc = dia.optionCombo->currentText();
-		if (LoadEnc == "UTF-16")
-			LoadEnc = "ISO-10646-UCS-2";
+		loadEnc = dia.optionCombo->currentText();
+		if (loadEnc == "UTF-16")
+			loadEnc = "ISO-10646-UCS-2";
 		fileName =  dia.selectedFile();
 		if (!fileName.isEmpty())
 		{
 			dirs->set("story_load", fileName.left(fileName.lastIndexOf("/")));
 			QString txt;
-			if (Serializer::readWithEncoding(fileName, LoadEnc, txt))
+			if (Serializer::readWithEncoding(fileName, loadEnc, txt))
 			{
 				txt.replace(QRegExp("\r"), "");
 				txt.replace(QRegExp("\n"), QChar(13));
@@ -3401,7 +3401,7 @@
 void StoryEditor::SaveTextFile()
 {
 	m_blockUpdate = true;
-	QString LoadEnc;
+	QString loadEnc;
 	QString fileName;
 	PrefsContext* dirs = prefsManager.prefsFile->getContext("dirs");
 	QString wdir = dirs->get("story_save", prefsManager.appPrefs.pathPrefs.documents);
@@ -3412,14 +3412,14 @@
 		m_blockUpdate = false;
 		return;
 	}
-	LoadEnc = dia.optionCombo->currentText();
-	if (LoadEnc == "UTF-16")
-		LoadEnc = "ISO-10646-UCS-2";
-	fileName =  dia.selectedFile();
+	loadEnc = dia.optionCombo->currentText();
+	if (loadEnc == "UTF-16")
+		loadEnc = "ISO-10646-UCS-2";
+	fileName = dia.selectedFile();
 	if (!fileName.isEmpty())
 	{
 		dirs->set("story_save", fileName.left(fileName.lastIndexOf("/")));
-		Serializer::writeWithEncoding(fileName, LoadEnc, Editor->StyledText.plainText());
+		Serializer::writeWithEncoding(fileName, loadEnc, Editor->StyledText.plainText());
 	}
 	m_blockUpdate = false;
 }
@@ -3441,37 +3441,37 @@
 
 void StoryEditor::specialActionKeyEvent(int unicodevalue)
 {
-	QString guiInsertString=QChar(unicodevalue);
-	bool setColor=false;
+	QString guiInsertString = QChar(unicodevalue);
+	bool setColor = false;
 	if (unicodevalue == seActions["unicodePageNumber"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="#";
+		setColor = true;
+		guiInsertString = "#";
 	}
 	if (unicodevalue == seActions["unicodeNonBreakingSpace"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="_";
+		setColor = true;
+		guiInsertString = "_";
 	}
 	if (unicodevalue == seActions["unicodeFrameBreak"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="|";
+		setColor = true;
+		guiInsertString = "|";
 	}
 	if (unicodevalue == seActions["unicodeNewLine"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="*";
+		setColor = true;
+		guiInsertString = "*";
 	}
 	if (unicodevalue == seActions["unicodeColumnBreak"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="^";
+		setColor = true;
+		guiInsertString = "^";
 	}
 	if (unicodevalue == seActions["unicodeNonBreakingHyphen"]->actionInt())
 	{
-		setColor=true;
-		guiInsertString="=";
+		setColor = true;
+		guiInsertString = "=";
 	}
 	if (setColor)
 		Editor->setColor(true);
@@ -3485,6 +3485,6 @@
 
 void StoryEditor::updateUnicodeActions()
 {
-	if (Editor->prevFont!=Editor->CurrFont)
+	if (Editor->prevFont != Editor->CurrFont)
 		ScCore->primaryMainWindow()->actionManager->enableUnicodeActions(&seActions, true, Editor->CurrFont);
 }




More information about the scribus-commit mailing list