r24795 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 3 19:52:56 UTC 2022


Author: jghali
Date: Mon Jan  3 19:52:55 2022
New Revision: 24795

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

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/colorsandfills.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24795&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Jan  3 19:52:55 2022
@@ -7095,22 +7095,22 @@
 	if (doc->pdfOptions().EmbedList.count() != 0)
 	{
 		QList<QString> tmpEm;
-		QList<QString>::Iterator itef;
-		for (itef = doc->pdfOptions().EmbedList.begin(); itef != doc->pdfOptions().EmbedList.end(); ++itef)
-		{
-			if (ReallyUsed.contains((*itef)))
-				tmpEm.append((*itef));
+		const auto& fontsToEmbed = doc->pdfOptions().EmbedList;
+		for (const auto& fontName : fontsToEmbed)
+		{
+			if (ReallyUsed.contains(fontName))
+				tmpEm.append(fontName);
 		}
 		doc->pdfOptions().EmbedList = tmpEm;
 	}
 	if (doc->pdfOptions().SubsetList.count() != 0)
 	{
 		QList<QString> tmpEm;
-		QList<QString>::Iterator itef;
-		for (itef = doc->pdfOptions().SubsetList.begin(); itef != doc->pdfOptions().SubsetList.end(); ++itef)
-		{
-			if (ReallyUsed.contains((*itef)))
-				tmpEm.append((*itef));
+		const auto& fontsToSubset = doc->pdfOptions().SubsetList;
+		for (const auto& fontName : fontsToSubset)
+		{
+			if (ReallyUsed.contains(fontName))
+				tmpEm.append(fontName);
 		}
 		doc->pdfOptions().SubsetList = tmpEm;
 	}

Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24795&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp	Mon Jan  3 19:52:55 2022
@@ -149,6 +149,7 @@
 	dataTree->setSelectionMode(QAbstractItemView::ExtendedSelection);
 	dataTree->setCurrentItem(dataTree->topLevelItem(0));
 	itemSelected(dataTree->currentItem());
+
 	connect(dataTree, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(itemSelected(QTreeWidgetItem*)));
 	connect(dataTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(selEditColor(QTreeWidgetItem*)));
 	connect(dataTree, SIGNAL(itemSelectionChanged()), this, SLOT(itemSelectionChanged()));




More information about the scribus-commit mailing list