Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Friedrich W. H. Kossebau
kdevelop
Commits
faded356
Commit
faded356
authored
Nov 24, 2019
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: use KAboutPluginDialog in LoadedPluginsDialog
parent
eb913c94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
kdevplatform/shell/loadedpluginsdialog.cpp
kdevplatform/shell/loadedpluginsdialog.cpp
+14
-0
No files found.
kdevplatform/shell/loadedpluginsdialog.cpp
View file @
faded356
...
@@ -28,7 +28,12 @@
...
@@ -28,7 +28,12 @@
#include <QVBoxLayout>
#include <QVBoxLayout>
#include <KAboutData>
#include <KAboutData>
#include <kcmutils_version.h>
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5,65,0)
#include <KAboutPluginDialog>
#else
#include <KAboutApplicationDialog>
#include <KAboutApplicationDialog>
#endif
#include <KIconLoader>
#include <KIconLoader>
#include <KLocalizedString>
#include <KLocalizedString>
#include <KTitleWidget>
#include <KTitleWidget>
...
@@ -242,12 +247,21 @@ private Q_SLOTS:
...
@@ -242,12 +247,21 @@ private Q_SLOTS:
auto
*
m
=
static_cast
<
PluginsModel
*>
(
itemView
()
->
model
());
auto
*
m
=
static_cast
<
PluginsModel
*>
(
itemView
()
->
model
());
KDevelop
::
IPlugin
*
p
=
m
->
pluginForIndex
(
focusedIndex
());
KDevelop
::
IPlugin
*
p
=
m
->
pluginForIndex
(
focusedIndex
());
if
(
p
)
{
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
));
KAboutData
aboutData
=
KAboutData
::
fromPluginMetaData
(
pluginInfo
(
p
));
if
(
!
aboutData
.
componentName
().
isEmpty
())
{
// Be sure the about data is not completely empty
if
(
!
aboutData
.
componentName
().
isEmpty
())
{
// Be sure the about data is not completely empty
KDevelop
::
ScopedDialog
<
KAboutApplicationDialog
>
aboutPlugin
(
aboutData
,
itemView
());
KDevelop
::
ScopedDialog
<
KAboutApplicationDialog
>
aboutPlugin
(
aboutData
,
itemView
());
aboutPlugin
->
exec
();
aboutPlugin
->
exec
();
return
;
return
;
}
}
#endif
}
}
}
}
private:
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment