r24905 by jghali - Qt6: remove some foreach

scribus-commit scribus-commit at lists.scribus.net
Fri Feb 4 22:46:04 UTC 2022


Author: jghali
Date: Fri Feb  4 22:46:04 2022
New Revision: 24905

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24905
Log:
Qt6: remove some foreach

Modified:
    trunk/Scribus/scribus/scimagecachedir.cpp

Modified: trunk/Scribus/scribus/scimagecachedir.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24905&path=/trunk/Scribus/scribus/scimagecachedir.cpp
==============================================================================
--- trunk/Scribus/scribus/scimagecachedir.cpp	(original)
+++ trunk/Scribus/scribus/scimagecachedir.cpp	Fri Feb  4 22:46:04 2022
@@ -64,13 +64,13 @@
 {
 	if (m_dirs)
 	{
-		foreach (ScImageCacheDir *p, *m_dirs)
+		for (ScImageCacheDir *p : *m_dirs)
 			delete p;
 		delete m_dirs;
 	}
 	if (m_files)
 	{
-		foreach (ScImageCacheFile *p, *m_files)
+		for (ScImageCacheFile *p : *m_files)
 			delete p;
 		delete m_files;
 	}
@@ -135,8 +135,10 @@
 	{
 		scDebug() << path() << "is modified";
 		if (m_dirs)
-			foreach (ScImageCacheDir *p, *m_dirs)
+		{
+			for (ScImageCacheDir* p : *m_dirs)
 				p->update();
+		}
 		if (m_files)
 			scan();
 	}
@@ -148,7 +150,7 @@
 	{
 		if (!m_files->isEmpty())
 		{
-			foreach (ScImageCacheFile *p, *m_files)
+			for (ScImageCacheFile *p : *m_files)
 			{
 				emit fileRemoved(p);
 				delete p;




More information about the scribus-commit mailing list