Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/small-templ-fix into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller on 2015-02-09
Status: Merged
Approved by: Zoltan Balogh on 2015-02-09
Approved revision: 350
Merged at revision: 349
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/small-templ-fix
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 82 lines (+19/-9)
3 files modified
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/Main.qml (+12/-4)
src/ubuntu/ubuntuclicktool.cpp (+2/-3)
src/ubuntu/ubuntusettingsclickwidget.cpp (+5/-2)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/small-templ-fix
Reviewer Review Type Date Requested Status
Zoltan Balogh (community) 2015-02-09 Approve on 2015-02-10
PS Jenkins bot continuous-integration Approve on 2015-02-09
Review via email: mp+249056@code.launchpad.net

Commit Message

- Make use of the backend in the qmake+backend app template
- Fix passing of the "CLICK_NO_LOCAL_MIRROR" env var to the chroot creation script

Description of the Change

Make use of the backend in the qmake+backend app template

To post a comment you must log in.
350. By Benjamin Zeller on 2015-02-09

Fix passing of the CLICK_NO_LOCAL_MIRROR env var

Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/Main.qml'
2--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/Main.qml 2015-01-17 04:53:32 +0000
3+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/Main.qml 2015-02-09 11:47:58 +0000
4@@ -1,6 +1,6 @@
5 import QtQuick 2.0
6 import Ubuntu.Components 1.1
7-
8+import %ClickHookName:s% 1.0
9 /*!
10 \brief MainView with a Label and Button elements.
11 */
12@@ -25,7 +25,15 @@
13 height: units.gu(75)
14
15 Page {
16- title: i18n.tr("Simple")
17+ title: i18n.tr("App with backend")
18+
19+ MyType {
20+ id: myType
21+
22+ Component.onCompleted: {
23+ myType.helloWorld = i18n.tr("Hello world..")
24+ }
25+ }
26
27 Column {
28 spacing: units.gu(1)
29@@ -38,7 +46,7 @@
30 id: label
31 objectName: "label"
32
33- text: i18n.tr("Hello..")
34+ text: myType.helloWorld
35 }
36
37 Button {
38@@ -48,7 +56,7 @@
39 text: i18n.tr("Tap me!")
40
41 onClicked: {
42- label.text = i18n.tr("..world!")
43+ myType.helloWorld = i18n.tr("..from Cpp Backend")
44 }
45 }
46 }
47
48=== modified file 'src/ubuntu/ubuntuclicktool.cpp'
49--- src/ubuntu/ubuntuclicktool.cpp 2015-02-05 08:28:21 +0000
50+++ src/ubuntu/ubuntuclicktool.cpp 2015-02-09 11:47:58 +0000
51@@ -112,12 +112,11 @@
52 bool useLocalMirror = settings.value(QLatin1String(Constants::SETTINGS_KEY_CHROOT_USE_LOCAL_MIRROR),false).toBool();
53 settings.endGroup();
54
55- Utils::Environment env = Utils::Environment::systemEnvironment();
56 if(!useLocalMirror)
57- env.set(QStringLiteral("CLICK_NO_LOCAL_MIRROR"),QStringLiteral("1"));
58+ command.prepend(QStringLiteral("env CLICK_NO_LOCAL_MIRROR=1 "));
59
60 params->setCommand(QLatin1String(Constants::UBUNTU_SUDO_BINARY));
61- params->setEnvironment(env);
62+ params->setEnvironment(Utils::Environment::systemEnvironment());
63 params->setArguments(command);
64 }
65
66
67=== modified file 'src/ubuntu/ubuntusettingsclickwidget.cpp'
68--- src/ubuntu/ubuntusettingsclickwidget.cpp 2015-02-05 08:28:21 +0000
69+++ src/ubuntu/ubuntusettingsclickwidget.cpp 2015-02-09 11:47:58 +0000
70@@ -75,8 +75,11 @@
71
72 void UbuntuSettingsClickWidget::on_pushButtonCreateClickTarget_clicked()
73 {
74- QString dummy;
75- Internal::UbuntuClickDialog::createClickChrootModal(true, dummy, this);
76+ //make sure the current settings are stored
77+ apply();
78+
79+ QString dummy;
80+ Internal::UbuntuClickDialog::createClickChrootModal(true, dummy, this);
81 listExistingClickTargets();
82 }
83

Subscribers

People subscribed via source and target branches