Changeset View
Changeset View
Standalone View
Standalone View
shell/containmentconfigview.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 80 | { | |||
---|---|---|---|---|---|
81 | setSource(m_containment->corona()->kPackage().fileUrl("containmentconfigurationui")); | 81 | setSource(m_containment->corona()->kPackage().fileUrl("containmentconfigurationui")); | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | PlasmaQuick::ConfigModel *ContainmentConfigView::containmentActionConfigModel() | 84 | PlasmaQuick::ConfigModel *ContainmentConfigView::containmentActionConfigModel() | ||
85 | { | 85 | { | ||
86 | if (!m_containmentActionConfigModel) { | 86 | if (!m_containmentActionConfigModel) { | ||
87 | m_containmentActionConfigModel = new PlasmaQuick::ConfigModel(this); | 87 | m_containmentActionConfigModel = new PlasmaQuick::ConfigModel(this); | ||
88 | 88 | | |||
89 | KPluginInfo::List actions = Plasma::PluginLoader::self()->listContainmentActionsInfo(QString()); | 89 | const KPluginInfo::List actions = Plasma::PluginLoader::self()->listContainmentActionsInfo(QString()); | ||
90 | 90 | | |||
91 | KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Generic")); | 91 | KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Generic")); | ||
92 | 92 | | |||
93 | foreach (const KPluginInfo &info, actions) { | 93 | for (const KPluginInfo &info : actions) { | ||
94 | pkg.setDefaultPackageRoot(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(PLASMA_RELATIVE_DATA_INSTALL_DIR "/containmentactions"), QStandardPaths::LocateDirectory)); | 94 | pkg.setDefaultPackageRoot(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(PLASMA_RELATIVE_DATA_INSTALL_DIR "/containmentactions"), QStandardPaths::LocateDirectory)); | ||
95 | m_containmentActionConfigModel->appendCategory(info.icon(), info.name(), pkg.filePath("ui", QStringLiteral("config.qml")), info.pluginName()); | 95 | m_containmentActionConfigModel->appendCategory(info.icon(), info.name(), pkg.filePath("ui", QStringLiteral("config.qml")), info.pluginName()); | ||
96 | } | 96 | } | ||
97 | 97 | | |||
98 | } | 98 | } | ||
99 | return m_containmentActionConfigModel; | 99 | return m_containmentActionConfigModel; | ||
100 | } | 100 | } | ||
101 | 101 | | |||
Show All 33 Lines | 126 | { | |||
135 | return m_wallpaperConfigModel; | 135 | return m_wallpaperConfigModel; | ||
136 | } | 136 | } | ||
137 | 137 | | |||
138 | PlasmaQuick::ConfigModel *ContainmentConfigView::containmentPluginsConfigModel() | 138 | PlasmaQuick::ConfigModel *ContainmentConfigView::containmentPluginsConfigModel() | ||
139 | { | 139 | { | ||
140 | if (!m_containmentPluginsConfigModel) { | 140 | if (!m_containmentPluginsConfigModel) { | ||
141 | m_containmentPluginsConfigModel = new PlasmaQuick::ConfigModel(this); | 141 | m_containmentPluginsConfigModel = new PlasmaQuick::ConfigModel(this); | ||
142 | 142 | | |||
143 | KPluginInfo::List actions = Plasma::PluginLoader::self()->listContainmentsOfType(QStringLiteral("Desktop")); | 143 | const KPluginInfo::List actions = Plasma::PluginLoader::self()->listContainmentsOfType(QStringLiteral("Desktop")); | ||
144 | 144 | | |||
145 | foreach (const KPluginInfo &info, actions) { | 145 | for (const KPluginInfo &info : actions) { | ||
146 | m_containmentPluginsConfigModel->appendCategory(info.icon(), info.name(), QString(), info.pluginName()); | 146 | m_containmentPluginsConfigModel->appendCategory(info.icon(), info.name(), QString(), info.pluginName()); | ||
147 | } | 147 | } | ||
148 | 148 | | |||
149 | } | 149 | } | ||
150 | return m_containmentPluginsConfigModel; | 150 | return m_containmentPluginsConfigModel; | ||
151 | } | 151 | } | ||
152 | 152 | | |||
153 | KDeclarative::ConfigPropertyMap *ContainmentConfigView::wallpaperConfiguration() const | 153 | KDeclarative::ConfigPropertyMap *ContainmentConfigView::wallpaperConfiguration() const | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |