Merge lp:~zeller-benjamin/messaging-app/applauncherd into lp:messaging-app

Proposed by Benjamin Zeller
Status: Work in progress
Proposed branch: lp:~zeller-benjamin/messaging-app/applauncherd
Merge into: lp:messaging-app
Diff against target: 198 lines (+47/-14)
7 files modified
CMakeLists.txt (+6/-0)
debian/control (+3/-0)
src/CMakeLists.txt (+7/-0)
src/main.cpp (+14/-5)
src/messaging-app.desktop.in.in (+1/-1)
src/messagingapplication.cpp (+14/-5)
src/messagingapplication.h (+2/-3)
To merge this branch: bzr merge lp:~zeller-benjamin/messaging-app/applauncherd
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+287959@code.launchpad.net

Commit message

Prepare messaging-app for mapplauncherd

Description of the change

Prepare messaging-app for mapplauncherd

To post a comment you must log in.
524. By Benjamin Zeller

Prepare messaging-app for mapplauncherd

525. By Benjamin Zeller

Merge trunk

Unmerged revisions

525. By Benjamin Zeller

Merge trunk

524. By Benjamin Zeller

Prepare messaging-app for mapplauncherd

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-01-19 17:44:27 +0000
+++ CMakeLists.txt 2016-03-14 10:25:25 +0000
@@ -2,6 +2,8 @@
2cmake_minimum_required(VERSION 2.8)2cmake_minimum_required(VERSION 2.8)
3set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)3set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
44
5option(MAPPLAUNCHERD_ENABLED "Build with mapplauncherd support" ON)
6
5# Standard install paths7# Standard install paths
6include(GNUInstallDirs)8include(GNUInstallDirs)
79
@@ -46,6 +48,10 @@
46find_package(PkgConfig REQUIRED)48find_package(PkgConfig REQUIRED)
47pkg_check_modules(NOTIFY REQUIRED libnotify)49pkg_check_modules(NOTIFY REQUIRED libnotify)
4850
51if (MAPPLAUNCHERD_ENABLED)
52 pkg_check_modules(MAPPLAUNCH REQUIRED qdeclarative5-boostable)
53endif()
54
49#find unity8 qml libraries55#find unity8 qml libraries
50set(UNITY8_QML_PATH /usr/lib/${CMAKE_C_LIBRARY_ARCHITECTURE}/unity8/qml/)56set(UNITY8_QML_PATH /usr/lib/${CMAKE_C_LIBRARY_ARCHITECTURE}/unity8/qml/)
51find_path(LIB_UNITY_QML_EXISTS NAMES libUnity-qml.so57find_path(LIB_UNITY_QML_EXISTS NAMES libUnity-qml.so
5258
=== modified file 'debian/control'
--- debian/control 2016-01-28 12:42:01 +0000
+++ debian/control 2016-03-14 10:25:25 +0000
@@ -33,6 +33,7 @@
33 qml-module-qtmultimedia,33 qml-module-qtmultimedia,
34 qtpim5-dev,34 qtpim5-dev,
35 xvfb,35 xvfb,
36 libmdeclarativecache5-dev (>= 1.1.13),
36Standards-Version: 3.9.437Standards-Version: 3.9.4
37Homepage: https://launchpad.net/messaging-app38Homepage: https://launchpad.net/messaging-app
38# If you aren't a member of ~phablet-team but need to upload packaging changes,39# If you aren't a member of ~phablet-team but need to upload packaging changes,
@@ -55,6 +56,8 @@
55 qtdeclarative5-gsettings1.0,56 qtdeclarative5-gsettings1.0,
56 qml-module-qt-labs-settings,57 qml-module-qt-labs-settings,
57 ttf-ancient-fonts-symbola,58 ttf-ancient-fonts-symbola,
59 libmdeclarativecache5-0,
60 mapplauncherd-booster-ubuntu-components,
58Recommends: unity8 (>= 7.81.0~),61Recommends: unity8 (>= 7.81.0~),
59Description: messaging application for Ubuntu62Description: messaging application for Ubuntu
60 An application to send and receive messages.63 An application to send and receive messages.
6164
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2015-11-26 20:32:50 +0000
+++ src/CMakeLists.txt 2016-03-14 10:25:25 +0000
@@ -20,6 +20,13 @@
20 )20 )
21qt5_use_modules(${MESSAGING_APP} Core DBus Gui Multimedia Qml Quick Sql Versit)21qt5_use_modules(${MESSAGING_APP} Core DBus Gui Multimedia Qml Quick Sql Versit)
2222
23if (MAPPLAUNCHERD_ENABLED)
24 set(MAPPLAUNCHERD_COMMAND_PREFIX "/usr/bin/invoker --type=ubuntu-components ")
25 add_definitions(-DMAPPLAUNCHERD_ENABLED)
26 target_link_libraries (${MESSAGING_APP} ${MAPPLAUNCH_LDFLAGS})
27 target_compile_options(${MESSAGING_APP} PRIVATE ${MAPPLAUNCH_CFLAGS})
28endif()
29
23include_directories(30include_directories(
24 ${CMAKE_CURRENT_BINARY_DIR}31 ${CMAKE_CURRENT_BINARY_DIR}
25 ${CMAKE_CURRENT_SOURCE_DIR}32 ${CMAKE_CURRENT_SOURCE_DIR}
2633
=== modified file 'src/main.cpp'
--- src/main.cpp 2014-08-26 19:07:12 +0000
+++ src/main.cpp 2016-03-14 10:25:25 +0000
@@ -24,6 +24,8 @@
24#include <QString>24#include <QString>
25#include <QTemporaryFile>25#include <QTemporaryFile>
26#include <QTextStream>26#include <QTextStream>
27#include <QGuiApplication>
28#include <QScopedPointer>
2729
28// libc30// libc
29#include <cerrno>31#include <cerrno>
@@ -34,23 +36,30 @@
34#include "messagingapplication.h"36#include "messagingapplication.h"
35#include "config.h"37#include "config.h"
3638
39#ifdef MAPPLAUNCHERD_ENABLED
40#include <mdeclarativecache5/MDeclarativeCache>
41#endif
42
37// WORKAROUND: to make easy to debug apps43// WORKAROUND: to make easy to debug apps
38#include <QtQml/QQmlDebuggingEnabler>44#include <QtQml/QQmlDebuggingEnabler>
39static QQmlDebuggingEnabler debuggingEnabler(false);45static QQmlDebuggingEnabler debuggingEnabler(false);
4046
41// Temporarily disable the telepathy folks backend47// Temporarily disable the telepathy folks backend
42// as it doesn’t play well with QtFolks.48// as it doesn’t play well with QtFolks.
43int main(int argc, char** argv)49int Q_DECL_EXPORT main(int argc, char** argv)
44{50{
45 QGuiApplication::setApplicationName("Messaging App");51 QGuiApplication::setApplicationName("Messaging App");
46 QGuiApplication::setOrganizationName("com.ubuntu.messaging-app");52 QGuiApplication::setOrganizationName("com.ubuntu.messaging-app");
4753 #ifdef MAPPLAUNCHERD_ENABLED
48 MessagingApplication application(argc, argv);54 QScopedPointer<QGuiApplication> app(MDeclarativeCache::qApplication(argc, argv));
55 #else
56 QScopedPointer<QGuiApplication> app(new QGuiApplication(argc,argv));
57 #endif
58 MessagingApplication application;
4959
50 if (!application.setup()) {60 if (!application.setup()) {
51 return 0;61 return 0;
52 }62 }
5363
54 return application.exec();64 return app->exec();
55}65}
56
5766
=== modified file 'src/messaging-app.desktop.in.in'
--- src/messaging-app.desktop.in.in 2016-02-10 16:50:36 +0000
+++ src/messaging-app.desktop.in.in 2016-03-14 10:25:25 +0000
@@ -4,7 +4,7 @@
4_GenericName=Messaging App4_GenericName=Messaging App
5_Comment=Messaging application5_Comment=Messaging application
6_Keywords=Messages;SMS;MMS;Text Messages;Text6_Keywords=Messages;SMS;MMS;Text Messages;Text
7Exec=messaging-app %u7Exec=@MAPPLAUNCHERD_COMMAND_PREFIX@messaging-app %u
8Terminal=false8Terminal=false
9Icon=@CMAKE_INSTALL_PREFIX@/@MESSAGING_APP_DIR@/assets/messaging-app.png9Icon=@CMAKE_INSTALL_PREFIX@/@MESSAGING_APP_DIR@/assets/messaging-app.png
10MimeType=x-scheme-handler/contact;x-scheme-handler/call10MimeType=x-scheme-handler/contact;x-scheme-handler/call
1111
=== modified file 'src/messagingapplication.cpp'
--- src/messagingapplication.cpp 2016-02-10 17:01:02 +0000
+++ src/messagingapplication.cpp 2016-03-14 10:25:25 +0000
@@ -42,6 +42,11 @@
42#include <QMimeDatabase>42#include <QMimeDatabase>
43#include <QStandardPaths>43#include <QStandardPaths>
44#include <QVersitReader>44#include <QVersitReader>
45#include <QGuiApplication>
46
47#ifdef MAPPLAUNCHERD_ENABLED
48#include <mdeclarativecache5/MDeclarativeCache>
49#endif
4550
46using namespace QtVersit;51using namespace QtVersit;
47#define Pair QPair<QString,QString>52#define Pair QPair<QString,QString>
@@ -84,10 +89,10 @@
84 return new StickersHistoryModel();89 return new StickersHistoryModel();
85}90}
8691
87MessagingApplication::MessagingApplication(int &argc, char **argv)92MessagingApplication::MessagingApplication()
88 : QGuiApplication(argc, argv), m_view(0), m_applicationIsReady(false)93 : QObject(0), m_view(0), m_applicationIsReady(false)
89{94{
90 setApplicationName("MessagingApp");95 qApp->setApplicationName("MessagingApp");
91}96}
9297
93bool MessagingApplication::fullscreen() const98bool MessagingApplication::fullscreen() const
@@ -105,7 +110,7 @@
105 validSchemes << "message";110 validSchemes << "message";
106 }111 }
107112
108 QStringList arguments = this->arguments();113 QStringList arguments = qApp->arguments();
109114
110 if (arguments.contains("--help")) {115 if (arguments.contains("--help")) {
111 printUsage(arguments);116 printUsage(arguments);
@@ -157,7 +162,11 @@
157 }162 }
158 }163 }
159164
160 m_view = new QQuickView();165 #ifdef MAPPLAUNCHERD_ENABLED
166 m_view = MDeclarativeCache::qQuickView();
167 #else
168 m_view = new QQuickView();
169 #endif
161 QObject::connect(m_view, SIGNAL(statusChanged(QQuickView::Status)), this, SLOT(onViewStatusChanged(QQuickView::Status)));170 QObject::connect(m_view, SIGNAL(statusChanged(QQuickView::Status)), this, SLOT(onViewStatusChanged(QQuickView::Status)));
162 QObject::connect(m_view->engine(), SIGNAL(quit()), SLOT(quit()));171 QObject::connect(m_view->engine(), SIGNAL(quit()), SLOT(quit()));
163 m_view->setResizeMode(QQuickView::SizeRootObjectToView);172 m_view->setResizeMode(QQuickView::SizeRootObjectToView);
164173
=== modified file 'src/messagingapplication.h'
--- src/messagingapplication.h 2015-11-24 18:09:55 +0000
+++ src/messagingapplication.h 2016-03-14 10:25:25 +0000
@@ -21,15 +21,14 @@
2121
22#include <QObject>22#include <QObject>
23#include <QQuickView>23#include <QQuickView>
24#include <QGuiApplication>
2524
26class MessagingApplication : public QGuiApplication25class MessagingApplication : public QObject
27{26{
28 Q_OBJECT27 Q_OBJECT
29 Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged)28 Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged)
3029
31public:30public:
32 MessagingApplication(int &argc, char **argv);31 MessagingApplication();
33 virtual ~MessagingApplication();32 virtual ~MessagingApplication();
3433
35 bool fullscreen() const;34 bool fullscreen() const;

Subscribers

People subscribed via source and target branches