Commit faded356 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau

shell: use KAboutPluginDialog in LoadedPluginsDialog

parent eb913c94
Pipeline #10969 passed with stage
in 47 minutes and 44 seconds
......@@ -28,7 +28,12 @@
#include <QVBoxLayout>
#include <KAboutData>
#include <kcmutils_version.h>
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5,65,0)
#include <KAboutPluginDialog>
#else
#include <KAboutApplicationDialog>
#endif
#include <KIconLoader>
#include <KLocalizedString>
#include <KTitleWidget>
......@@ -242,12 +247,21 @@ private Q_SLOTS:
auto *m = static_cast<PluginsModel*>(itemView()->model());
KDevelop::IPlugin *p = m->pluginForIndex(focusedIndex());
if (p) {
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5,65,0)
const KPluginMetaData pluginInfo = ::pluginInfo(p);
if (!pluginInfo.name().isEmpty()) { // Be sure the about data is not completely empty
KDevelop::ScopedDialog<KAboutPluginDialog> aboutPlugin(pluginInfo, itemView());
aboutPlugin->exec();
return;
}
#else
KAboutData aboutData = KAboutData::fromPluginMetaData(pluginInfo(p));
if (!aboutData.componentName().isEmpty()) { // Be sure the about data is not completely empty
KDevelop::ScopedDialog<KAboutApplicationDialog> aboutPlugin(aboutData, itemView());
aboutPlugin->exec();
return;
}
#endif
}
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment