┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-12-07 21:20:28 +0000
committerPeter Penz <[email protected]>2009-12-07 21:20:28 +0000
commit4724888b0cea3b8b9b9739fbc25c3137dadb18fc (patch)
tree6490a31e7b06560890380e43da1feee011e97987 /src
parent233a08164f79d9909693c5de438f856467ad5b76 (diff)
use KNewStuff3 instead of the deprecated KNewStuff2
svn path=/trunk/KDE/kdebase/apps/; revision=1060003
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/settings/servicessettingspage.cpp17
-rw-r--r--src/settings/servicessettingspage.h5
3 files changed, 8 insertions, 20 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index de3e2863d..2b7a60e4f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -74,7 +74,7 @@ kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
kde4_add_library(dolphinprivate SHARED ${dolphinprivate_LIB_SRCS})
-target_link_libraries(dolphinprivate ${KDE4_KFILE_LIBS} konq ${KDE4_KNEWSTUFF2_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${X11_LIBRARIES})
+target_link_libraries(dolphinprivate ${KDE4_KFILE_LIBS} konq ${KDE4_KNEWSTUFF3_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${X11_LIBRARIES})
if(X11_Xrender_FOUND)
target_link_libraries(dolphinprivate ${X11_Xrender_LIB} )
endif(X11_Xrender_FOUND)
@@ -201,7 +201,7 @@ target_link_libraries(dolphin
${KDE4_KUTILS_LIBRARY}
konq
dolphinprivate
- knewstuff2
+ knewstuff3
${KDE4_PHONON_LIBS}
)
@@ -280,7 +280,7 @@ kde4_add_plugin(kcm_dolphingeneral ${kcm_dolphingeneral_PART_SRCS})
target_link_libraries(kcm_dolphinviewmodes ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} dolphinprivate)
target_link_libraries(kcm_dolphinnavigation ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} dolphinprivate)
-target_link_libraries(kcm_dolphinservices ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF2_LIBRARY} dolphinprivate)
+target_link_libraries(kcm_dolphinservices ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF3_LIBRARY} dolphinprivate)
target_link_libraries(kcm_dolphingeneral ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} dolphinprivate)
if (Nepomuk_FOUND)
target_link_libraries(kcm_dolphinviewmodes ${NEPOMUK_LIBRARIES})
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 <kdesktopfileactions.h>
#include <kicon.h>
#include <klocale.h>
-#include <knewstuff2/engine.h>
+#include <knewstuff3/knewstuffbutton.h>
#include <kservice.h>
#include <kservicetypetrader.h>
#include <kstandarddirs.h>
@@ -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();
diff --git a/src/settings/servicessettingspage.h b/src/settings/servicessettingspage.h
index 359cc77ad..9a3832e70 100644
--- a/src/settings/servicessettingspage.h
+++ b/src/settings/servicessettingspage.h
@@ -49,11 +49,6 @@ private slots:
*/
void loadServices();
- /**
- * Opens KHotNewStuff to download new services.
- */
- void downloadNewServices();
-
bool isInServicesList(const QString& service) const;
private: