From 4724888b0cea3b8b9b9739fbc25c3137dadb18fc Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 7 Dec 2009 21:20:28 +0000 Subject: use KNewStuff3 instead of the deprecated KNewStuff2 svn path=/trunk/KDE/kdebase/apps/; revision=1060003 --- src/settings/servicessettingspage.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/settings/servicessettingspage.cpp') diff --git a/src/settings/servicessettingspage.cpp b/src/settings/servicessettingspage.cpp index 9088366a8..a5e19725a 100644 --- a/src/settings/servicessettingspage.cpp +++ b/src/settings/servicessettingspage.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,9 +53,10 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : connect(m_servicesList, SIGNAL(itemClicked(QListWidgetItem*)), this, SIGNAL(changed())); - QPushButton* downloadButton = new QPushButton(i18nc("@action:button", "Download New Services...")); - downloadButton->setIcon(KIcon("get-hot-new-stuff")); - connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadNewServices())); + KNS3::Button* downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."), + "servicemenu.knsrc", + this); + connect(downloadButton, SIGNAL(dialogFinished(const Entry::List&)), this, SLOT(loadServices())); topLayout->addWidget(label); topLayout->addWidget(m_servicesList); @@ -129,14 +130,6 @@ void ServicesSettingsPage::loadServices() } } -void ServicesSettingsPage::downloadNewServices() -{ - KNS::Engine khns(this); - khns.init("servicemenu.knsrc"); - khns.downloadDialogModal(this); - loadServices(); -} - bool ServicesSettingsPage::isInServicesList(const QString& service) const { const int count = m_servicesList->count(); -- cgit v1.3