r24097 by jghali - Fix more compiler warnings

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 24 16:51:20 UTC 2020


Author: jghali
Date: Sat Oct 24 16:51:19 2020
New Revision: 24097

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24097
Log:
Fix more compiler warnings

Modified:
    branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
    branches/Version14x/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
    branches/Version14x/Scribus/scribus/smtextstyles.cpp
    branches/Version14x/Scribus/scribus/storyeditor.cpp
    branches/Version14x/Scribus/scribus/tabpdfoptions.cpp

Modified: branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24097&path=/branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	(original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	Sat Oct 24 16:51:19 2020
@@ -608,7 +608,7 @@
  			psize = static_cast<double>(parent2Style->getFont()->getSize());
  		else if (styles.contains("default-style"))
  			psize = static_cast<double>(styles["default-style"]->getFont()->getSize());
- 			psize = psize / 10;
+ 		psize = psize / 10;
  		size = getSize(value, psize);
  		int nsize = static_cast<int>(size * 10);
  		style->getFont()->setSize(nsize);
@@ -628,7 +628,7 @@
  	else if (key == "fo:color")
 		style->getFont()->setColor(value);
 	else if ((key == "style:use-window-font-color") && (value == "true"))
- 			style->getFont()->setColor("Black");
+ 		style->getFont()->setColor("Black");
  	else if ((key == "fo:font-weight") && (value == "bold"))
  		style->getFont()->setWeight(BOLD);
  	else if ((key == "fo:font-style") && (value == "italic"))

Modified: branches/Version14x/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24097&path=/branches/Version14x/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp	(original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp	Sat Oct 24 16:51:19 2020
@@ -131,7 +131,7 @@
 		{
 			QString tmpText(list[i]);
 			QString tmpText2(tmpText);
-			tmpText2.simplified();
+			tmpText2=tmpText2.simplified();
 			int numberOfWords = tmpText2.count(" ");
 			++numberOfWords;
 			useStyle = NULL;

Modified: branches/Version14x/Scribus/scribus/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24097&path=/branches/Version14x/Scribus/scribus/smtextstyles.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/smtextstyles.cpp	(original)
+++ branches/Version14x/Scribus/scribus/smtextstyles.cpp	Sat Oct 24 16:51:19 2020
@@ -39,7 +39,11 @@
 
 
 SMParagraphStyle::SMParagraphStyle(SMCharacterStyle* cstyleItem) : StyleItem(),
-pwidget_(0), doc_(0), selectionIsDirty_(false), unitRatio_(1.0), cstyleItem_(cstyleItem)
+	pwidget_(0), 
+	cstyleItem_(cstyleItem),
+	doc_(0),
+	selectionIsDirty_(false),
+	unitRatio_(1.0)
 {
 	Q_ASSERT(cstyleItem_);
 	cstyles_ = cstyleItem_->tmpStyles();

Modified: branches/Version14x/Scribus/scribus/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24097&path=/branches/Version14x/Scribus/scribus/storyeditor.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/storyeditor.cpp	(original)
+++ branches/Version14x/Scribus/scribus/storyeditor.cpp	Sat Oct 24 16:51:19 2020
@@ -985,7 +985,8 @@
 {
 	emit SideBarUp(false);
 	bool useMimeStyledText = false;
-	int  newParaCount, lengthLastPara, advanceLen = 0;
+	// int  newParaCount, lengthLastPara,
+	int advanceLen = 0;
 	int  pos = textCursor().hasSelection() ? textCursor().selectionStart() : textCursor().position();
 	const QMimeData* mimeData = QApplication::clipboard()->mimeData(QClipboard::Clipboard);
 	if (mimeData->hasFormat("application/x-scribus-styledtext"))
@@ -1010,8 +1011,8 @@
 		if (!data.isEmpty())
 		{
 			data.replace(QRegExp("\r"), "");
-			newParaCount=data.count("\n");
-			lengthLastPara=data.length()-data.lastIndexOf("\n");
+		//	newParaCount=data.count("\n");
+		//	lengthLastPara=data.length()-data.lastIndexOf("\n");
 			data.replace(QRegExp("\n"), SpecialChars::PARSEP);
 //			inserted=true;
 			advanceLen = data.length() /*- newParaCount*/;
@@ -2127,7 +2128,7 @@
 controlling back to story editor - have rest */
 void StoryEditor::doubleClick(int para, int position)
 {
-	int indexFrom=0, indexTo=0;
+	int indexFrom=0; //, indexTo=0;
 	QString selText = Editor->textCursor().selectedText();
 	if (selText.length() == 0 || !smartSelection)
 	{
@@ -2135,7 +2136,7 @@
 		return;
 	}
 	indexFrom = Editor->textCursor().selectionStart();
-	indexTo = Editor->textCursor().selectionEnd();
+//	indexTo = Editor->textCursor().selectionEnd();
 	selText =  selText.trimmed();
 	Editor->textCursor().clearSelection();
 	Editor->textCursor().setPosition(indexFrom);

Modified: branches/Version14x/Scribus/scribus/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24097&path=/branches/Version14x/Scribus/scribus/tabpdfoptions.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/tabpdfoptions.cpp	(original)
+++ branches/Version14x/Scribus/scribus/tabpdfoptions.cpp	Sat Oct 24 16:51:19 2020
@@ -92,6 +92,7 @@
 	PassUser(0),
 	PDFVersionCombo(0),
 	PrintProfC(0),
+	InfoString(0),
 	PrintSec(0),
 	Resolution(0),
 	RotateDeg(0),
@@ -122,7 +123,6 @@
 	fitWindow(0),
 	hideMenuBar(0),
 	hideToolBar(0),
-	InfoString(0),
 	LPIangle(0),
 	LPIfreq(0),
 	LPIfunc(0),




More information about the scribus-commit mailing list