[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:08 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=d7abe35

The following commit has been merged in the master branch:
commit d7abe35547f17455d022d39d4035d34272948c92
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Apr 11 19:40:54 2014 +0200

    First attempt to get it working with KF5
---
 CMakeLists.txt                             | 74 +++++++++++++++++-------------
 KTp/CMakeLists.txt                         | 20 ++++----
 KTp/Declarative/CMakeLists.txt             | 15 +++---
 KTp/Declarative/messages-model.cpp         |  1 +
 KTp/Declarative/pinned-contacts-model.cpp  |  2 +-
 KTp/Declarative/qml-plugins.cpp            | 10 ++--
 KTp/Declarative/qml-plugins.h              |  9 ++--
 KTp/Declarative/telepathy-manager.cpp      |  4 +-
 KTp/Logger/CMakeLists.txt                  |  6 +--
 KTp/Logger/pending-logger-operation.cpp    |  2 +-
 KTp/Logger/plugins/CMakeLists.txt          |  4 +-
 KTp/Logger/plugins/tplogger/CMakeLists.txt |  6 +--
 KTp/Models/CMakeLists.txt                  |  8 ++--
 KTp/Models/contacts-filter-model.cpp       |  2 +-
 KTp/Widgets/CMakeLists.txt                 | 14 +++---
 KTp/Widgets/add-contact-dialog.cpp         |  1 +
 KTp/Widgets/contact-grid-dialog.cpp        |  4 +-
 KTp/Widgets/contact-view-widget.cpp        |  4 +-
 KTp/Widgets/contact-view-widget.h          |  4 +-
 KTp/Widgets/join-chat-room-dialog.cpp      |  6 ++-
 KTp/Widgets/notification-config-dialog.cpp |  1 +
 KTp/Widgets/settings-kcm-dialog.cpp        |  4 +-
 KTp/Widgets/start-chat-dialog.cpp          |  1 +
 KTp/actions.cpp                            |  3 +-
 KTp/contact-info-dialog.cpp                |  8 ++--
 KTp/logs-importer-private.cpp              |  1 +
 KTp/message-filter-config-manager.h        |  1 +
 KTp/message-processor.cpp                  |  1 +
 KTp/persistent-contact.h                   |  1 +
 KTp/telepathy-handler-application.cpp      | 15 +-----
 KTp/telepathy-handler-application.h        |  8 ----
 data/icons/CMakeLists.txt                  |  2 +-
 kpeople/actionsplugin/CMakeLists.txt       |  2 +-
 kpeople/datasourceplugin/CMakeLists.txt    |  2 +-
 kpeople/uiplugins/CMakeLists.txt           |  8 ++--
 tests/CMakeLists.txt                       | 20 ++++----
 tests/contact-list-model-view-main.cpp     | 24 +++++-----
 tests/roles-proxy-model.cpp                |  2 +-
 tools/debugger/CMakeLists.txt              | 15 +++---
 tools/debugger/debug-message-view.cpp      | 19 ++++----
 tools/debugger/main-window.cpp             |  4 +-
 tools/debugger/main.cpp                    | 28 ++++++-----
 42 files changed, 192 insertions(+), 174 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9474624..5d85ead 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,58 +1,69 @@
 project(ktp-common-internals)
 
-cmake_minimum_required (VERSION 2.6.3 FATAL_ERROR)
+cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
 
+find_package(ECM 0.0.11 REQUIRED NO_MODULE)
 set (CMAKE_MODULE_PATH
      "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
-     ${CMAKE_MODULE_PATH}
+     ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}
 )
 cmake_policy(SET CMP0002 OLD)
 
 set (KTP_VERSION "0.7.80")
 # Bump for every 0.x release, or whenever BC changes
-set (KTP_SONUMBER 7)
-set (KTP_MESSAGE_FILTER_FRAMEWORK_VERSION "4")
-
-find_package (KDE4 REQUIRED)
-find_package (TelepathyQt4 0.9.2.1 REQUIRED)
-find_package (TelepathyLoggerQt4)
-find_package (KPeople 0.2)
-find_package (KdepimLibs)
-
-# set some default settings
-include (KDE4Defaults)
-
-# make some more macros available
-include (MacroLibrary)
-
-macro_log_feature(KPEOPLE_FOUND "KPeople" "Support for KDE Contact Aggregation" "https://projects.kde.org/libkpeople" FALSE "" "")
-macro_log_feature(KDEPIMLIBS_FOUND "KDE-PIM Libraries" "Support for Contact Aggregation" "https://projects.kde.org/kdepimlibs" FALSE "" "")
-macro_log_feature(TELEPATHY_LOGGER_QT4_FOUND "TelepatyLoggerQt4" "Qt bindings for TelepathyLogger. This is needed to provide access to chat logs. HIGHLY recommended" "http://projects.kde.org/telepathy-logger-qt" FALSE "" "")
-macro_display_feature_log()
-
-
-add_definitions (${KDE4_DEFINITIONS}
+set (KTP_SONUMBER 9)
+set (KTP_MESSAGE_FILTER_FRAMEWORK_VERSION "5")
+
+find_package (Qt5 REQUIRED CONFIG COMPONENTS Qml Test)
+find_package (KF5 REQUIRED CONFIG COMPONENTS KCMUtils NotifyConfig TextEditor Wallet KDE4Support)
+find_package (TelepathyQt5 0.9.2.1 REQUIRED)
+find_package (TelepathyLoggerQt5 QUIET)
+find_package (KPeople 0.3 QUIET)
+
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings)
+include(ECMPackageConfigHelpers)
+include(ECMMarkNonGuiExecutable)
+include(ECMPackageConfigHelpers)
+include(ECMInstallIcons)
+include(CMakePackageConfigHelpers)
+include(WriteBasicConfigVersionFile)
+include(CheckIncludeFiles)
+include(FeatureSummary)
+
+set_package_properties(KPeople PROPERTIES DESCRIPTION "Support for KDE Contact Aggregation"
+                       URL "https://projects.kde.org/libkpeople"
+                       TYPE OPTIONAL
+                      )
+set_package_properties(TelepathyLoggerQt5 PROPERTIES DESCRIPTION "Qt bindings for TelepathyLogger. This is needed to provide access to chat logs. HIGHLY recommended"
+                       URL "http://projects.kde.org/telepathy-logger-qt"
+                       TYPE OPTIONAL
+                      )
+
+
+add_definitions (
                  -DQT_NO_CAST_FROM_ASCII
                  -DQT_NO_KEYWORDS
 )
 
-include_directories (${KDE4_INCLUDES}
+include_directories (
                      ${CMAKE_CURRENT_BINARY_DIR}
                      ${CMAKE_CURRENT_SOURCE_DIR}
-                     ${TELEPATHY_QT4_INCLUDE_DIR}
+                     ${TELEPATHY_QT5_INCLUDE_DIR}
 )
 
-if (TELEPATHY_LOGGER_QT4_FOUND)
-    add_definitions(${TELEPATHY_LOGGER_QT4_DEFINITIONS}
+if (TELEPATHY_LOGGER_QT5_FOUND)
+    add_definitions(${TELEPATHY_LOGGER_QT5_DEFINITIONS}
                     -DHAVE_TPLOGGERQT)
-    include_directories(${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS})
-endif (TELEPATHY_LOGGER_QT4_FOUND)
+    include_directories(${TELEPATHY_LOGGER_QT5_INCLUDE_DIRS})
+endif ()
 
 if (KPEOPLE_FOUND AND KDEPIMLIBS_FOUND)
     include_directories (${KDEPIMLIBS_INCLUDE_DIRS})
     add_definitions(-DHAVE_KPEOPLE)
     add_subdirectory(kpeople)
-endif (KPEOPLE_FOUND AND KDEPIMLIBS_FOUND)
+endif ()
 
 
 configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
@@ -64,3 +75,4 @@ add_subdirectory(tools)
 add_subdirectory(data)
 add_subdirectory(tests)
 
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/KTp/CMakeLists.txt b/KTp/CMakeLists.txt
index 535639f..3dc66f7 100644
--- a/KTp/CMakeLists.txt
+++ b/KTp/CMakeLists.txt
@@ -65,19 +65,19 @@ set (ktp_common_internals_private_HDRS
 )
 
 set (ktp_private_LIBS
-                       ${KDE4_KDECORE_LIBS}
-                       ${KDE4_KIO_LIBS}
-                       ${TELEPATHY_QT4_LIBRARIES}
-                       ${KDE4_KDEUI_LIBS}
+                       KF5::Wallet
+                       KF5::KIOWidgets
+                       KF5::KDE4Support
+                       ${TELEPATHY_QT5_LIBRARIES}
                        ${KDEPIMLIBS_KABC_LIBS}
 )
 
-if (TELEPATHY_LOGGER_QT4_FOUND)
+if (TELEPATHY_LOGGER_QT5_FOUND)
     set (ktp_private_LIBS
          ${ktp_private_LIBS}
-         ${TELEPATHY_LOGGER_QT4_LIBRARIES}
+         ${TELEPATHY_LOGGER_QT5_LIBRARIES}
          )
-endif (TELEPATHY_LOGGER_QT4_FOUND)
+endif ()
 
 if (KPEOPLE_FOUND)
     include_directories(${KPEOPLE_INCLUDES})
@@ -86,9 +86,9 @@ if (KPEOPLE_FOUND)
          ${ktp_private_LIBS}
          ${KPEOPLE_LIBS}
          )
-endif(KPEOPLE_FOUND)
+endif()
 
-kde4_add_library (ktpcommoninternalsprivate SHARED
+add_library (ktpcommoninternalsprivate
                  ${ktp_common_internals_private_SRCS}
 )
 
@@ -124,4 +124,4 @@ if(DOXYGEN_EXECUTABLE)
   add_custom_target(
     apidox
     COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile)
-endif(DOXYGEN_EXECUTABLE)
+endif()
diff --git a/KTp/Declarative/CMakeLists.txt b/KTp/Declarative/CMakeLists.txt
index 5702553..4bdff42 100644
--- a/KTp/Declarative/CMakeLists.txt
+++ b/KTp/Declarative/CMakeLists.txt
@@ -16,18 +16,17 @@ set (ktp_qml_plugin_SRCS
     qml-plugins.cpp
 )
 
-kde4_add_library (ktpqmlplugin SHARED ${ktp_qml_plugin_SRCS})
+add_library (ktpqmlplugin SHARED ${ktp_qml_plugin_SRCS})
 
 target_link_libraries (ktpqmlplugin
-    ${QT_QTSCRIPT_LIBRARY}
-    ${QT_QTDECLARATIVE_LIBRARY}
-    ${KDE4_KDECORE_LIBS}
-    ${TELEPATHY_QT4_LIBRARIES}
-    ${KDE4_KDEUI_LIBS}
+    Qt5::Qml
+    
+    ${TELEPATHY_QT5_LIBRARIES}
+    KF5::KDE4Support
     ktpcommoninternalsprivate
     ktploggerprivate
     ktpmodelsprivate
 )
 
-install (TARGETS ktpqmlplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/telepathy)
-install (FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/telepathy)
+install (TARGETS ktpqmlplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/telepathy)
+install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/telepathy)
diff --git a/KTp/Declarative/messages-model.cpp b/KTp/Declarative/messages-model.cpp
index bc51e3e..ec28ea1 100644
--- a/KTp/Declarative/messages-model.cpp
+++ b/KTp/Declarative/messages-model.cpp
@@ -22,6 +22,7 @@
 
 #include <KDebug>
 #include <KLocalizedString>
+#include <KConfig>
 
 #include <TelepathyQt/ReceivedMessage>
 #include <TelepathyQt/TextChannel>
diff --git a/KTp/Declarative/pinned-contacts-model.cpp b/KTp/Declarative/pinned-contacts-model.cpp
index 96cbf1b..88affc4 100644
--- a/KTp/Declarative/pinned-contacts-model.cpp
+++ b/KTp/Declarative/pinned-contacts-model.cpp
@@ -159,7 +159,7 @@ QVariant PinnedContactsModel::data(const QModelIndex &index, int role) const
             return found;
         }
         case Qt::DecorationRole: {
-            KIcon icon;
+            QIcon icon;
             if (p->contact()) {
                 QString file = p->contact()->avatarData().fileName;
                 if (!file.isEmpty()) {
diff --git a/KTp/Declarative/qml-plugins.cpp b/KTp/Declarative/qml-plugins.cpp
index bc134e0..2ab65d5 100644
--- a/KTp/Declarative/qml-plugins.cpp
+++ b/KTp/Declarative/qml-plugins.cpp
@@ -21,10 +21,8 @@
 
 #include "qml-plugins.h"
 
-#include <QtDeclarative/QDeclarativeItem>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
+#include <QQmlEngine>
+#include <QQmlContext>
 
 #include "conversation.h"
 #include "conversations-model.h"
@@ -40,8 +38,9 @@
 #include "KTp/Models/contacts-model.h"
 #include "KTp/Models/accounts-list-model.h"
 
+#include <QtQml>
 
-void QmlPlugins::initializeEngine(QDeclarativeEngine *engine, const char *uri)
+void QmlPlugins::initializeEngine(QQmlEngine *engine, const char *uri)
 {
     Q_UNUSED(uri)
 
@@ -70,4 +69,3 @@ void QmlPlugins::registerTypes(const char *uri)
     qRegisterMetaType<Tp::AccountPtr>();
 }
 
-Q_EXPORT_PLUGIN2(conversation, QmlPlugins);
diff --git a/KTp/Declarative/qml-plugins.h b/KTp/Declarative/qml-plugins.h
index e2e2b1a..a578db9 100644
--- a/KTp/Declarative/qml-plugins.h
+++ b/KTp/Declarative/qml-plugins.h
@@ -20,12 +20,15 @@
 #ifndef QML_PLUGINS_H
 #define QML_PLUGINS_H
 
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
+#include <QQmlExtensionPlugin>
 
-class QmlPlugins : public QDeclarativeExtensionPlugin
+class QmlPlugins : public QQmlExtensionPlugin
 {
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
     public:
-        virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri);
+        virtual void initializeEngine(QQmlEngine *engine, const char *uri);
         virtual void registerTypes(const char *uri);
 };
 
diff --git a/KTp/Declarative/telepathy-manager.cpp b/KTp/Declarative/telepathy-manager.cpp
index 940dc62..9f59da4 100644
--- a/KTp/Declarative/telepathy-manager.cpp
+++ b/KTp/Declarative/telepathy-manager.cpp
@@ -26,7 +26,7 @@
 #include <TelepathyQt/AbstractClient>
 #include <TelepathyQt/TextChannel>
 
-#include <QDeclarativeEngine>
+#include <QQmlEngine>
 
 TelepathyManager::TelepathyManager(QObject *parent)
     : QObject(parent)
@@ -75,7 +75,7 @@ bool TelepathyManager::registerClient(QObject *client, const QString &name)
     }
 
     //the client registrar will delete the handler when the registrar is deleted.
-    QDeclarativeEngine::setObjectOwnership(client, QDeclarativeEngine::CppOwnership);
+    QQmlEngine::setObjectOwnership(client, QQmlEngine::CppOwnership);
 
     return m_clientRegistrar->registerClient(Tp::AbstractClientPtr(abstractClient), name);
 }
diff --git a/KTp/Logger/CMakeLists.txt b/KTp/Logger/CMakeLists.txt
index 3b3b35f..9d4ef4c 100644
--- a/KTp/Logger/CMakeLists.txt
+++ b/KTp/Logger/CMakeLists.txt
@@ -37,7 +37,7 @@ set (ktp_logger_private_HDRS
     scrollback-manager.h
 )
 
-kde4_add_library (ktploggerprivate SHARED
+add_library (ktploggerprivate SHARED
                  ${ktp_logger_private_SRCS}
 )
 
@@ -47,8 +47,8 @@ set_target_properties(ktploggerprivate PROPERTIES
                                        DEFINE_SYMBOL MAKE_KTP_LIB)
 
 target_link_libraries (ktploggerprivate
-                       ${KDE4_KDECORE_LIBS}
-                       ${TELEPATHY_QT4_LIBRARIES}
+                       
+                       ${TELEPATHY_QT5_LIBRARIES}
                        ktpcommoninternalsprivate
 )
 
diff --git a/KTp/Logger/pending-logger-operation.cpp b/KTp/Logger/pending-logger-operation.cpp
index b52e461..d08467a 100644
--- a/KTp/Logger/pending-logger-operation.cpp
+++ b/KTp/Logger/pending-logger-operation.cpp
@@ -82,4 +82,4 @@ QList<AbstractLoggerPlugin*> PendingLoggerOperation::plugins() const
     return LogManager::instance()->d->plugins;
 }
 
-#include "pending-logger-operation.moc"
+#include "moc_pending-logger-operation.cpp"
diff --git a/KTp/Logger/plugins/CMakeLists.txt b/KTp/Logger/plugins/CMakeLists.txt
index c408808..bd15c96 100644
--- a/KTp/Logger/plugins/CMakeLists.txt
+++ b/KTp/Logger/plugins/CMakeLists.txt
@@ -1,3 +1,3 @@
-if (TELEPATHY_LOGGER_QT4_FOUND)
+if (TELEPATHY_LOGGER_QT5_FOUND)
     add_subdirectory(tplogger)
-endif(TELEPATHY_LOGGER_QT4_FOUND)
+endif()
diff --git a/KTp/Logger/plugins/tplogger/CMakeLists.txt b/KTp/Logger/plugins/tplogger/CMakeLists.txt
index fa1a600..5a36206 100644
--- a/KTp/Logger/plugins/tplogger/CMakeLists.txt
+++ b/KTp/Logger/plugins/tplogger/CMakeLists.txt
@@ -15,9 +15,9 @@ target_link_libraries (ktploggerplugin_tplogger
     ktpcommoninternalsprivate
     ktploggerprivate
     ${QT_LIBRARIES}
-    ${KDE4_KDECORE_LIBS}
-    ${TELEPATHY_QT4_LIBRARIES}
-    ${TELEPATHY_LOGGER_QT4_LIBRARIES}
+    
+    ${TELEPATHY_QT5_LIBRARIES}
+    ${TELEPATHY_LOGGER_QT5_LIBRARIES}
 )
 
 # Install:
diff --git a/KTp/Models/CMakeLists.txt b/KTp/Models/CMakeLists.txt
index e89c7d7..1b69e6e 100644
--- a/KTp/Models/CMakeLists.txt
+++ b/KTp/Models/CMakeLists.txt
@@ -30,8 +30,8 @@ set (ktp_models_private_HDRS
 )
 
 set (ktp_models_private_LIBS
-                       ${KDE4_KDECORE_LIBS}
-                       ${TELEPATHY_QT4_LIBRARIES}
+                       
+                       ${TELEPATHY_QT5_LIBRARIES}
                        ${KDE4_KDEUI_LIBS}
                        ktpcommoninternalsprivate
 )
@@ -49,9 +49,9 @@ if (KPEOPLE_FOUND)
          ${KPEOPLE_LIBS}
          ${KDEPIMLIBS_KABC_LIBS}
          )
-endif (KPEOPLE_FOUND)
+endif ()
 
-kde4_add_library (ktpmodelsprivate SHARED
+add_library (ktpmodelsprivate SHARED
                  ${ktp_models_private_SRCS}
 )
 
diff --git a/KTp/Models/contacts-filter-model.cpp b/KTp/Models/contacts-filter-model.cpp
index 617d3aa..e3a5642 100644
--- a/KTp/Models/contacts-filter-model.cpp
+++ b/KTp/Models/contacts-filter-model.cpp
@@ -1019,4 +1019,4 @@ QString ContactsFilterModel::sortRoleString() const
     return QString();
 }
 
-#include "contacts-filter-model.moc"
+#include "moc_contacts-filter-model.cpp"
diff --git a/KTp/Widgets/CMakeLists.txt b/KTp/Widgets/CMakeLists.txt
index ff74193..6d46417 100644
--- a/KTp/Widgets/CMakeLists.txt
+++ b/KTp/Widgets/CMakeLists.txt
@@ -27,13 +27,13 @@ set (ktp_widgets_private_HDRS
      settings-kcm-dialog.h
 )
 
-kde4_add_ui_files (ktp_widgets_private_SRCS
+qt5_wrap_ui (ktp_widgets_private_SRCS
                    add-contact-dialog.ui
                    join-chat-room-dialog.ui
                    start-chat-dialog.ui
 )
 
-kde4_add_library (ktpwidgetsprivate SHARED
+add_library (ktpwidgetsprivate SHARED
                  ${ktp_widgets_private_SRCS}
 )
 
@@ -44,11 +44,11 @@ set_target_properties(ktpwidgetsprivate PROPERTIES
                                                 DEFINE_SYMBOL MAKE_KTP_LIB)
 
 target_link_libraries (ktpwidgetsprivate
-                       ${KDE4_KDECORE_LIBS}
-                       ${TELEPATHY_QT4_LIBRARIES}
-                       ${KDE4_KDEUI_LIBS}
-                       ${KDE4_KNOTIFYCONFIG_LIBRARY}
-                       ${KDE4_KCMUTILS_LIBS}
+                       
+                       ${TELEPATHY_QT5_LIBRARIES}
+                       KF5::KDE4Support
+                       KF5::NotifyConfig
+                       KF5::KCMUtils
                        ktpcommoninternalsprivate
                        ktpmodelsprivate
 )
diff --git a/KTp/Widgets/add-contact-dialog.cpp b/KTp/Widgets/add-contact-dialog.cpp
index 233a6b6..c9b8ae5 100644
--- a/KTp/Widgets/add-contact-dialog.cpp
+++ b/KTp/Widgets/add-contact-dialog.cpp
@@ -30,6 +30,7 @@
 #include <KMessageBox>
 #include <KPushButton>
 #include <KDebug>
+#include <KLocalizedString>
 
 #include <TelepathyQt/AccountManager>
 #include <TelepathyQt/Account>
diff --git a/KTp/Widgets/contact-grid-dialog.cpp b/KTp/Widgets/contact-grid-dialog.cpp
index 1b72346..5c092d1 100644
--- a/KTp/Widgets/contact-grid-dialog.cpp
+++ b/KTp/Widgets/contact-grid-dialog.cpp
@@ -55,7 +55,7 @@ public:
     KTp::ContactsListModel *contactsModel;
     KTp::ContactGridWidget *contactGridWidget;
 
-public Q_SLOTS:
+public:
     void _k_onAccountManagerReady();
     void _k_onSelectionChanged();
 };
@@ -149,4 +149,4 @@ KTp::ContactsFilterModel* KTp::ContactGridDialog::filter() const
 }
 
 
-#include "contact-grid-dialog.moc"
+#include "moc_contact-grid-dialog.cpp"
diff --git a/KTp/Widgets/contact-view-widget.cpp b/KTp/Widgets/contact-view-widget.cpp
index 8a4846b..04dec5b 100644
--- a/KTp/Widgets/contact-view-widget.cpp
+++ b/KTp/Widgets/contact-view-widget.cpp
@@ -24,10 +24,10 @@
 #include <KDE/KLineEdit>
 #include <KDE/KDebug>
 
-#include <QtGui/QApplication>
 #include <QtGui/QTextOption>
 #include <QtGui/QPainter>
-#include <QtGui/QVBoxLayout>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QVBoxLayout>
 
 #include "types.h"
 #include <KTp/Models/contacts-list-model.h>
diff --git a/KTp/Widgets/contact-view-widget.h b/KTp/Widgets/contact-view-widget.h
index 1a2e763..2ebf4a3 100644
--- a/KTp/Widgets/contact-view-widget.h
+++ b/KTp/Widgets/contact-view-widget.h
@@ -21,8 +21,8 @@
 #ifndef CONTACT_VIEW_WIDGET_H
 #define CONTACT_VIEW_WIDGET_H
 
-#include <QtGui/QWidget>
-#include <QtGui/QListView>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QListView>
 
 #include <TelepathyQt/Types>
 
diff --git a/KTp/Widgets/join-chat-room-dialog.cpp b/KTp/Widgets/join-chat-room-dialog.cpp
index 710eb87..0a7e286 100644
--- a/KTp/Widgets/join-chat-room-dialog.cpp
+++ b/KTp/Widgets/join-chat-room-dialog.cpp
@@ -31,6 +31,9 @@
 #include <KNotification>
 #include <KPushButton>
 #include <KCompletionBox>
+#include <KIcon>
+#include <KGlobalSettings>
+
 
 #include <TelepathyQt/AccountSet>
 #include <TelepathyQt/AccountCapabilityFilter>
@@ -44,6 +47,7 @@
 #include <TelepathyQt/RoomListChannel>
 
 #include <QSortFilterProxyModel>
+#include <KLocalizedString>
 
 KTp::JoinChatRoomDialog::JoinChatRoomDialog(Tp::AccountManagerPtr accountManager, QWidget* parent)
     : KDialog(parent, Qt::Dialog)
@@ -93,7 +97,7 @@ KTp::JoinChatRoomDialog::JoinChatRoomDialog(Tp::AccountManagerPtr accountManager
     ui->listView->setModelColumn(FavoriteRoomsModel::NameColumn);
 
     // recentTab
-    m_recentComp->setCompletionMode(KGlobalSettings::CompletionPopup);
+    m_recentComp->setCompletionMode(KCompletion::CompletionPopup);
     m_recentComp->setIgnoreCase(true);
 
     ui->lineEdit->setCompletionObject(m_recentComp);
diff --git a/KTp/Widgets/notification-config-dialog.cpp b/KTp/Widgets/notification-config-dialog.cpp
index 5047dc2..fe22197 100644
--- a/KTp/Widgets/notification-config-dialog.cpp
+++ b/KTp/Widgets/notification-config-dialog.cpp
@@ -32,6 +32,7 @@
 #include <KAboutData>
 #include <KConfig>
 #include <KSharedConfig>
+#include <KLocalizedString>
 
 KTp::NotificationConfigDialog::NotificationConfigDialog(const Tp::ContactPtr &contact, QWidget *parent)
     : KDialog(parent)
diff --git a/KTp/Widgets/settings-kcm-dialog.cpp b/KTp/Widgets/settings-kcm-dialog.cpp
index 036b80c..1ff8b1a 100644
--- a/KTp/Widgets/settings-kcm-dialog.cpp
+++ b/KTp/Widgets/settings-kcm-dialog.cpp
@@ -23,6 +23,8 @@
 
 #include <KNotifyConfigWidget>
 #include <KMessageBox>
+#include <KLocalizedString>
+#include <KIcon>
 
 namespace KTp
 {
@@ -66,4 +68,4 @@ void SettingsKcmDialog::addNotificationsModule()
     addPage(notificationPage);
 }
 
-}
\ No newline at end of file
+}
diff --git a/KTp/Widgets/start-chat-dialog.cpp b/KTp/Widgets/start-chat-dialog.cpp
index e7629f2..dfd2021 100644
--- a/KTp/Widgets/start-chat-dialog.cpp
+++ b/KTp/Widgets/start-chat-dialog.cpp
@@ -38,6 +38,7 @@
 
 #include <KTp/actions.h>
 #include <KTp/contact.h>
+#include <KLocalizedString>
 
 namespace KTp {
 
diff --git a/KTp/actions.cpp b/KTp/actions.cpp
index c4c6f85..e25c9f3 100644
--- a/KTp/actions.cpp
+++ b/KTp/actions.cpp
@@ -181,8 +181,7 @@ Tp::PendingChannelRequest* Actions::startFileTransfer(const Tp::AccountPtr &acco
         notification->setText(i18n("Transferring files with .exe or .ini extension is not allowed by Google Talk. It was sent with filename <i>%1</i>", fileName));
         notification->setTitle(i18n("Transferred file renamed"));
 
-        KAboutData aboutData("ktelepathy", 0, KLocalizedString(), 0);
-        notification->setComponentData(KComponentData(aboutData));
+        notification->setComponentName(QStringLiteral("ktelepathy"));
         notification->sendEvent();
 
     } else {
diff --git a/KTp/contact-info-dialog.cpp b/KTp/contact-info-dialog.cpp
index 7cc53d3..83331e4 100644
--- a/KTp/contact-info-dialog.cpp
+++ b/KTp/contact-info-dialog.cpp
@@ -45,6 +45,8 @@
 #include <KFileDialog>
 #include <KImageFilePreview>
 #include <KMessageBox>
+#include <KIconLoader>
+#include <KMimeType>
 
 namespace KTp {
 
@@ -208,7 +210,7 @@ void ContactInfoDialog::Private::onContactInfoReceived(Tp::PendingOperation* op)
 
 void ContactInfoDialog::Private::onChangeAvatarButtonClicked()
 {
-    QPointer<KFileDialog> fileDialog = new KFileDialog(KUrl(), QString(), q);
+    QPointer<KFileDialog> fileDialog = new KFileDialog(QUrl(), QString(), q);
     fileDialog->setOperationMode(KFileDialog::Opening);
     fileDialog->setPreviewWidget(new KImageFilePreview(fileDialog));
     fileDialog->setMimeFilter(QStringList() << QLatin1String("image/*"));
@@ -302,7 +304,7 @@ void ContactInfoDialog::Private::addStateRow(const QString& description, Tp::Con
 {
     QLabel *descriptionLabel = new QLabel(description, q);
 
-    KIcon icon;
+    QIcon icon;
     switch (state) {
         case Tp::Contact::PresenceStateYes:
             icon = KIcon(QLatin1String("task-complete"));
@@ -454,4 +456,4 @@ void ContactInfoDialog::slotButtonClicked(int button)
 
 } /* namespace KTp */
 
-#include "contact-info-dialog.moc"
+#include "moc_contact-info-dialog.cpp"
diff --git a/KTp/logs-importer-private.cpp b/KTp/logs-importer-private.cpp
index 7275b07..74e6f46 100644
--- a/KTp/logs-importer-private.cpp
+++ b/KTp/logs-importer-private.cpp
@@ -22,6 +22,7 @@
 #include <KLocalizedString>
 #include <KDebug>
 #include <KStandardDirs>
+#include <KTimeZone>
 
 using namespace KTp;
 
diff --git a/KTp/message-filter-config-manager.h b/KTp/message-filter-config-manager.h
index 2f02944..a470c95 100644
--- a/KTp/message-filter-config-manager.h
+++ b/KTp/message-filter-config-manager.h
@@ -20,6 +20,7 @@
 #define MESSAGE_FILTER_CONFIG_MANAGER_H
 
 #include <KPluginInfo>
+#include <KSharedConfig>
 
 #include <KTp/ktp-export.h>
 
diff --git a/KTp/message-processor.cpp b/KTp/message-processor.cpp
index 906f8e6..b461ef8 100644
--- a/KTp/message-processor.cpp
+++ b/KTp/message-processor.cpp
@@ -29,6 +29,7 @@
 #include <KService>
 #include <KServiceTypeTrader>
 #include <KPluginFactory>
+#include <KGlobal>
 #include <KDE/KStandardDirs>
 
 using namespace KTp;
diff --git a/KTp/persistent-contact.h b/KTp/persistent-contact.h
index aedfbd8..62d691a 100644
--- a/KTp/persistent-contact.h
+++ b/KTp/persistent-contact.h
@@ -24,6 +24,7 @@
 #include "KTp/contact.h"
 
 #include "ktp-export.h"
+#include <kdemacros.h>
 
 namespace KTp {
 
diff --git a/KTp/telepathy-handler-application.cpp b/KTp/telepathy-handler-application.cpp
index 2b5d608..aa78f5c 100644
--- a/KTp/telepathy-handler-application.cpp
+++ b/KTp/telepathy-handler-application.cpp
@@ -164,19 +164,6 @@ TelepathyHandlerApplication::TelepathyHandlerApplication(bool GUIenabled,
     d->init(initialTimeout, timeout);
 }
 
-#ifndef Q_OS_WIN
-TelepathyHandlerApplication::TelepathyHandlerApplication(Display *display,
-                                                         Qt::HANDLE visual,
-                                                         Qt::HANDLE colormap,
-                                                         int initialTimeout,
-                                                         int timeout)
-    : KApplication(display, visual, colormap, Private::initHack()),
-      d(new Private(this))
-{
-    d->init(initialTimeout, timeout);
-}
-#endif
-
 TelepathyHandlerApplication::~TelepathyHandlerApplication()
 {
     delete d;
@@ -222,4 +209,4 @@ void TelepathyHandlerApplication::jobFinished()
 
 } // namespace KTp
 
-#include "telepathy-handler-application.moc"
+#include "moc_telepathy-handler-application.cpp"
diff --git a/KTp/telepathy-handler-application.h b/KTp/telepathy-handler-application.h
index fbdb523..504ad52 100644
--- a/KTp/telepathy-handler-application.h
+++ b/KTp/telepathy-handler-application.h
@@ -51,14 +51,6 @@ public:
                                          int initialTimeout = 15000,
                                          int timeout = 2000);
 
-#ifndef Q_OS_WIN
-    explicit TelepathyHandlerApplication(Display *display,
-                                         Qt::HANDLE visual = 0,
-                                         Qt::HANDLE colormap = 0,
-                                         int initialTimeout = 15000,
-                                         int timeout = 2000);
-#endif
-
     virtual ~TelepathyHandlerApplication();
 
     static int newJob();
diff --git a/data/icons/CMakeLists.txt b/data/icons/CMakeLists.txt
index 106884f..832a8e5 100644
--- a/data/icons/CMakeLists.txt
+++ b/data/icons/CMakeLists.txt
@@ -1 +1 @@
-kde4_install_icons( ${ICON_INSTALL_DIR} )
+ecm_install_icons( ${ICON_INSTALL_DIR} )
diff --git a/kpeople/actionsplugin/CMakeLists.txt b/kpeople/actionsplugin/CMakeLists.txt
index c2e5d3d..e4d1fee 100644
--- a/kpeople/actionsplugin/CMakeLists.txt
+++ b/kpeople/actionsplugin/CMakeLists.txt
@@ -10,7 +10,7 @@ kde4_add_plugin (ktp_kpeople_plugin
 
 target_link_libraries (ktp_kpeople_plugin
     ${QT_LIBRARIES}
-    ${TELEPATHY_QT4_LIBRARIES}
+    ${TELEPATHY_QT5_LIBRARIES}
     ${KDE4_KDEUI_LIBS}
     ${KPEOPLE_LIBS}
     ${KDE4_KFILE_LIBS}
diff --git a/kpeople/datasourceplugin/CMakeLists.txt b/kpeople/datasourceplugin/CMakeLists.txt
index 408e31f..b3fb61d 100644
--- a/kpeople/datasourceplugin/CMakeLists.txt
+++ b/kpeople/datasourceplugin/CMakeLists.txt
@@ -11,7 +11,7 @@ kde4_add_plugin (im_persons_data_source_plugin
 target_link_libraries (im_persons_data_source_plugin
     ${QT_LIBRARIES}
     ${QT_QTSQL_LIBRARIES}
-    ${TELEPATHY_QT4_LIBRARIES}
+    ${TELEPATHY_QT5_LIBRARIES}
     ${KDE4_KDEUI_LIBS}
     ${KPEOPLE_LIBS}
     ${KDEPIMLIBS_KABC_LIBS}
diff --git a/kpeople/uiplugins/CMakeLists.txt b/kpeople/uiplugins/CMakeLists.txt
index 2fa6b8b..fda1f2c 100644
--- a/kpeople/uiplugins/CMakeLists.txt
+++ b/kpeople/uiplugins/CMakeLists.txt
@@ -1,9 +1,9 @@
 include_directories(${KPEOPLE_INCLUDES})
 
-kde4_add_plugin(imdetailswidgetplugin imdetailswidget.cpp)
-target_link_libraries(imdetailswidgetplugin ${QT_QTCORE_LIBRARY}
-    ${QT_QTGUI_LIBRARY}
-    ${TELEPATHY_QT4_LIBRARIES}
+add_library(imdetailswidgetplugin MODULE imdetailswidget.cpp)
+target_link_libraries(imdetailswidgetplugin Qt5::Core
+    Qt5::Gui
+    ${TELEPATHY_QT5_LIBRARIES}
     ${KDE4_KDECORE_LIBRARY}
     ${KDE4_KDEUI_LIBRARY}
     ${KPEOPLE_LIBS}
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 7be28cb..56c67ba 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -11,20 +11,20 @@ set(model_view_SRCS
     roles-proxy-model.cpp
 )
 
-kde4_add_ui_files(model_view_SRCS model-view.ui)
+qt5_wrap_ui(model_view_SRCS model-view.ui)
 
 ###
 
-kde4_add_executable(ktp_contact_list_model_view
+add_executable(ktp_contact_list_model_view
     ${model_view_SRCS}
     contact-list-model-view-main.cpp
 )
 
 target_link_libraries(ktp_contact_list_model_view
-  ${QT_QTTEST_LIBRARY}
-  ${KDE4_KDECORE_LIBS}
+  Qt5::Test
+  
   ${KDE4_KDEUI_LIBS}
-  ${TELEPATHY_QT4_LIBRARIES}
+  ${TELEPATHY_QT5_LIBRARIES}
   ktpcommoninternalsprivate
   ktpmodelsprivate
 )
@@ -34,21 +34,21 @@ if (KPEOPLE_FOUND)
 include_directories(${KPEOPLE_INCLUDES})
 
 
-kde4_add_executable(ktp_kpeople_list_model_view
+add_executable(ktp_kpeople_list_model_view
     ${model_view_SRCS}
     kpeople-model-view-main.cpp
 )
 
 target_link_libraries(ktp_kpeople_list_model_view
-  ${QT_QTTEST_LIBRARY}
-  ${KDE4_KDECORE_LIBS}
+  Qt5::Test
+  
   ${KDE4_KDEUI_LIBS}
-  ${TELEPATHY_QT4_LIBRARIES}
+  ${TELEPATHY_QT5_LIBRARIES}
   ${KPEOPLE_LIBS}
   ktpcommoninternalsprivate
   ktpmodelsprivate
 )
 
-endif (KPEOPLE_FOUND)
+endif ()
 
 
diff --git a/tests/contact-list-model-view-main.cpp b/tests/contact-list-model-view-main.cpp
index a2ddde4..ee9387e 100644
--- a/tests/contact-list-model-view-main.cpp
+++ b/tests/contact-list-model-view-main.cpp
@@ -22,9 +22,7 @@
 #include "model-view.h"
 
 #include <KAboutData>
-#include <KCmdLineArgs>
-#include <KDebug>
-#include <KApplication>
+#include <KLocalizedString>
 
 #include <TelepathyQt/Types>
 #include <TelepathyQt/Debug>
@@ -35,6 +33,7 @@
 #include <TelepathyQt/TextChannel>
 
 #include <QDBusConnection>
+#include <QApplication>
 
 #include "KTp/Models/contacts-list-model.h"
 #include "KTp/contact-factory.h"
@@ -43,17 +42,20 @@
 
 int main(int argc, char *argv[])
 {
-    KAboutData aboutData("telepathy-kde-models-test-ui",
-                         0,
-                         ki18n("Telepathy KDE Models Test UI"),
-                         "0.1",
-                         ki18n("Telepathy KDE Models Test UI"),
+    KAboutData aboutData(QStringLiteral("telepathy-kde-models-test-ui"),
+                         QString(),
+                         i18n("Telepathy KDE Models Test UI"),
+                         QStringLiteral("0.1"),
+                         i18n("Telepathy KDE Models Test UI"),
                          KAboutData::License_LGPL,
-                         ki18n("(C) 2011 Collabora Ltd"));
+                         i18n("(C) 2011 Collabora Ltd"));
 
-    KCmdLineArgs::init(argc, argv, &aboutData);
+    QApplication app(argc, argv);
 
-    KApplication app;
+    QCommandLineParser parser;
+    aboutData.setupCommandLine(&parser);
+    parser.process(app);
+    aboutData.processCommandLine(&parser);
 
     Tp::registerTypes();
     Tp::enableDebug(false);
diff --git a/tests/roles-proxy-model.cpp b/tests/roles-proxy-model.cpp
index 70ed6b0..b008356 100644
--- a/tests/roles-proxy-model.cpp
+++ b/tests/roles-proxy-model.cpp
@@ -77,7 +77,7 @@ QModelIndex RolesProxyModel::index(int row, int column, const QModelIndex &paren
     }
 
     // Return the index to the item.
-    return createIndex(row, column, 0);
+    return createIndex(row, column);
 }
 
 QModelIndex RolesProxyModel::parent(const QModelIndex &index) const
diff --git a/tools/debugger/CMakeLists.txt b/tools/debugger/CMakeLists.txt
index 43d0dad..9e501a8 100644
--- a/tools/debugger/CMakeLists.txt
+++ b/tools/debugger/CMakeLists.txt
@@ -2,7 +2,7 @@ project(ktp-debugger)
 
 include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
-    ${TELEPATHY_QT4_INCLUDE_DIR}
+    ${TELEPATHY_QT5_INCLUDE_DIR}
     ${KDE4_INCLUDES}
 )
 
@@ -12,12 +12,15 @@ set(ktp-debugger_SRCS
     main.cpp
 )
 
-kde4_add_ui_files(ktp-debugger_SRCS main-window.ui)
-kde4_add_executable(ktp-debugger ${ktp-debugger_SRCS})
+qt5_wrap_ui(ktp-debugger_SRCS main-window.ui)
+add_executable(ktp-debugger ${ktp-debugger_SRCS})
 target_link_libraries(ktp-debugger
-    ${TELEPATHY_QT4_LIBRARIES}
-    ${KDE4_KDEUI_LIBS}
-    ${KDE4_KTEXTEDITOR_LIBS}
+    ${TELEPATHY_QT5_LIBRARIES}
+    KF5::IconThemes
+    KF5::TextEditor
+    KF5::I18n
+    KF5::IconThemes
+    KF5::KDE4Support
 )
 
 install(TARGETS ktp-debugger DESTINATION ${BIN_INSTALL_DIR})
diff --git a/tools/debugger/debug-message-view.cpp b/tools/debugger/debug-message-view.cpp
index 0b006e2..3eb3214 100644
--- a/tools/debugger/debug-message-view.cpp
+++ b/tools/debugger/debug-message-view.cpp
@@ -33,6 +33,7 @@
 #include <KTextEditor/View>
 #include <kfind.h>
 #include <KFileDialog>
+#include <KTextEditor/Document>
 
 #include <ctime>
 #include <QDate>
@@ -60,8 +61,8 @@ DebugMessageView::DebugMessageView(QWidget *parent)
     layout()->addWidget(view);
     m_editor->setHighlightingMode(QString::fromLatin1("KTp"));
 
-    m_editor->activeView()->setContextMenu(new QMenu());
-    m_editor->activeView()->contextMenu()->addAction(KStandardAction::clear(this, SLOT(clear()), this));
+    view->setContextMenu(new QMenu());
+    view->contextMenu()->addAction(KStandardAction::clear(this, SLOT(clear()), this));
 }
 
 void DebugMessageView::clear()
@@ -79,11 +80,10 @@ void DebugMessageView::showEvent(QShowEvent* event)
 
 void DebugMessageView::addDelayedMessages()
 {
-    m_editor->startEditing();
+    KTextEditor::Document::EditingTransaction transaction(m_editor);
     Q_FOREACH(const Tp::DebugMessage &msg, m_tmpCache) {
         appendMessage(msg);
     }
-    m_editor->endEditing();
     m_tmpCache.clear();
 }
 
@@ -174,11 +174,12 @@ void DebugMessageView::onFetchMessagesFinished(Tp::PendingOperation* op)
         messages.append(m_tmpCache); //append any messages that were received from onNewDebugMessage()
         m_tmpCache.clear();
 
-        m_editor->startEditing();
-        Q_FOREACH(const Tp::DebugMessage &msg, messages) {
-            appendMessage(msg);
+        {
+            KTextEditor::Document::EditingTransaction transaction(m_editor);
+            Q_FOREACH(const Tp::DebugMessage &msg, messages) {
+                appendMessage(msg);
+            }
         }
-        m_editor->endEditing();
 
         //TODO limit m_messages size
 
@@ -238,7 +239,7 @@ void DebugMessageView::appendMessage(const Tp::DebugMessage &msg)
 
 void DebugMessageView::saveLogFile()
 {
-    KUrl savedFile = KFileDialog::getSaveFileName(KUrl(), QString(), 0, i18n("Save Log"));
+    QUrl savedFile = KFileDialog::getSaveFileName(QUrl(), QString(), 0, i18n("Save Log"));
     m_editor->saveAs(savedFile);
 }
 
diff --git a/tools/debugger/main-window.cpp b/tools/debugger/main-window.cpp
index eb607cc..5d9c1e1 100644
--- a/tools/debugger/main-window.cpp
+++ b/tools/debugger/main-window.cpp
@@ -21,6 +21,8 @@
 #include <KIcon>
 #include <KStatusBar>
 #include <KToolBar>
+#include <KIconLoader>
+#include <KLocalizedString>
 
 
 MainWindow::MainWindow(QWidget *parent)
@@ -56,4 +58,4 @@ MainWindow::~MainWindow()
 void MainWindow::saveLogFile()
 {
     m_ui.tabWidget->currentWidget()->findChild<DebugMessageView *>()->saveLogFile();
-}
\ No newline at end of file
+}
diff --git a/tools/debugger/main.cpp b/tools/debugger/main.cpp
index 3861cf2..71c3758 100644
--- a/tools/debugger/main.cpp
+++ b/tools/debugger/main.cpp
@@ -20,24 +20,28 @@
 #include "version.h"
 
 #include <KAboutData>
-#include <KCmdLineArgs>
-#include <KApplication>
+#include <KLocalizedString>
 #include <TelepathyQt/Debug>
 #include <TelepathyQt/Types>
 
 int main(int argc, char **argv)
 {
-    KAboutData aboutData("ktp-debugger", 0,
-            ki18n("KDE Telepathy Debug Tool"),
-            KTP_VERSION,
-            ki18n("Tool for inspecting logs of the various underlying telepathy components"),
+    KAboutData aboutData(QStringLiteral("ktp-debugger"), QString(),
+            i18n("KDE Telepathy Debug Tool"),
+            QStringLiteral(KTP_VERSION),
+            i18n("Tool for inspecting logs of the various underlying telepathy components"),
             KAboutData::License_LGPL,
-            ki18n("Copyright (C) 2011 Collabora Ltd."));
-    aboutData.addAuthor(ki18n("George Kiagiadakis"), ki18n("Developer"),
-                        "george.kiagiadakis at collabora.com");
-
-    KCmdLineArgs::init(argc, argv, &aboutData);
-    KApplication app;
+            i18n("Copyright (C) 2011 Collabora Ltd."));
+    aboutData.addAuthor(i18n("George Kiagiadakis"), i18n("Developer"),
+                        QStringLiteral("george.kiagiadakis at collabora.com"));
+
+    QApplication app(argc, argv);
+    {
+        QCommandLineParser parser;
+        aboutData.setupCommandLine(&parser);
+        parser.process(app);
+        aboutData.processCommandLine(&parser);
+    }
 
     Tp::registerTypes();
     Tp::enableDebug(true);

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list