Changeset View
Changeset View
Standalone View
Standalone View
shell/loadedpluginsdialog.cpp
Show All 18 Lines | |||||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | 20 | | |||
21 | #include "loadedpluginsdialog.h" | 21 | #include "loadedpluginsdialog.h" | ||
22 | 22 | | |||
23 | #include <QApplication> | 23 | #include <QApplication> | ||
24 | #include <QDialogButtonBox> | 24 | #include <QDialogButtonBox> | ||
25 | #include <QListView> | 25 | #include <QListView> | ||
26 | #include <QPainter> | 26 | #include <QPainter> | ||
27 | #include <QPointer> | ||||
27 | #include <QPushButton> | 28 | #include <QPushButton> | ||
28 | #include <QVBoxLayout> | 29 | #include <QVBoxLayout> | ||
29 | 30 | | |||
30 | #include <KAboutData> | 31 | #include <KAboutData> | ||
31 | #include <KAboutApplicationDialog> | 32 | #include <KAboutApplicationDialog> | ||
32 | #include <KIconLoader> | 33 | #include <KIconLoader> | ||
33 | #include <KLocalizedString> | 34 | #include <KLocalizedString> | ||
34 | #include <KTitleWidget> | 35 | #include <KTitleWidget> | ||
▲ Show 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | |||||
235 | private Q_SLOTS: | 236 | private Q_SLOTS: | ||
236 | void info() | 237 | void info() | ||
237 | { | 238 | { | ||
238 | PluginsModel *m = static_cast<PluginsModel*>(itemView()->model()); | 239 | PluginsModel *m = static_cast<PluginsModel*>(itemView()->model()); | ||
239 | KDevelop::IPlugin *p = m->pluginForIndex(focusedIndex()); | 240 | KDevelop::IPlugin *p = m->pluginForIndex(focusedIndex()); | ||
240 | if (p) { | 241 | if (p) { | ||
241 | KAboutData aboutData = KAboutData::fromPluginMetaData(pluginInfo(p)); | 242 | KAboutData aboutData = KAboutData::fromPluginMetaData(pluginInfo(p)); | ||
242 | if (!aboutData.componentName().isEmpty()) { // Be sure the about data is not completely empty | 243 | if (!aboutData.componentName().isEmpty()) { // Be sure the about data is not completely empty | ||
243 | KAboutApplicationDialog aboutPlugin(aboutData, itemView()); | 244 | QPointer<KAboutApplicationDialog> aboutPlugin = | ||
244 | aboutPlugin.exec(); | 245 | new KAboutApplicationDialog(aboutData, itemView()); | ||
246 | aboutPlugin->exec(); | ||||
247 | delete aboutPlugin; | ||||
245 | return; | 248 | return; | ||
246 | } | 249 | } | ||
247 | } | 250 | } | ||
248 | } | 251 | } | ||
249 | private: | 252 | private: | ||
250 | QPushButton *pushButton; | 253 | QPushButton *pushButton; | ||
251 | }; | 254 | }; | ||
252 | 255 | | |||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |