Changeset View
Changeset View
Standalone View
Standalone View
shell/loadedpluginsdialog.cpp
Show All 28 Lines | |||||
29 | 29 | | |||
30 | #include <KAboutData> | 30 | #include <KAboutData> | ||
31 | #include <KAboutApplicationDialog> | 31 | #include <KAboutApplicationDialog> | ||
32 | #include <KIconLoader> | 32 | #include <KIconLoader> | ||
33 | #include <KLocalizedString> | 33 | #include <KLocalizedString> | ||
34 | #include <KTitleWidget> | 34 | #include <KTitleWidget> | ||
35 | #include <KWidgetItemDelegate> | 35 | #include <KWidgetItemDelegate> | ||
36 | 36 | | |||
37 | #include <util/scopeddialog.h> | ||||
38 | | ||||
37 | #include "core.h" | 39 | #include "core.h" | ||
38 | #include "plugincontroller.h" | 40 | #include "plugincontroller.h" | ||
39 | 41 | | |||
40 | #define MARGIN 5 | 42 | #define MARGIN 5 | ||
41 | 43 | | |||
42 | namespace { | 44 | namespace { | ||
43 | 45 | | |||
44 | KPluginMetaData pluginInfo(KDevelop::IPlugin* plugin) | 46 | KPluginMetaData pluginInfo(KDevelop::IPlugin* plugin) | ||
▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | |||||
235 | private Q_SLOTS: | 237 | private Q_SLOTS: | ||
236 | void info() | 238 | void info() | ||
237 | { | 239 | { | ||
238 | PluginsModel *m = static_cast<PluginsModel*>(itemView()->model()); | 240 | PluginsModel *m = static_cast<PluginsModel*>(itemView()->model()); | ||
239 | KDevelop::IPlugin *p = m->pluginForIndex(focusedIndex()); | 241 | KDevelop::IPlugin *p = m->pluginForIndex(focusedIndex()); | ||
240 | if (p) { | 242 | if (p) { | ||
241 | KAboutData aboutData = KAboutData::fromPluginMetaData(pluginInfo(p)); | 243 | KAboutData aboutData = KAboutData::fromPluginMetaData(pluginInfo(p)); | ||
242 | if (!aboutData.componentName().isEmpty()) { // Be sure the about data is not completely empty | 244 | if (!aboutData.componentName().isEmpty()) { // Be sure the about data is not completely empty | ||
243 | KAboutApplicationDialog aboutPlugin(aboutData, itemView()); | 245 | KDevelop::ScopedDialog<KAboutApplicationDialog> aboutPlugin(aboutData, itemView()); | ||
244 | aboutPlugin.exec(); | 246 | aboutPlugin->exec(); | ||
245 | return; | 247 | return; | ||
246 | } | 248 | } | ||
247 | } | 249 | } | ||
248 | } | 250 | } | ||
249 | private: | 251 | private: | ||
250 | QPushButton *pushButton; | 252 | QPushButton *pushButton; | ||
251 | }; | 253 | }; | ||
252 | 254 | | |||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |