Merge lp:~abreu-alexandre/unity-webapps-qml/rtm-backport-sync-fixes into lp:unity-webapps-qml/rtm-14.09

Proposed by Alexandre Abreu
Status: Merged
Approved by: Alexandre Abreu
Approved revision: 134
Merged at revision: 134
Proposed branch: lp:~abreu-alexandre/unity-webapps-qml/rtm-backport-sync-fixes
Merge into: lp:unity-webapps-qml/rtm-14.09
Diff against target: 38 lines (+9/-2)
1 file modified
src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-model.cpp (+9/-2)
To merge this branch: bzr merge lp:~abreu-alexandre/unity-webapps-qml/rtm-backport-sync-fixes
Reviewer Review Type Date Requested Status
WebApps Pending
Review via email: mp+246460@code.launchpad.net

Commit message

Backport a testability improvement (webapps instrumentation) from trunk that allows some tests from external packages to run.

Description of the change

Backport a testability improvement (webapps instrumentation) from trunk that allows some tests from external packages to run.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-model.cpp'
2--- src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-model.cpp 2014-07-17 13:41:45 +0000
3+++ src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-model.cpp 2015-01-14 16:22:12 +0000
4@@ -19,11 +19,11 @@
5 #include <QDir>
6 #include <QDebug>
7 #include <QtCore/QTextStream>
8+#include <QtCore/QtGlobal>
9
10 #include "unity-webapps-app-model.h"
11 #include "unity-webapps-app-manifest-parser.h"
12
13-
14 /*!
15 \qmltype UnityWebappsAppModel
16 \inqmlmodule Ubuntu.UnityWebApps 0.1
17@@ -56,7 +56,6 @@
18 paths, all other "values" are ignored.
19 */
20
21-
22 // TODO add local folders
23 QString UnityWebappsAppModel::_commonScriptsDirName = "common";
24 QString UnityWebappsAppModel::_webappDirPrefix = "unity-webapps-";
25@@ -77,6 +76,14 @@
26 QString
27 UnityWebappsAppModel::getDefaultWebappsInstallationSearchPath()
28 {
29+ const char *WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER_ENV_VAR =
30+ "WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER";
31+ if (qEnvironmentVariableIsSet(
32+ WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER_ENV_VAR))
33+ {
34+ return QString::fromUtf8(
35+ qgetenv(WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER_ENV_VAR));
36+ }
37 return "/usr/share/unity-webapps/userscripts";
38 }
39

Subscribers

People subscribed via source and target branches

to all changes: