diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/kconfigini.cpp | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index 83a6c3cf..3d0af962 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -46,11 +46,12 @@ KCONFIGCORE_EXPORT bool kde_kiosk_exception = false; // flag to disable kiosk re  static QByteArray lookup(const KConfigIniBackend::BufferFragment &fragment, QHash<KConfigIniBackend::BufferFragment, QByteArray> *cache)  { -    QHash<KConfigIniBackend::BufferFragment, QByteArray>::iterator it = cache->find(fragment); -    if (it == cache->end()) { -        it = cache->insert(fragment, fragment.toByteArray()); +    auto it = cache->constFind(fragment); +    if (it != cache->constEnd()) { +        return it.value();      } -    return it.value(); + +    return cache->insert(fragment, fragment.toByteArray()).value();  }  QString KConfigIniBackend::warningProlog(const QFile &file, int line) | 
