[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib
From:       Eckhart Wörner <ew () ewsoftware ! de>
Date:       2008-11-16 1:02:22
Message-ID: 1226797342.017605.7090.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 884846 by ewoerner:

Do not use qDebug() with anything that has side-effects
BUG: 175003


 M  +4 -4      MapThemeManager.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MapThemeManager.cpp #884845:884846
@@ -19,6 +19,7 @@
 #include <QtCore/QFileInfo>
 #include <QtCore/QFileSystemWatcher>
 #include <QtGui/QStandardItemModel>
+#include <QtCore/QString>
 #include <QtCore/QStringList>
 #include <QtCore/QTimer>
 #include <QtCore/QDebug>
@@ -68,11 +69,10 @@
 
 void MapThemeManager::initFileSystemWatcher()
 {
-    QStringList paths = pathsToWatch();
+    const QStringList paths = pathsToWatch();
 
-    QStringListIterator it( paths );
-    while ( it.hasNext() )
-        qDebug() << "path to watch: " << it.next();
+    foreach(const QString& path, paths)
+        qDebug() << "path to watch: " << path;
 
     d->m_fileSystemWatcher = new QFileSystemWatcher( paths, this );
     connect( d->m_fileSystemWatcher, SIGNAL( directoryChanged( const QString& )),
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic