[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:50 UTC 2016


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

The following commit has been merged in the master branch:
commit c4a4851f46a0d65b3aa43b2215262367c1ac6666
Author: Vishesh Handa <me at vhanda.in>
Date:   Sun Apr 13 16:42:30 2014 +0200

    Port to frameworks
---
 CMakeLists.txt        | 41 ++++++++++++++++++++++++++---------------
 src/contactrunner.cpp |  7 +++++--
 src/contactrunner.h   |  4 +---
 3 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0baa80a..379e8e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,35 +3,46 @@ project(KTPContactRunner)
 set(KTP_CONTACT_RUNNER_VERSION "0.7.80")
 set(IS_KTP_INTERNAL_MODULE TRUE)
 
-set(CMAKE_MODULE_PATH
-    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
-    ${CMAKE_MODULE_PATH})
+find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+set (CMAKE_MODULE_PATH
+     "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
+     ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}
+)
 cmake_policy(SET CMP0002 OLD)
 
 # Find the required Libaries
-find_package(KDE4 REQUIRED)
-find_package(TelepathyQt4 0.9.1 REQUIRED)
-find_package(KTp REQUIRED)
-include(KDE4Defaults)
-
+find_package (Qt5 REQUIRED CONFIG COMPONENTS Core)
+find_package (KF5 REQUIRED CONFIG COMPONENTS Runner I18n KDE4Support)
+find_package (TelepathyQt5 0.9.2.1 REQUIRED)
+find_package (KTp REQUIRED)
+
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings)
+include(ECMPackageConfigHelpers)
+include(ECMMarkNonGuiExecutable)
+include(ECMPackageConfigHelpers)
+include(ECMInstallIcons)
+include(CMakePackageConfigHelpers)
+include(WriteBasicConfigVersionFile)
+include(CheckIncludeFiles)
+include(FeatureSummary)
 
-add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
 include_directories(
    ${CMAKE_SOURCE_DIR}
    ${CMAKE_BINARY_DIR}
-   ${KDE4_INCLUDES}
-   ${TELEPATHY_QT4_INCLUDE_DIR}
+   ${TELEPATHY_QT5_INCLUDE_DIR}
    ${KTP_INCLUDE_DIR}
    )
 
 # We add our source code here
 set(runner_SRCS src/contactrunner.cpp)
 
-kde4_add_plugin(krunner_ktp_contacts ${runner_SRCS})
+add_library(krunner_ktp_contacts MODULE ${runner_SRCS})
 target_link_libraries(krunner_ktp_contacts
-                      ${KDE4_PLASMA_LIBS}
-                      ${KDE4_KIO_LIBS}
-                      ${TELEPATHY_QT4_LIBRARIES}
+                      KF5::Runner
+                      KF5::KDE4Support
+                      ${TELEPATHY_QT5_LIBRARIES}
                       ${KTP_MODELS_LIBRARIES}
                       ${KTP_LIBRARIES})
 
diff --git a/src/contactrunner.cpp b/src/contactrunner.cpp
index 51c0b88..02a9da4 100644
--- a/src/contactrunner.cpp
+++ b/src/contactrunner.cpp
@@ -24,6 +24,7 @@
 #include <KMimeType>
 #include <KToolInvocation>
 #include <KStandardDirs>
+#include <KLocale>
 
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/Contact>
@@ -405,7 +406,7 @@ void ContactRunner::matchContacts(Plasma::RunnerContext &context)
             match.setSelectedAction(defaultAction);
             match.setRelevance(relevance);
 
-            context.addMatch(term, match);
+            context.addMatch(match);
         }
     }
 }
@@ -508,7 +509,9 @@ void ContactRunner::addPresenceMatch(Plasma::RunnerContext &context, Tp::Connect
 
     match.setData(qVariantFromValue(data));
 
-    context.addMatch(context.query(), match);
+    context.addMatch(match);
 }
 
+K_EXPORT_PLASMA_RUNNER(ktp_contacts, ContactRunner)
+
 #include "contactrunner.moc"
diff --git a/src/contactrunner.h b/src/contactrunner.h
index f0c91b8..4998259 100644
--- a/src/contactrunner.h
+++ b/src/contactrunner.h
@@ -22,7 +22,7 @@
 
 #include <QtCore/QModelIndex>
 
-#include <Plasma/AbstractRunner>
+#include <KRunner/AbstractRunner>
 #include <KIcon>
 
 #include <TelepathyQt/AccountManager>
@@ -79,6 +79,4 @@ class ContactRunner : public Plasma::AbstractRunner
     bool m_loggerDisabled;
 };
 
-K_EXPORT_PLASMA_RUNNER(ktp_contacts, ContactRunner)
-
 #endif /* KTPCONTACTRUNNER_H */

-- 
ktp-contact-runner packaging



More information about the pkg-kde-commits mailing list