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


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

The following commit has been merged in the master branch:
commit cbea7cbc7c7104c6ef270ba71597ef4fb06d7a10
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Mon Feb 25 02:05:23 2013 +0000

    Add a test to display the model from pinned-contacts-model from KTp declarative
    
    Required includes in many other files to be fixed
    
    REVIEW: 109132
---
 KTp/Declarative/contact-pin.h             |  2 +-
 KTp/Declarative/conversation-target.h     |  2 +-
 KTp/Declarative/messages-model.cpp        |  2 +-
 KTp/Declarative/pinned-contacts-model.h   |  2 +-
 KTp/Declarative/telepathy-text-observer.h |  2 +-
 tests/CMakeLists.txt                      | 35 +++++++++++++---
 tests/pinned-contacts-model-view-main.cpp | 68 +++++++++++++++++++++++++++++++
 7 files changed, 102 insertions(+), 11 deletions(-)

diff --git a/KTp/Declarative/contact-pin.h b/KTp/Declarative/contact-pin.h
index ec740b6..96e4e36 100644
--- a/KTp/Declarative/contact-pin.h
+++ b/KTp/Declarative/contact-pin.h
@@ -20,7 +20,7 @@
 #define CONTACTPIN_H
 
 #include <QObject>
-#include "types.h"
+#include "KTp/types.h"
 
 class PinnedContactsModel;
 
diff --git a/KTp/Declarative/conversation-target.h b/KTp/Declarative/conversation-target.h
index 1e7f159..e620cdc 100644
--- a/KTp/Declarative/conversation-target.h
+++ b/KTp/Declarative/conversation-target.h
@@ -23,7 +23,7 @@
 #include <QObject>
 #include <QIcon>
 
-#include "types.h"
+#include "KTp/types.h"
 
 class ConversationTarget : public QObject
 {
diff --git a/KTp/Declarative/messages-model.cpp b/KTp/Declarative/messages-model.cpp
index 1c56e3d..dc975d0 100644
--- a/KTp/Declarative/messages-model.cpp
+++ b/KTp/Declarative/messages-model.cpp
@@ -27,7 +27,7 @@
 #include <TelepathyQt/Account>
 
 
-#include "message-processor.h"
+#include "KTp/message-processor.h"
 
 class MessageItem
 {
diff --git a/KTp/Declarative/pinned-contacts-model.h b/KTp/Declarative/pinned-contacts-model.h
index 7f01961..2b7658c 100644
--- a/KTp/Declarative/pinned-contacts-model.h
+++ b/KTp/Declarative/pinned-contacts-model.h
@@ -21,7 +21,7 @@
 
 #include <QModelIndex>
 #include <QVector>
-#include "types.h"
+#include "KTp/types.h"
 
 struct Pin;
 class ConversationsModel;
diff --git a/KTp/Declarative/telepathy-text-observer.h b/KTp/Declarative/telepathy-text-observer.h
index d60b5a3..3fa20f8 100644
--- a/KTp/Declarative/telepathy-text-observer.h
+++ b/KTp/Declarative/telepathy-text-observer.h
@@ -21,7 +21,7 @@
 #define TELEPATHY_TEXT_OBSERVER_H
 
 #include "conversations-model.h"
-#include "types.h"
+#include "KTp/types.h"
 
 #include <TelepathyQt/AbstractClientHandler>
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4694b75..358c4e1 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -6,18 +6,18 @@ include_directories(
   ${CMAKE_CURRENT_SOURCE_DIR}/..
   )
 
-
-
-set(ktp_contact_list_model_view_SRCS
-    contact-list-model-view-main.cpp
+set(model_view_SRCS
     model-view.cpp
     roles-proxy-model.cpp
 )
 
-kde4_add_ui_files(ktp_contact_list_model_view_SRCS model-view.ui)
+kde4_add_ui_files(model_view_SRCS model-view.ui)
+
+###
 
 kde4_add_executable(ktp_contact_list_model_view
-    ${ktp_contact_list_model_view_SRCS}
+    ${model_view_SRCS}
+    contact-list-model-view-main.cpp
 )
 
 target_link_libraries(ktp_contact_list_model_view
@@ -29,3 +29,26 @@ target_link_libraries(ktp_contact_list_model_view
   ktpmodelsprivate
 )
 
+###
+
+kde4_add_executable(ktp_pinned-contact_list_model_view
+    ${model_view_SRCS}
+    pinned-contacts-model-view-main.cpp
+    ../KTp/Declarative/pinned-contacts-model.cpp
+    ../KTp/Declarative/telepathy-text-observer.cpp
+    ../KTp/Declarative/conversations-model.cpp
+    ../KTp/Declarative/conversation-target.cpp
+    ../KTp/Declarative/contact-pin.cpp
+    ../KTp/Declarative/messages-model.cpp
+    ../KTp/Declarative/conversation-queue-manager.cpp
+    ../KTp/Declarative/conversation.cpp
+)
+
+target_link_libraries(ktp_pinned-contact_list_model_view
+  ${QT_QTTEST_LIBRARY}
+  ${KDE4_KDECORE_LIBS}
+  ${KDE4_KDEUI_LIBS}
+  ${TELEPATHY_QT4_LIBRARIES}
+  ktpcommoninternalsprivate
+  ktpmodelsprivate
+)
\ No newline at end of file
diff --git a/tests/pinned-contacts-model-view-main.cpp b/tests/pinned-contacts-model-view-main.cpp
new file mode 100644
index 0000000..e94de01
--- /dev/null
+++ b/tests/pinned-contacts-model-view-main.cpp
@@ -0,0 +1,68 @@
+/*
+ * This file is part of telepathy-kde-models-test-ui
+ *
+ * Copyright (C) 2011 Collabora Ltd. <info at collabora.co.uk>
+ *   @Author George Goldberg <george.goldberg at collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "model-view.h"
+
+#include <KAboutData>
+#include <KCmdLineArgs>
+#include <KDebug>
+#include <KApplication>
+
+#include <TelepathyQt/Types>
+#include <TelepathyQt/Debug>
+
+#include "KTp/Declarative/telepathy-text-observer.h"
+#include "KTp/Declarative/conversations-model.h"
+#include "KTp/Declarative/pinned-contacts-model.h"
+
+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::License_LGPL,
+                         ki18n("(C) 2011 Collabora Ltd"));
+
+    KCmdLineArgs::init(argc, argv, &aboutData);
+
+    KApplication app;
+
+    Tp::registerTypes();
+    Tp::enableDebug(false);
+    Tp::enableWarnings(true);
+
+    
+    PinnedContactsModel *model = new PinnedContactsModel(&app);
+    
+    TelepathyTextObserver *observer = new TelepathyTextObserver(&app);
+    model->setAccountManager(observer->accountManager());
+    model->setConversationsModel(observer->conversationModel());
+    
+    // Set up and show the main widget
+    ModelView *mainWidget = new ModelView(model, 0);
+    mainWidget->show();
+
+    // Start event loop.
+    app.exec();
+}
+

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list