Changeset View
Changeset View
Standalone View
Standalone View
src/core/kprotocolinfofactory.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 62 | { | |||
---|---|---|---|---|---|
64 | 64 | | |||
65 | // fill cache, if not already done and use it | 65 | // fill cache, if not already done and use it | ||
66 | fillCache(); | 66 | fillCache(); | ||
67 | return m_cache.values(); | 67 | return m_cache.values(); | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | KProtocolInfoPrivate *KProtocolInfoFactory::findProtocol(const QString &protocol) | 70 | KProtocolInfoPrivate *KProtocolInfoFactory::findProtocol(const QString &protocol) | ||
71 | { | 71 | { | ||
72 | Q_ASSERT(!protocol.isEmpty()); | ||||
73 | Q_ASSERT(!protocol.contains(':')); | ||||
74 | | ||||
72 | QMutexLocker locker(&m_mutex); | 75 | QMutexLocker locker(&m_mutex); | ||
73 | 76 | | |||
74 | const bool filled = fillCache(); | 77 | const bool filled = fillCache(); | ||
75 | 78 | | |||
76 | KProtocolInfoPrivate *info = m_cache.value(protocol); | 79 | KProtocolInfoPrivate *info = m_cache.value(protocol); | ||
77 | if (!info && !filled) { | 80 | if (!info && !filled) { | ||
78 | // Unknown protocol! Maybe it just got installed and our cache is out of date? | 81 | // Unknown protocol! Maybe it just got installed and our cache is out of date? | ||
79 | qCDebug(KIO_CORE) << "Refilling KProtocolInfoFactory cache in the hope to find" << protocol; | 82 | qCDebug(KIO_CORE) << "Refilling KProtocolInfoFactory cache in the hope to find" << protocol; | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |