Merge lp:~renatofilho/messaging-app/fix-snap-paths into lp:messaging-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 608
Merged at revision: 606
Proposed branch: lp:~renatofilho/messaging-app/fix-snap-paths
Merge into: lp:messaging-app
Diff against target: 31 lines (+5/-2)
1 file modified
config.h.in (+5/-2)
To merge this branch: bzr merge lp:~renatofilho/messaging-app/fix-snap-paths
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
system-apps-ci-bot continuous-integration Approve
Review via email: mp+311137@code.launchpad.net

Commit message

Append "SNAP" path into the base application path, when that var is set.

To post a comment you must log in.
607. By Renato Araujo Oliveira Filho

Fix check for installed app.

608. By Renato Araujo Oliveira Filho

Convert QByteArray to QString to avoid problems with function signature.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:608
https://jenkins.canonical.com/system-apps/job/lp-messaging-app-ci/154/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1993
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/475
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1996
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1826/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1826
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1826/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-app-ci/154/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.h.in'
2--- config.h.in 2016-01-19 17:44:27 +0000
3+++ config.h.in 2016-11-17 13:01:48 +0000
4@@ -28,6 +28,7 @@
5
6 #define I18N_DIRECTORY "@CMAKE_INSTALL_PREFIX@/share/locale"
7 #define UNITY8_QML_PATH "@UNITY8_QML_PATH@"
8+#define SNAP_PATH "SNAP"
9
10 inline bool isRunningInstalled() {
11 static bool installed = (QCoreApplication::applicationDirPath() ==
12@@ -36,7 +37,9 @@
13 }
14
15 inline QString messagingAppDirectory() {
16- if (isRunningInstalled()) {
17+ if (qEnvironmentVariableIsSet(SNAP_PATH)) {
18+ return QString("%1/@CMAKE_INSTALL_PREFIX@/@MESSAGING_APP_DIR@/").arg(QString(qgetenv(SNAP_PATH)));
19+ } else if (isRunningInstalled()) {
20 return QString("@CMAKE_INSTALL_PREFIX@/@MESSAGING_APP_DIR@/");
21 } else {
22 return QString("@CMAKE_SOURCE_DIR@/src/qml/");
23@@ -44,7 +47,7 @@
24 }
25
26 inline QString ubuntuPhonePluginPath() {
27- if (isRunningInstalled()) {
28+ if (isRunningInstalled() || qEnvironmentVariableIsSet(SNAP_PATH)) {
29 return QString::null;
30 } else {
31 return QString("@CMAKE_SOURCE_DIR@/");

Subscribers

People subscribed via source and target branches