Fix iterator
svn path=/trunk/KDE/kdelibs/; revision=906617
This commit is contained in:
parent
0ced881246
commit
eebb6178a5
@ -511,7 +511,7 @@ void Animator::setInitialPixmap(int id, const QPixmap &pixmap)
|
|||||||
|
|
||||||
QPixmap Animator::currentPixmap(int id)
|
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()) {
|
if (it == d->animatedElements.constEnd()) {
|
||||||
//kDebug() << "Animator::currentPixmap(" << id << ") found no entry for it!";
|
//kDebug() << "Animator::currentPixmap(" << id << ") found no entry for it!";
|
||||||
|
@ -535,7 +535,7 @@ bool DataEnginePrivate::isUsed() const
|
|||||||
|
|
||||||
DataContainer *DataEnginePrivate::source(const QString &sourceName, bool createWhenMissing)
|
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()) {
|
if (it != sources.constEnd()) {
|
||||||
DataContainer *s = it.value();
|
DataContainer *s = it.value();
|
||||||
if (limit > 0) {
|
if (limit > 0) {
|
||||||
|
@ -95,8 +95,8 @@ DataEngineManager::~DataEngineManager()
|
|||||||
|
|
||||||
Plasma::DataEngine *DataEngineManager::engine(const QString &name) const
|
Plasma::DataEngine *DataEngineManager::engine(const QString &name) const
|
||||||
{
|
{
|
||||||
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()) {
|
||||||
// ref and return the engine
|
// ref and return the engine
|
||||||
//Plasma::DataEngine *engine = *it;
|
//Plasma::DataEngine *engine = *it;
|
||||||
return *it;
|
return *it;
|
||||||
@ -108,9 +108,9 @@ Plasma::DataEngine *DataEngineManager::engine(const QString &name) const
|
|||||||
Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
|
Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
|
||||||
{
|
{
|
||||||
Plasma::DataEngine *engine = 0;
|
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 = *it;
|
||||||
engine->d->ref();
|
engine->d->ref();
|
||||||
return engine;
|
return engine;
|
||||||
|
@ -261,7 +261,7 @@ void PackageStructure::addFileDefinition(const char *key, const QString &path, c
|
|||||||
QString PackageStructure::path(const char *key) const
|
QString PackageStructure::path(const char *key) const
|
||||||
{
|
{
|
||||||
//kDebug() << "looking for" << key;
|
//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()) {
|
if (it == d->contents.constEnd()) {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ QString PackageStructure::path(const char *key) const
|
|||||||
|
|
||||||
QString PackageStructure::name(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()) {
|
if (it == d->contents.constEnd()) {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@ void PackageStructure::setRequired(const char *key, bool required)
|
|||||||
|
|
||||||
bool PackageStructure::isRequired(const char *key) const
|
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()) {
|
if (it == d->contents.constEnd()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -317,7 +317,7 @@ void PackageStructure::setMimetypes(const char *key, QStringList mimetypes)
|
|||||||
|
|
||||||
QStringList PackageStructure::mimetypes(const char *key) const
|
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()) {
|
if (it == d->contents.constEnd()) {
|
||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,11 @@ SignalRelay *DataContainerPrivate::signalRelay(const DataContainer *dc, QObject
|
|||||||
Plasma::IntervalAlignment align,
|
Plasma::IntervalAlignment align,
|
||||||
bool immediateUpdate)
|
bool immediateUpdate)
|
||||||
{
|
{
|
||||||
QMap<uint, SignalRelay *>::const_iterator relayIt = relays.find(pollingInterval);
|
QMap<uint, SignalRelay *>::const_iterator relayIt = relays.constFind(pollingInterval);
|
||||||
SignalRelay *relay = 0;
|
SignalRelay *relay = 0;
|
||||||
|
|
||||||
//FIXME what if we have two applets with the same interval and different alignment?
|
//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,
|
relay = new SignalRelay(const_cast<DataContainer*>(dc), this,
|
||||||
pollingInterval, align, immediateUpdate);
|
pollingInterval, align, immediateUpdate);
|
||||||
relays[pollingInterval] = relay;
|
relays[pollingInterval] = relay;
|
||||||
|
4
svg.cpp
4
svg.cpp
@ -250,9 +250,9 @@ class SvgPrivate
|
|||||||
//kDebug() << "FAIL! **************************";
|
//kDebug() << "FAIL! **************************";
|
||||||
//kDebug() << path << "**";
|
//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!";
|
//kDebug() << "gots us an existing one!";
|
||||||
renderer = it.value();
|
renderer = it.value();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user