[SCM] ktp-contact-runner packaging branch, upstream, updated. upstream/0.8.1-3-gc84f8e7
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 18 12:04:26 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-runner.git;a=commitdiff;h=d98ccb5
The following commit has been merged in the upstream branch:
commit d98ccb57e1664ad082f5e05f7f6344d662571f0a
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Tue Apr 28 10:52:29 2015 +0200
Imported Upstream version 15.04.0
---
.gitignore | 3 +++
.reviewboardrc | 2 ++
CMakeLists.txt | 42 ++++++++++++++++-----------------
plasma-runner-ktp-contact.desktop.cmake | 3 ++-
src/contactrunner.cpp | 40 +++++++++++++++----------------
src/contactrunner.h | 10 ++++----
6 files changed, 53 insertions(+), 47 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5ff87c2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.kdev4
+*~
+build
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 0000000..f3c165c
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,2 @@
+REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
+REPOSITORY = 'git://anongit.kde.org/ktp-contact-runner'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7fb932..6320fe1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,39 +1,42 @@
project(KTPContactRunner)
-set(KTP_CONTACT_RUNNER_VERSION "0.8.80")
+cmake_minimum_required(VERSION 2.8.12)
+
+set(KTP_CONTACT_RUNNER_VERSION "15.04.0")
set(IS_KTP_INTERNAL_MODULE TRUE)
-set(CMAKE_MODULE_PATH
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
- ${CMAKE_MODULE_PATH})
+find_package(ECM 1.0.0 REQUIRED NO_MODULE)
+set (CMAKE_MODULE_PATH
+ ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH}
+)
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 Widgets Core DBus Network)
+find_package (KF5 REQUIRED COMPONENTS I18n Service Runner)
+find_package (KTp REQUIRED)
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings)
+include(FeatureSummary)
-add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
- ${KDE4_INCLUDES}
- ${TELEPATHY_QT4_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}
- ${KTP_MODELS_LIBRARIES}
- ${KTP_LIBRARIES})
+ Qt5::Widgets
+ KF5::I18n
+ KF5::Service
+ KF5::Runner
+ KTp::Models
+ KTp::CommonInternals)
install(TARGETS krunner_ktp_contacts
DESTINATION ${PLUGIN_INSTALL_DIR})
@@ -46,6 +49,3 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-runner-ktp-contact.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
-find_package(Msgfmt REQUIRED)
-find_package(Gettext REQUIRED)
-add_subdirectory( po )
diff --git a/plasma-runner-ktp-contact.desktop.cmake b/plasma-runner-ktp-contact.desktop.cmake
index 4d88e84..dd048e1 100644
--- a/plasma-runner-ktp-contact.desktop.cmake
+++ b/plasma-runner-ktp-contact.desktop.cmake
@@ -1,5 +1,6 @@
[Desktop Entry]
Name=Instant Messaging
+Name[ast]=Mensaxería nel intre
Name[bs]=Brze poruke
Name[ca]=Missatgeria instantània
Name[ca at valencia]=Missatgeria instantània
@@ -53,7 +54,7 @@ Comment[en_GB]=Start a chat with any of your IM contacts or change your IM statu
Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
Comment[et]=Vestluse alustamine mõne oma kiirsuhtluskontaktiga või enda kiirsuhtlusoleku muutmine
Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
-Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
+Comment[fr]=Démarre une conversation avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
Comment[gl]=Inicie unha conversa con calquera dos seus contactos ou cambie seu estado na IM
Comment[hu]=Csevegés indítása az azonnali üzenetküldési partnerei valamelyikével vagy az azonnali üzenetküldési állapotának módosítása
Comment[ia]=Initia conversation con qualcunque de tu contactos de IM o modifica tu status de IM
diff --git a/src/contactrunner.cpp b/src/contactrunner.cpp
index 51c0b88..2605792 100644
--- a/src/contactrunner.cpp
+++ b/src/contactrunner.cpp
@@ -19,11 +19,11 @@
#include "contactrunner.h"
-#include <KDebug>
-#include <KFileDialog>
-#include <KMimeType>
-#include <KToolInvocation>
-#include <KStandardDirs>
+#include <QDebug>
+#include <QFileDialog>
+#include <QStandardPaths>
+
+#include <KLocalizedString>
#include <TelepathyQt/ContactManager>
#include <TelepathyQt/Contact>
@@ -44,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;
@@ -61,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)")));
@@ -135,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;
}
@@ -216,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;
}
@@ -232,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(
- KUrl("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;
@@ -405,7 +403,7 @@ void ContactRunner::matchContacts(Plasma::RunnerContext &context)
match.setSelectedAction(defaultAction);
match.setRelevance(relevance);
- context.addMatch(term, match);
+ context.addMatch(match);
}
}
}
@@ -508,7 +506,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..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 <Plasma/AbstractRunner>
-#include <KIcon>
+#include <KRunner/AbstractRunner>
#include <TelepathyQt/AccountManager>
+Q_DECLARE_LOGGING_CATEGORY(KTP_CONTACT_RUNNER)
+
namespace KTp
{
class GlobalPresence;
@@ -79,6 +81,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