~phablet-team/ubuntu-system-settings/path-fixes

« back to all changes in this revision

Viewing changes to src/plugin-manager.cpp

  • Committer: Jonas G. Drange
  • Date: 2016-09-23 13:07:28 UTC
  • mfrom: (1712.2.2 snap2)
  • Revision ID: jonas.drange@canonical.com-20160923130728-7cc8k10w54s2w8ei
address comments from ltinkl

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
    QStandardPaths::StandardLocation loc = QStandardPaths::GenericDataLocation;
90
90
    QFileInfoList searchPaths;
91
91
    Q_FOREACH(const QString &path, QStandardPaths::standardLocations(loc)) {
92
 
        QDir dir(QString("%1/%2").arg(path).arg(baseDir), "*.settings");
 
92
        QDir dir(QStringLiteral("%1/%2").arg(path).arg(baseDir), "*.settings");
93
93
        searchPaths.append(dir.entryInfoList());
94
94
    }
95
95
 
106
106
    if (ctx)
107
107
        ctx->engine()->rootContext()->setContextProperty("showAllUI", showAll);
108
108
 
109
 
    Q_FOREACH(QFileInfo fileInfo, searchPaths) {
 
109
    Q_FOREACH(const QFileInfo &fileInfo, searchPaths) {
110
110
        Plugin *plugin = new Plugin(fileInfo);
111
111
        QQmlEngine::setContextForObject(plugin, ctx);
112
112
        QMap<QString, Plugin*> &pluginList = m_plugins[plugin->category()];