Changeset View
Changeset View
Standalone View
Standalone View
src/kirigamiplugin.cpp
Show All 39 Lines | |||||
40 | 40 | | |||
41 | //Q_INIT_RESOURCE(kirigami); | 41 | //Q_INIT_RESOURCE(kirigami); | ||
42 | #ifdef KIRIGAMI_BUILD_TYPE_STATIC | 42 | #ifdef KIRIGAMI_BUILD_TYPE_STATIC | ||
43 | #include <qrc_kirigami.cpp> | 43 | #include <qrc_kirigami.cpp> | ||
44 | #endif | 44 | #endif | ||
45 | 45 | | |||
46 | QUrl KirigamiPlugin::componentUrl(const QString &fileName) const | 46 | QUrl KirigamiPlugin::componentUrl(const QString &fileName) const | ||
47 | { | 47 | { | ||
48 | foreach (const QString &style, m_stylesFallbackChain) { | 48 | for (const QString &style : qAsConst(m_stylesFallbackChain)) { | ||
apol: qAsConst isn't necessary because the method is already const.
Is it just for readability? | |||||
Yep just for readability. It's just for avoiding that we thing it will detach. mlaurent: Yep just for readability. It's just for avoiding that we thing it will detach.
For sure here it… | |||||
49 | const QString candidate = QStringLiteral("styles/") + style + QLatin1Char('/') + fileName; | 49 | const QString candidate = QStringLiteral("styles/") + style + QLatin1Char('/') + fileName; | ||
50 | if (QFile::exists(resolveFilePath(candidate))) { | 50 | if (QFile::exists(resolveFilePath(candidate))) { | ||
51 | #ifdef KIRIGAMI_BUILD_TYPE_STATIC | 51 | #ifdef KIRIGAMI_BUILD_TYPE_STATIC | ||
52 | return QUrl(QStringLiteral("qrc:/org/kde/kirigami/styles/") + style + QLatin1Char('/') + fileName); | 52 | return QUrl(QStringLiteral("qrc:/org/kde/kirigami/styles/") + style + QLatin1Char('/') + fileName); | ||
53 | #else | 53 | #else | ||
54 | return QUrl(resolveFileUrl(candidate)); | 54 | return QUrl(resolveFileUrl(candidate)); | ||
55 | #endif | 55 | #endif | ||
56 | } | 56 | } | ||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |
qAsConst isn't necessary because the method is already const.
Is it just for readability?