From 82a8d921b836a3507c31a14e82bc7cfd64ee1e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Fiestas?= Date: Tue, 23 Sep 2014 14:26:56 +0200 Subject: [PATCH] Port KIO free of KDElibs4Support --- kio/CMakeLists.txt | 6 +++--- kio/kiokdeconnect.cpp | 25 ++++++------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index 99f402215..fc81f4a20 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -8,11 +8,11 @@ set(kio_kdeconnect_PART_SRCS add_library(kio_kdeconnect MODULE ${kio_kdeconnect_PART_SRCS}) target_link_libraries(kio_kdeconnect - KF5::KIOCore - KF5::KDELibs4Support + kdeconnectinterfaces Qt5::Core Qt5::Gui - kdeconnectinterfaces + KF5::KIOCore + KF5::I18n ) ########### install files ############### diff --git a/kio/kiokdeconnect.cpp b/kio/kiokdeconnect.cpp index 91eb704ef..0d393ca37 100644 --- a/kio/kiokdeconnect.cpp +++ b/kio/kiokdeconnect.cpp @@ -24,24 +24,14 @@ #include #include +#include + #include -#include -#include -#include -#include -#include -#include -#include Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio") -extern "C" int KDE_EXPORT kdemain(int argc, char **argv) +extern "C" int Q_DECL_EXPORT kdemain(int argc, char **argv) { - K4AboutData about("kiokdeconnect", "kdeconnect-kio", ki18n("kiokdeconnect"), "1.0"); - KCmdLineArgs::init(&about); - - KApplication app; - if (argc != 4) { fprintf(stderr, "Usage: kio_kdeconnect protocol pool app\n"); exit(-1); @@ -115,13 +105,12 @@ void KioKdeconnect::listAllDevices() entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IRGRP | S_IROTH); entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, ""); entry.insert(KIO::UDSEntry::UDS_URL, target); - listEntry(entry, false); + listEntry(entry); processedSize(i++); } - listEntry(KIO::UDSEntry(), true); infoMessage(""); finished(); } @@ -164,7 +153,7 @@ void KioKdeconnect::listDevice() entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IRGRP | S_IROTH); entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, ""); entry.insert(KIO::UDSEntry::UDS_URL, url + "/DCIM/Camera"); - listEntry(entry, false); + listEntry(entry); entry.insert(KIO::UDSEntry::UDS_NAME, "files"); entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, i18n("All files")); @@ -173,9 +162,8 @@ void KioKdeconnect::listDevice() entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IRGRP | S_IROTH); entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, ""); entry.insert(KIO::UDSEntry::UDS_URL, url); - listEntry(entry, false); + listEntry(entry); - listEntry(KIO::UDSEntry(), true); infoMessage(""); finished(); @@ -193,7 +181,6 @@ void KioKdeconnect::listDir(const QUrl &url) if (!m_dbusInterface->isValid()) { infoMessage(i18n("Could not contact background service.")); - listEntry(KIO::UDSEntry(), true); finished(); return; }