[SCM] ktp-contact-runner packaging branch, master, updated. debian/15.12.1-2-244-g38a1f58

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 17:50:54 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-runner.git;a=commitdiff;h=c56a38a

The following commit has been merged in the master branch:
commit c56a38af179a6fdaead6c30c83e62274ddd2419e
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Fri Dec 12 20:05:59 2014 +0100

    Get rid of kdelibs4support dependency
    
    REVIEW: 121462
---
 CMakeLists.txt        |  5 +++--
 src/contactrunner.cpp | 35 ++++++++++++++++-------------------
 src/contactrunner.h   |  6 ++++--
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 430eb60..2e7f0ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
 project(KTPContactRunner)
 
+cmake_minimum_required(VERSION 2.8.12)
+
 set(KTP_CONTACT_RUNNER_VERSION "0.8.80")
 set(IS_KTP_INTERNAL_MODULE TRUE)
 
@@ -11,7 +13,7 @@ cmake_policy(SET CMP0002 OLD)
 
 # Find the required Libaries
 find_package (Qt5 REQUIRED CONFIG COMPONENTS Core DBus Network)
-find_package (KF5 REQUIRED COMPONENTS I18n Service Runner KDELibs4Support)
+find_package (KF5 REQUIRED COMPONENTS I18n Service Runner)
 find_package (KTp REQUIRED)
 
 include(KDEInstallDirs)
@@ -32,7 +34,6 @@ target_link_libraries(krunner_ktp_contacts
                       KF5::I18n
                       KF5::Service
                       KF5::Runner
-                      KF5::KDELibs4Support
                       KTp::Models
                       KTp::CommonInternals)
 
diff --git a/src/contactrunner.cpp b/src/contactrunner.cpp
index 7a872fd..2605792 100644
--- a/src/contactrunner.cpp
+++ b/src/contactrunner.cpp
@@ -19,12 +19,11 @@
 
 #include "contactrunner.h"
 
-#include <KDebug>
-#include <KFileDialog>
-#include <KMimeType>
-#include <KToolInvocation>
-#include <KStandardDirs>
-#include <KLocale>
+#include <QDebug>
+#include <QFileDialog>
+#include <QStandardPaths>
+
+#include <KLocalizedString>
 
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/Contact>
@@ -45,6 +44,8 @@
 #include <KTp/contact-factory.h>
 #include <KTp/contact.h>
 
+Q_LOGGING_CATEGORY(KTP_CONTACT_RUNNER, "ktp-contact-runner")
+
 struct MatchInfo {
     Tp::AccountPtr account;
     Tp::ContactPtr contact;
@@ -62,7 +63,7 @@ ContactRunner::ContactRunner(QObject *parent, const QVariantList &args):
 
     setObjectName(QLatin1String("IM Contacts Runner"));
 
-    m_loggerDisabled = KStandardDirs::findExe(QLatin1String("ktp-log-viewer")).isEmpty();
+    m_loggerDisabled = QStandardPaths::findExecutable(QLatin1String("ktp-log-viewer")).isEmpty();
 
     addSyntax(Plasma::RunnerSyntax(QLatin1String(":q:"), i18n("Finds all IM contacts matching :q:.")));
     addSyntax(Plasma::RunnerSyntax(QLatin1String("chat :q:"), i18n("Finds all contacts matching :q: that are capable of text chats (default behavior)")));
@@ -136,20 +137,18 @@ ContactRunner::~ContactRunner()
 void ContactRunner::accountManagerReady(Tp::PendingOperation *operation)
 {
     if (operation->isError()) {
-        kWarning() << operation->errorMessage();
+        qCWarning(KTP_CONTACT_RUNNER) << operation->errorMessage();
         return;
     }
 
-    kDebug() << "Accounts manager is ready!";
-
     m_globalPresence->setAccountManager(m_accountManager);
 }
 
-QList< QAction* > ContactRunner::actionsForMatch(const Plasma::QueryMatch &match)
+QList<QAction*> ContactRunner::actionsForMatch(const Plasma::QueryMatch &match)
 {
-    QList< QAction* > actions;
+    QList<QAction*> actions;
 
-    MatchInfo data = match.data().value< MatchInfo >();
+    MatchInfo data = match.data().value<MatchInfo>();
     if (!data.contact) {
         return actions;
     }
@@ -217,7 +216,7 @@ void ContactRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
     }
 
     if (!data.account || !data.contact) {
-        kWarning() << "Running invalid contact info";
+        qCWarning(KTP_CONTACT_RUNNER) << "Running invalid contact info";
         return;
     }
 
@@ -233,11 +232,9 @@ void ContactRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
         KTp::Actions::startAudioVideoCall(account, contact);
     } else if (match.selectedAction() == action("start-file-transfer")) {
 
-      QStringList filenames = KFileDialog::getOpenFileNames(
-                                    QUrl("kfiledialog:///FileTransferLastDirectory"),
-                                    QString(),
-                                    0,
-                                    i18n("Choose files to send to %1", contact->alias()));
+        QStringList filenames = QFileDialog::getOpenFileNames(0,
+                                                              i18n("Choose files to send to %1", contact->alias()),
+                                                              QStringLiteral("kfiledialog:///FileTransferLastDirectory"));
 
         if (filenames.isEmpty()) { // User hit cancel button
             return;
diff --git a/src/contactrunner.h b/src/contactrunner.h
index 4998259..19e94fe 100644
--- a/src/contactrunner.h
+++ b/src/contactrunner.h
@@ -20,13 +20,15 @@
 #ifndef KTPCONTACTRUNNER_H
 #define KTPCONTACTRUNNER_H
 
-#include <QtCore/QModelIndex>
+#include <QModelIndex>
+#include <QLoggingCategory>
 
 #include <KRunner/AbstractRunner>
-#include <KIcon>
 
 #include <TelepathyQt/AccountManager>
 
+Q_DECLARE_LOGGING_CATEGORY(KTP_CONTACT_RUNNER)
+
 namespace KTp
 {
     class GlobalPresence;

-- 
ktp-contact-runner packaging



More information about the pkg-kde-commits mailing list