Changeset View
Changeset View
Standalone View
Standalone View
src/urifilters/ikws/searchproviderdlg.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 94 | { | |||
---|---|---|---|---|---|
106 | const QSet<QString> shorthands = normalizedShorthands.split(QLatin1Char(',')).toSet(); | 106 | const QSet<QString> shorthands = normalizedShorthands.split(QLatin1Char(',')).toSet(); | ||
107 | 107 | | |||
108 | // Look at each shorthand the user entered and wade through the search | 108 | // Look at each shorthand the user entered and wade through the search | ||
109 | // provider list in search of a conflicting shorthand. Do not continue | 109 | // provider list in search of a conflicting shorthand. Do not continue | ||
110 | // search after finding one, because shorthands should be assigned only | 110 | // search after finding one, because shorthands should be assigned only | ||
111 | // once. Act like data inconsistencies regarding this don't exist (should | 111 | // once. Act like data inconsistencies regarding this don't exist (should | ||
112 | // probably be handled on load). | 112 | // probably be handled on load). | ||
113 | for (const QString &shorthand : shorthands) { | 113 | for (const QString &shorthand : shorthands) { | ||
114 | Q_FOREACH (const SearchProvider *provider, m_providers) { | 114 | for (const SearchProvider *provider : qAsConst(m_providers)) { | ||
115 | if (provider != m_provider && provider->keys().contains(shorthand)) { | 115 | if (provider != m_provider && provider->keys().contains(shorthand)) { | ||
116 | contenders.insert(shorthand, provider); | 116 | contenders.insert(shorthand, provider); | ||
117 | break; | 117 | break; | ||
118 | } | 118 | } | ||
119 | } | 119 | } | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | if (!contenders.isEmpty()) { | 122 | if (!contenders.isEmpty()) { | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |