diff --git a/animator.cpp b/animator.cpp index 12de0263f..c2bc4308a 100644 --- a/animator.cpp +++ b/animator.cpp @@ -511,7 +511,7 @@ void Animator::setInitialPixmap(int id, const QPixmap &pixmap) QPixmap Animator::currentPixmap(int id) { - QMap::const_iterator it = d->animatedElements.find(id); + QMap::const_iterator it = d->animatedElements.constFind(id); if (it == d->animatedElements.constEnd()) { //kDebug() << "Animator::currentPixmap(" << id << ") found no entry for it!"; diff --git a/dataengine.cpp b/dataengine.cpp index db44f1b83..e37943e89 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -535,7 +535,7 @@ bool DataEnginePrivate::isUsed() const DataContainer *DataEnginePrivate::source(const QString &sourceName, bool createWhenMissing) { - DataEngine::SourceDict::const_iterator it = sources.find(sourceName); + DataEngine::SourceDict::const_iterator it = sources.constFind(sourceName); if (it != sources.constEnd()) { DataContainer *s = it.value(); if (limit > 0) { diff --git a/dataenginemanager.cpp b/dataenginemanager.cpp index 6e94e1a3f..9bf78d43b 100644 --- a/dataenginemanager.cpp +++ b/dataenginemanager.cpp @@ -95,8 +95,8 @@ DataEngineManager::~DataEngineManager() Plasma::DataEngine *DataEngineManager::engine(const QString &name) const { - Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name); - if (it != d->engines.end()) { + Plasma::DataEngine::Dict::const_iterator it = d->engines.constFind(name); + if (it != d->engines.constEnd()) { // ref and return the engine //Plasma::DataEngine *engine = *it; return *it; @@ -108,9 +108,9 @@ Plasma::DataEngine *DataEngineManager::engine(const QString &name) const Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name) { Plasma::DataEngine *engine = 0; - Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name); + Plasma::DataEngine::Dict::const_iterator it = d->engines.constFind(name); - if (it != d->engines.end()) { + if (it != d->engines.constEnd()) { engine = *it; engine->d->ref(); return engine; diff --git a/packagestructure.cpp b/packagestructure.cpp index d1d9d3fe8..fb67cc402 100644 --- a/packagestructure.cpp +++ b/packagestructure.cpp @@ -261,7 +261,7 @@ void PackageStructure::addFileDefinition(const char *key, const QString &path, c QString PackageStructure::path(const char *key) const { //kDebug() << "looking for" << key; - QMap::const_iterator it = d->contents.find(key); + QMap::const_iterator it = d->contents.constFind(key); if (it == d->contents.constEnd()) { return QString(); } @@ -272,7 +272,7 @@ QString PackageStructure::path(const char *key) const QString PackageStructure::name(const char *key) const { - QMap::const_iterator it = d->contents.find(key); + QMap::const_iterator it = d->contents.constFind(key); if (it == d->contents.constEnd()) { return QString(); } @@ -292,7 +292,7 @@ void PackageStructure::setRequired(const char *key, bool required) bool PackageStructure::isRequired(const char *key) const { - QMap::const_iterator it = d->contents.find(key); + QMap::const_iterator it = d->contents.constFind(key); if (it == d->contents.constEnd()) { return false; } @@ -317,7 +317,7 @@ void PackageStructure::setMimetypes(const char *key, QStringList mimetypes) QStringList PackageStructure::mimetypes(const char *key) const { - QMap::const_iterator it = d->contents.find(key); + QMap::const_iterator it = d->contents.constFind(key); if (it == d->contents.constEnd()) { return QStringList(); } diff --git a/private/datacontainer_p.cpp b/private/datacontainer_p.cpp index 879934cbe..0f58606ed 100644 --- a/private/datacontainer_p.cpp +++ b/private/datacontainer_p.cpp @@ -28,11 +28,11 @@ SignalRelay *DataContainerPrivate::signalRelay(const DataContainer *dc, QObject Plasma::IntervalAlignment align, bool immediateUpdate) { - QMap::const_iterator relayIt = relays.find(pollingInterval); + QMap::const_iterator relayIt = relays.constFind(pollingInterval); SignalRelay *relay = 0; //FIXME what if we have two applets with the same interval and different alignment? - if (relayIt == relays.end()) { + if (relayIt == relays.constEnd()) { relay = new SignalRelay(const_cast(dc), this, pollingInterval, align, immediateUpdate); relays[pollingInterval] = relay; diff --git a/svg.cpp b/svg.cpp index e048345c9..60207ce98 100644 --- a/svg.cpp +++ b/svg.cpp @@ -250,9 +250,9 @@ class SvgPrivate //kDebug() << "FAIL! **************************"; //kDebug() << path << "**"; - QHash::const_iterator it = s_renderers.find(path); + QHash::const_iterator it = s_renderers.constFind(path); - if (it != s_renderers.end()) { + if (it != s_renderers.constEnd()) { //kDebug() << "gots us an existing one!"; renderer = it.value(); } else {