Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qmake-template-makeover into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 353
Merged at revision: 334
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qmake-template-makeover
Merge into: lp:qtcreator-plugin-ubuntu
Prerequisite: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/chroot-agent-cli
Diff against target: 2200 lines (+739/-939)
64 files modified
debian/control (+3/-2)
debian/qtcreator-plugin-ubuntu-common.install (+8/-7)
share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/CMakeLists.txt (+0/-2)
share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/displayName.qml (+40/-14)
share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/wizard.xml (+3/-10)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.apparmor (+8/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.desktop (+7/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.pro (+24/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/main.qml (+56/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.cpp (+17/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.h (+38/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/displayName.pro (+34/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.cpp (+12/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.h (+25/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/qmldir (+2/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests/unit/tst_mytype.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/manifest.json.in (+16/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/projectName.pro (+34/-0)
share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/wizard.xml (+73/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/CMakeLists.txt (+0/-6)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml (+0/-14)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml (+0/-49)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/CMakeLists.txt (+0/-6)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml (+0/-39)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml (+0/-35)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml (+0/-13)
share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/deployment.pri (+0/-5)
share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest/manifest.pro (+0/-27)
share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/appName/appName.pro (+4/-1)
share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/projectName.pro (+28/-6)
share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/wizard.xml (+4/-6)
share/qtcreator/templates/wizards/ubuntu/scope/wizard.xml (+2/-2)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.apparmor (+8/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.desktop (+7/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.pro (+24/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/main.qml (+56/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/manifest.json.in (+16/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/projectName.pro (+31/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/wizard.xml (+61/-0)
share/qtcreator/templates/wizards/ubuntu/simple-app-qmlproject/wizard.xml (+2/-3)
share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/CMakeLists.txt (+0/-3)
share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/displayName.qml (+27/-10)
share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/wizard.xml (+3/-9)
share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml (+0/-49)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/CMakeLists.txt (+0/-6)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/HelloComponent.qml (+0/-14)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/tests/unit/tst_hellocomponent.qml (+0/-49)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/CMakeLists.txt (+0/-6)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/HelloTab.qml (+0/-30)
share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/WorldTab.qml (+0/-29)
share/qtcreator/templates/wizards/ubuntu/tabs/Makefile (+0/-48)
share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml (+0/-14)
share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop (+0/-7)
share/qtcreator/templates/wizards/ubuntu/tabs/main.qml (+0/-41)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py (+0/-131)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py (+0/-1)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py (+0/-23)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run (+0/-11)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml (+0/-49)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml (+0/-30)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml (+0/-35)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml (+0/-13)
share/qtcreator/templates/wizards/ubuntu/tabs/wizard.xml (+0/-69)
src/ubuntu/ubuntulocalrunconfiguration.cpp (+17/-15)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qmake-template-makeover
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Leo Arias (community) Needs Fixing
Zoltan Balogh Approve
Review via email: mp+246100@code.launchpad.net

Commit message

Improve qmake templates by refactoring complicated parts
into qmake feature files distributed by a package from the
archive

Description of the change

Improve qmake templates by refactoring complicated parts
into qmake feature files distributed by a package from the
archive

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

I like it

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

I think you need to update the qtcreator-plugin-ubuntu-common.install file to point to the new template directories.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

Also, on the backend templates you are putting the tests inside the backend/tests/unit directory.
I suggest to move them to the tests/qml/backend directory instead, to put all the tests of all the types in the main folder. What do you think about this?

Revision history for this message
Leo Arias (elopio) wrote :
review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
352. By Benjamin Zeller

Cleanup

353. By Benjamin Zeller

Merge

354. By Benjamin Zeller

Rename the projects with c++ backend

355. By Benjamin Zeller

Rephrase description for qmake templates

356. By Benjamin Zeller

Fix architecture for qmake-extras package

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-01-16 13:03:01 +0000
3+++ debian/control 2015-01-28 13:07:46 +0000
4@@ -85,7 +85,8 @@
5
6 Package: qtcreator-plugin-ubuntu-common
7 Architecture: all
8-Depends: ${misc:Depends},
9+Depends: ubuntu-sdk-qmake-extras,
10+ ${misc:Depends},
11 Recommends: qtcreator-plugin-ubuntu
12 Replaces: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
13 Conflicts: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
14@@ -98,7 +99,7 @@
15 Qt Creator IDE.
16
17 Package: ubuntu-sdk-qmake-extras
18-Architecture: all
19+Architecture: any
20 Depends: ${misc:Depends},
21 Description: Extra qmake features required by the Ubuntu-SDK templates,
22 extends qmake projects with Ubuntu specific variables and tools
23
24=== modified file 'debian/qtcreator-plugin-ubuntu-common.install'
25--- debian/qtcreator-plugin-ubuntu-common.install 2014-11-19 13:17:57 +0000
26+++ debian/qtcreator-plugin-ubuntu-common.install 2015-01-28 13:07:46 +0000
27@@ -1,12 +1,13 @@
28 usr/bin/ubuntu-sdk
29-usr/share/qtcreator/templates/wizards/ubuntu/webapp
30-usr/share/qtcreator/templates/wizards/ubuntu/backendplustabs
31+usr/share/qtcreator/templates/wizards/ubuntu/backend-app-cmake
32+usr/share/qtcreator/templates/wizards/ubuntu/backend-app-qmake
33+usr/share/qtcreator/templates/wizards/ubuntu/goproject
34 usr/share/qtcreator/templates/wizards/ubuntu/html5-simple
35+usr/share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake
36 usr/share/qtcreator/templates/wizards/ubuntu/scope
37-usr/share/qtcreator/templates/wizards/ubuntu/simple
38-usr/share/qtcreator/templates/wizards/ubuntu/tabs
39-usr/share/qtcreator/templates/wizards/ubuntu/goproject
40 usr/share/qtcreator/templates/wizards/ubuntu/share
41-usr/share/qtcreator/templates/wizards/ubuntu/simplei18n
42-usr/share/qtcreator/templates/wizards/ubuntu/bin_app-qmake
43+usr/share/qtcreator/templates/wizards/ubuntu/simple-app-qmake
44+usr/share/qtcreator/templates/wizards/ubuntu/simple-app-qmlproject
45+usr/share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake
46+usr/share/qtcreator/templates/wizards/ubuntu/webapp
47 usr/share/qtcreator/ubuntu
48
49=== renamed directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs' => 'share/qtcreator/templates/wizards/ubuntu/backend-app-cmake'
50=== modified file 'share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/CMakeLists.txt'
51--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/CMakeLists.txt 2014-10-17 09:36:07 +0000
52+++ share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/CMakeLists.txt 2015-01-28 13:07:46 +0000
53@@ -9,5 +9,3 @@
54 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE_NAME} DESTINATION ${DESKTOP_DIR})
55 install(FILES ${QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR})
56
57-add_subdirectory(components)
58-add_subdirectory(ui)
59
60=== modified file 'share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/displayName.qml'
61--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml 2015-01-07 10:50:28 +0000
62+++ share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/app/displayName.qml 2015-01-28 13:07:46 +0000
63@@ -1,6 +1,6 @@
64 import QtQuick 2.0
65 import Ubuntu.Components 1.1
66-import "ui"
67+import Myapp 1.0
68
69 /*!
70 \brief MainView with Tabs element.
71@@ -25,17 +25,43 @@
72 useDeprecatedToolbar: false
73
74 width: units.gu(100)
75- height: units.gu(75)
76-
77- Tabs {
78- id: tabs
79-
80- HelloTab {
81- objectName: "helloTab"
82- }
83-
84- WorldTab {
85- objectName: "worldTab"
86- }
87- }
88+ height: units.gu(76)
89+
90+ Page {
91+ title: i18n.tr("App with backend")
92+
93+ MyType {
94+ id: myType
95+
96+ Component.onCompleted: {
97+ myType.helloWorld = i18n.tr("Hello world..")
98+ }
99+ }
100+
101+ Column {
102+ spacing: units.gu(1)
103+ anchors {
104+ margins: units.gu(2)
105+ fill: parent
106+ }
107+
108+ Label {
109+ id: label
110+ objectName: "label"
111+
112+ text: myType.helloWorld
113+ }
114+
115+ Button {
116+ objectName: "button"
117+ width: parent.width
118+
119+ text: i18n.tr("Tap me!")
120+
121+ onClicked: {
122+ myType.helloWorld = i18n.tr("..from Cpp Backend")
123+ }
124+ }
125+ }
126+ }
127 }
128
129=== modified file 'share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/wizard.xml'
130--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/wizard.xml 2015-01-07 10:50:28 +0000
131+++ share/qtcreator/templates/wizards/ubuntu/backend-app-cmake/wizard.xml 2015-01-28 13:07:46 +0000
132@@ -1,18 +1,18 @@
133 <?xml version="1.0" encoding="UTF-8"?>
134-<wizard version="1" kind="project" firstpage="10" id="UbuntuAppWBackendPlusTabsCMake'" category="A.UbuntuProject"
135+<wizard version="1" kind="project" firstpage="10" id="A4_UbuntuAppWBackendPlusTabsCMake'" category="A.UbuntuProject"
136 platformIndependent="true"
137 class="ubuntu-project-cmake"
138 featuresRequired=""
139 >
140 <icon>../share/ubuntu.png</icon>
141 <description>A simple C++ based QtQuick2 Extension Library with
142-Tabbed UI written in QML.
143+simple UI written in QML.
144
145 Includes also
146 - a unit test for C++
147 - unit and functional tests for QML
148 </description>
149- <displayname>App with QML Extension Library</displayname>
150+ <displayname>QML App with C++ plugin (cmake)</displayname>
151 <displaycategory>Ubuntu</displaycategory>
152 <files>
153 <file source="CMakeLists.txt" target="CMakeLists.txt" openproject="true"/>
154@@ -26,13 +26,6 @@
155 <file source="app/graphics/toolbarIcon@8.png" target="app/graphics/toolbarIcon@8.png" openeditor="false" binary="true"/>
156 <file source="app/displayName.desktop.in" target="app/%ClickHookName%.desktop.in" openeditor="false"/>
157 <file source="app/graphics/displayName.png" target="app/graphics/%ProjectName%.png" openeditor="false" binary="true"/>
158- <file source="app/tests/unit/tst_hellocomponent.qml" target="app/tests/unit/tst_hellocomponent.qml" openeditor="false"/>
159- <file source="app/components/CMakeLists.txt" target="app/components/CMakeLists.txt" openeditor="false"/>
160- <file source="app/components/HelloComponent.qml" target="app/components/HelloComponent.qml" openeditor="false"/>
161- <file source="app/ui/CMakeLists.txt" target="app/ui/CMakeLists.txt" openeditor="false"/>
162- <file source="app/ui/WorldTabTools.qml" target="app/ui/WorldTabTools.qml" openeditor="false"/>
163- <file source="app/ui/WorldTab.qml" target="app/ui/WorldTab.qml" openeditor="false"/>
164- <file source="app/ui/HelloTab.qml" target="app/ui/HelloTab.qml" openeditor="false"/>
165 <file source="app/CMakeLists.txt" target="app/CMakeLists.txt" openeditor="false"/>
166 <file source="app/tests/autopilot/run" target="app/tests/autopilot/run" openeditor="false"/>
167 <file source="app/tests/autopilot/displayName/main/test_main.py" target="app/tests/autopilot/%ProjectName%/main/test_main.py" openeditor="false"/>
168
169=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake'
170=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName'
171=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.apparmor'
172--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.apparmor 1970-01-01 00:00:00 +0000
173+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.apparmor 2015-01-28 13:07:46 +0000
174@@ -0,0 +1,8 @@
175+{
176+ "policy_groups": [
177+ "networking"
178+ ],
179+ "policy_version": 1.2
180+}
181+
182+
183
184=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.desktop'
185--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.desktop 1970-01-01 00:00:00 +0000
186+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.desktop 2015-01-28 13:07:46 +0000
187@@ -0,0 +1,7 @@
188+[Desktop Entry]
189+Name=%ClickHookName%
190+Exec=qmlscene $@ %ClickHookName%/main.qml
191+Icon=%ClickHookName%/%ClickHookName%.png
192+Terminal=false
193+Type=Application
194+X-Ubuntu-Touch=true
195
196=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.png'
197Binary files share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.png 2015-01-28 13:07:46 +0000 differ
198=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.pro'
199--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.pro 1970-01-01 00:00:00 +0000
200+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/appName.pro 2015-01-28 13:07:46 +0000
201@@ -0,0 +1,24 @@
202+TEMPLATE = aux
203+TARGET = %ClickHookName%
204+
205+RESOURCES += %ClickHookName%.qrc
206+
207+QML_FILES += $$files(*.qml,true) \
208+ $$files(*.js,true)
209+
210+CONF_FILES += %ClickHookName%.apparmor \
211+ %ClickHookName%.desktop \
212+ %ClickHookName%.png
213+
214+OTHER_FILES += $${CONF_FILES} \
215+ $${QML_FILES}
216+
217+#specify where the qml/js files are installed to
218+qml_files.path = /%ClickHookName%
219+qml_files.files += $${QML_FILES}
220+
221+#specify where the config files are installed to
222+config_files.path = /%ClickHookName%
223+config_files.files += $${CONF_FILES}
224+
225+INSTALLS+=config_files qml_files
226
227=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/main.qml'
228--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/main.qml 1970-01-01 00:00:00 +0000
229+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/main.qml 2015-01-28 13:07:46 +0000
230@@ -0,0 +1,56 @@
231+import QtQuick 2.0
232+import Ubuntu.Components 1.1
233+
234+/*!
235+ \brief MainView with a Label and Button elements.
236+*/
237+
238+MainView {
239+ // objectName for functional testing purposes (autopilot-qt5)
240+ objectName: "mainView"
241+
242+ // Note! applicationName needs to match the "name" field of the click manifest
243+ applicationName: "%ProjectName:l%.%ClickDomain:l%"
244+
245+ /*
246+ This property enables the application to change orientation
247+ when the device is rotated. The default is false.
248+ */
249+ //automaticOrientation: true
250+
251+ // Removes the old toolbar and enables new features of the new header.
252+ useDeprecatedToolbar: false
253+
254+ width: units.gu(100)
255+ height: units.gu(75)
256+
257+ Page {
258+ title: i18n.tr("Simple")
259+
260+ Column {
261+ spacing: units.gu(1)
262+ anchors {
263+ margins: units.gu(2)
264+ fill: parent
265+ }
266+
267+ Label {
268+ id: label
269+ objectName: "label"
270+
271+ text: i18n.tr("Hello..")
272+ }
273+
274+ Button {
275+ objectName: "button"
276+ width: parent.width
277+
278+ text: i18n.tr("Tap me!")
279+
280+ onClicked: {
281+ label.text = i18n.tr("..world!")
282+ }
283+ }
284+ }
285+ }
286+}
287
288=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend'
289=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName'
290=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.cpp'
291--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.cpp 1970-01-01 00:00:00 +0000
292+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.cpp 2015-01-28 13:07:46 +0000
293@@ -0,0 +1,17 @@
294+#include <QtQml>
295+#include <QtQml/QQmlContext>
296+#include "backend.h"
297+#include "mytype.h"
298+
299+
300+void BackendPlugin::registerTypes(const char *uri)
301+{
302+ Q_ASSERT(uri == QLatin1String("%ClickHookName:s%"));
303+
304+ qmlRegisterType<MyType>(uri, 1, 0, "MyType");
305+}
306+
307+void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
308+{
309+ QQmlExtensionPlugin::initializeEngine(engine, uri);
310+}
311
312=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.h'
313--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.h 1970-01-01 00:00:00 +0000
314+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/backend.h 2015-01-28 13:07:46 +0000
315@@ -0,0 +1,38 @@
316+#ifndef BACKEND_PLUGIN_H
317+#define BACKEND_PLUGIN_H
318+
319+#include <QtQml/QQmlEngine>
320+#include <QtQml/QQmlExtensionPlugin>
321+
322+/*
323+ ----8<-----
324+
325+ import %ClickHookName:s% 1.0
326+
327+ Rectangle {
328+ width: 200
329+ height: 200
330+
331+ MyType {
332+ id: helloType
333+ }
334+
335+ Text {
336+ anchors.centerIn: parent
337+ text: helloType.helloworld
338+ }
339+ }
340+
341+ -----8<------
342+*/
343+class BackendPlugin : public QQmlExtensionPlugin
344+{
345+ Q_OBJECT
346+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
347+
348+public:
349+ void registerTypes(const char *uri);
350+ void initializeEngine(QQmlEngine *engine, const char *uri);
351+};
352+#endif // BACKEND_PLUGIN_H
353+
354
355=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/displayName.pro'
356--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/displayName.pro 1970-01-01 00:00:00 +0000
357+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/displayName.pro 2015-01-28 13:07:46 +0000
358@@ -0,0 +1,34 @@
359+TEMPLATE = lib
360+TARGET = %ClickHookName:s%backend
361+QT += qml quick
362+CONFIG += qt plugin
363+
364+load(ubuntu-click)
365+
366+TARGET = $$qtLibraryTarget($$TARGET)
367+
368+# Input
369+SOURCES += \
370+ backend.cpp \
371+ mytype.cpp
372+
373+HEADERS += \
374+ backend.h \
375+ mytype.h
376+
377+OTHER_FILES = qmldir
378+
379+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
380+ copy_qmldir.target = $$OUT_PWD/qmldir
381+ copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
382+ copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
383+ QMAKE_EXTRA_TARGETS += copy_qmldir
384+ PRE_TARGETDEPS += $$copy_qmldir.target
385+}
386+
387+qmldir.files = qmldir
388+installPath = $${UBUNTU_CLICK_PLUGIN_PATH}/%ClickHookName:s%
389+qmldir.path = $$installPath
390+target.path = $$installPath
391+INSTALLS += target qmldir
392+
393
394=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.cpp'
395--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.cpp 1970-01-01 00:00:00 +0000
396+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.cpp 2015-01-28 13:07:46 +0000
397@@ -0,0 +1,12 @@
398+#include "mytype.h"
399+
400+MyType::MyType(QObject *parent) :
401+ QObject(parent),
402+ m_message("")
403+{
404+
405+}
406+
407+MyType::~MyType() {
408+
409+}
410
411=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.h'
412--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.h 1970-01-01 00:00:00 +0000
413+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/mytype.h 2015-01-28 13:07:46 +0000
414@@ -0,0 +1,25 @@
415+#ifndef MYTYPE_H
416+#define MYTYPE_H
417+
418+#include <QObject>
419+
420+class MyType : public QObject
421+{
422+ Q_OBJECT
423+ Q_PROPERTY( QString helloWorld READ helloWorld WRITE setHelloWorld NOTIFY helloWorldChanged )
424+
425+public:
426+ explicit MyType(QObject *parent = 0);
427+ ~MyType();
428+
429+Q_SIGNALS:
430+ void helloWorldChanged();
431+
432+protected:
433+ QString helloWorld() { return m_message; }
434+ void setHelloWorld(QString msg) { m_message = msg; Q_EMIT helloWorldChanged(); }
435+
436+ QString m_message;
437+};
438+
439+#endif // MYTYPE_H
440
441=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/qmldir'
442--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/qmldir 1970-01-01 00:00:00 +0000
443+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/displayName/qmldir 2015-01-28 13:07:46 +0000
444@@ -0,0 +1,2 @@
445+module %ClickHookName:s%
446+plugin %ClickHookName:s%backend
447
448=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests'
449=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests/unit'
450=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests/unit/tst_mytype.qml'
451--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests/unit/tst_mytype.qml 1970-01-01 00:00:00 +0000
452+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/backend/tests/unit/tst_mytype.qml 2015-01-28 13:07:46 +0000
453@@ -0,0 +1,49 @@
454+import QtQuick 2.0
455+import QtTest 1.0
456+import Ubuntu.Components 1.1
457+import %ClickHookName:s% 1.0
458+
459+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
460+
461+// Execute tests with:
462+// qmltestrunner
463+
464+Item {
465+ // The objects
466+ MyType {
467+ id: objectUnderTest
468+ }
469+
470+ TestCase {
471+ name: "MyType"
472+
473+ function init() {
474+ console.debug(">> init");
475+ compare("",objectUnderTest.helloWorld,"text was not empty on init");
476+ console.debug("<< init");
477+ }
478+
479+ function cleanup() {
480+ console.debug(">> cleanup");
481+ console.debug("<< cleanup");
482+ }
483+
484+ function initTestCase() {
485+ console.debug(">> initTestCase");
486+ console.debug("<< initTestCase");
487+ }
488+
489+ function cleanupTestCase() {
490+ console.debug(">> cleanupTestCase");
491+ console.debug("<< cleanupTestCase");
492+ }
493+
494+ function test_canReadAndWriteText() {
495+ var expected = "Hello World 2";
496+
497+ objectUnderTest.helloWorld = expected;
498+
499+ compare(expected,objectUnderTest.helloWorld,"expected did not equal result");
500+ }
501+ }
502+}
503
504=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/manifest.json.in'
505--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/manifest.json.in 1970-01-01 00:00:00 +0000
506+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/manifest.json.in 2015-01-28 13:07:46 +0000
507@@ -0,0 +1,16 @@
508+{
509+ "name": "%ProjectName:l%.%ClickDomain:l%",
510+ "description": "description of %ProjectName%",
511+ "architecture": "@CLICK_ARCH@",
512+ "title": "%ProjectName%",
513+ "hooks": {
514+ "%ClickHookName%": {
515+ "apparmor": "%ClickHookName%/%ClickHookName%.apparmor",
516+ "desktop": "%ClickHookName%/%ClickHookName%.desktop"
517+ }
518+ },
519+ "version": "0.1",
520+ "maintainer": "%ClickMaintainer%",
521+ "framework" : "%ClickFrameworkVersion%"
522+}
523+
524
525=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/projectName.pro'
526--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/projectName.pro 1970-01-01 00:00:00 +0000
527+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/projectName.pro 2015-01-28 13:07:46 +0000
528@@ -0,0 +1,34 @@
529+# This is the basic qmake template for the Ubuntu-SDK
530+# it handles creation and installation of the manifest
531+# file and takes care of subprojects
532+TEMPLATE = subdirs
533+
534+#load Ubuntu specific features
535+load(ubuntu-click)
536+
537+SUBDIRS += %ClickHookName% \
538+ backend/%ClickHookName:s%
539+
540+# specify the manifest file, this file is required for click
541+# packaging and for the IDE to create runconfigurations
542+UBUNTU_MANIFEST_FILE=manifest.json.in
543+
544+# specify translation domain, this must be equal with the
545+# app name in the manifest file
546+UBUNTU_TRANSLATION_DOMAIN="%ProjectName:l%.%ClickDomain:l%"
547+
548+# specify the source files that should be included into
549+# the translation file, from those files a translation
550+# template is created in po/template.pot, to create a
551+# translation copy the template to e.g. de.po and edit the sources
552+UBUNTU_TRANSLATION_SOURCES+= \
553+ $$files(*.qml,true) \
554+ $$files(*.js,true) \
555+ $$files(*.cpp,true) \
556+ $$files(*.h,true)
557+
558+# specifies all translations files and makes sure they are
559+# compiled and installed into the right place in the click package
560+UBUNTU_PO_FILES+=$$files(po/*.po)
561+
562+
563
564=== added file 'share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/wizard.xml'
565--- share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/wizard.xml 1970-01-01 00:00:00 +0000
566+++ share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/wizard.xml 2015-01-28 13:07:46 +0000
567@@ -0,0 +1,73 @@
568+<?xml version="1.0" encoding="UTF-8"?>
569+<wizard version="1" kind="project" firstpage="10" id="A4_UbuntuAppBackendQmake'" category="A.UbuntuProject"
570+ platformIndependent="true"
571+ class="ubuntu-project-qmake"
572+ featuresRequired=""
573+ >
574+ <icon>../share/ubuntu.png</icon>
575+ <description>A simple C++ based QtQuick2 Extension Library with
576+simple UI written in QML.
577+
578+Includes also
579+ - a unit test for C++
580+ - unit and functional tests for QML
581+
582+This templates requires a Kit using at least a 15.04 click chroot.
583+</description>
584+ <displayname>QML App with C++ plugin (qmake)</displayname>
585+ <displaycategory>Ubuntu</displaycategory>
586+ <files>
587+ <file source="projectName.pro" target="%ProjectName%.pro" openproject="true"/>
588+<!-- MANIFEST PARTS -->
589+ <file source="manifest.json.in" openeditor="true"/>
590+<!-- APP PARTS -->
591+ <file source="appName/appName.pro" target="%ClickHookName%/%ClickHookName%.pro" openeditor="false"/>
592+ <file source="appName/appName.png" target="%ClickHookName%/%ClickHookName%.png" openeditor="false" binary="true"/>
593+ <file source="appName/main.qml" target="%ClickHookName%/main.qml" openeditor="true"/>
594+ <file source="appName/appName.desktop" target="%ClickHookName%/%ClickHookName%.desktop" openeditor="false"/>
595+ <file source="appName/appName.apparmor" target="%ClickHookName%/%ClickHookName%.apparmor" openeditor="false"/>
596+ <file source="backend/displayName/backend.h" target="backend/%ClickHookName:s%/backend.h" openeditor="false"/>
597+ <file source="backend/displayName/backend.cpp" target="backend/%ClickHookName:s%/backend.cpp" openeditor="false"/>
598+ <file source="backend/displayName/mytype.h" target="backend/%ClickHookName:s%/mytype.h" openeditor="false"/>
599+ <file source="backend/displayName/mytype.cpp" target="backend/%ClickHookName:s%/mytype.cpp" openeditor="false"/>
600+ <file source="backend/displayName/qmldir" target="backend/%ClickHookName:s%/qmldir" openeditor="false"/>
601+ <file source="backend/displayName/displayName.pro" target="backend/%ClickHookName:s%/%ClickHookName:s%.pro" openeditor="false"/>
602+ <file source="backend/tests/unit/tst_mytype.qml" target="backend/tests/unit/tst_mytype.qml" openeditor="false"/>
603+ </files>
604+
605+ <!-- Create a 2nd wizard page with click package parameters -->
606+ <fieldpagetitle>Click package parameters</fieldpagetitle>
607+ <fields>
608+ <field mandatory="true" name="ClickDomain">
609+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9-]+$'
610+ defaulttext="" placeholdertext="Nickname"/>
611+ <fielddescription>Nickname:</fielddescription>
612+ </field>
613+ <field mandatory="true" name="ClickMaintainer">
614+ <fieldcontrol class="QLineEdit" validator='^[^"]+$'
615+ defaulttext="" placeholdertext="Maintainer"/>
616+ <fielddescription>Maintainer:</fielddescription>
617+ </field>
618+ <field mandatory="true" name="ClickHookName">
619+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9.-]+$'
620+ defaulttext="app" placeholdertext="app hook name"/>
621+ <fielddescription>App name:</fielddescription>
622+ </field>
623+ <field name="ClickFrameworkVersion">
624+ <fieldcontrol class="QComboBox" defaultindex="0">
625+ <comboentries>
626+ <!-- Do not add any other frameworks here, they are populated at runtime, this is just a dummy framework to make sure we can find the combobox -->
627+ <comboentry value="ubuntu-sdk-dummy-framework">
628+ <comboentrytext>Dummy Framework</comboentrytext>
629+ </comboentry>
630+ </comboentries>
631+ </fieldcontrol>
632+ <fielddescription>Framework:</fielddescription>
633+ </field>
634+ </fields>
635+ <validationrules>
636+ <validationrule condition='/^(.*)\s+&lt;(.*@.*)&gt;$/.test("%ClickMaintainer%")'>
637+ <message>Invalid format for maintainer (should be like "Joe Bloggs &lt;joe.bloggs@isp.com&gt;")</message>
638+ </validationrule>
639+ </validationrules>
640+</wizard>
641
642=== removed directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components'
643=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/CMakeLists.txt'
644--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/CMakeLists.txt 2014-10-17 09:36:07 +0000
645+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/CMakeLists.txt 1970-01-01 00:00:00 +0000
646@@ -1,6 +0,0 @@
647-file(GLOB COMPONENTS_QML_JS_FILES *.qml *.js)
648-
649-# Make the files visible in the qtcreator tree
650-add_custom_target(%ProjectName:l%_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})
651-
652-install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR}/components)
653
654=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml'
655--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 2014-08-21 10:23:21 +0000
656+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
657@@ -1,14 +0,0 @@
658-import QtQuick 2.0
659-import Ubuntu.Components 1.1
660-
661-UbuntuShape {
662- width: 200
663- height: width
664-
665- property alias text : myText.text
666-
667- Label {
668- id: myText
669- anchors.centerIn: parent
670- }
671-}
672
673=== removed directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit'
674=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml'
675--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 2014-08-21 10:23:21 +0000
676+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
677@@ -1,49 +0,0 @@
678-import QtQuick 2.0
679-import QtTest 1.0
680-import Ubuntu.Components 1.1
681-import "../../components"
682-
683-// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
684-
685-// Execute tests with:
686-// qmltestrunner
687-
688-Item {
689- // The objects
690- HelloComponent {
691- id: objectUnderTest
692- }
693-
694- TestCase {
695- name: "HelloComponent"
696-
697- function init() {
698- console.debug(">> init");
699- compare("",objectUnderTest.text,"text was not empty on init");
700- console.debug("<< init");
701- }
702-
703- function cleanup() {
704- console.debug(">> cleanup");
705- console.debug("<< cleanup");
706- }
707-
708- function initTestCase() {
709- console.debug(">> initTestCase");
710- console.debug("<< initTestCase");
711- }
712-
713- function cleanupTestCase() {
714- console.debug(">> cleanupTestCase");
715- console.debug("<< cleanupTestCase");
716- }
717-
718- function test_canReadAndWriteText() {
719- var expected = "Hello World";
720-
721- objectUnderTest.text = expected;
722-
723- compare(expected,objectUnderTest.text,"expected did not equal result");
724- }
725- }
726-}
727
728=== removed directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui'
729=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/CMakeLists.txt'
730--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/CMakeLists.txt 2014-10-17 09:36:07 +0000
731+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/CMakeLists.txt 1970-01-01 00:00:00 +0000
732@@ -1,6 +0,0 @@
733-file(GLOB UI_QML_JS_FILES *.qml *.js)
734-
735-# Make the files visible in the qtcreator tree
736-add_custom_target(%ProjectName:l%_ui_QMlFiles ALL SOURCES ${UI_QML_JS_FILES})
737-
738-install(FILES ${UI_QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR}/ui)
739
740=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml'
741--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 2014-08-21 10:23:21 +0000
742+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
743@@ -1,39 +0,0 @@
744-import QtQuick 2.0
745-import Ubuntu.Components 1.1
746-import %ClickHookName:s% 1.0
747-import "../components"
748-
749-Tab {
750- title: i18n.tr("Hello..")
751-
752- page: Page {
753- Column {
754- spacing: units.gu(2)
755- anchors.centerIn: parent
756-
757- MyType {
758- id: myType
759-
760- Component.onCompleted: {
761- myType.helloWorld = "Cpp Backend + Tabbed UI"
762- }
763- }
764-
765- HelloComponent {
766- objectName: "helloTab_HelloComponent"
767-
768- anchors.horizontalCenter: parent.horizontalCenter
769-
770- text: i18n.tr(myType.helloWorld)
771- }
772-
773- Label {
774- objectName: "helloTab_label"
775-
776- anchors.horizontalCenter: parent.horizontalCenter
777-
778- text: i18n.tr("You can change the Tab from Page title above.")
779- }
780- }
781- }
782-}
783
784=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml'
785--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 2014-08-21 10:23:21 +0000
786+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
787@@ -1,35 +0,0 @@
788-import QtQuick 2.0
789-import Ubuntu.Components 1.1
790-import "../components"
791-
792-Tab {
793- title: i18n.tr("..World!")
794-
795- page: Page {
796- tools: WorldTabTools {
797- objectName: "worldTab_tools"
798- }
799-
800- Column {
801- spacing: units.gu(2)
802- anchors.centerIn: parent
803-
804- HelloComponent {
805- objectName: "worldTab_HelloComponent"
806-
807- anchors.horizontalCenter: parent.horizontalCenter
808-
809- text: i18n.tr("WorldTab")
810- }
811-
812- Label {
813- id: label
814- objectName: "worldTab_label"
815-
816- anchors.horizontalCenter: parent.horizontalCenter
817-
818- text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
819- }
820- }
821- }
822-}
823
824=== removed file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml'
825--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 2014-08-21 10:23:21 +0000
826+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
827@@ -1,13 +0,0 @@
828-import QtQuick 2.0
829-import Ubuntu.Components 1.1
830-
831-ToolbarItems {
832- ToolbarButton {
833- iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
834- text: i18n.tr("Tap me!")
835-
836- onTriggered: {
837- label.text = i18n.tr("Toolbar tapped")
838- }
839- }
840-}
841
842=== removed file 'share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/deployment.pri'
843--- share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/deployment.pri 2014-11-13 15:45:24 +0000
844+++ share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/deployment.pri 1970-01-01 00:00:00 +0000
845@@ -1,5 +0,0 @@
846-qt_install_libs = $$[QT_INSTALL_LIBS]
847-target.path = /lib/$$basename(qt_install_libs)/bin
848-export(target.path)
849-INSTALLS += target
850-
851
852=== removed directory 'share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest'
853=== removed file 'share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest/manifest.pro'
854--- share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest/manifest.pro 2014-11-13 15:45:24 +0000
855+++ share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest/manifest.pro 1970-01-01 00:00:00 +0000
856@@ -1,27 +0,0 @@
857-#This creates the manifest.json file, it is the description file for the
858-#click package.
859-
860-TEMPLATE = aux
861-
862-#figure out the current build architecture
863-CLICK_ARCH=$$system(dpkg-architecture -qDEB_HOST_ARCH)
864-
865-
866-# substitute the architecture in the manifest file
867-manifest_file.output = manifest.json
868-manifest_file.CONFIG += no_link \
869- add_inputs_as_makefile_deps\
870- target_predeps
871-manifest_file.commands = sed s/@CLICK_ARCH@/$$CLICK_ARCH/g ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
872-manifest_file.input = UBUNTU_MANIFEST_FILE
873-QMAKE_EXTRA_COMPILERS += manifest_file
874-
875-#do not remove this line, it is required by the IDE even if you do
876-#not substitute variables in the manifest file
877-UBUNTU_MANIFEST_FILE = $$PWD/manifest.json.in
878-
879-#installation path of the manifest file
880-mfile.path = /
881-mfile.CONFIG += no_check_exist
882-mfile.files += $$OUT_PWD/manifest.json
883-INSTALLS+=mfile
884
885=== renamed directory 'share/qtcreator/templates/wizards/ubuntu/bin_app-qmake' => 'share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake'
886=== modified file 'share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/appName/appName.pro'
887--- share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/appName/appName.pro 2014-11-13 15:45:24 +0000
888+++ share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/appName/appName.pro 2015-01-28 13:07:46 +0000
889@@ -1,6 +1,8 @@
890 TEMPLATE = app
891 TARGET = %ClickHookName%
892
893+load(ubuntu-click)
894+
895 QT += qml quick
896
897 SOURCES += main.cpp
898@@ -18,4 +20,5 @@
899 INSTALLS+=config_files
900
901 # Default rules for deployment.
902-include(../deployment.pri)
903+target.path = $${UBUNTU_CLICK_BINARY_PATH}
904+INSTALLS+=target
905
906=== renamed file 'share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/manifest/manifest.json.in' => 'share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/manifest.json.in'
907=== modified file 'share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/projectName.pro'
908--- share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/projectName.pro 2014-11-13 15:45:24 +0000
909+++ share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/projectName.pro 2015-01-28 13:07:46 +0000
910@@ -1,9 +1,31 @@
911-#This is the basic qmake template for the Ubuntu-SDK
912-#Now if you want to get started right click the project
913-#and add the subproject you like (app,scope,helper,backend)
914-
915+# This is the basic qmake template for the Ubuntu-SDK
916+# it handles creation and installation of the manifest
917+# file and takes care of subprojects
918 TEMPLATE = subdirs
919
920-SUBDIRS += %ClickHookName% \
921- manifest
922+#load Ubuntu specific features
923+load(ubuntu-click)
924+
925+SUBDIRS += %ClickHookName%
926+
927+# specify the manifest file, this file is required for click
928+# packaging and for the IDE to create runconfigurations
929+UBUNTU_MANIFEST_FILE=manifest.json.in
930+
931+# specify translation domain, this must be equal with the
932+# app name in the manifest file
933+UBUNTU_TRANSLATION_DOMAIN="%ProjectName:l%.%ClickDomain:l%"
934+
935+# specify the source files that should be included into
936+# the translation file, from those files a translation
937+# template is created in po/template.pot, to create a
938+# translation copy the template to e.g. de.po and edit the sources
939+UBUNTU_TRANSLATION_SOURCES+= \
940+ $$files(app/*.qml,true) \
941+ $$files(app/*.js,true)
942+
943+# specifies all translations files and makes sure they are
944+# compiled and installed into the right place in the click package
945+UBUNTU_PO_FILES+=$$files(po/*.po)
946+
947
948
949=== modified file 'share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/wizard.xml'
950--- share/qtcreator/templates/wizards/ubuntu/bin_app-qmake/wizard.xml 2015-01-07 10:50:28 +0000
951+++ share/qtcreator/templates/wizards/ubuntu/qtquick-app-qmake/wizard.xml 2015-01-28 13:07:46 +0000
952@@ -1,5 +1,5 @@
953 <?xml version="1.0" encoding="UTF-8"?>
954-<wizard version="1" kind="project" firstpage="10" id="UbuntuAppSimpleQmake'" category="A.UbuntuProject"
955+<wizard version="1" kind="project" firstpage="10" id="B_UbuntuAppSimpleQmake" category="A.UbuntuProject"
956 platformIndependent="true"
957 class="ubuntu-project-qmake"
958 featuresRequired=""
959@@ -7,16 +7,14 @@
960 <icon>../share/ubuntu.png</icon>
961 <description>Creates a C++ Ubuntu application project with a sample UI containing a Label and a Button.
962
963-This templates is built using qmake.
964+This templates requires a Kit using at least a 15.04 click chroot.
965 </description>
966- <displayname>App with Simple UI (QMake)</displayname>
967+ <displayname>QtQuick App with QML UI (qmake)</displayname>
968 <displaycategory>Ubuntu</displaycategory>
969 <files>
970 <file source="projectName.pro" target="%ProjectName%.pro" openproject="true"/>
971- <file source="deployment.pri"/>
972 <!-- MANIFEST PARTS -->
973- <file source="manifest/manifest.json.in" openeditor="true"/>
974- <file source="manifest/manifest.pro" openeditor="false"/>
975+ <file source="manifest.json.in" openeditor="true"/>
976 <!-- APP PARTS -->
977 <file source="appName/appName.pro" target="%ClickHookName%/%ClickHookName%.pro" openeditor="false"/>
978 <file source="appName/appName.qrc" target="%ClickHookName%/%ClickHookName%.qrc" openeditor="false"/>
979
980=== modified file 'share/qtcreator/templates/wizards/ubuntu/scope/wizard.xml'
981--- share/qtcreator/templates/wizards/ubuntu/scope/wizard.xml 2015-01-07 10:50:28 +0000
982+++ share/qtcreator/templates/wizards/ubuntu/scope/wizard.xml 2015-01-28 13:07:46 +0000
983@@ -1,12 +1,12 @@
984 <?xml version="1.0" encoding="UTF-8"?>
985-<wizard version="1" kind="project" firstpage="10" id="UbuntuUnityScope" category="A.UbuntuProject"
986+<wizard version="1" kind="project" firstpage="10" id="C_UbuntuUnityScope" category="A.UbuntuProject"
987 platformIndependent="true"
988 class="ubuntu-project-cmake"
989 featuresRequired=""
990 >
991 <icon>../share/ubuntu.png</icon>
992 <description>A simple C++ based Unity Scope</description>
993- <displayname>Unity Scope</displayname>
994+ <displayname>Unity Scope (cmake)</displayname>
995 <displaycategory>Ubuntu</displaycategory>
996 <files>
997 <file source="cmake/FindGMock.cmake"/>
998
999=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake'
1000=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName'
1001=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.apparmor'
1002--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.apparmor 1970-01-01 00:00:00 +0000
1003+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.apparmor 2015-01-28 13:07:46 +0000
1004@@ -0,0 +1,8 @@
1005+{
1006+ "policy_groups": [
1007+ "networking"
1008+ ],
1009+ "policy_version": 1.2
1010+}
1011+
1012+
1013
1014=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.desktop'
1015--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.desktop 1970-01-01 00:00:00 +0000
1016+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.desktop 2015-01-28 13:07:46 +0000
1017@@ -0,0 +1,7 @@
1018+[Desktop Entry]
1019+Name=%ClickHookName%
1020+Exec=qmlscene $@ %ClickHookName%/main.qml
1021+Icon=%ClickHookName%/%ClickHookName%.png
1022+Terminal=false
1023+Type=Application
1024+X-Ubuntu-Touch=true
1025
1026=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.png'
1027Binary files share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.png 2015-01-28 13:07:46 +0000 differ
1028=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.pro'
1029--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.pro 1970-01-01 00:00:00 +0000
1030+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/appName.pro 2015-01-28 13:07:46 +0000
1031@@ -0,0 +1,24 @@
1032+TEMPLATE = aux
1033+TARGET = %ClickHookName%
1034+
1035+RESOURCES += %ClickHookName%.qrc
1036+
1037+QML_FILES += $$files(*.qml,true) \
1038+ $$files(*.js,true)
1039+
1040+CONF_FILES += %ClickHookName%.apparmor \
1041+ %ClickHookName%.desktop \
1042+ %ClickHookName%.png
1043+
1044+OTHER_FILES += $${CONF_FILES} \
1045+ $${QML_FILES}
1046+
1047+#specify where the qml/js files are installed to
1048+qml_files.path = /%ClickHookName%
1049+qml_files.files += $${QML_FILES}
1050+
1051+#specify where the config files are installed to
1052+config_files.path = /%ClickHookName%
1053+config_files.files += $${CONF_FILES}
1054+
1055+INSTALLS+=config_files qml_files
1056
1057=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/main.qml'
1058--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/main.qml 1970-01-01 00:00:00 +0000
1059+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/appName/main.qml 2015-01-28 13:07:46 +0000
1060@@ -0,0 +1,56 @@
1061+import QtQuick 2.0
1062+import Ubuntu.Components 1.1
1063+
1064+/*!
1065+ \brief MainView with a Label and Button elements.
1066+*/
1067+
1068+MainView {
1069+ // objectName for functional testing purposes (autopilot-qt5)
1070+ objectName: "mainView"
1071+
1072+ // Note! applicationName needs to match the "name" field of the click manifest
1073+ applicationName: "%ProjectName:l%.%ClickDomain:l%"
1074+
1075+ /*
1076+ This property enables the application to change orientation
1077+ when the device is rotated. The default is false.
1078+ */
1079+ //automaticOrientation: true
1080+
1081+ // Removes the old toolbar and enables new features of the new header.
1082+ useDeprecatedToolbar: false
1083+
1084+ width: units.gu(100)
1085+ height: units.gu(75)
1086+
1087+ Page {
1088+ title: i18n.tr("Simple")
1089+
1090+ Column {
1091+ spacing: units.gu(1)
1092+ anchors {
1093+ margins: units.gu(2)
1094+ fill: parent
1095+ }
1096+
1097+ Label {
1098+ id: label
1099+ objectName: "label"
1100+
1101+ text: i18n.tr("Hello..")
1102+ }
1103+
1104+ Button {
1105+ objectName: "button"
1106+ width: parent.width
1107+
1108+ text: i18n.tr("Tap me!")
1109+
1110+ onClicked: {
1111+ label.text = i18n.tr("..world!")
1112+ }
1113+ }
1114+ }
1115+ }
1116+}
1117
1118=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/manifest.json.in'
1119--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/manifest.json.in 1970-01-01 00:00:00 +0000
1120+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/manifest.json.in 2015-01-28 13:07:46 +0000
1121@@ -0,0 +1,16 @@
1122+{
1123+ "name": "%ProjectName:l%.%ClickDomain:l%",
1124+ "description": "description of %ProjectName%",
1125+ "architecture": "@CLICK_ARCH@",
1126+ "title": "%ProjectName%",
1127+ "hooks": {
1128+ "%ClickHookName%": {
1129+ "apparmor": "%ClickHookName%/%ClickHookName%.apparmor",
1130+ "desktop": "%ClickHookName%/%ClickHookName%.desktop"
1131+ }
1132+ },
1133+ "version": "0.1",
1134+ "maintainer": "%ClickMaintainer%",
1135+ "framework" : "%ClickFrameworkVersion%"
1136+}
1137+
1138
1139=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/projectName.pro'
1140--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/projectName.pro 1970-01-01 00:00:00 +0000
1141+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/projectName.pro 2015-01-28 13:07:46 +0000
1142@@ -0,0 +1,31 @@
1143+# This is the basic qmake template for the Ubuntu-SDK
1144+# it handles creation and installation of the manifest
1145+# file and takes care of subprojects
1146+TEMPLATE = subdirs
1147+
1148+#load Ubuntu specific features
1149+load(ubuntu-click)
1150+
1151+SUBDIRS += %ClickHookName%
1152+
1153+# specify the manifest file, this file is required for click
1154+# packaging and for the IDE to create runconfigurations
1155+UBUNTU_MANIFEST_FILE=manifest.json.in
1156+
1157+# specify translation domain, this must be equal with the
1158+# app name in the manifest file
1159+UBUNTU_TRANSLATION_DOMAIN="%ProjectName:l%.%ClickDomain:l%"
1160+
1161+# specify the source files that should be included into
1162+# the translation file, from those files a translation
1163+# template is created in po/template.pot, to create a
1164+# translation copy the template to e.g. de.po and edit the sources
1165+UBUNTU_TRANSLATION_SOURCES+= \
1166+ $$files(app/*.qml,true) \
1167+ $$files(app/*.js,true)
1168+
1169+# specifies all translations files and makes sure they are
1170+# compiled and installed into the right place in the click package
1171+UBUNTU_PO_FILES+=$$files(po/*.po)
1172+
1173+
1174
1175=== added file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/wizard.xml'
1176--- share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/wizard.xml 1970-01-01 00:00:00 +0000
1177+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmake/wizard.xml 2015-01-28 13:07:46 +0000
1178@@ -0,0 +1,61 @@
1179+<?xml version="1.0" encoding="UTF-8"?>
1180+<wizard version="1" kind="project" firstpage="10" id="A3_UbuntuAppSimpleQmake'" category="A.UbuntuProject"
1181+ platformIndependent="true"
1182+ class="ubuntu-project-qmake"
1183+ featuresRequired=""
1184+ >
1185+ <icon>../share/ubuntu.png</icon>
1186+ <description>Creates a Qt Quick 2 application project with a sample UI containing a Label and a Button. This project contains QML code only.
1187+
1188+This templates requires a Kit using at least a 15.04 click chroot.
1189+</description>
1190+ <displayname>QML App with Simple UI (qmake)</displayname>
1191+ <displaycategory>Ubuntu</displaycategory>
1192+ <files>
1193+ <file source="projectName.pro" target="%ProjectName%.pro" openproject="true"/>
1194+<!-- MANIFEST PARTS -->
1195+ <file source="manifest.json.in" openeditor="true"/>
1196+<!-- APP PARTS -->
1197+ <file source="appName/appName.pro" target="%ClickHookName%/%ClickHookName%.pro" openeditor="false"/>
1198+ <file source="appName/appName.png" target="%ClickHookName%/%ClickHookName%.png" openeditor="false" binary="true"/>
1199+ <file source="appName/main.qml" target="%ClickHookName%/main.qml" openeditor="true"/>
1200+ <file source="appName/appName.desktop" target="%ClickHookName%/%ClickHookName%.desktop" openeditor="false"/>
1201+ <file source="appName/appName.apparmor" target="%ClickHookName%/%ClickHookName%.apparmor" openeditor="false"/>
1202+ </files>
1203+
1204+ <!-- Create a 2nd wizard page with click package parameters -->
1205+ <fieldpagetitle>Click package parameters</fieldpagetitle>
1206+ <fields>
1207+ <field mandatory="true" name="ClickDomain">
1208+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9-]+$'
1209+ defaulttext="" placeholdertext="Nickname"/>
1210+ <fielddescription>Nickname:</fielddescription>
1211+ </field>
1212+ <field mandatory="true" name="ClickMaintainer">
1213+ <fieldcontrol class="QLineEdit" validator='^[^"]+$'
1214+ defaulttext="" placeholdertext="Maintainer"/>
1215+ <fielddescription>Maintainer:</fielddescription>
1216+ </field>
1217+ <field mandatory="true" name="ClickHookName">
1218+ <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9.-]+$'
1219+ defaulttext="app" placeholdertext="app hook name"/>
1220+ <fielddescription>App name:</fielddescription>
1221+ </field>
1222+ <field name="ClickFrameworkVersion">
1223+ <fieldcontrol class="QComboBox" defaultindex="0">
1224+ <comboentries>
1225+ <!-- Do not add any other frameworks here, they are populated at runtime, this is just a dummy framework to make sure we can find the combobox -->
1226+ <comboentry value="ubuntu-sdk-dummy-framework">
1227+ <comboentrytext>Dummy Framework</comboentrytext>
1228+ </comboentry>
1229+ </comboentries>
1230+ </fieldcontrol>
1231+ <fielddescription>Framework:</fielddescription>
1232+ </field>
1233+ </fields>
1234+ <validationrules>
1235+ <validationrule condition='/^(.*)\s+&lt;(.*@.*)&gt;$/.test("%ClickMaintainer%")'>
1236+ <message>Invalid format for maintainer (should be like "Joe Bloggs &lt;joe.bloggs@isp.com&gt;")</message>
1237+ </validationrule>
1238+ </validationrules>
1239+</wizard>
1240
1241=== renamed directory 'share/qtcreator/templates/wizards/ubuntu/simple' => 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmlproject'
1242=== modified file 'share/qtcreator/templates/wizards/ubuntu/simple-app-qmlproject/wizard.xml'
1243--- share/qtcreator/templates/wizards/ubuntu/simple/wizard.xml 2015-01-07 10:50:28 +0000
1244+++ share/qtcreator/templates/wizards/ubuntu/simple-app-qmlproject/wizard.xml 2015-01-28 13:07:46 +0000
1245@@ -1,5 +1,5 @@
1246 <?xml version="1.0" encoding="UTF-8"?>
1247-<wizard version="1" kind="project" firstpage="10" id="UbuntuAppSimple'" category="A.UbuntuProject"
1248+<wizard version="1" kind="project" firstpage="10" id="A1_UbuntuAppSimple'" category="A.UbuntuProject"
1249 platformIndependent="true"
1250 class="ubuntu-project-plain-qml"
1251 featuresRequired=""
1252@@ -9,7 +9,7 @@
1253
1254 Includes also unit and functional tests.
1255 </description>
1256- <displayname>App with Simple UI</displayname>
1257+ <displayname>QML App with Simple UI (qmlproject)</displayname>
1258 <displaycategory>Ubuntu</displaycategory>
1259 <files>
1260 <file source="../share/manifest.json" target="manifest.json" openeditor="true"/>
1261@@ -20,7 +20,6 @@
1262 <file source="tests/autopilot/displayName/test_main.py" target="tests/autopilot/%ProjectName%/test_main.py" openeditor="false"/>
1263 <file source="tests/autopilot/displayName/__init__.py" target="tests/autopilot/%ProjectName%/__init__.py" openeditor="false"/>
1264 <file source="tests/autopilot/run" target="tests/autopilot/run" openeditor="false"/>
1265- <file source="tests/unit/tst_hellocomponent.qml" target="tests/unit/tst_hellocomponent.qml" openeditor="false"/>
1266 <file source="Makefile" target="Makefile" openeditor="false"/>
1267 <file source="../share/displayName.apparmor" target="%ClickHookName%.apparmor" openeditor="false"/>
1268 <file source="../share/.excludes" target=".excludes" openeditor="false"/>
1269
1270=== renamed directory 'share/qtcreator/templates/wizards/ubuntu/simplei18n' => 'share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake'
1271=== modified file 'share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/CMakeLists.txt'
1272--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/CMakeLists.txt 2014-10-17 09:36:07 +0000
1273+++ share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/CMakeLists.txt 2015-01-28 13:07:46 +0000
1274@@ -12,9 +12,6 @@
1275 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE_NAME} DESTINATION ${DESKTOP_DIR})
1276 install(FILES ${QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR})
1277
1278-add_subdirectory(components)
1279-add_subdirectory(ui)
1280-
1281 # Make the autpilot files visible in qtcreator
1282 file(GLOB_RECURSE AUTOPILOT_TEST_FILES *.py)
1283 add_custom_target(%ProjectName:l%_AutopilotFiles ALL SOURCES ${AUTOPILOT_TEST_FILES})
1284
1285=== modified file 'share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/displayName.qml'
1286--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/displayName.qml 2015-01-07 10:50:28 +0000
1287+++ share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/app/displayName.qml 2015-01-28 13:07:46 +0000
1288@@ -1,6 +1,5 @@
1289 import QtQuick 2.0
1290 import Ubuntu.Components 1.1
1291-import "ui"
1292
1293 /*!
1294 \brief MainView with Tabs element.
1295@@ -27,15 +26,33 @@
1296 width: units.gu(100)
1297 height: units.gu(75)
1298
1299- Tabs {
1300- id: tabs
1301-
1302- HelloTab {
1303- objectName: "helloTab"
1304- }
1305-
1306- WorldTab {
1307- objectName: "worldTab"
1308+ Page {
1309+ title: i18n.tr("Simple")
1310+
1311+ Column {
1312+ spacing: units.gu(1)
1313+ anchors {
1314+ margins: units.gu(2)
1315+ fill: parent
1316+ }
1317+
1318+ Label {
1319+ id: label
1320+ objectName: "label"
1321+
1322+ text: i18n.tr("Hello..")
1323+ }
1324+
1325+ Button {
1326+ objectName: "button"
1327+ width: parent.width
1328+
1329+ text: i18n.tr("Tap me!")
1330+
1331+ onClicked: {
1332+ label.text = i18n.tr("..world!")
1333+ }
1334+ }
1335 }
1336 }
1337 }
1338
1339=== modified file 'share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/wizard.xml'
1340--- share/qtcreator/templates/wizards/ubuntu/simplei18n/wizard.xml 2015-01-07 10:50:28 +0000
1341+++ share/qtcreator/templates/wizards/ubuntu/simple-i18n-cmake/wizard.xml 2015-01-28 13:07:46 +0000
1342@@ -1,5 +1,5 @@
1343 <?xml version="1.0" encoding="UTF-8"?>
1344-<wizard version="1" kind="project" firstpage="10" id="UbuntuAppWBackendPlusTabsCMake'" category="A.UbuntuProject"
1345+<wizard version="1" kind="project" firstpage="10" id="A2_UbuntuSimpleI18nQmlProject'" category="A.UbuntuProject"
1346 platformIndependent="true"
1347 class="ubuntu-project-cmake"
1348 featuresRequired=""
1349@@ -10,19 +10,13 @@
1350 Includes also
1351 - unit and functional tests for QML
1352 </description>
1353- <displayname>App with Simple UI and localization</displayname>
1354+ <displayname>QML App with Simple UI (cmake)</displayname>
1355 <displaycategory>Ubuntu</displaycategory>
1356 <files>
1357 <file source="CMakeLists.txt" target="CMakeLists.txt" openproject="true"/>
1358 <file source="app/graphics/toolbarIcon@8.png" target="app/graphics/toolbarIcon@8.png" openeditor="false" binary="true"/>
1359- <file source="app/displayName.desktop.in" target="app/%ClickHookName%.desktop.in" openeditor="false"/>
1360+ <file source="app/displayName.desktop.in" target="app/%ClickHookName%.desktop.in" openeditor="false"/>
1361 <file source="app/graphics/displayName.png" target="app/graphics/%ProjectName%.png" openeditor="false" binary="true"/>
1362- <file source="app/tests/unit/tst_hellocomponent.qml" target="app/tests/unit/tst_hellocomponent.qml" openeditor="false"/>
1363- <file source="app/components/CMakeLists.txt" target="app/components/CMakeLists.txt" openeditor="false"/>
1364- <file source="app/components/HelloComponent.qml" target="app/components/HelloComponent.qml" openeditor="false"/>
1365- <file source="app/ui/CMakeLists.txt" target="app/ui/CMakeLists.txt" openeditor="false"/>
1366- <file source="app/ui/WorldTab.qml" target="app/ui/WorldTab.qml" openeditor="false"/>
1367- <file source="app/ui/HelloTab.qml" target="app/ui/HelloTab.qml" openeditor="false"/>
1368 <file source="app/CMakeLists.txt" target="app/CMakeLists.txt" openeditor="false"/>
1369 <file source="app/tests/autopilot/run" target="app/tests/autopilot/run" openeditor="false"/>
1370 <file source="app/tests/autopilot/displayName/main/test_main.py" target="app/tests/autopilot/%ProjectName%/main/test_main.py" openeditor="false"/>
1371
1372=== removed directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit'
1373=== removed file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml'
1374--- share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 2014-08-21 10:23:21 +0000
1375+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
1376@@ -1,49 +0,0 @@
1377-import QtQuick 2.0
1378-import QtTest 1.0
1379-import Ubuntu.Components 1.1
1380-import "../../components"
1381-
1382-// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1383-
1384-// Execute tests with:
1385-// qmltestrunner
1386-
1387-Item {
1388- // The objects
1389- HelloComponent {
1390- id: objectUnderTest
1391- }
1392-
1393- TestCase {
1394- name: "HelloComponent"
1395-
1396- function init() {
1397- console.debug(">> init");
1398- compare("",objectUnderTest.text,"text was not empty on init");
1399- console.debug("<< init");
1400- }
1401-
1402- function cleanup() {
1403- console.debug(">> cleanup");
1404- console.debug("<< cleanup");
1405- }
1406-
1407- function initTestCase() {
1408- console.debug(">> initTestCase");
1409- console.debug("<< initTestCase");
1410- }
1411-
1412- function cleanupTestCase() {
1413- console.debug(">> cleanupTestCase");
1414- console.debug("<< cleanupTestCase");
1415- }
1416-
1417- function test_canReadAndWriteText() {
1418- var expected = "Hello World";
1419-
1420- objectUnderTest.text = expected;
1421-
1422- compare(expected,objectUnderTest.text,"expected did not equal result");
1423- }
1424- }
1425-}
1426
1427=== removed directory 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components'
1428=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/CMakeLists.txt'
1429--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/CMakeLists.txt 2014-10-17 09:36:07 +0000
1430+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/CMakeLists.txt 1970-01-01 00:00:00 +0000
1431@@ -1,6 +0,0 @@
1432-file(GLOB COMPONENTS_QML_JS_FILES *.qml *.js)
1433-
1434-# Make the files visible in the qtcreator tree
1435-add_custom_target(%ProjectName:l%_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})
1436-
1437-install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR}/components)
1438
1439=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/HelloComponent.qml'
1440--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/HelloComponent.qml 2014-10-14 08:33:49 +0000
1441+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
1442@@ -1,14 +0,0 @@
1443-import QtQuick 2.0
1444-import Ubuntu.Components 1.1
1445-
1446-UbuntuShape {
1447- width: 200
1448- height: width
1449-
1450- property alias text : myText.text
1451-
1452- Label {
1453- id: myText
1454- anchors.centerIn: parent
1455- }
1456-}
1457
1458=== removed directory 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/tests/unit'
1459=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/tests/unit/tst_hellocomponent.qml'
1460--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/tests/unit/tst_hellocomponent.qml 2014-10-14 08:33:49 +0000
1461+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
1462@@ -1,49 +0,0 @@
1463-import QtQuick 2.0
1464-import QtTest 1.0
1465-import Ubuntu.Components 1.1
1466-import "../../components"
1467-
1468-// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1469-
1470-// Execute tests with:
1471-// qmltestrunner
1472-
1473-Item {
1474- // The objects
1475- HelloComponent {
1476- id: objectUnderTest
1477- }
1478-
1479- TestCase {
1480- name: "HelloComponent"
1481-
1482- function init() {
1483- console.debug(">> init");
1484- compare("",objectUnderTest.text,"text was not empty on init");
1485- console.debug("<< init");
1486- }
1487-
1488- function cleanup() {
1489- console.debug(">> cleanup");
1490- console.debug("<< cleanup");
1491- }
1492-
1493- function initTestCase() {
1494- console.debug(">> initTestCase");
1495- console.debug("<< initTestCase");
1496- }
1497-
1498- function cleanupTestCase() {
1499- console.debug(">> cleanupTestCase");
1500- console.debug("<< cleanupTestCase");
1501- }
1502-
1503- function test_canReadAndWriteText() {
1504- var expected = "Hello World";
1505-
1506- objectUnderTest.text = expected;
1507-
1508- compare(expected,objectUnderTest.text,"expected did not equal result");
1509- }
1510- }
1511-}
1512
1513=== removed directory 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui'
1514=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/CMakeLists.txt'
1515--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/CMakeLists.txt 2014-10-17 09:36:07 +0000
1516+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/CMakeLists.txt 1970-01-01 00:00:00 +0000
1517@@ -1,6 +0,0 @@
1518-file(GLOB UI_QML_JS_FILES *.qml *.js)
1519-
1520-# Make the files visible in the qtcreator tree
1521-add_custom_target(%ProjectName:l%_ui_QMlFiles ALL SOURCES ${UI_QML_JS_FILES})
1522-
1523-install(FILES ${UI_QML_JS_FILES} DESTINATION ${%ProjectName:u%_DIR}/ui)
1524
1525=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/HelloTab.qml'
1526--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/HelloTab.qml 2014-10-14 08:33:49 +0000
1527+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
1528@@ -1,30 +0,0 @@
1529-import QtQuick 2.0
1530-import Ubuntu.Components 1.1
1531-import "../components"
1532-
1533-Tab {
1534- title: i18n.tr("Hello..")
1535-
1536- page: Page {
1537- Column {
1538- spacing: units.gu(2)
1539- anchors.centerIn: parent
1540-
1541- HelloComponent {
1542- objectName: "helloTab_HelloComponent"
1543-
1544- anchors.horizontalCenter: parent.horizontalCenter
1545-
1546- text: i18n.tr("Hello World")
1547- }
1548-
1549- Label {
1550- objectName: "helloTab_label"
1551-
1552- anchors.horizontalCenter: parent.horizontalCenter
1553-
1554- text: i18n.tr("You can change the Tab from Page title above.")
1555- }
1556- }
1557- }
1558-}
1559
1560=== removed file 'share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/WorldTab.qml'
1561--- share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/WorldTab.qml 2014-10-14 08:33:49 +0000
1562+++ share/qtcreator/templates/wizards/ubuntu/simplei18n/app/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
1563@@ -1,29 +0,0 @@
1564-import QtQuick 2.0
1565-import Ubuntu.Components 1.1
1566-import "../components"
1567-
1568-Tab {
1569- title: i18n.tr("..World!")
1570-
1571- page: Page {
1572- Column {
1573- spacing: units.gu(2)
1574- anchors.centerIn: parent
1575-
1576- HelloComponent {
1577- objectName: "worldTab_HelloComponent"
1578-
1579- anchors.horizontalCenter: parent.horizontalCenter
1580-
1581- text: i18n.tr("WorldTab")
1582- }
1583-
1584- Label {
1585- id: label
1586- objectName: "worldTab_label"
1587-
1588- anchors.horizontalCenter: parent.horizontalCenter
1589- }
1590- }
1591- }
1592-}
1593
1594=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs'
1595=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/Makefile'
1596--- share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 2014-12-05 10:15:06 +0000
1597+++ share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 1970-01-01 00:00:00 +0000
1598@@ -1,48 +0,0 @@
1599-# More information: https://wiki.ubuntu.com/Touch/Testing
1600-#
1601-# Notes for autopilot tests:
1602-# ---------------------------------------------------------------
1603-# In order to run autopilot tests:
1604-# sudo apt-add-repository ppa:autopilot/ppa
1605-# sudo apt-get update
1606-# sudo apt-get install python-autopilot autopilot-qt
1607-#
1608-# Notes for translations:
1609-# ---------------------------------------------------------------
1610-# In order to create translation files manually:
1611-# 1) run make once to create and update the po/template.pot
1612-# 2) copy the template file and set the name to the language you want to
1613-# translate to: cp po/template.pot po/de.po
1614-# 3) edit the po file
1615-# 4) run make build-translations to build the translation files
1616-#
1617-# Steps 1) and 4) are automatically executed by QtCreator
1618-#################################################################
1619-
1620-#APP_ID needs to match the "name" field of the click manifest
1621-APP_ID=%ClickDomain:l%.%ProjectName:l%
1622-
1623-#provides a way for the IDE to set a specific target folder for the translations
1624-TRANSLATION_ROOT=.
1625-
1626-MO_FILES=$(shell for infile in `find po -name "*.po"`; do basename -s .po $$infile | awk '{print "$(TRANSLATION_ROOT)/share/locale/" $$0 "/LC_MESSAGES/$(APP_ID).mo";}' ; done)
1627-QMLJS_FILES=$(shell find . -name "*.qml" -o -name "*.js" | grep -v ./tests)
1628-
1629-all: po/template.pot
1630-
1631-autopilot:
1632- chmod +x tests/autopilot/run
1633- tests/autopilot/run
1634-
1635-check:
1636- qmltestrunner -input tests/unit
1637-
1638-#translation targets
1639-
1640-build-translations: $(MO_FILES)
1641-
1642-po/template.pot: $(QMLJS_FILES)
1643- mkdir -p $(CURDIR)/po && xgettext -o po/template.pot --qt --c++ --add-comments=TRANSLATORS --keyword=tr --keyword=tr:1,2 $(QMLJS_FILES) --from-code=UTF-8
1644-
1645-$(TRANSLATION_ROOT)/share/locale/%/LC_MESSAGES/$(APP_ID).mo: po/%.po
1646- mkdir -p $(TRANSLATION_ROOT)/share/locale/$*/LC_MESSAGES && msgfmt -o $(@) $(<)
1647
1648=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/components'
1649=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml'
1650--- share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 2014-08-21 10:23:21 +0000
1651+++ share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
1652@@ -1,14 +0,0 @@
1653-import QtQuick 2.0
1654-import Ubuntu.Components 1.1
1655-
1656-UbuntuShape {
1657- width: 200
1658- height: width
1659-
1660- property alias text : myText.text
1661-
1662- Label {
1663- id: myText
1664- anchors.centerIn: parent
1665- }
1666-}
1667
1668=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop'
1669--- share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 2014-07-30 07:30:29 +0000
1670+++ share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 1970-01-01 00:00:00 +0000
1671@@ -1,7 +0,0 @@
1672-[Desktop Entry]
1673-Name=%ClickHookName%
1674-Exec=qmlscene $@ main.qml
1675-Icon=%ProjectName%.png
1676-Terminal=false
1677-Type=Application
1678-X-Ubuntu-Touch=true
1679
1680=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/displayName.png'
1681Binary files share/qtcreator/templates/wizards/ubuntu/tabs/displayName.png 2014-05-22 11:51:07 +0000 and share/qtcreator/templates/wizards/ubuntu/tabs/displayName.png 1970-01-01 00:00:00 +0000 differ
1682=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics'
1683=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png'
1684Binary files share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png 2013-08-08 07:26:20 +0000 and share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png 1970-01-01 00:00:00 +0000 differ
1685=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/main.qml'
1686--- share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 2015-01-07 10:50:28 +0000
1687+++ share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 1970-01-01 00:00:00 +0000
1688@@ -1,41 +0,0 @@
1689-import QtQuick 2.0
1690-import Ubuntu.Components 1.1
1691-import "ui"
1692-
1693-/*!
1694- \brief MainView with Tabs element.
1695- First Tab has a single Label and
1696- second Tab has a single ToolbarAction.
1697-*/
1698-
1699-MainView {
1700- // objectName for functional testing purposes (autopilot-qt5)
1701- objectName: "mainView"
1702-
1703- // Note! applicationName needs to match the "name" field of the click manifest
1704- applicationName: "%ProjectName:l%.%ClickDomain:l%"
1705-
1706- /*
1707- This property enables the application to change orientation
1708- when the device is rotated. The default is false.
1709- */
1710- //automaticOrientation: true
1711-
1712- // Removes the old toolbar and enables new features of the new header.
1713- useDeprecatedToolbar: false
1714-
1715- width: units.gu(100)
1716- height: units.gu(75)
1717-
1718- Tabs {
1719- id: tabs
1720-
1721- HelloTab {
1722- objectName: "helloTab"
1723- }
1724-
1725- WorldTab {
1726- objectName: "worldTab"
1727- }
1728- }
1729-}
1730
1731=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests'
1732=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot'
1733=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName'
1734=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py'
1735--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 2013-08-08 07:26:20 +0000
1736+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
1737@@ -1,131 +0,0 @@
1738-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1739-
1740-"""Ubuntu Touch App autopilot tests."""
1741-
1742-from os import remove
1743-import os.path
1744-from tempfile import mktemp
1745-import subprocess
1746-
1747-from autopilot.input import Mouse, Touch, Pointer
1748-from autopilot.matchers import Eventually
1749-from autopilot.platform import model
1750-from testtools.matchers import Is, Not, Equals
1751-from autopilot.testcase import AutopilotTestCase
1752-
1753-def get_module_include_path():
1754- return os.path.abspath(
1755- os.path.join(
1756- os.path.dirname(__file__),
1757- '..',
1758- '..',
1759- '..',
1760- '..',
1761- 'modules')
1762- )
1763-
1764-
1765-class UbuntuTouchAppTestCase(AutopilotTestCase):
1766- """A common test case class that provides several useful methods for the tests."""
1767-
1768- if model() == 'Desktop':
1769- scenarios = [
1770- ('with mouse', dict(input_device_class=Mouse))
1771- ]
1772- else:
1773- scenarios = [
1774- ('with touch', dict(input_device_class=Touch))
1775- ]
1776-
1777- @property
1778- def main_window(self):
1779- return MainWindow(self.app)
1780-
1781-
1782- def setUp(self):
1783- self.pointing_device = Pointer(self.input_device_class.create())
1784- super(UbuntuTouchAppTestCase, self).setUp()
1785- self.launch_test_qml()
1786-
1787-
1788- def launch_test_qml(self):
1789- # If the test class has defined a 'test_qml' class attribute then we
1790- # write it to disk and launch it inside the QML Scene. If not, then we
1791- # silently do nothing (presumably the test has something else planned).
1792- arch = subprocess.check_output(["dpkg-architecture",
1793- "-qDEB_HOST_MULTIARCH"]).strip()
1794- if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
1795- qml_path = mktemp(suffix='.qml')
1796- open(qml_path, 'w').write(self.test_qml)
1797- self.addCleanup(remove, qml_path)
1798-
1799- self.app = self.launch_test_application(
1800- "/usr/lib/" + arch + "/qt5/bin/qmlscene",
1801- "-I", get_module_include_path(),
1802- qml_path,
1803- app_type='qt')
1804-
1805- if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
1806- qml_path = self.test_qml_file
1807- self.app = self.launch_test_application(
1808- "/usr/lib/" + arch + "/qt5/bin/qmlscene",
1809- "-I", get_module_include_path(),
1810- qml_path,
1811- app_type='qt')
1812-
1813- self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
1814-
1815-
1816- def get_qml_view(self):
1817- """Get the main QML view"""
1818-
1819- return self.app.select_single("QQuickView")
1820-
1821- def get_mainview(self):
1822- """Get the QML MainView"""
1823-
1824- mainView = self.app.select_single("MainView")
1825- self.assertThat(mainView, Not(Is(None)))
1826- return mainView
1827-
1828-
1829- def get_object(self,objectName):
1830- """Get a object based on the objectName"""
1831-
1832- obj = self.app.select_single(objectName=objectName)
1833- self.assertThat(obj, Not(Is(None)))
1834- return obj
1835-
1836-
1837- def mouse_click(self,objectName):
1838- """Move mouse on top of the object and click on it"""
1839-
1840- obj = self.get_object(objectName)
1841- self.pointing_device.move_to_object(obj)
1842- self.pointing_device.click()
1843-
1844-
1845- def mouse_press(self,objectName):
1846- """Move mouse on top of the object and press mouse button (without releasing it)"""
1847-
1848- obj = self.get_object(objectName)
1849- self.pointing_device.move_to_object(obj)
1850- self.pointing_device.press()
1851-
1852-
1853- def mouse_release(self):
1854- """Release mouse button"""
1855-
1856- self.pointing_device.release()
1857-
1858-
1859- def type_string(self, string):
1860- """Type a string with keyboard"""
1861-
1862- self.keyboard.type(string)
1863-
1864-
1865- def type_key(self, key):
1866- """Type a single key with keyboard"""
1867-
1868- self.keyboard.key(key)
1869
1870=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main'
1871=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py'
1872--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 2013-08-08 07:26:20 +0000
1873+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
1874@@ -1,1 +0,0 @@
1875-""" A main.qml test suite """
1876
1877=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py'
1878--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 2014-06-30 15:20:18 +0000
1879+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
1880@@ -1,23 +0,0 @@
1881-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1882-
1883-"""Tests for the Hello World"""
1884-
1885-from autopilot.matchers import Eventually
1886-from textwrap import dedent
1887-from testtools.matchers import Is, Not, Equals
1888-from testtools import skip
1889-import os
1890-from %ProjectName% import UbuntuTouchAppTestCase
1891-
1892-
1893-class MainTests(UbuntuTouchAppTestCase):
1894- """Generic tests for the Hello World"""
1895-
1896- test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%ProjectName%")
1897-
1898- def test_0_can_select_mainView(self):
1899- """Must be able to select the mainview."""
1900-
1901- mainView = self.get_mainview()
1902- self.assertThat(mainView.visible,Eventually(Equals(True)))
1903-
1904
1905=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run'
1906--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 2014-06-30 15:20:18 +0000
1907+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 1970-01-01 00:00:00 +0000
1908@@ -1,11 +0,0 @@
1909-#!/bin/bash
1910-
1911-if [[ -z `which autopilot` ]]; then
1912- echo "Autopilot is not installed. Skip"
1913- exit
1914-fi
1915-
1916-SCRIPTPATH=`dirname $0`
1917-pushd ${SCRIPTPATH}
1918-autopilot run %ProjectName%
1919-popd
1920
1921=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit'
1922=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml'
1923--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 2014-08-21 10:23:21 +0000
1924+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
1925@@ -1,49 +0,0 @@
1926-import QtQuick 2.0
1927-import QtTest 1.0
1928-import Ubuntu.Components 1.1
1929-import "../../components"
1930-
1931-// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1932-
1933-// Execute tests with:
1934-// qmltestrunner
1935-
1936-Item {
1937- // The objects
1938- HelloComponent {
1939- id: objectUnderTest
1940- }
1941-
1942- TestCase {
1943- name: "HelloComponent"
1944-
1945- function init() {
1946- console.debug(">> init");
1947- compare("",objectUnderTest.text,"text was not empty on init");
1948- console.debug("<< init");
1949- }
1950-
1951- function cleanup() {
1952- console.debug(">> cleanup");
1953- console.debug("<< cleanup");
1954- }
1955-
1956- function initTestCase() {
1957- console.debug(">> initTestCase");
1958- console.debug("<< initTestCase");
1959- }
1960-
1961- function cleanupTestCase() {
1962- console.debug(">> cleanupTestCase");
1963- console.debug("<< cleanupTestCase");
1964- }
1965-
1966- function test_canReadAndWriteText() {
1967- var expected = "Hello World";
1968-
1969- objectUnderTest.text = expected;
1970-
1971- compare(expected,objectUnderTest.text,"expected did not equal result");
1972- }
1973- }
1974-}
1975
1976=== removed directory 'share/qtcreator/templates/wizards/ubuntu/tabs/ui'
1977=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml'
1978--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 2014-08-21 10:23:21 +0000
1979+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
1980@@ -1,30 +0,0 @@
1981-import QtQuick 2.0
1982-import Ubuntu.Components 1.1
1983-import "../components"
1984-
1985-Tab {
1986- title: i18n.tr("Hello..")
1987-
1988- page: Page {
1989- Column {
1990- spacing: units.gu(2)
1991- anchors.centerIn: parent
1992-
1993- HelloComponent {
1994- objectName: "helloTab_HelloComponent"
1995-
1996- anchors.horizontalCenter: parent.horizontalCenter
1997-
1998- text: i18n.tr("HelloTab")
1999- }
2000-
2001- Label {
2002- objectName: "helloTab_label"
2003-
2004- anchors.horizontalCenter: parent.horizontalCenter
2005-
2006- text: i18n.tr("You can change the Tab from Page title above.")
2007- }
2008- }
2009- }
2010-}
2011
2012=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml'
2013--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 2014-08-21 10:23:21 +0000
2014+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
2015@@ -1,35 +0,0 @@
2016-import QtQuick 2.0
2017-import Ubuntu.Components 1.1
2018-import "../components"
2019-
2020-Tab {
2021- title: i18n.tr("..World!")
2022-
2023- page: Page {
2024- tools: WorldTabTools {
2025- objectName: "worldTab_tools"
2026- }
2027-
2028- Column {
2029- spacing: units.gu(2)
2030- anchors.centerIn: parent
2031-
2032- HelloComponent {
2033- objectName: "worldTab_HelloComponent"
2034-
2035- anchors.horizontalCenter: parent.horizontalCenter
2036-
2037- text: i18n.tr("WorldTab")
2038- }
2039-
2040- Label {
2041- id: label
2042- objectName: "worldTab_label"
2043-
2044- anchors.horizontalCenter: parent.horizontalCenter
2045-
2046- text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
2047- }
2048- }
2049- }
2050-}
2051
2052=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml'
2053--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 2014-08-21 10:23:21 +0000
2054+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
2055@@ -1,13 +0,0 @@
2056-import QtQuick 2.0
2057-import Ubuntu.Components 1.1
2058-
2059-ToolbarItems {
2060- ToolbarButton {
2061- iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
2062- text: i18n.tr("Tap me!")
2063-
2064- onTriggered: {
2065- label.text = i18n.tr("Toolbar tapped")
2066- }
2067- }
2068-}
2069
2070=== removed file 'share/qtcreator/templates/wizards/ubuntu/tabs/wizard.xml'
2071--- share/qtcreator/templates/wizards/ubuntu/tabs/wizard.xml 2015-01-07 10:50:28 +0000
2072+++ share/qtcreator/templates/wizards/ubuntu/tabs/wizard.xml 1970-01-01 00:00:00 +0000
2073@@ -1,69 +0,0 @@
2074-<?xml version="1.0" encoding="UTF-8"?>
2075-<wizard version="1" kind="project" firstpage="10" id="UbuntuAppTabs'" category="A.UbuntuProject"
2076- platformIndependent="true"
2077- class="ubuntu-project-plain-qml"
2078- featuresRequired=""
2079- >
2080- <icon>../share/ubuntu.png</icon>
2081- <description>Creates a Qt Quick 2 application project using Tabs component. This project contains QML code only.
2082-
2083-Includes also unit and functional tests.</description>
2084- <displayname>App with Tabbed UI</displayname>
2085- <displaycategory>Ubuntu</displaycategory>
2086- <files>
2087- <file source="../share/manifest.json" target="manifest.json" openeditor="true"/>
2088- <file source="../share/displayName.qmlproject" target="%ProjectName%.qmlproject" openproject="true"/>
2089- <file source="main.qml" target="main.qml" openeditor="true"/>
2090- <file source="graphics/toolbarIcon@8.png" target="graphics/toolbarIcon@8.png" openeditor="false" binary="true"/>
2091- <file source="components/HelloComponent.qml" target="components/HelloComponent.qml" openeditor="false"/>
2092- <file source="ui/HelloTab.qml" target="ui/HelloTab.qml" openeditor="false"/>
2093- <file source="ui/WorldTabTools.qml" target="ui/WorldTabTools.qml" openeditor="false"/>
2094- <file source="ui/WorldTab.qml" target="ui/WorldTab.qml" openeditor="false"/>
2095- <file source="displayName.png" target="%ProjectName%.png" openeditor="false" binary="true"/>
2096- <file source="displayName.desktop" target="%ClickHookName%.desktop" openeditor="false"/>
2097- <file source="tests/autopilot/displayName/main/test_main.py" target="tests/autopilot/%ProjectName%/main/test_main.py" openeditor="false"/>
2098- <file source="tests/autopilot/displayName/main/__init__.py" target="tests/autopilot/%ProjectName%/main/__init__.py" openeditor="false"/>
2099- <file source="tests/autopilot/displayName/__init__.py" target="tests/autopilot/%ProjectName%/__init__.py" openeditor="false"/>
2100- <file source="tests/autopilot/run" target="tests/autopilot/run" openeditor="false"/>
2101- <file source="tests/unit/tst_hellocomponent.qml" target="tests/unit/tst_hellocomponent.qml" openeditor="false"/>
2102- <file source="Makefile" target="Makefile" openeditor="false"/>
2103- <file source="../share/displayName.apparmor" target="%ClickHookName%.apparmor" openeditor="false"/>
2104- <file source="../share/.excludes" target=".excludes" openeditor="false"/>
2105- </files>
2106-
2107- <!-- Create a 2nd wizard page with click package parameters -->
2108- <fieldpagetitle>Click package parameters</fieldpagetitle>
2109- <fields>
2110- <field mandatory="true" name="ClickDomain">
2111- <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9-]+$'
2112- defaulttext="" placeholdertext="Nickname"/>
2113- <fielddescription>Nickname:</fielddescription>
2114- </field>
2115- <field mandatory="true" name="ClickMaintainer">
2116- <fieldcontrol class="QLineEdit" validator='^[^"]+$'
2117- defaulttext="" placeholdertext="Maintainer"/>
2118- <fielddescription>Maintainer:</fielddescription>
2119- </field>
2120- <field mandatory="true" name="ClickHookName">
2121- <fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9.-]+$'
2122- defaulttext="myapp" placeholdertext="app hook name"/>
2123- <fielddescription>App name:</fielddescription>
2124- </field>
2125- <field name="ClickFrameworkVersion">
2126- <fieldcontrol class="QComboBox" defaultindex="0">
2127- <comboentries>
2128- <!-- Do not add any other frameworks here, they are populated at runtime, this is just a dummy framework to make sure we can find the combobox -->
2129- <comboentry value="ubuntu-sdk-dummy-framework">
2130- <comboentrytext>Dummy Framework</comboentrytext>
2131- </comboentry>
2132- </comboentries>
2133- </fieldcontrol>
2134- <fielddescription>Framework:</fielddescription>
2135- </field>
2136- </fields>
2137- <validationrules>
2138- <validationrule condition='/^(.*)\s+&lt;(.*@.*)&gt;$/.test("%ClickMaintainer%")'>
2139- <message>Invalid format for maintainer (should be like "Joe Bloggs &lt;joe.bloggs@isp.com&gt;")</message>
2140- </validationrule>
2141- </validationrules>
2142-</wizard>
2143
2144=== modified file 'src/ubuntu/ubuntulocalrunconfiguration.cpp'
2145--- src/ubuntu/ubuntulocalrunconfiguration.cpp 2015-01-13 09:55:54 +0000
2146+++ src/ubuntu/ubuntulocalrunconfiguration.cpp 2015-01-28 13:07:46 +0000
2147@@ -38,7 +38,7 @@
2148 using namespace Ubuntu::Internal;
2149
2150 enum {
2151- debug = 0
2152+ debug = 1
2153 };
2154
2155 UbuntuLocalRunConfiguration::UbuntuLocalRunConfiguration(ProjectExplorer::Target *parent, Core::Id id)
2156@@ -460,20 +460,17 @@
2157
2158 //lambda checks if the executable is in a qmldir and add its to QML2_IMPORT_PATH if
2159 //required
2160- auto loc_addToImportPath = [&usedPaths,&env] (const QString &executable) {
2161- if(debug) qDebug()<<"Looking at executable "<<executable;
2162- QFileInfo inf(executable);
2163- if(inf.exists()) {
2164- QDir d = inf.absoluteDir();
2165- if(debug) qDebug()<<"Looking in the dir: "<<d.absolutePath();
2166- if(d.exists(QLatin1String("qmldir"))) {
2167- QString path = QDir::cleanPath(d.absolutePath()+QDir::separator()+QLatin1String(".."));
2168- if(usedPaths.contains(path))
2169- return;
2170+ auto loc_addToImportPath = [&usedPaths,&env] (const QString &loc_executable) {
2171+ QDir d = QFileInfo(loc_executable).absoluteDir();
2172+ if(debug) qDebug()<<"Looking in the dir: "<<d.absolutePath()<<loc_executable;
2173+ if(d.exists(QLatin1String("qmldir"))) {
2174+ QString path = QDir::cleanPath(d.absolutePath()+QDir::separator()+QLatin1String(".."));
2175+ if(usedPaths.contains(path))
2176+ return;
2177
2178- env.appendOrSet(QStringLiteral("QML2_IMPORT_PATH"),path,QStringLiteral(":"));
2179- usedPaths.insert(path);
2180- }
2181+ if(debug) qDebug()<<"Adding"<<path<<"to QML2_IMPORT_PATH";
2182+ env.appendOrSet(QStringLiteral("QML2_IMPORT_PATH"),path,QStringLiteral(":"));
2183+ usedPaths.insert(path);
2184 }
2185 };
2186
2187@@ -487,7 +484,12 @@
2188 }
2189 } else if (target()->project()->id() == QmakeProjectManager::Constants::QMAKEPROJECT_ID) {
2190 QmakeProjectManager::QmakeProject* pro = static_cast<QmakeProjectManager::QmakeProject*> (target()->project());
2191- foreach(const QmakeProjectManager::QmakeProFileNode* applPro, pro->applicationProFiles()) {
2192+ foreach(const QmakeProjectManager::QmakeProFileNode* applPro, pro->allProFiles()) {
2193+ if(applPro->projectType() != QmakeProjectManager::ApplicationTemplate &&
2194+ applPro->projectType() != QmakeProjectManager::LibraryTemplate) {
2195+ continue;
2196+ }
2197+
2198 QmakeProjectManager::TargetInformation info = applPro->targetInformation();
2199 if(applPro->targetInformation().valid)
2200 loc_addToImportPath(info.buildDir + QDir::separator() + info.target);

Subscribers

People subscribed via source and target branches