diff --git a/shell/currentcontainmentactionsmodel.h b/shell/currentcontainmentactionsmodel.h --- a/shell/currentcontainmentactionsmodel.h +++ b/shell/currentcontainmentactionsmodel.h @@ -30,6 +30,8 @@ class ContainmentActions; } +class QQuickItem; + //This model load the data about available containment actions plugins, such as context menus that can be loaded on mouse click //TODO: out of the library? class CurrentContainmentActionsModel : public QStandardItemModel @@ -55,7 +57,7 @@ Q_INVOKABLE void update(int row, const QString &action, const QString &plugin); Q_INVOKABLE void remove(int row); Q_INVOKABLE void showConfiguration(int row); - Q_INVOKABLE void showAbout(int row); + Q_INVOKABLE void showAbout(int row, QQuickItem *ctx = nullptr); Q_INVOKABLE void save(); private: diff --git a/shell/currentcontainmentactionsmodel.cpp b/shell/currentcontainmentactionsmodel.cpp --- a/shell/currentcontainmentactionsmodel.cpp +++ b/shell/currentcontainmentactionsmodel.cpp @@ -25,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include @@ -220,7 +223,7 @@ configDlg->show(); } -void CurrentContainmentActionsModel::showAbout(int row) +void CurrentContainmentActionsModel::showAbout(int row, QQuickItem *ctx) { const QString action = itemData(index(row, 0)).value(ActionRole).toString(); @@ -244,6 +247,12 @@ KAboutApplicationDialog *aboutDialog = new KAboutApplicationDialog(aboutData, qobject_cast(parent())); aboutDialog->setWindowIcon(QIcon::fromTheme(info.icon())); aboutDialog->setAttribute(Qt::WA_DeleteOnClose); + + if (ctx && ctx->window()) { + aboutDialog->setWindowModality(Qt::WindowModal); + aboutDialog->winId(); // so it creates the windowHandle(); + aboutDialog->windowHandle()->setTransientParent(ctx->window()); + } aboutDialog->show(); }