Fix iterator

svn path=/trunk/KDE/kdelibs/; revision=906617
This commit is contained in:
Laurent Montel 2009-01-06 13:09:05 +00:00
parent 0ced881246
commit eebb6178a5
6 changed files with 14 additions and 14 deletions

View File

@ -511,7 +511,7 @@ void Animator::setInitialPixmap(int id, const QPixmap &pixmap)
QPixmap Animator::currentPixmap(int id)
{
QMap<int, ElementAnimationState*>::const_iterator it = d->animatedElements.find(id);
QMap<int, ElementAnimationState*>::const_iterator it = d->animatedElements.constFind(id);
if (it == d->animatedElements.constEnd()) {
//kDebug() << "Animator::currentPixmap(" << id << ") found no entry for it!";

View File

@ -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) {

View File

@ -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;

View File

@ -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<QByteArray, ContentStructure>::const_iterator it = d->contents.find(key);
QMap<QByteArray, ContentStructure>::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<QByteArray, ContentStructure>::const_iterator it = d->contents.find(key);
QMap<QByteArray, ContentStructure>::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<QByteArray, ContentStructure>::const_iterator it = d->contents.find(key);
QMap<QByteArray, ContentStructure>::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<QByteArray, ContentStructure>::const_iterator it = d->contents.find(key);
QMap<QByteArray, ContentStructure>::const_iterator it = d->contents.constFind(key);
if (it == d->contents.constEnd()) {
return QStringList();
}

View File

@ -28,11 +28,11 @@ SignalRelay *DataContainerPrivate::signalRelay(const DataContainer *dc, QObject
Plasma::IntervalAlignment align,
bool immediateUpdate)
{
QMap<uint, SignalRelay *>::const_iterator relayIt = relays.find(pollingInterval);
QMap<uint, SignalRelay *>::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<DataContainer*>(dc), this,
pollingInterval, align, immediateUpdate);
relays[pollingInterval] = relay;

View File

@ -250,9 +250,9 @@ class SvgPrivate
//kDebug() << "FAIL! **************************";
//kDebug() << path << "**";
QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = s_renderers.find(path);
QHash<QString, SharedSvgRenderer::Ptr>::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 {