diff --git a/src/kcmkwin/kwintabbox/main.cpp b/src/kcmkwin/kwintabbox/main.cpp index bfecdbf02f..b26c4658ca 100644 --- a/src/kcmkwin/kwintabbox/main.cpp +++ b/src/kcmkwin/kwintabbox/main.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include // Plasma #include #include @@ -58,8 +58,12 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) tabWidget->addTab(m_primaryTabBoxUi, i18n("Main")); tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative")); - QPushButton* ghnsButton = new QPushButton(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")), i18n("Get New Task Switchers...")); - connect(ghnsButton, &QAbstractButton::clicked, this, &KWinTabBoxConfig::slotGHNS); + KNS3::Button *ghnsButton = new KNS3::Button(i18n("Get New Task Switchers..."), QStringLiteral("kwinswitcher.knsrc"), this); + connect(ghnsButton, &KNS3::Button::dialogFinished, this, [this] (auto changedEntries) { + if (!changedEntries.isEmpty()) { + initLayoutLists(); + } + }); QHBoxLayout* buttonBar = new QHBoxLayout(); QSpacerItem* buttonBarSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); @@ -423,13 +427,6 @@ void KWinTabBoxConfig::configureEffectClicked() } } -void KWinTabBoxConfig::slotGHNS() -{ - if (!KNS3::QtQuickDialogWrapper("kwinswitcher.knsrc").exec().isEmpty()) { - initLayoutLists(); - } -} - } // namespace #include "main.moc" diff --git a/src/kcmkwin/kwintabbox/main.h b/src/kcmkwin/kwintabbox/main.h index a00e2babcc..0099c052ca 100644 --- a/src/kcmkwin/kwintabbox/main.h +++ b/src/kcmkwin/kwintabbox/main.h @@ -42,7 +42,6 @@ private Q_SLOTS: void updateUnmanagedState(); void updateDefaultIndicator(); void configureEffectClicked(); - void slotGHNS(); private: void updateUiFromConfig(KWinTabBoxConfigForm *form, const TabBox::TabBoxSettings *config);