]> Some of my projects - localmylist.git/commitdiff
Use provided key, not it.key()
authorAPTX <marek321@gmail.com>
Tue, 7 May 2013 22:50:05 +0000 (00:50 +0200)
committerAPTX <marek321@gmail.com>
Tue, 7 May 2013 22:50:05 +0000 (00:50 +0200)
The iterator is invalid if it can not find the key.

localmylist/settings.cpp

index 4b34eaef4dc87212b02abd8f98cf0e4444efafa8..84501aff56faa485a8ed2ae6fc3cee6d8d215954 100644 (file)
@@ -45,7 +45,7 @@ QVariant Settings::get(const QString &key) const
        if (it != settings.end())
                return it.value();
 
-       qWarning() << "Trying to read undefined setting" << it.key();
+       qWarning() << "Trying to read undefined setting" << key;
        return QVariant();
 }