r21951 by craig - Clazy part 9: More multi arg QString replacements, foreach fixes for references, etc

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 11:57:46 UTC 2017


Author: craig
Date: Fri Apr 21 11:57:46 2017
New Revision: 21951

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21951
Log:
Clazy part 9: More multi arg QString replacements, foreach fixes for references, etc

Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/canvasgesture.h
    trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
    trunk/Scribus/scribus/latexhelpers.cpp
    trunk/Scribus/scribus/pageitem_latexframe.cpp
    trunk/Scribus/scribus/pageitem_pathtext.cpp
    trunk/Scribus/scribus/pageitem_table.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
    trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
    trunk/Scribus/scribus/plugins/import/ai/importai.cpp
    trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
    trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
    trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
    trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/scfonts.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/ui/aboutplugins.cpp
    trunk/Scribus/scribus/ui/copypagetomasterpagedialog.cpp
    trunk/Scribus/scribus/ui/insertaframe.cpp
    trunk/Scribus/scribus/ui/insertaframe.h
    trunk/Scribus/scribus/ui/picstatus.cpp
    trunk/Scribus/scribus/ui/prefs_externaltools.cpp
    trunk/Scribus/scribus/ui/resourcemanager.cpp
    trunk/Scribus/scribus/ui/stylemanager.cpp
    trunk/Scribus/scribus/upgradechecker.cpp
    trunk/Scribus/scribus/util_file.cpp

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Fri Apr 21 11:57:46 2017
@@ -216,6 +216,7 @@
 	actionmanager.h
 	appmodehelper.h
 	canvas.h
+	canvasgesture.h
 	canvasgesture_cellselect.h
 	canvasgesture_columnresize.h
 	canvasgesture_rowresize.h

Modified: trunk/Scribus/scribus/canvasgesture.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/canvasgesture.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture.h	(original)
+++ trunk/Scribus/scribus/canvasgesture.h	Fri Apr 21 11:57:46 2017
@@ -46,6 +46,7 @@
  */
 class SCRIBUS_API CanvasGesture : public CanvasMode
 {
+	Q_OBJECT
 
 protected:
 	explicit CanvasGesture (CanvasMode* parent) : CanvasMode(parent->view()), m_delegate(parent) {};

Modified: trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp	(original)
+++ trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp	Fri Apr 21 11:57:46 2017
@@ -63,7 +63,7 @@
 
 void ScDLManager::addURLs(const QStringList &urlList, bool overwrite, const QString &downloadLocation, const QString& destinationLocation)
 {
-	foreach(QString s, urlList)
+	foreach(const QString& s, urlList)
 	{
 		DownloadData d;
 		d.id=m_dlID++;

Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp	(original)
+++ trunk/Scribus/scribus/latexhelpers.cpp	Fri Apr 21 11:57:46 2017
@@ -465,7 +465,7 @@
 {
 	QStringList configFiles = PrefsManager::instance()->latexConfigs();
 	QMap<QString, QString> configCmds;
-	foreach (QString configFile, configFiles)
+	foreach (const QString& configFile, configFiles)
 	{
 		LatexConfigParser *config = LatexConfigCache::instance()->parser(configFile);
 		configCmds.insert(configFile, config->executable());

Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp	Fri Apr 21 11:57:46 2017
@@ -112,7 +112,8 @@
 	Q_ASSERT(!fi.fileName().contains("\\"));
 	QStringList files;
 	files = dir.entryList(filter);
-	foreach (QString file, files) {
+	foreach (const QString& file, files)
+	{
 		Q_ASSERT(file.startsWith("scribus_temp"));
 		dir.remove(file);
 	}
@@ -462,7 +463,7 @@
 	{
 		QFileInfo fi;
 		QStringList configs = PrefsManager::instance()->latexConfigs();
-		foreach (QString config, configs)
+		foreach (const QString& config, configs)
 		{
 			fi.setFile(config);
 			if (newConfig == fi.fileName())

Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp	Fri Apr 21 11:57:46 2017
@@ -172,7 +172,8 @@
 	if (glyphRuns.isEmpty())
 		return;
 
-	foreach (const GlyphCluster run, glyphRuns) {
+	foreach (const GlyphCluster& run, glyphRuns)
+	{
 		totalTextLen += run.width();
 		if (run.hasFlag(ScLayout_ExpandingSpace))
 			spaceCount++;

Modified: trunk/Scribus/scribus/pageitem_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/pageitem_table.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_table.cpp	Fri Apr 21 11:57:46 2017
@@ -1353,8 +1353,8 @@
 	qDebug() << "m_rowHeights: " <<  m_rowHeights;
 	qDebug() << "m_cellAreas: " <<  m_cellAreas;
 	qDebug() << "m_cellRows: ";
-	foreach(QList<TableCell> cellRow, m_cellRows)
-		foreach(TableCell cell, cellRow)
+	foreach(const QList<TableCell>& cellRow, m_cellRows)
+		foreach(const TableCell& cell, cellRow)
 			qDebug() << cell.asString();
 	qDebug() << "-------------------------------------------------";
 }

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Fri Apr 21 11:57:46 2017
@@ -1367,20 +1367,16 @@
 static QList<Pdf::Resource> asColorSpace(QList<PdfICCD> iccCSlist)
 {
 	QList<Pdf::Resource> result;
-	foreach (Pdf::Resource r, iccCSlist)
-	{
+	foreach (const Pdf::Resource& r, iccCSlist)
 		result.append(r);
-	}
 	return result;
 }
 
 static QList<Pdf::Resource> asColorSpace(QList<PdfSpotC> spotMapValues)
 {
 	QList<Pdf::Resource> result;
-	foreach (Pdf::Resource r, spotMapValues)
-	{
+	foreach (const Pdf::Resource& r, spotMapValues)
 		result.append(r);
-	}
 	return result;
 }
 
@@ -8625,7 +8621,7 @@
 
 void PDFLibCore::PDF_RadioButtons()
 {
-	QMap<PageItem*, QList<PageItem*> > rbMap;
+	QHash<PageItem*, QList<PageItem*> > rbMap;
 	for (int a = 0; a < pageData.radioButtonList.count(); a++)
 	{
 		PageItem* pa = pageData.radioButtonList[a]->Parent;
@@ -8638,7 +8634,7 @@
 			rbMap.insert(pa, aList);
 		}
 	}
-	QMap<PageItem*, QList<PageItem*> >::Iterator it;
+	QHash<PageItem*, QList<PageItem*> >::Iterator it;
 	for (it = rbMap.begin(); it != rbMap.end(); ++it)
 	{
 		QList<PageItem*> bList = it.value();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	Fri Apr 21 11:57:46 2017
@@ -724,11 +724,10 @@
 	struct ScribusDoc::BookMa bok;
 	int counter;
 	bool newVersion = false;
-	QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
+	QString tmp, tmpf, PgNam, Defont;
 	QMap<int,int> TableID;
 	QList<PageItem*> TableItems;
 	int x, a;
-//	double xf, xf2;
 	PageItem *Neu;
 	groupRemap.clear();
 	itemRemap.clear();
@@ -1724,14 +1723,13 @@
 
 void Scribus12Format::GetItemText(QDomElement *it, ScribusDoc *doc, bool VorLFound, bool impo, PageItem* obj, LastStyles* last)
 {
-	QString tmp2, tmf, tmpf, tmp3;
-	tmp2 = it->attribute("CH");
+	QString tmp2(it->attribute("CH"));
 	tmp2.replace(QRegExp("\r"), QChar(5));
 	tmp2.replace(QRegExp("\n"), QChar(5));
 	tmp2.replace(QRegExp("\t"), QChar(4));
 	tmp2.replace(SpecialChars::OLD_NBHYPHEN, SpecialChars::NBHYPHEN);
 	tmp2.replace(SpecialChars::OLD_NBSPACE, SpecialChars::NBSPACE);
-	tmpf = it->attribute("CFONT", doc->itemToolPrefs().textFont);
+	QString tmpf(it->attribute("CFONT", doc->itemToolPrefs().textFont));
 	doc->AllFonts->findFont(tmpf, doc);
 	int size = qRound(ScCLocale::toDoubleC(it->attribute("CSIZE")) * 10);
 	QString fcolor = it->attribute("CCOLOR");
@@ -1828,7 +1826,7 @@
 	groupRemap.clear();
 	itemRemap.clear();
 	itemNext.clear();
-	QString tmV, tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
+	QString tmp, tmpf;
 	QMap<int,int> TableID;
 	QList<PageItem*> TableItems;
 	int x, a, counter; //, baseobj;
@@ -2251,12 +2249,11 @@
 
 void Scribus12Format::GetStyle(QDomElement *pg, ParagraphStyle *vg, StyleSet<ParagraphStyle> * tempParagraphStyles, ScribusDoc* doc, bool fl)
 {
-	bool fou;
 	int fShade, sShade;
 	QString fColor, sColor;
-	QString tmpf, tmf, tmV;
+	QString tmpf;
 	double xf, xf2;
-	fou = false;
+	bool fou = false;
 	const StyleSet<ParagraphStyle> & docParagraphStyles(tempParagraphStyles? *tempParagraphStyles : doc->paragraphStyles());
 	vg->setName(pg->attribute("NAME"));
 	vg->setLineSpacingMode(static_cast<ParagraphStyle::LineSpacingMode>(pg->attribute("LINESPMode", "0").toInt()));
@@ -2403,8 +2400,6 @@
 {
 	ParagraphStyle pstyle;
 	QDomDocument docu("scridoc");
-	QString tmpf, tmf;
-// 	DoFonts.clear();
 	QString f (readSLA(fileName));
 	if (f.isEmpty())
 		return false;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Fri Apr 21 11:57:46 2017
@@ -2151,7 +2151,6 @@
 		if (!reader.isStartElement() || reader.name() != "PatternItem") 
 			continue;
 
-		QStringRef tName = reader.name();
 		ScXmlStreamAttributes tAtt = reader.attributes();
 			
 		ItemInfo itemInfo;
@@ -3145,7 +3144,7 @@
 	QString tmp;
 	QMap<int,PageItem*> TableID;
 	QList<PageItem*> TableItems;
-	QMap<PageItem*, int> groupID;
+	QHash<PageItem*, int> groupID;
 	double pageX = 0, pageY = 0;
 	QMap<int,int> layerTrans;
 	int maxLayer = 0, maxLevel = 0, a = 0;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	Fri Apr 21 11:57:46 2017
@@ -179,8 +179,7 @@
 	ParagraphStyle vg;
 	struct ScribusDoc::BookMa bok;
 	int counter;//, Pgc;
-	QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
-	QFont fo;
+	QString tmp, PgNam, Defont;
 	QMap<int,int> TableID;
 	QList<PageItem*> TableItems;
 	QMap<int,int> TableIDM;
@@ -2041,8 +2040,7 @@
 	itemRemap.clear();
 	itemNext.clear();
 	itemCount = 0;
-	QString tmV, tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
-	QFont fo;
+	QString tmp;
 	ReplacedFonts.clear();
 	newReplacement = false;
 	QMap<int,int> TableID;
@@ -2517,9 +2515,7 @@
 
 void Scribus13Format::GetStyle(QDomElement *pg, ParagraphStyle *vg, StyleSet<ParagraphStyle> *tempParagraphStyles, ScribusDoc* doc, bool fl)
 {
-	bool fou;
-	QString tmpf, tmf, tmV;
-	fou = false;
+	bool fou = false;
 	readParagraphStyle(*vg, *pg, doc);
 	const StyleSet<ParagraphStyle> & docParagraphStyles(tempParagraphStyles? *tempParagraphStyles : doc->paragraphStyles());
 	for (int xx=0; xx<docParagraphStyles.count(); ++xx)

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Fri Apr 21 11:57:46 2017
@@ -4235,7 +4235,6 @@
 		if (!reader.isStartElement() || reader.name() != "PatternItem") 
 			continue;
 
-		QStringRef tName = reader.name();
 		ScXmlStreamAttributes tAtt = reader.attributes();
 			
 		ItemInfo itemInfo;
@@ -5219,10 +5218,8 @@
 		{
 			QStringList slRowHeights=rowHeights.split(" ");
 			int i=0;
-			foreach(QString pos, slRowHeights)
-			{
+			foreach(const QString& pos, slRowHeights)
 				tableitem->resizeRow(i++, pos.toDouble());
-			}
 		}
 //		QString colPositions(attrs.valueAsString("ColumnPositions"));
 //		QStringList slColPositions=colPositions.split(" ");
@@ -5230,11 +5227,9 @@
 		if(!colWidths.isEmpty())
 		{
 			QStringList slColWidths=colWidths.split(" ");
-			int j=0;
-			foreach(QString pos, slColWidths)
-			{
-				tableitem->resizeColumn(j++, pos.toDouble());
-			}
+			int i=0;
+			foreach(const QString& pos, slColWidths)
+				tableitem->resizeColumn(i++, pos.toDouble());
 		}
 		QString cellAreas(attrs.valueAsString("CellAreas"));
 		if(!cellAreas.isEmpty())

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Fri Apr 21 11:57:46 2017
@@ -891,7 +891,7 @@
 	{
 		TableBorder tbLeft = style.leftBorder();
 		docu.writeStartElement("TableBorderLeft");
-		foreach (TableBorderLine tbl, tbLeft.borderLines())
+		foreach (const TableBorderLine& tbl, tbLeft.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -906,7 +906,7 @@
 	{
 		TableBorder tbRight = style.rightBorder();
 		docu.writeStartElement("TableBorderRight");
-		foreach (TableBorderLine tbl, tbRight.borderLines())
+		foreach (const TableBorderLine& tbl, tbRight.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -921,7 +921,7 @@
 	{
 		TableBorder tbTop = style.topBorder();
 		docu.writeStartElement("TableBorderTop");
-		foreach (TableBorderLine tbl, tbTop.borderLines())
+		foreach (const TableBorderLine& tbl, tbTop.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -936,7 +936,7 @@
 	{
 		TableBorder tbBottom = style.bottomBorder();
 		docu.writeStartElement("TableBorderBottom");
-		foreach (TableBorderLine tbl, tbBottom.borderLines())
+		foreach (const TableBorderLine& tbl, tbBottom.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -973,7 +973,7 @@
 	{
 		TableBorder tbLeft = style.leftBorder();
 		docu.writeStartElement("TableBorderLeft");
-		foreach (TableBorderLine tbl, tbLeft.borderLines())
+		foreach (const TableBorderLine& tbl, tbLeft.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -988,7 +988,7 @@
 	{
 		TableBorder tbRight = style.rightBorder();
 		docu.writeStartElement("TableBorderRight");
-		foreach (TableBorderLine tbl, tbRight.borderLines())
+		foreach (const TableBorderLine& tbl, tbRight.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -1003,7 +1003,7 @@
 	{
 		TableBorder tbTop = style.topBorder();
 		docu.writeStartElement("TableBorderTop");
-		foreach (TableBorderLine tbl, tbTop.borderLines())
+		foreach (const TableBorderLine& tbl, tbTop.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -1018,7 +1018,7 @@
 	{
 		TableBorder tbBottom = style.bottomBorder();
 		docu.writeStartElement("TableBorderBottom");
-		foreach (TableBorderLine tbl, tbBottom.borderLines())
+		foreach (const TableBorderLine& tbl, tbBottom.borderLines())
 		{
 			docu.writeStartElement("TableBorderLine");
 			docu.writeAttribute("Width", tbl.width());
@@ -1085,10 +1085,10 @@
 	docu.writeAttribute("filename", m_Doc->Print_Options.filename);
 	docu.writeAttribute("separationName", m_Doc->Print_Options.separationName);
 	docu.writeAttribute("printerCommand", m_Doc->Print_Options.printerCommand);
-	for (int p = 0; p < m_Doc->Print_Options.allSeparations.count(); ++p)
+	for (int i = 0; i < m_Doc->Print_Options.allSeparations.count(); ++i)
 	{
 		docu.writeEmptyElement("Separation");
-		docu.writeAttribute("Name", m_Doc->Print_Options.allSeparations[p]);
+		docu.writeAttribute("Name", m_Doc->Print_Options.allSeparations[i]);
 	}
 	docu.writeEndElement();
 }
@@ -1516,7 +1516,6 @@
 	uint ObCount = maxC;
 	ScPage *page;
 	uint pages;
-	QString tmp;
 	if (master)
 		pages = doc->MasterPages.count();
 	else
@@ -2262,7 +2261,7 @@
 			{
 				TableBorder tbLeft = tableItem->leftBorder();
 				docu.writeStartElement("TableBorderLeft");
-				foreach (TableBorderLine tbl, tbLeft.borderLines())
+				foreach (const TableBorderLine& tbl, tbLeft.borderLines())
 				{
 					docu.writeStartElement("TableBorderLine");
 					docu.writeAttribute("Width", tbl.width());
@@ -2277,7 +2276,7 @@
 			{
 				TableBorder tbRight = tableItem->rightBorder();
 				docu.writeStartElement("TableBorderRight");
-				foreach (TableBorderLine tbl, tbRight.borderLines())
+				foreach (const TableBorderLine& tbl, tbRight.borderLines())
 				{
 					docu.writeStartElement("TableBorderLine");
 					docu.writeAttribute("Width", tbl.width());
@@ -2292,7 +2291,7 @@
 			{
 				TableBorder tbTop = tableItem->topBorder();
 				docu.writeStartElement("TableBorderTop");
-				foreach (TableBorderLine tbl, tbTop.borderLines())
+				foreach (const TableBorderLine& tbl, tbTop.borderLines())
 				{
 					docu.writeStartElement("TableBorderLine");
 					docu.writeAttribute("Width", tbl.width());
@@ -2307,7 +2306,7 @@
 			{
 				TableBorder tbBottom = tableItem->bottomBorder();
 				docu.writeStartElement("TableBorderBottom");
-				foreach (TableBorderLine tbl, tbBottom.borderLines())
+				foreach (const TableBorderLine& tbl, tbBottom.borderLines())
 				{
 					docu.writeStartElement("TableBorderLine");
 					docu.writeAttribute("Width", tbl.width());
@@ -2361,7 +2360,7 @@
 						TableBorder tbLeft = cell.leftBorder();
 						docu.writeStartElement("TableBorderLeft");
 						docu.writeAttribute("Width", tbLeft.width());
-						foreach (TableBorderLine tbl, tbLeft.borderLines())
+						foreach (const TableBorderLine& tbl, tbLeft.borderLines())
 						{
 							docu.writeStartElement("TableBorderLine");
 							docu.writeAttribute("Width", tbl.width());
@@ -2377,7 +2376,7 @@
 						TableBorder tbRight = cell.rightBorder();
 						docu.writeStartElement("TableBorderRight");
 						docu.writeAttribute("Width", tbRight.width());
-						foreach (TableBorderLine tbl, tbRight.borderLines())
+						foreach (const TableBorderLine& tbl, tbRight.borderLines())
 						{
 							docu.writeStartElement("TableBorderLine");
 							docu.writeAttribute("Width", tbl.width());
@@ -2393,7 +2392,7 @@
 						TableBorder tbTop = cell.topBorder();
 						docu.writeStartElement("TableBorderTop");
 						docu.writeAttribute("Width", tbTop.width());
-						foreach (TableBorderLine tbl, tbTop.borderLines())
+						foreach (const TableBorderLine& tbl, tbTop.borderLines())
 						{
 							docu.writeStartElement("TableBorderLine");
 							docu.writeAttribute("Width", tbl.width());
@@ -2409,7 +2408,7 @@
 						TableBorder tbBottom = cell.bottomBorder();
 						docu.writeStartElement("TableBorderBottom");
 						docu.writeAttribute("Width", tbBottom.width());
-						foreach (TableBorderLine tbl, tbBottom.borderLines())
+						foreach (const TableBorderLine& tbl, tbBottom.borderLines())
 						{
 							docu.writeStartElement("TableBorderLine");
 							docu.writeAttribute("Width", tbl.width());
@@ -2453,8 +2452,6 @@
 
 void Scribus150Format::SetItemProps(ScXmlStreamWriter& docu, PageItem* item, const QString& baseDir)
 {
-//	double xf, yf;
-	QString tmp, tmpy;
 	docu.writeAttribute("OwnPage", item->OwnPage);
 	docu.writeAttribute("ItemID", qHash(item) & 0x7FFFFFFF);
 	docu.writeAttribute("PTYPE",item->realItemType());
@@ -2712,6 +2709,7 @@
 		docu.writeAttribute("SOFTSHADOWOBJTRANS",item->softShadowHasObjectTransparency());
 	}
 
+	QString tmp;
 	if (item->isTable())
 	{
 		//PTYPE == PageItem::Table or 16 (pageitem.h)

Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	Fri Apr 21 11:57:46 2017
@@ -644,7 +644,6 @@
 
 void ODTIm::parseTextSpan(QDomElement &elem, PageItem* item, ParagraphStyle &tmpStyle, CharStyle &tmpCStyle, ObjStyleODT &tmpOStyle, int &posC)
 {
-	QString txt = "";
 	ObjStyleODT cStyle = tmpOStyle;
 	if (elem.hasAttribute("text:style-name"))
 		resovleStyle(cStyle, elem.attribute("text:style-name"));

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	Fri Apr 21 11:57:46 2017
@@ -85,7 +85,6 @@
  	          (name == "text:list-level-style-number") ||
  	          (name == "text:list-level-style-image")) && (inList))
  	{
- 		QString level = "";
  		for (int i = 0; i < attrs.count(); ++i)
  		{
  			if (attrs.localName(i) == "text:level")
@@ -822,4 +821,4 @@
  	QString nname = QString((const char*) name).toLower();
  	sreader->endElement(NULL, NULL, nname);
  }
- 
+ 

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp	Fri Apr 21 11:57:46 2017
@@ -89,7 +89,7 @@
 		fT.close();
 		if (tempBuf.startsWith("%PDF"))
 		{
-			QString tmp, cmd1, cmd2;
+			QString tmp;
 			QString pdfFile = QDir::toNativeSeparators(fName);
 			QString tmpFile = QDir::toNativeSeparators(ScPaths::tempFileDir() + "sc.png");
 			int ret = -1;
@@ -762,7 +762,7 @@
 
 bool AIPlug::parseHeader(QString fName, double &x, double &y, double &b, double &h)
 {
-	QString tmp, BBox, tmp2, FarNam;
+	QString tmp, BBox, FarNam;
 	ScColor cc;
 	double c, m, yc, k;
 	bool found = false;
@@ -1132,7 +1132,6 @@
 	Code >> m;
 	Code >> y;
 	Code >> k;
-	QString tmpS = data;
 	int an = data.indexOf("(");
 	int en = data.lastIndexOf(")");
 	QString FarNam = data.mid(an+1, en-an-1);
@@ -1188,7 +1187,6 @@
 		tmp.setColor(Cc, Mc, Yc, Kc);
 		meshColorMode = 0;
 	}
-	QString tmpS = data;
 	int an = data.indexOf("(");
 	int en = data.lastIndexOf(")");
 	QString FarNam = data.mid(an+1, en-an-1);
@@ -2647,7 +2645,6 @@
 		command = da2.last();
 		if (command == "Bd")
 		{
-			QString tmpS = Cdata;
 			int an = Cdata.indexOf("(");
 			int en = Cdata.lastIndexOf(")");
 			currentGradientName = Cdata.mid(an+1, en-an-1);
@@ -2870,8 +2867,7 @@
 
 void AIPlug::processSymbol(QDataStream &ts, bool sym)
 {
-	QString tmp = "";
-	QString tmpData = "";
+	QString tmp;
 	while (!ts.atEnd())
 	{
 		tmp = removeAIPrefix(readLinefromDataStream(ts));
@@ -2989,7 +2985,6 @@
 //		cmyk = true;
 	if (tmp.startsWith("%%BeginData"))
 	{
-		QString dummyS;
 		ScTextStream gVals2(&tmp, QIODevice::ReadOnly);
 		tmp = readLinefromDataStream(ts);
 	}
@@ -3226,7 +3221,6 @@
 	}
 	else if (tmp.startsWith("BeginTextDocument"))
 	{
-		QString dataStringT = "";
 		tmp = removeAIPrefix(readLinefromDataStream(ts));
 		while (!ts.atEnd())
 		{

Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp	Fri Apr 21 11:57:46 2017
@@ -365,7 +365,6 @@
 
 bool CgmPlug::convert(QString fn)
 {
-	QString tmp;
 	Coords.resize(0);
 	Coords.svgInit();
 	importedColors.clear();

Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp	Fri Apr 21 11:57:46 2017
@@ -333,7 +333,6 @@
 
 bool CvgPlug::convert(QString fn)
 {
-	QString tmp;
 	CurrColorFill = "Black";
 	CurrFillShade = 100.0;
 	CurrColorStroke = "Black";

Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp	Fri Apr 21 11:57:46 2017
@@ -343,7 +343,6 @@
 
 bool DrwPlug::convert(QString fn)
 {
-	QString tmp;
 	Coords.resize(0);
 	Coords.svgInit();
 	importedColors.clear();
@@ -484,7 +483,6 @@
 	quint8 data8, chData;
 	quint16 data16;
 	int index;
-	QFont font;
 	QString textFont;
 	ds.setByteOrder(QDataStream::LittleEndian);
 	QString cmdText = QString("Record %1 Type: ").arg(recordCount);

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	Fri Apr 21 11:57:46 2017
@@ -613,7 +613,7 @@
 //	double BaseY = m_Doc->currentPage()->yOffset();
 	storeObjectStyles(e);
 	parseStyle(oostyle, e);
-	QString drawID = e.attribute("draw:name");
+//	QString drawID = e.attribute("draw:name");
 //	int zn = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, BaseX, BaseY, 1, 1, 0, CommonStrings::None, CommonStrings::None);
 //	PageItem *neu = m_Doc->Items->at(zn);
 	for (QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling())

Modified: trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpct.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpct.cpp	Fri Apr 21 11:57:46 2017
@@ -422,7 +422,6 @@
 
 bool PctPlug::convert(QString fn)
 {
-	QString tmp;
 	CurrColorFill = "White";
 	CurrFillShade = 100.0;
 	CurrColorStroke = "Black";

Modified: trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	Fri Apr 21 11:57:46 2017
@@ -407,7 +407,6 @@
 
 void ShapePlug::parseGroup(QDomNode &DOC)
 {
-	QString tmp = "";
 	QString FillCol = "White";
 	QString StrokeCol = "Black";
 	QString defFillCol = "White";
@@ -666,8 +665,6 @@
 
 void ShapePlug::parseGroupProperties(QDomNode &DOC, double &minXCoor, double &minYCoor, double &maxXCoor, double &maxYCoor, bool &firstCheck)
 {
-	QString FillCol = "White";
-	QString StrokeCol = "Black";
 	while(!DOC.isNull())
 	{
 		double x1, y1, x2, y2;

Modified: trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsml.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsml.cpp	Fri Apr 21 11:57:46 2017
@@ -339,7 +339,6 @@
 
 bool SmlPlug::convert(QString fn)
 {
-	QString tmp;
 	CurrColorFill = "White";
 	CurrFillShade = 100.0;
 	CurrColorStroke = "Black";

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	Fri Apr 21 11:57:46 2017
@@ -327,7 +327,6 @@
 
 bool SVGPlug::loadData(QString fName)
 {
-	QString f("");
 	bool isCompressed = false, success = false;
 	QByteArray bb(3, ' ');
 	QFile fi(fName);
@@ -2388,7 +2387,7 @@
 
 QString SVGPlug::parseIccColor( const QString &s )
 {
-	QColor color, tmpR;
+	QColor color;
 	QString ret;
 	bool iccColorFound = false;
 	int iccColorIndex  = s.indexOf("icc-color");

Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp	Fri Apr 21 11:57:46 2017
@@ -683,7 +683,6 @@
 
 bool WpgPlug::convert(QString fn)
 {
-	QString tmp;
 	importedColors.clear();
 
 	QFile file(fn);

Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp	Fri Apr 21 11:57:46 2017
@@ -454,7 +454,6 @@
 
 bool XarPlug::convert(QString fn)
 {
-	QString tmp;
 	Coords.resize(0);
 	Coords.svgInit();
 	imageData.resize(0);

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	Fri Apr 21 11:57:46 2017
@@ -452,8 +452,6 @@
 
 bool XfigPlug::parseHeader(QString fName, double &x, double &y, double &b, double &h)
 {
-	QString tmp, BBox, tmp2, FarNam;
-	ScColor cc;
 	bool found = false;
 	QFile f(fName);
 	if (f.open(QIODevice::ReadOnly))

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	Fri Apr 21 11:57:46 2017
@@ -371,7 +371,6 @@
 {
 	char *name = const_cast<char*>("");
 	char *file;
-	QString data;
 
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &file, "utf-8", &name)) {
 		return NULL;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	Fri Apr 21 11:57:46 2017
@@ -1372,8 +1372,6 @@
 // apply presentation attribute
 	pdfOptions.PresentMode = self->presentation;
 
-	QList<PDFPresentationData> PresentVals;
-	PresentVals.clear();
 	int tmpnum = PyList_Size(self->effval);
 	for (int i = 0; i < tmpnum; ++i) 
 	{

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	Fri Apr 21 11:57:46 2017
@@ -395,7 +395,7 @@
 		return NULL;
 	}
 // copied from void ScribusMainWindow::slotFilePrint() in file scribus.cpp
-	QString fna, prn, cmd, scmd, cc, data, SepName;
+	QString fna, prn, cmd, cc, SepName;
 	QString printcomm;
 	bool fil, PSfile;
 	PSfile = false;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	Fri Apr 21 11:57:46 2017
@@ -292,7 +292,7 @@
 	numberFormat.setForeground(colors.numberColor);
 	operatorFormat.setForeground(colors.signColor);
 
-	foreach (QString kw, keywords)
+	foreach (const QString& kw, keywords)
 	{
 		rule.pattern = QRegExp("\\b" + kw + "\\b", Qt::CaseInsensitive);
 		rule.format = keywordFormat;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	Fri Apr 21 11:57:46 2017
@@ -161,7 +161,6 @@
 
 bool ScriptPlugin::initPlugin()
 {
-	QString cm;
 #if defined(Q_OS_WIN)
 	QString pyHome = qApp->applicationDirPath() + "/python";
 	if (QDir(pyHome).exists())

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp	(original)
+++ trunk/Scribus/scribus/prefsmanager.cpp	Fri Apr 21 11:57:46 2017
@@ -1738,7 +1738,8 @@
 	dcExternalTools.setAttribute("LatexForceDpi", static_cast<int>(appPrefs.extToolPrefs.latexForceDpi));
 	dcExternalTools.setAttribute("LatexStartWithEmptyFrames", static_cast<int>(appPrefs.extToolPrefs.latexStartWithEmptyFrames));
 	QStringList configs = latexConfigs();
-	foreach (QString config, configs) {
+	foreach (const QString& config, configs)
+	{
 		QDomElement domConfig = docu.createElement("LatexConfig");
 		domConfig.setAttribute("file", config);
 		domConfig.setAttribute("command", appPrefs.extToolPrefs.latexCommands[config]);

Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp	(original)
+++ trunk/Scribus/scribus/scfonts.cpp	Fri Apr 21 11:57:46 2017
@@ -437,9 +437,9 @@
 	if (!names.isEmpty())
 	{
 		std::sort(names.begin(), names.end(), nameComp);
-		foreach (const FT_SfntName name, names)
-		{
-			QString string = decodeNameRecord(name);
+		foreach (const FT_SfntName& name, names)
+		{
+			QString string(decodeNameRecord(name));
 			if (!string.isEmpty())
 			{
 				familyName = string;

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Apr 21 11:57:46 2017
@@ -15934,9 +15934,9 @@
 	}
 }
 
-QMap<PageItem*, QString> ScribusDoc::getDocItemNames(PageItem::ItemType itemType)
-{
-	QMap<PageItem*, QString> namesMap;
+QHash<PageItem*, QString> ScribusDoc::getDocItemNames(PageItem::ItemType itemType)
+{
+	QHash<PageItem*, QString> namesMap;
 	QList<PageItem*> allItems;
 	int docItemsCount = DocItems.count();
 	for (int i = 0; i < docItemsCount; ++i)
@@ -16577,7 +16577,7 @@
 
 bool ScribusDoc::updateLocalNums(StoryText& itemText)
 {
-	QList<Numeration> m_nums;
+	QVector<Numeration> m_nums;
 	QList<int> m_counters;
 	bool needUpdate = false;
 	for (int pos = 0; pos < itemText.length(); ++pos)

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Fri Apr 21 11:57:46 2017
@@ -1166,7 +1166,7 @@
 	void rotateGroup(double angle, FPoint RCenter, Selection* customSelection = 0);
 	void scaleGroup(double scx, double scy, bool scaleText=true, Selection* customSelection = 0, bool scaleLine = false);
 	//! \brief Get a list of frames of certain type
-	QMap<PageItem*, QString> getDocItemNames(PageItem::ItemType itemType);
+	QHash<PageItem*, QString> getDocItemNames(PageItem::ItemType itemType);
 	//! \brief Returns a serializer for this document
 	Serializer *serializer();
 	//! \brief Returns a text serializer for this document, used to paste text chunks

Modified: trunk/Scribus/scribus/ui/aboutplugins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/aboutplugins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aboutplugins.cpp	(original)
+++ trunk/Scribus/scribus/ui/aboutplugins.cpp	Fri Apr 21 11:57:46 2017
@@ -80,7 +80,7 @@
 		desc += QString("<p>%1</p>").arg(about->shortDescription);
 	if (!about->description.isNull())
 		desc += QString("<p>%1</p>").arg(about->description);
-	html += QString("<h2>%1</h2>%2").arg( tr("Description:")).arg(desc);
+	html += QString("<h2>%1</h2>%2").arg( tr("Description:"), desc);
 	html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Author(s):"), htmlize(about->authors));
 	html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Copyright:"), htmlize(about->copyright));
 	html += QString("<h2>%1</h2><p>%2</p>").arg( tr("License:"), htmlize(about->license));

Modified: trunk/Scribus/scribus/ui/copypagetomasterpagedialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/copypagetomasterpagedialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/copypagetomasterpagedialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/copypagetomasterpagedialog.cpp	Fri Apr 21 11:57:46 2017
@@ -31,7 +31,7 @@
 		pagePositionComboBox->hide();
 	else
 	{
-		foreach (QString untranslatedPageName, pageLocations)
+		foreach (const QString& untranslatedPageName, pageLocations)
 			pagePositionComboBox->addItem(CommonStrings::translatePageSetLocString(untranslatedPageName));
 		pagePositionComboBox->setCurrentIndex(currentLocation);
 	}

Modified: trunk/Scribus/scribus/ui/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/insertaframe.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.cpp	(original)
+++ trunk/Scribus/scribus/ui/insertaframe.cpp	Fri Apr 21 11:57:46 2017
@@ -209,7 +209,7 @@
 	iafData.linkToExistingFramePtr=NULL;
 	if (comboBoxLinkToExistingFrameName->count()!=0)
 	{
-		QMapIterator<PageItem*, QString> i(pageItemMap);
+		QHashIterator<PageItem*, QString> i(pageItemMap);
 		while (i.hasNext())
 		{
 			i.next();

Modified: trunk/Scribus/scribus/ui/insertaframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/insertaframe.h
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.h	(original)
+++ trunk/Scribus/scribus/ui/insertaframe.h	Fri Apr 21 11:57:46 2017
@@ -45,7 +45,7 @@
 	QButtonGroup *pagePlacementButtonGroup;
 	QButtonGroup *framePositionButtonGroup;
 	QButtonGroup *sizeButtonGroup;
-	QMap<PageItem*, QString> pageItemMap;
+	QHash<PageItem*, QString> pageItemMap;
 	
 protected slots:
 	void slotSelectType(int id);

Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp	(original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp	Fri Apr 21 11:57:46 2017
@@ -493,12 +493,11 @@
 {
 	if (currItem != NULL)
 	{
-		ExtImageProps* dia = new ExtImageProps(this, &currItem->pixm.imgInfo, currItem, m_Doc->view());
-		dia->exec();
+		ExtImageProps dia(this, &currItem->pixm.imgInfo, currItem, m_Doc->view());
+		dia.exec();
 		loadPict(currItem->Pfile);
 		refreshItem(currItem);
 		imageViewArea->currentItem()->setIcon(createImgIcon(currItem));
-		delete dia;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/prefs_externaltools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/prefs_externaltools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_externaltools.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_externaltools.cpp	Fri Apr 21 11:57:46 2017
@@ -63,7 +63,7 @@
 	latexConfigsListWidget->clear();
 	QStringList configs = prefsData->extToolPrefs.latexConfigs;
 	commands = prefsData->extToolPrefs.latexCommands;
-	foreach (QString config, configs)
+	foreach (const QString& config, configs)
 		insertConfigItem(config);
 	latexConfigsListWidget->setCurrentRow(0);
 	pdfViewerLineEdit->setText(QDir::toNativeSeparators(prefsData->extToolPrefs.pdfViewerExecutable));
@@ -176,7 +176,7 @@
 				/*Linux */ "kwrite" << "kate" << "gedit" << "gvim" <<
 				/*Windows */ "notepad" <<
 				/*Mac OS*/ "open";
-		foreach (QString editor, editors)
+		foreach (const QString& editor, editors)
 		{
 			if (fileInPath(editor))
 			{

Modified: trunk/Scribus/scribus/ui/resourcemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/resourcemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/resourcemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/resourcemanager.cpp	Fri Apr 21 11:57:46 2017
@@ -1061,12 +1061,10 @@
 								QDir dir(toDir);
 								if (dir.exists())
 								{
-									foreach (QString f2e, zipContents)
+									foreach (const QString& f2e, zipContents)
 									{
 										if (extractFiles.contains(f2e))
-										{
 											fun->extract(f2e, toDir, ScZipHandler::SkipPaths);
-										}
 									}
 								}
 							}

Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp	Fri Apr 21 11:57:46 2017
@@ -388,7 +388,7 @@
 			QStringList neededColors;
 			neededColors.clear();
 
-			foreach (QString aStyle, dia2->paragraphStyles())
+			foreach (const QString& aStyle, dia2->paragraphStyles())
 			{
 				ParagraphStyle& sty(tmpParaStyles[tmpParaStyles.find(aStyle)]);
 				if (dia2->clashRename())
@@ -410,7 +410,7 @@
 					neededColors.append(sty.charStyle().fillColor());
 			}
 
-			foreach (QString aStyle, dia2->characterStyles())
+			foreach (const QString& aStyle, dia2->characterStyles())
 			{
 				CharStyle& sty(tmpCharStyles[tmpCharStyles.find(/*it.data()*/aStyle)]);
 				if (dia2->clashRename())
@@ -432,7 +432,7 @@
 					neededColors.append(sty.fillColor());
 			}
 
-			foreach (QString aStyle, dia2->lineStyles())
+			foreach (const QString& aStyle, dia2->lineStyles())
 			{
 				multiLine &sty = tmpLineStyles[/*it.data()*/aStyle];
 				QString styName = aStyle;

Modified: trunk/Scribus/scribus/upgradechecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/upgradechecker.cpp
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.cpp	(original)
+++ trunk/Scribus/scribus/upgradechecker.cpp	Fri Apr 21 11:57:46 2017
@@ -85,7 +85,7 @@
 		{
 			QString hostname("services.scribus.net");
 			QString filepath("/"+filename);
-			QUrl fileURL(QString("https://%1%2").arg(hostname).arg(filepath));
+			QUrl fileURL(QString("https://%1%2").arg(hostname, filepath));
 			outputText("<b>"+ tr("Attempting to get the Scribus version update file:")+"</b>");
 			outputText(fileURL.toString());
 

Modified: trunk/Scribus/scribus/util_file.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21951&path=/trunk/Scribus/scribus/util_file.cpp
==============================================================================
--- trunk/Scribus/scribus/util_file.cpp	(original)
+++ trunk/Scribus/scribus/util_file.cpp	Fri Apr 21 11:57:46 2017
@@ -218,7 +218,7 @@
 	//Get $PATH
 	QStringList env = QProcess::systemEnvironment();
 	QString path;
-	foreach (QString line, env)
+	foreach (const QString& line, env)
 	{
 		if (line.indexOf("PATH") == 0)
 		{
@@ -232,7 +232,7 @@
 	#else
 		splitpath = path.split(':', QString::SkipEmptyParts);
 	#endif
-	foreach (QString dir, splitpath)
+	foreach (const QString& dir, splitpath)
 	{
 		QFileInfo info(dir, file);
 		if (info.exists())




More information about the scribus-commit mailing list