Merge lp:~bzoltan/ubuntu-qtcreator-plugins/saving_security_policy_groups into lp:ubuntu-qtcreator-plugins

Proposed by Zoltan Balogh
Status: Needs review
Proposed branch: lp:~bzoltan/ubuntu-qtcreator-plugins/saving_security_policy_groups
Merge into: lp:ubuntu-qtcreator-plugins
Diff against target: 18130 lines (+16775/-0)
251 files modified
.bzr-builddeb/default.conf (+3/-0)
LICENSE.LGPL (+504/-0)
debian/changelog (+131/-0)
debian/compat (+1/-0)
debian/control (+96/-0)
debian/copyright (+50/-0)
debian/qtcreator-plugin-ubuntu-common.install (+10/-0)
debian/qtcreator-plugin-ubuntu-cordova-common.install (+1/-0)
debian/qtcreator-plugin-ubuntu-cordova.install (+3/-0)
debian/qtcreator-plugin-ubuntu.install (+4/-0)
debian/rules (+29/-0)
debian/ubuntusdk.desktop (+11/-0)
qtcreator-plugin-ubuntu.pro (+2/-0)
share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro (+8/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp (+17/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h (+38/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro (+34/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp (+12/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h (+25/-0)
share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir (+2/-0)
share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile (+21/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml (+14/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml (+38/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py (+132/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py (+1/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py (+23/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run (+11/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml (+39/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml (+35/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml (+13/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro (+10/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp (+17/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h (+38/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro (+34/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp (+12/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h (+25/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir (+2/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro (+11/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js (+27/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css (+57/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html (+90/-0)
share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml (+43/-0)
share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/html5/html/app.js (+22/-0)
share/qtcreator/templates/wizards/ubuntu/html5/html/index.html (+75/-0)
share/qtcreator/templates/wizards/ubuntu/html5/main.qml (+35/-0)
share/qtcreator/templates/wizards/ubuntu/projectypes.json (+217/-0)
share/qtcreator/templates/wizards/ubuntu/scope/config.h (+9/-0)
share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope (+18/-0)
share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in (+3/-0)
share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c (+87/-0)
share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h (+21/-0)
share/qtcreator/templates/wizards/ubuntu/scope/displayName.c (+203/-0)
share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro (+73/-0)
share/qtcreator/templates/wizards/ubuntu/simple/Makefile (+21/-0)
share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml (+14/-0)
share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/simple/main.qml (+54/-0)
share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py (+131/-0)
share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py (+1/-0)
share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py (+38/-0)
share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run (+11/-0)
share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/Makefile (+21/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml (+14/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/main.qml (+38/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py (+131/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py (+1/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py (+23/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run (+11/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml (+49/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml (+30/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml (+35/-0)
share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml (+13/-0)
share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop (+8/-0)
share/qtcreator/templates/wizards/ubuntu/webapp/app.json (+7/-0)
share/qtcreator/ubuntu/menu.json (+438/-0)
share/qtcreator/ubuntu/scripts/device_developertools_has (+30/-0)
share/qtcreator/ubuntu/scripts/device_developertools_install (+25/-0)
share/qtcreator/ubuntu/scripts/device_developertools_packages (+1/-0)
share/qtcreator/ubuntu/scripts/device_developertools_remove (+23/-0)
share/qtcreator/ubuntu/scripts/device_flashdaily (+39/-0)
share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap (+39/-0)
share/qtcreator/ubuntu/scripts/device_hasnetwork (+20/-0)
share/qtcreator/ubuntu/scripts/device_network_clone (+23/-0)
share/qtcreator/ubuntu/scripts/device_portforward (+33/-0)
share/qtcreator/ubuntu/scripts/device_reboot (+20/-0)
share/qtcreator/ubuntu/scripts/device_reboot2bootloader (+21/-0)
share/qtcreator/ubuntu/scripts/device_reboot2recovery (+20/-0)
share/qtcreator/ubuntu/scripts/device_rootshell (+20/-0)
share/qtcreator/ubuntu/scripts/device_search (+24/-0)
share/qtcreator/ubuntu/scripts/device_service_ssh_start (+20/-0)
share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config (+20/-0)
share/qtcreator/ubuntu/scripts/device_shutdown (+20/-0)
share/qtcreator/ubuntu/scripts/device_time_clone (+29/-0)
share/qtcreator/ubuntu/scripts/device_version (+21/-0)
share/qtcreator/ubuntu/scripts/device_writableimage_has (+22/-0)
share/qtcreator/ubuntu/scripts/device_writableimage_set (+23/-0)
share/qtcreator/ubuntu/scripts/device_writableimage_unset (+23/-0)
share/qtcreator/ubuntu/scripts/functions.inc (+145/-0)
share/qtcreator/ubuntu/scripts/i18n_update_template (+42/-0)
share/qtcreator/ubuntu/scripts/manifest_description (+5/-0)
share/qtcreator/ubuntu/scripts/openssh_connect (+26/-0)
share/qtcreator/ubuntu/scripts/openssh_install (+23/-0)
share/qtcreator/ubuntu/scripts/openssh_publickey (+66/-0)
share/qtcreator/ubuntu/scripts/openssh_remove (+22/-0)
share/qtcreator/ubuntu/scripts/openssh_version (+25/-0)
share/qtcreator/ubuntu/scripts/qtc_bzr_info (+19/-0)
share/qtcreator/ubuntu/scripts/qtc_device_buildanddeploypackage (+47/-0)
share/qtcreator/ubuntu/scripts/qtc_device_buildpackage (+115/-0)
share/qtcreator/ubuntu/scripts/qtc_device_close_all_apps (+48/-0)
share/qtcreator/ubuntu/scripts/qtc_device_deploy_package (+68/-0)
share/qtcreator/ubuntu/scripts/qtc_device_restart_appslense (+22/-0)
share/qtcreator/ubuntu/scripts/qtc_device_run_app (+90/-0)
share/qtcreator/ubuntu/scripts/qtc_launch_gallery (+24/-0)
share/qtcreator/ubuntu/scripts/qtc_project_click_create (+133/-0)
share/qtcreator/ubuntu/scripts/qtc_project_click_createanddeploy (+93/-0)
share/qtcreator/ubuntu/scripts/qtc_project_create_package (+51/-0)
share/qtcreator/ubuntu/scripts/qtc_project_debuild (+20/-0)
share/qtcreator/ubuntu/scripts/qtc_project_detect_qmldeps (+34/-0)
share/qtcreator/ubuntu/scripts/qtc_project_make (+20/-0)
share/qtcreator/ubuntu/scripts/qtc_project_packaging (+118/-0)
share/qtcreator/ubuntu/scripts/qtc_read_bazaar_settings (+39/-0)
share/qtcreator/ubuntu/welcome/Link.qml (+84/-0)
share/qtcreator/ubuntu/welcome/NewsBox.qml (+79/-0)
share/qtcreator/ubuntu/welcome/welcome.qml (+221/-0)
share/qtcreator/ubuntu/welcome/welcome.qmlproject (+20/-0)
src/cordovaubuntuprojectmanager/CordovaUbuntuProject.mimetypes.xml (+9/-0)
src/cordovaubuntuprojectmanager/CordovaUbuntuProjectManager.pluginspec.in (+10/-0)
src/cordovaubuntuprojectmanager/common.h (+55/-0)
src/cordovaubuntuprojectmanager/constants.h (+32/-0)
src/cordovaubuntuprojectmanager/cordovaubuntuproject.qrc (+5/-0)
src/cordovaubuntuprojectmanager/cordovaubuntuprojectmanager.pro (+29/-0)
src/cordovaubuntuprojectmanager/cordovaubuntuprojectmanager_dependencies.pri (+7/-0)
src/cordovaubuntuprojectmanager/cproject.cpp (+85/-0)
src/cordovaubuntuprojectmanager/cproject.h (+62/-0)
src/cordovaubuntuprojectmanager/cprojectfile.cpp (+80/-0)
src/cordovaubuntuprojectmanager/cprojectfile.h (+54/-0)
src/cordovaubuntuprojectmanager/cprojectmanager.h (+74/-0)
src/cordovaubuntuprojectmanager/cprojectnode.cpp (+175/-0)
src/cordovaubuntuprojectmanager/cprojectnode.h (+73/-0)
src/cordovaubuntuprojectmanager/crunconfiguration.cpp (+86/-0)
src/cordovaubuntuprojectmanager/crunconfiguration.h (+72/-0)
src/cordovaubuntuprojectmanager/cruncontrol.cpp (+126/-0)
src/cordovaubuntuprojectmanager/cruncontrol.h (+63/-0)
src/cordovaubuntuprojectmanager/global.h (+30/-0)
src/cordovaubuntuprojectmanager/plugin.cpp (+126/-0)
src/cordovaubuntuprojectmanager/plugin.h (+56/-0)
src/plugin.pri (+15/-0)
src/ubuntu/Ubuntu.pluginspec.in (+12/-0)
src/ubuntu/UbuntuProject.mimetypes.xml (+9/-0)
src/ubuntu/manifest.json.template (+14/-0)
src/ubuntu/manifestlib.js (+79/-0)
src/ubuntu/myapp.json.template (+6/-0)
src/ubuntu/resources.qrc (+18/-0)
src/ubuntu/ubuntu.pri (+2/-0)
src/ubuntu/ubuntu.pro (+117/-0)
src/ubuntu/ubuntu_dependencies.pri (+8/-0)
src/ubuntu/ubuntu_global.h (+32/-0)
src/ubuntu/ubuntuapimode.cpp (+39/-0)
src/ubuntu/ubuntuapimode.h (+41/-0)
src/ubuntu/ubuntubzr.cpp (+48/-0)
src/ubuntu/ubuntubzr.h (+57/-0)
src/ubuntu/ubuntuclickmanifest.cpp (+241/-0)
src/ubuntu/ubuntuclickmanifest.h (+109/-0)
src/ubuntu/ubuntuconstants.h (+354/-0)
src/ubuntu/ubuntucoreappsmode.cpp (+32/-0)
src/ubuntu/ubuntucoreappsmode.h (+40/-0)
src/ubuntu/ubuntudevicemode.cpp (+70/-0)
src/ubuntu/ubuntudevicemode.h (+49/-0)
src/ubuntu/ubuntudevicenotifier.cpp (+107/-0)
src/ubuntu/ubuntudevicenotifier.h (+55/-0)
src/ubuntu/ubuntudeviceswidget.cpp (+483/-0)
src/ubuntu/ubuntudeviceswidget.h (+105/-0)
src/ubuntu/ubuntudeviceswidget.ui (+946/-0)
src/ubuntu/ubuntufeatureprovider.cpp (+36/-0)
src/ubuntu/ubuntufeatureprovider.h (+42/-0)
src/ubuntu/ubuntuircmode.cpp (+32/-0)
src/ubuntu/ubuntuircmode.h (+40/-0)
src/ubuntu/ubuntumenu.cpp (+445/-0)
src/ubuntu/ubuntumenu.h (+77/-0)
src/ubuntu/ubuntupackagingmode.cpp (+140/-0)
src/ubuntu/ubuntupackagingmode.h (+55/-0)
src/ubuntu/ubuntupackagingwidget.cpp (+326/-0)
src/ubuntu/ubuntupackagingwidget.h (+67/-0)
src/ubuntu/ubuntupackagingwidget.ui (+498/-0)
src/ubuntu/ubuntupastebinmode.cpp (+14/-0)
src/ubuntu/ubuntupastebinmode.h (+39/-0)
src/ubuntu/ubuntuplugin.cpp (+142/-0)
src/ubuntu/ubuntuplugin.h (+78/-0)
src/ubuntu/ubuntupolicygroupinfo.cpp (+60/-0)
src/ubuntu/ubuntupolicygroupinfo.h (+57/-0)
src/ubuntu/ubuntupolicygroupmodel.cpp (+63/-0)
src/ubuntu/ubuntupolicygroupmodel.h (+58/-0)
src/ubuntu/ubuntuprocess.cpp (+171/-0)
src/ubuntu/ubuntuprocess.h (+82/-0)
src/ubuntu/ubuntuproject.cpp (+88/-0)
src/ubuntu/ubuntuproject.h (+88/-0)
src/ubuntu/ubuntuprojectapp.cpp (+347/-0)
src/ubuntu/ubuntuprojectapp.h (+70/-0)
src/ubuntu/ubuntuprojectapplicationwizard.cpp (+131/-0)
src/ubuntu/ubuntuprojectapplicationwizard.h (+74/-0)
src/ubuntu/ubuntuprojectfile.cpp (+76/-0)
src/ubuntu/ubuntuprojectfile.h (+72/-0)
src/ubuntu/ubuntuprojectmanager.cpp (+66/-0)
src/ubuntu/ubuntuprojectmanager.h (+75/-0)
src/ubuntu/ubuntuprojectnode.cpp (+172/-0)
src/ubuntu/ubuntuprojectnode.h (+103/-0)
src/ubuntu/ubunturunconfiguration.cpp (+27/-0)
src/ubuntu/ubunturunconfiguration.h (+74/-0)
src/ubuntu/ubunturunconfigurationfactory.cpp (+83/-0)
src/ubuntu/ubunturunconfigurationfactory.h (+77/-0)
src/ubuntu/ubunturuncontrol.cpp (+91/-0)
src/ubuntu/ubunturuncontrol.h (+88/-0)
src/ubuntu/ubunturuncontrolfactory.cpp (+52/-0)
src/ubuntu/ubunturuncontrolfactory.h (+66/-0)
src/ubuntu/ubuntusecuritypolicypickerdialog.cpp (+88/-0)
src/ubuntu/ubuntusecuritypolicypickerdialog.h (+56/-0)
src/ubuntu/ubuntusecuritypolicypickerdialog.ui (+200/-0)
src/ubuntu/ubuntusettingsclickpage.cpp (+50/-0)
src/ubuntu/ubuntusettingsclickpage.h (+48/-0)
src/ubuntu/ubuntusettingsclickwidget.cpp (+57/-0)
src/ubuntu/ubuntusettingsclickwidget.h (+47/-0)
src/ubuntu/ubuntusettingsclickwidget.ui (+69/-0)
src/ubuntu/ubuntusettingsdeviceconnectivitypage.cpp (+49/-0)
src/ubuntu/ubuntusettingsdeviceconnectivitypage.h (+46/-0)
src/ubuntu/ubuntusettingsdeviceconnectivitywidget.cpp (+91/-0)
src/ubuntu/ubuntusettingsdeviceconnectivitywidget.h (+49/-0)
src/ubuntu/ubuntusettingsdeviceconnectivitywidget.ui (+149/-0)
src/ubuntu/ubuntusettingspage.cpp (+51/-0)
src/ubuntu/ubuntusettingspage.h (+47/-0)
src/ubuntu/ubuntusettingswidget.cpp (+56/-0)
src/ubuntu/ubuntusettingswidget.h (+44/-0)
src/ubuntu/ubuntusettingswidget.ui (+90/-0)
src/ubuntu/ubuntushared.h (+40/-0)
src/ubuntu/ubuntuversion.cpp (+66/-0)
src/ubuntu/ubuntuversion.h (+54/-0)
src/ubuntu/ubuntuversionmanager.cpp (+58/-0)
src/ubuntu/ubuntuversionmanager.h (+55/-0)
src/ubuntu/ubuntuwebmode.cpp (+85/-0)
src/ubuntu/ubuntuwebmode.h (+54/-0)
src/ubuntu/ubuntuwelcomemode.cpp (+133/-0)
src/ubuntu/ubuntuwelcomemode.h (+55/-0)
src/ubuntu/ubuntuwikimode.cpp (+32/-0)
src/ubuntu/ubuntuwikimode.h (+40/-0)
To merge this branch: bzr merge lp:~bzoltan/ubuntu-qtcreator-plugins/saving_security_policy_groups
Reviewer Review Type Date Requested Status
Zsombor Egri Pending
Review via email: mp+195916@code.launchpad.net

Commit message

Description of the change

The saving of the security policy groups were broken.

The list of the policy groups in the "Simple" tab was saved, but after that quickly overwriten with the content of the AppArmor tab. The problem was that the content of the AppArmor was not updated from the list before saving.

Single line fix

To post a comment you must log in.

Unmerged revisions

55. By Zoltan Balogh

Fixing #1252965: Security policy groups are not saved

54. By Chris Wayne

Add in webapp template.

Approved by Zoltan Balogh, PS Jenkins bot.

53. By Timo Jyrinki

Bump also runtime QtC dependency to 2.8.x.

Approved by PS Jenkins bot, Timo Jyrinki, Zoltan Balogh.

52. By Martin Albisetti

Add architecture:all to the default manifest template.

Approved by PS Jenkins bot, Zoltan Balogh.

51. By Alexandre Abreu

Fix ubuntu platform default on cordova; Fix running cordova apps on touch. Fixes: https://bugs.launchpad.net/bugs/1198097.

Approved by Zoltan Balogh, PS Jenkins bot.

50. By Michael Zanetti

make it work on Mir too, no need to hardcode the qpa platform. Fixes: https://bugs.launchpad.net/bugs/1238031.

Approved by Christian Dywan, PS Jenkins bot.

49. By Kyle Nitzsche

Convert default SDK cordova app to use Ubuntu HTML5 per LP: #1234822.

Approved by Alexandre Abreu, PS Jenkins bot.

48. By Zoltan Balogh

Saving the AppArmor manifest file when Click package is created (LP: #1233683). Fixes: https://bugs.launchpad.net/bugs/1233683.

Approved by Zsombor Egri, PS Jenkins bot.

47. By Juhapekka Piiroinen

created click pkg for cordova desktop has qmlscene exec (LP: #1232213)
do not execute i18n stuff on all project files (LP: #1176433)
Internationalization workflow improvements (LP: #1177449)
[i18n] The .pot file generator should provide relative paths (LP: #1180325)
Split out reserved security policies from regular ones (LP: #1227814). Fixes: https://bugs.launchpad.net/bugs/1176433, https://bugs.launchpad.net/bugs/1177449, https://bugs.launchpad.net/bugs/1180325, https://bugs.launchpad.net/bugs/1227814, https://bugs.launchpad.net/bugs/1232213.

Approved by Zoltan Balogh, PS Jenkins bot.

46. By Juhapekka Piiroinen

Can't run html5 apps on device from SDK (LP: 1232061). Fixes: https://bugs.launchpad.net/bugs/1232061.

Approved by PS Jenkins bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== added file '.bzr-builddeb/default.conf'
3--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
4+++ .bzr-builddeb/default.conf 2013-11-20 07:46:30 +0000
5@@ -0,0 +1,3 @@
6+[BUILDDEB]
7+split = true
8+
9
10=== added file 'LICENSE.LGPL'
11--- LICENSE.LGPL 1970-01-01 00:00:00 +0000
12+++ LICENSE.LGPL 2013-11-20 07:46:30 +0000
13@@ -0,0 +1,504 @@
14+ GNU LESSER GENERAL PUBLIC LICENSE
15+ Version 2.1, February 1999
16+
17+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
18+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19+ Everyone is permitted to copy and distribute verbatim copies
20+ of this license document, but changing it is not allowed.
21+
22+[This is the first released version of the Lesser GPL. It also counts
23+ as the successor of the GNU Library Public License, version 2, hence
24+ the version number 2.1.]
25+
26+ Preamble
27+
28+ The licenses for most software are designed to take away your
29+freedom to share and change it. By contrast, the GNU General Public
30+Licenses are intended to guarantee your freedom to share and change
31+free software--to make sure the software is free for all its users.
32+
33+ This license, the Lesser General Public License, applies to some
34+specially designated software packages--typically libraries--of the
35+Free Software Foundation and other authors who decide to use it. You
36+can use it too, but we suggest you first think carefully about whether
37+this license or the ordinary General Public License is the better
38+strategy to use in any particular case, based on the explanations below.
39+
40+ When we speak of free software, we are referring to freedom of use,
41+not price. Our General Public Licenses are designed to make sure that
42+you have the freedom to distribute copies of free software (and charge
43+for this service if you wish); that you receive source code or can get
44+it if you want it; that you can change the software and use pieces of
45+it in new free programs; and that you are informed that you can do
46+these things.
47+
48+ To protect your rights, we need to make restrictions that forbid
49+distributors to deny you these rights or to ask you to surrender these
50+rights. These restrictions translate to certain responsibilities for
51+you if you distribute copies of the library or if you modify it.
52+
53+ For example, if you distribute copies of the library, whether gratis
54+or for a fee, you must give the recipients all the rights that we gave
55+you. You must make sure that they, too, receive or can get the source
56+code. If you link other code with the library, you must provide
57+complete object files to the recipients, so that they can relink them
58+with the library after making changes to the library and recompiling
59+it. And you must show them these terms so they know their rights.
60+
61+ We protect your rights with a two-step method: (1) we copyright the
62+library, and (2) we offer you this license, which gives you legal
63+permission to copy, distribute and/or modify the library.
64+
65+ To protect each distributor, we want to make it very clear that
66+there is no warranty for the free library. Also, if the library is
67+modified by someone else and passed on, the recipients should know
68+that what they have is not the original version, so that the original
69+author's reputation will not be affected by problems that might be
70+introduced by others.
71+
72
73+ Finally, software patents pose a constant threat to the existence of
74+any free program. We wish to make sure that a company cannot
75+effectively restrict the users of a free program by obtaining a
76+restrictive license from a patent holder. Therefore, we insist that
77+any patent license obtained for a version of the library must be
78+consistent with the full freedom of use specified in this license.
79+
80+ Most GNU software, including some libraries, is covered by the
81+ordinary GNU General Public License. This license, the GNU Lesser
82+General Public License, applies to certain designated libraries, and
83+is quite different from the ordinary General Public License. We use
84+this license for certain libraries in order to permit linking those
85+libraries into non-free programs.
86+
87+ When a program is linked with a library, whether statically or using
88+a shared library, the combination of the two is legally speaking a
89+combined work, a derivative of the original library. The ordinary
90+General Public License therefore permits such linking only if the
91+entire combination fits its criteria of freedom. The Lesser General
92+Public License permits more lax criteria for linking other code with
93+the library.
94+
95+ We call this license the "Lesser" General Public License because it
96+does Less to protect the user's freedom than the ordinary General
97+Public License. It also provides other free software developers Less
98+of an advantage over competing non-free programs. These disadvantages
99+are the reason we use the ordinary General Public License for many
100+libraries. However, the Lesser license provides advantages in certain
101+special circumstances.
102+
103+ For example, on rare occasions, there may be a special need to
104+encourage the widest possible use of a certain library, so that it becomes
105+a de-facto standard. To achieve this, non-free programs must be
106+allowed to use the library. A more frequent case is that a free
107+library does the same job as widely used non-free libraries. In this
108+case, there is little to gain by limiting the free library to free
109+software only, so we use the Lesser General Public License.
110+
111+ In other cases, permission to use a particular library in non-free
112+programs enables a greater number of people to use a large body of
113+free software. For example, permission to use the GNU C Library in
114+non-free programs enables many more people to use the whole GNU
115+operating system, as well as its variant, the GNU/Linux operating
116+system.
117+
118+ Although the Lesser General Public License is Less protective of the
119+users' freedom, it does ensure that the user of a program that is
120+linked with the Library has the freedom and the wherewithal to run
121+that program using a modified version of the Library.
122+
123+ The precise terms and conditions for copying, distribution and
124+modification follow. Pay close attention to the difference between a
125+"work based on the library" and a "work that uses the library". The
126+former contains code derived from the library, whereas the latter must
127+be combined with the library in order to run.
128+
129
130+ GNU LESSER GENERAL PUBLIC LICENSE
131+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
132+
133+ 0. This License Agreement applies to any software library or other
134+program which contains a notice placed by the copyright holder or
135+other authorized party saying it may be distributed under the terms of
136+this Lesser General Public License (also called "this License").
137+Each licensee is addressed as "you".
138+
139+ A "library" means a collection of software functions and/or data
140+prepared so as to be conveniently linked with application programs
141+(which use some of those functions and data) to form executables.
142+
143+ The "Library", below, refers to any such software library or work
144+which has been distributed under these terms. A "work based on the
145+Library" means either the Library or any derivative work under
146+copyright law: that is to say, a work containing the Library or a
147+portion of it, either verbatim or with modifications and/or translated
148+straightforwardly into another language. (Hereinafter, translation is
149+included without limitation in the term "modification".)
150+
151+ "Source code" for a work means the preferred form of the work for
152+making modifications to it. For a library, complete source code means
153+all the source code for all modules it contains, plus any associated
154+interface definition files, plus the scripts used to control compilation
155+and installation of the library.
156+
157+ Activities other than copying, distribution and modification are not
158+covered by this License; they are outside its scope. The act of
159+running a program using the Library is not restricted, and output from
160+such a program is covered only if its contents constitute a work based
161+on the Library (independent of the use of the Library in a tool for
162+writing it). Whether that is true depends on what the Library does
163+and what the program that uses the Library does.
164+
165+ 1. You may copy and distribute verbatim copies of the Library's
166+complete source code as you receive it, in any medium, provided that
167+you conspicuously and appropriately publish on each copy an
168+appropriate copyright notice and disclaimer of warranty; keep intact
169+all the notices that refer to this License and to the absence of any
170+warranty; and distribute a copy of this License along with the
171+Library.
172+
173+ You may charge a fee for the physical act of transferring a copy,
174+and you may at your option offer warranty protection in exchange for a
175+fee.
176+
177
178+ 2. You may modify your copy or copies of the Library or any portion
179+of it, thus forming a work based on the Library, and copy and
180+distribute such modifications or work under the terms of Section 1
181+above, provided that you also meet all of these conditions:
182+
183+ a) The modified work must itself be a software library.
184+
185+ b) You must cause the files modified to carry prominent notices
186+ stating that you changed the files and the date of any change.
187+
188+ c) You must cause the whole of the work to be licensed at no
189+ charge to all third parties under the terms of this License.
190+
191+ d) If a facility in the modified Library refers to a function or a
192+ table of data to be supplied by an application program that uses
193+ the facility, other than as an argument passed when the facility
194+ is invoked, then you must make a good faith effort to ensure that,
195+ in the event an application does not supply such function or
196+ table, the facility still operates, and performs whatever part of
197+ its purpose remains meaningful.
198+
199+ (For example, a function in a library to compute square roots has
200+ a purpose that is entirely well-defined independent of the
201+ application. Therefore, Subsection 2d requires that any
202+ application-supplied function or table used by this function must
203+ be optional: if the application does not supply it, the square
204+ root function must still compute square roots.)
205+
206+These requirements apply to the modified work as a whole. If
207+identifiable sections of that work are not derived from the Library,
208+and can be reasonably considered independent and separate works in
209+themselves, then this License, and its terms, do not apply to those
210+sections when you distribute them as separate works. But when you
211+distribute the same sections as part of a whole which is a work based
212+on the Library, the distribution of the whole must be on the terms of
213+this License, whose permissions for other licensees extend to the
214+entire whole, and thus to each and every part regardless of who wrote
215+it.
216+
217+Thus, it is not the intent of this section to claim rights or contest
218+your rights to work written entirely by you; rather, the intent is to
219+exercise the right to control the distribution of derivative or
220+collective works based on the Library.
221+
222+In addition, mere aggregation of another work not based on the Library
223+with the Library (or with a work based on the Library) on a volume of
224+a storage or distribution medium does not bring the other work under
225+the scope of this License.
226+
227+ 3. You may opt to apply the terms of the ordinary GNU General Public
228+License instead of this License to a given copy of the Library. To do
229+this, you must alter all the notices that refer to this License, so
230+that they refer to the ordinary GNU General Public License, version 2,
231+instead of to this License. (If a newer version than version 2 of the
232+ordinary GNU General Public License has appeared, then you can specify
233+that version instead if you wish.) Do not make any other change in
234+these notices.
235+
236
237+ Once this change is made in a given copy, it is irreversible for
238+that copy, so the ordinary GNU General Public License applies to all
239+subsequent copies and derivative works made from that copy.
240+
241+ This option is useful when you wish to copy part of the code of
242+the Library into a program that is not a library.
243+
244+ 4. You may copy and distribute the Library (or a portion or
245+derivative of it, under Section 2) in object code or executable form
246+under the terms of Sections 1 and 2 above provided that you accompany
247+it with the complete corresponding machine-readable source code, which
248+must be distributed under the terms of Sections 1 and 2 above on a
249+medium customarily used for software interchange.
250+
251+ If distribution of object code is made by offering access to copy
252+from a designated place, then offering equivalent access to copy the
253+source code from the same place satisfies the requirement to
254+distribute the source code, even though third parties are not
255+compelled to copy the source along with the object code.
256+
257+ 5. A program that contains no derivative of any portion of the
258+Library, but is designed to work with the Library by being compiled or
259+linked with it, is called a "work that uses the Library". Such a
260+work, in isolation, is not a derivative work of the Library, and
261+therefore falls outside the scope of this License.
262+
263+ However, linking a "work that uses the Library" with the Library
264+creates an executable that is a derivative of the Library (because it
265+contains portions of the Library), rather than a "work that uses the
266+library". The executable is therefore covered by this License.
267+Section 6 states terms for distribution of such executables.
268+
269+ When a "work that uses the Library" uses material from a header file
270+that is part of the Library, the object code for the work may be a
271+derivative work of the Library even though the source code is not.
272+Whether this is true is especially significant if the work can be
273+linked without the Library, or if the work is itself a library. The
274+threshold for this to be true is not precisely defined by law.
275+
276+ If such an object file uses only numerical parameters, data
277+structure layouts and accessors, and small macros and small inline
278+functions (ten lines or less in length), then the use of the object
279+file is unrestricted, regardless of whether it is legally a derivative
280+work. (Executables containing this object code plus portions of the
281+Library will still fall under Section 6.)
282+
283+ Otherwise, if the work is a derivative of the Library, you may
284+distribute the object code for the work under the terms of Section 6.
285+Any executables containing that work also fall under Section 6,
286+whether or not they are linked directly with the Library itself.
287+
288
289+ 6. As an exception to the Sections above, you may also combine or
290+link a "work that uses the Library" with the Library to produce a
291+work containing portions of the Library, and distribute that work
292+under terms of your choice, provided that the terms permit
293+modification of the work for the customer's own use and reverse
294+engineering for debugging such modifications.
295+
296+ You must give prominent notice with each copy of the work that the
297+Library is used in it and that the Library and its use are covered by
298+this License. You must supply a copy of this License. If the work
299+during execution displays copyright notices, you must include the
300+copyright notice for the Library among them, as well as a reference
301+directing the user to the copy of this License. Also, you must do one
302+of these things:
303+
304+ a) Accompany the work with the complete corresponding
305+ machine-readable source code for the Library including whatever
306+ changes were used in the work (which must be distributed under
307+ Sections 1 and 2 above); and, if the work is an executable linked
308+ with the Library, with the complete machine-readable "work that
309+ uses the Library", as object code and/or source code, so that the
310+ user can modify the Library and then relink to produce a modified
311+ executable containing the modified Library. (It is understood
312+ that the user who changes the contents of definitions files in the
313+ Library will not necessarily be able to recompile the application
314+ to use the modified definitions.)
315+
316+ b) Use a suitable shared library mechanism for linking with the
317+ Library. A suitable mechanism is one that (1) uses at run time a
318+ copy of the library already present on the user's computer system,
319+ rather than copying library functions into the executable, and (2)
320+ will operate properly with a modified version of the library, if
321+ the user installs one, as long as the modified version is
322+ interface-compatible with the version that the work was made with.
323+
324+ c) Accompany the work with a written offer, valid for at
325+ least three years, to give the same user the materials
326+ specified in Subsection 6a, above, for a charge no more
327+ than the cost of performing this distribution.
328+
329+ d) If distribution of the work is made by offering access to copy
330+ from a designated place, offer equivalent access to copy the above
331+ specified materials from the same place.
332+
333+ e) Verify that the user has already received a copy of these
334+ materials or that you have already sent this user a copy.
335+
336+ For an executable, the required form of the "work that uses the
337+Library" must include any data and utility programs needed for
338+reproducing the executable from it. However, as a special exception,
339+the materials to be distributed need not include anything that is
340+normally distributed (in either source or binary form) with the major
341+components (compiler, kernel, and so on) of the operating system on
342+which the executable runs, unless that component itself accompanies
343+the executable.
344+
345+ It may happen that this requirement contradicts the license
346+restrictions of other proprietary libraries that do not normally
347+accompany the operating system. Such a contradiction means you cannot
348+use both them and the Library together in an executable that you
349+distribute.
350+
351
352+ 7. You may place library facilities that are a work based on the
353+Library side-by-side in a single library together with other library
354+facilities not covered by this License, and distribute such a combined
355+library, provided that the separate distribution of the work based on
356+the Library and of the other library facilities is otherwise
357+permitted, and provided that you do these two things:
358+
359+ a) Accompany the combined library with a copy of the same work
360+ based on the Library, uncombined with any other library
361+ facilities. This must be distributed under the terms of the
362+ Sections above.
363+
364+ b) Give prominent notice with the combined library of the fact
365+ that part of it is a work based on the Library, and explaining
366+ where to find the accompanying uncombined form of the same work.
367+
368+ 8. You may not copy, modify, sublicense, link with, or distribute
369+the Library except as expressly provided under this License. Any
370+attempt otherwise to copy, modify, sublicense, link with, or
371+distribute the Library is void, and will automatically terminate your
372+rights under this License. However, parties who have received copies,
373+or rights, from you under this License will not have their licenses
374+terminated so long as such parties remain in full compliance.
375+
376+ 9. You are not required to accept this License, since you have not
377+signed it. However, nothing else grants you permission to modify or
378+distribute the Library or its derivative works. These actions are
379+prohibited by law if you do not accept this License. Therefore, by
380+modifying or distributing the Library (or any work based on the
381+Library), you indicate your acceptance of this License to do so, and
382+all its terms and conditions for copying, distributing or modifying
383+the Library or works based on it.
384+
385+ 10. Each time you redistribute the Library (or any work based on the
386+Library), the recipient automatically receives a license from the
387+original licensor to copy, distribute, link with or modify the Library
388+subject to these terms and conditions. You may not impose any further
389+restrictions on the recipients' exercise of the rights granted herein.
390+You are not responsible for enforcing compliance by third parties with
391+this License.
392+
393
394+ 11. If, as a consequence of a court judgment or allegation of patent
395+infringement or for any other reason (not limited to patent issues),
396+conditions are imposed on you (whether by court order, agreement or
397+otherwise) that contradict the conditions of this License, they do not
398+excuse you from the conditions of this License. If you cannot
399+distribute so as to satisfy simultaneously your obligations under this
400+License and any other pertinent obligations, then as a consequence you
401+may not distribute the Library at all. For example, if a patent
402+license would not permit royalty-free redistribution of the Library by
403+all those who receive copies directly or indirectly through you, then
404+the only way you could satisfy both it and this License would be to
405+refrain entirely from distribution of the Library.
406+
407+If any portion of this section is held invalid or unenforceable under any
408+particular circumstance, the balance of the section is intended to apply,
409+and the section as a whole is intended to apply in other circumstances.
410+
411+It is not the purpose of this section to induce you to infringe any
412+patents or other property right claims or to contest validity of any
413+such claims; this section has the sole purpose of protecting the
414+integrity of the free software distribution system which is
415+implemented by public license practices. Many people have made
416+generous contributions to the wide range of software distributed
417+through that system in reliance on consistent application of that
418+system; it is up to the author/donor to decide if he or she is willing
419+to distribute software through any other system and a licensee cannot
420+impose that choice.
421+
422+This section is intended to make thoroughly clear what is believed to
423+be a consequence of the rest of this License.
424+
425+ 12. If the distribution and/or use of the Library is restricted in
426+certain countries either by patents or by copyrighted interfaces, the
427+original copyright holder who places the Library under this License may add
428+an explicit geographical distribution limitation excluding those countries,
429+so that distribution is permitted only in or among countries not thus
430+excluded. In such case, this License incorporates the limitation as if
431+written in the body of this License.
432+
433+ 13. The Free Software Foundation may publish revised and/or new
434+versions of the Lesser General Public License from time to time.
435+Such new versions will be similar in spirit to the present version,
436+but may differ in detail to address new problems or concerns.
437+
438+Each version is given a distinguishing version number. If the Library
439+specifies a version number of this License which applies to it and
440+"any later version", you have the option of following the terms and
441+conditions either of that version or of any later version published by
442+the Free Software Foundation. If the Library does not specify a
443+license version number, you may choose any version ever published by
444+the Free Software Foundation.
445+
446
447+ 14. If you wish to incorporate parts of the Library into other free
448+programs whose distribution conditions are incompatible with these,
449+write to the author to ask for permission. For software which is
450+copyrighted by the Free Software Foundation, write to the Free
451+Software Foundation; we sometimes make exceptions for this. Our
452+decision will be guided by the two goals of preserving the free status
453+of all derivatives of our free software and of promoting the sharing
454+and reuse of software generally.
455+
456+ NO WARRANTY
457+
458+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
459+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
460+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
461+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
462+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
463+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
464+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
465+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
466+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
467+
468+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
469+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
470+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
471+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
472+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
473+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
474+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
475+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
476+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
477+DAMAGES.
478+
479+ END OF TERMS AND CONDITIONS
480+
481
482+ How to Apply These Terms to Your New Libraries
483+
484+ If you develop a new library, and you want it to be of the greatest
485+possible use to the public, we recommend making it free software that
486+everyone can redistribute and change. You can do so by permitting
487+redistribution under these terms (or, alternatively, under the terms of the
488+ordinary General Public License).
489+
490+ To apply these terms, attach the following notices to the library. It is
491+safest to attach them to the start of each source file to most effectively
492+convey the exclusion of warranty; and each file should have at least the
493+"copyright" line and a pointer to where the full notice is found.
494+
495+ <one line to give the library's name and a brief idea of what it does.>
496+ Copyright (C) <year> <name of author>
497+
498+ This library is free software; you can redistribute it and/or
499+ modify it under the terms of the GNU Lesser General Public
500+ License as published by the Free Software Foundation; either
501+ version 2.1 of the License, or (at your option) any later version.
502+
503+ This library is distributed in the hope that it will be useful,
504+ but WITHOUT ANY WARRANTY; without even the implied warranty of
505+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
506+ Lesser General Public License for more details.
507+
508+ You should have received a copy of the GNU Lesser General Public
509+ License along with this library; if not, write to the Free Software
510+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
511+
512+Also add information on how to contact you by electronic and paper mail.
513+
514+You should also get your employer (if you work as a programmer) or your
515+school, if any, to sign a "copyright disclaimer" for the library, if
516+necessary. Here is a sample; alter the names:
517+
518+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
519+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
520+
521+ <signature of Ty Coon>, 1 April 1990
522+ Ty Coon, President of Vice
523+
524+That's all there is to it!
525+
526+
527
528=== added directory 'debian'
529=== added file 'debian/changelog'
530--- debian/changelog 1970-01-01 00:00:00 +0000
531+++ debian/changelog 2013-11-20 07:46:30 +0000
532@@ -0,0 +1,131 @@
533+qtcreator-plugin-ubuntu (2.8.1-0ubuntu2) UNRELEASED; urgency=low
534+
535+ * Automatic snapshot from revision 52 (bootstrap)
536+
537+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Wed, 13 Nov 2013 11:55:29 +0200
538+
539+qtcreator-plugin-ubuntu (2.8.1-0ubuntu1) trusty; urgency=low
540+
541+ [ Juhapekka Piiroinen ]
542+ * Fix plugin to compile against Qt Creator 2.8.1.
543+ * Platfom development mode needs write access on the RO image (LP: #1229129)
544+ * Do not hard code the phablet user (LP: #1223363)
545+ * Click package script removes plugin includes from the desktop file (LP: #1220939)
546+ * Fixed bug where click packaging manifest files wasnt created on new application creation.
547+ * Moved misc buttons from Devices tabs under Settings page.
548+ * Added more Settings pages.
549+ * execute sanity checks for click packages after generation (LP: #1230413)
550+ * Can't run html5 apps on device from SDK (LP: 1232061)
551+ * created click pkg for cordova desktop has qmlscene exec (LP: #1232213)
552+ * do not execute i18n stuff on all project files (LP: #1176433)
553+ * Internationalization workflow improvements (LP: #1177449)
554+ * [i18n] The .pot file generator should provide relative paths (LP: #1180325)
555+ * Split out reserved security policies from regular ones (LP: #1227814)
556+ * Fixed an issue where Click package creation or installation wasnt visible for cordova projects.
557+
558+ [ Maxim Ermilov ]
559+ * Fixed CordovaUbuntuProjectManager to compile against Qt Creator 2.8
560+
561+ [ Zoltán Balogh ]
562+ * Saving the AppArmor manifest file when Click package is created (LP: #1233683)
563+
564+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 23 Sep 2013 10:01:41 +0300
565+
566+qtcreator-plugin-ubuntu (2.7.2-0ubuntu5) saucy; urgency=low
567+
568+ * Cannot add device: device key expected before created (LP: #1227820)
569+
570+ -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Fri, 20 Sep 2013 11:04:13 +0300
571+
572+qtcreator-plugin-ubuntu (2.7.2-0ubuntu4) saucy; urgency=low
573+
574+ * If no device is present, try to use the system package to
575+ detect security policy groups, else, manual entry (LP: #1227618)
576+
577+ -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Thu, 19 Sep 2013 16:23:02 +0300
578+
579+qtcreator-plugin-ubuntu (2.7.2-0ubuntu3) saucy; urgency=low
580+
581+ * USB Device connection / disconnection detection.
582+ * Refactored Menus.
583+ * Can't set version number in Packaging form (LP: #1212326)
584+ * QtC cuts folder names when building on the device (LP: #1212937)
585+ * Click packages need to exclude the .bzr dir (LP: #1214628)
586+ * Force lower case click package name (LP: #1219877)
587+ * Packaging resets package name, other attributes to default every
588+ time it's opened (LP: #1219948)
589+ * please provide gui for security manifest (LP: #1221407)
590+ * Cannot enable developer mode on read-only image (LP: #1223301)
591+ * Cannot launch application through qtcreator (LP: #1225178)
592+ * Application installation script problems (LP: #1213902)
593+ * Comment field in .desktop file should be generated on the fly
594+ (LP: #1223388)
595+ * SDK should set applicationName to "name" value in the click manifest
596+ (LP: #1227085)
597+
598+ -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Wed, 18 Sep 2013 15:36:58 +0300
599+
600+qtcreator-plugin-ubuntu (2.7.2-0ubuntu2) saucy; urgency=low
601+
602+ [ Zoltan Balogh ]
603+ * Fix app id and the dbus session adress (LP: #1221414).
604+ * Use pkcon to install click packages (LP: #1223014)
605+
606+ [ Timo Jyrinki ]
607+ * Add Cordova dependencies to the Cordova plugin (LP: #1209385)
608+ * Recommend ubuntu-sdk from qtcreator-plugin-ubuntu (LP: #1198084)
609+
610+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 16 Sep 2013 08:58:21 +0300
611+
612+qtcreator-plugin-ubuntu (2.7.2-0ubuntu1) saucy; urgency=low
613+
614+ [ Juhapekka Piiroinen ]
615+ * Move the plugin code from qtcreator source package to here, fix install
616+ * Depend on qtcreator-dev
617+
618+ [ Zoltán Balogh ]
619+ * Fixing the build dependencies
620+
621+ [ Timo Jyrinki ]
622+ * Follow Qt Creator version numbering but slightly higher to allow upgrades
623+ * Move icon out of debian/ directory
624+ * Remove provides/conflicts/replaces for old PPA ubuntu-qtcreator-plugins
625+ * Clean out packaging with wrap-and-sort -a -t
626+ * Add recommended cflags and QT_SELECT to debian/rules
627+ * Make dependencies stricter. Require Qt Creator >= 2.7.1 and recommend
628+ the plugins from the -common packages.
629+ * A file moved from ubuntu plugin package to cordova plugin package, adding
630+ Replaces.
631+
632+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Fri, 06 Sep 2013 07:12:02 +0300
633+
634+qtcreator-plugin-ubuntu (0.1-0ubuntu3) saucy; urgency=low
635+
636+ * The Cordova project type in the template definition file had a typo. The
637+ fileName was wrongly filename. So the .desktop file was not created.
638+ (LP: #1216046)
639+
640+ -- Zoltán Balogh <zoltan@bakter.hu> Tue, 27 Aug 2013 22:15:56 +0300
641+
642+qtcreator-plugin-ubuntu (0.1-0ubuntu2) saucy; urgency=low
643+
644+ * New snapshot relese from bazaar revision 17.
645+ - Add desktop file to the Cordova template.
646+ - Depend on gksu from the common packages (LP: #1209369)
647+ - Fix bug #1197537 (LP: #1197537)
648+ - xgettext is called using --from-code=UTF-8 (LP: #1183045)
649+
650+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Tue, 27 Aug 2013 17:18:31 +0300
651+
652+qtcreator-plugin-ubuntu (0.1-0ubuntu1) saucy; urgency=low
653+
654+ [ Juhapekka Piiroinen ]
655+ * Initial release
656+
657+ [ Timo Jyrinki ]
658+ * Automatic snapshot from revision 3 (bootstrap)
659+
660+ [ Zoltán Balogh ]
661+ * Adopt to new syntax of the phablet-flash
662+
663+ -- Zoltán Balogh <zoltan@bakter.hu> Thu, 15 Aug 2013 10:19:41 +0300
664
665=== added file 'debian/compat'
666--- debian/compat 1970-01-01 00:00:00 +0000
667+++ debian/compat 2013-11-20 07:46:30 +0000
668@@ -0,0 +1,1 @@
669+9
670
671=== added file 'debian/control'
672--- debian/control 1970-01-01 00:00:00 +0000
673+++ debian/control 2013-11-20 07:46:30 +0000
674@@ -0,0 +1,96 @@
675+Source: qtcreator-plugin-ubuntu
676+Section: devel
677+Priority: optional
678+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
679+Build-Depends: debhelper (>= 9),
680+ libqt5script5 (>= 5.0.2~),
681+ libqt5scripttools5 (>= 5.0.2~),
682+ libqt5webkit5-dev,
683+ libqt5widgets5 (>= 5.0.2~),
684+ libsqlite3-dev,
685+ qt5-qmake (>= 5.0.2~),
686+ qtcreator-dev (>= 2.8.1),
687+ qtdeclarative5-dev-tools (>= 5.0.2~),
688+ qtdeclarative5-private-dev (>= 5.0.2~),
689+ qtquick1-5-dev (>= 5.0.2~),
690+ qtquick1-5-dev-tools (>= 5.0.2~),
691+ qtscript5-private-dev (>= 5.0.2~),
692+ qttools5-dev-tools (>= 5.0.2~),
693+ qtxmlpatterns5-dev-tools,
694+ libudev-dev,
695+Standards-Version: 3.9.4
696+Homepage: https://launchpad.net/qtcreator-plugin-ubuntu
697+# If you aren't a member of ~ubuntu-sdk-team but need to upload packaging changes,
698+# just go ahead. ~ubuntu-sdk-team will notice and sync up the code again.
699+Vcs-Bzr: https://code.launchpad.net/~ubuntu-sdk-team/qtcreator-plugin-ubuntu/trunk
700+
701+Package: qtcreator-plugin-ubuntu
702+Architecture: any
703+Depends: android-tools-adb,
704+ click,
705+ click-dev,
706+ click-doc,
707+ devscripts,
708+ dh-make,
709+ libqt5scripttools5,
710+ qtcreator (>= 2.8.1),
711+ qtcreator-plugin-ubuntu-common,
712+ ubuntu-html5-theme,
713+ ubuntu-ui-toolkit-doc,
714+ ubuntu-ui-toolkit-examples,
715+ ${misc:Depends},
716+Recommends: ubuntu-sdk
717+Description: Ubuntu plugin for Qt Creator IDE
718+ Qt Creator is a new, lightweight, cross-platform integrated development
719+ environment (IDE) designed to make development with the Qt application
720+ framework even faster and easier.
721+ .
722+ This package contains the Ubuntu plugin for Qt Creator, providing
723+ deeper integration for developing applications for Ubuntu using the
724+ Ubuntu UI Toolkit. It also introduces an Ubuntu themed welcome
725+ screen.
726+
727+Package: qtcreator-plugin-ubuntu-common
728+Architecture: all
729+Depends: gksu,
730+ ${misc:Depends},
731+Recommends: qtcreator-plugin-ubuntu
732+Replaces: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
733+Conflicts: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
734+Description: Common data files for the Ubuntu plugin for Qt Creator IDE
735+ Qt Creator is a new, lightweight, cross-platform integrated development
736+ environment (IDE) designed to make development with the Qt application
737+ framework even faster and easier.
738+ .
739+ This package contains the runtime data files for the Ubuntu plugin for
740+ Qt Creator IDE.
741+
742+Package: qtcreator-plugin-ubuntu-cordova
743+Architecture: any
744+Depends: cordova-ubuntu-2.8,
745+ cordova-ubuntu-2.8-dev,
746+ qtcreator-plugin-ubuntu (= ${binary:Version}),
747+ qtcreator-plugin-ubuntu-cordova-common,
748+ ${misc:Depends},
749+Replaces: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu9)
750+Description: Cordova Ubuntu plugin for Qt Creator IDE
751+ Qt Creator is a new, lightweight, cross-platform integrated development
752+ environment (IDE) designed to make development with the Qt application
753+ framework even faster and easier.
754+ .
755+ This package contains the Cordova Ubuntu plugin for Qt Creator.
756+
757+Package: qtcreator-plugin-ubuntu-cordova-common
758+Architecture: all
759+Depends: gksu,
760+ ${misc:Depends},
761+Recommends: qtcreator-plugin-ubuntu-cordova
762+Replaces: qtcreator-plugin-ubuntu-cordova (<= 2.7.1-0ubuntu4),
763+Conflicts: qtcreator-plugin-ubuntu-cordova (<= 2.7.1-0ubuntu4),
764+Description: Common data files for Cordova Ubuntu plugin for Qt Creator IDE
765+ Qt Creator is a new, lightweight, cross-platform integrated development
766+ environment (IDE) designed to make development with the Qt application
767+ framework even faster and easier.
768+ .
769+ This package contains a data package for the Cordova Ubuntu plugin
770+ for Qt Creator IDE.
771
772=== added file 'debian/copyright'
773--- debian/copyright 1970-01-01 00:00:00 +0000
774+++ debian/copyright 2013-11-20 07:46:30 +0000
775@@ -0,0 +1,50 @@
776+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
777+Upstream-Name: qtcreator-plugin-ubuntu
778+Source: https://code.launchpad.net/~ubuntu-sdk-team/qtcreator-plugin-ubuntu/trunk
779+
780+Files: *
781+Copyright: 2013 Canonical Ltd.
782+License: LGPL-2.1
783+
784+License: LGPL-2.1
785+ This program is free software; you can redistribute it and/or modify
786+ it under the terms of the GNU Lesser General Public License as published by
787+ the Free Software Foundation; version 2.1.
788+ .
789+ This program is distributed in the hope that it will be useful,
790+ but WITHOUT ANY WARRANTY; without even the implied warranty of
791+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
792+ GNU Lesser General Public License for more details.
793+ .
794+ You should have received a copy of the GNU Lesser General Public License
795+ along with this program. If not, see <http://www.gnu.org/licenses/>.
796+ .
797+ On Debian systems, the complete text of the GNU Lesser General Public
798+ License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.
799+
800+Files: share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html
801+ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml
802+ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css
803+License: Apache-2.0
804+Copyright: 2012 The Apache Software Foundation
805+
806+License: Apache-2.0
807+ Licensed to the Apache Software Foundation (ASF) under one
808+ or more contributor license agreements. See the NOTICE file
809+ distributed with this work for additional information
810+ regarding copyright ownership. The ASF licenses this file
811+ to you under the Apache License, Version 2.0 (the
812+ "License"); you may not use this file except in compliance
813+ with the License. You may obtain a copy of the License at
814+ .
815+ http://www.apache.org/licenses/LICENSE-2.0
816+ .
817+ Unless required by applicable law or agreed to in writing,
818+ software distributed under the License is distributed on an
819+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
820+ KIND, either express or implied. See the License for the
821+ specific language governing permissions and limitations
822+ under the License.
823+ .
824+ On Debian systems, the complete text of the Apache License, Version 2.0
825+ can be found in `/usr/share/common-licenses/Apache-2.0'.
826
827=== added file 'debian/qtcreator-plugin-ubuntu-common.install'
828--- debian/qtcreator-plugin-ubuntu-common.install 1970-01-01 00:00:00 +0000
829+++ debian/qtcreator-plugin-ubuntu-common.install 2013-11-20 07:46:30 +0000
830@@ -0,0 +1,10 @@
831+usr/bin/ubuntu-sdk
832+usr/share/qtcreator/templates/wizards/ubuntu/backend
833+usr/share/qtcreator/templates/wizards/ubuntu/webapp
834+usr/share/qtcreator/templates/wizards/ubuntu/backendplustabs
835+usr/share/qtcreator/templates/wizards/ubuntu/html5
836+usr/share/qtcreator/templates/wizards/ubuntu/projectypes.json
837+usr/share/qtcreator/templates/wizards/ubuntu/scope
838+usr/share/qtcreator/templates/wizards/ubuntu/simple
839+usr/share/qtcreator/templates/wizards/ubuntu/tabs
840+usr/share/qtcreator/ubuntu
841
842=== added file 'debian/qtcreator-plugin-ubuntu-cordova-common.install'
843--- debian/qtcreator-plugin-ubuntu-cordova-common.install 1970-01-01 00:00:00 +0000
844+++ debian/qtcreator-plugin-ubuntu-cordova-common.install 2013-11-20 07:46:30 +0000
845@@ -0,0 +1,1 @@
846+usr/share/qtcreator/templates/wizards/ubuntu/cordovaubuntu
847
848=== added file 'debian/qtcreator-plugin-ubuntu-cordova.install'
849--- debian/qtcreator-plugin-ubuntu-cordova.install 1970-01-01 00:00:00 +0000
850+++ debian/qtcreator-plugin-ubuntu-cordova.install 2013-11-20 07:46:30 +0000
851@@ -0,0 +1,3 @@
852+src/cordovaubuntuprojectmanager/CordovaUbuntuProject.mimetypes.xml usr/share/mime/packages/
853+usr/lib/*/qtcreator/plugins/Canonical/CordovaUbuntuProjectManager.pluginspec
854+usr/lib/*/qtcreator/plugins/Canonical/libCordovaUbuntuProjectManager.so
855
856=== added file 'debian/qtcreator-plugin-ubuntu.install'
857--- debian/qtcreator-plugin-ubuntu.install 1970-01-01 00:00:00 +0000
858+++ debian/qtcreator-plugin-ubuntu.install 2013-11-20 07:46:30 +0000
859@@ -0,0 +1,4 @@
860+debian/ubuntusdk.desktop usr/share/applications
861+ubuntu-qtcreator.png usr/share/icons
862+usr/lib/*/qtcreator/plugins/Canonical/Ubuntu.pluginspec
863+usr/lib/*/qtcreator/plugins/Canonical/libUbuntu.so
864
865=== added file 'debian/rules'
866--- debian/rules 1970-01-01 00:00:00 +0000
867+++ debian/rules 2013-11-20 07:46:30 +0000
868@@ -0,0 +1,29 @@
869+#!/usr/bin/make -f
870+
871+# Uncomment this to turn on verbose mode.
872+#export DH_VERBOSE=1
873+
874+export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
875+export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
876+export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
877+export QT_SELECT := qt5
878+
879+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
880+
881+# -----------------------------------
882+
883+%:
884+ dh $@ --fail-missing
885+
886+override_dh_auto_configure:
887+ mkdir -p builddir
888+ dh_auto_configure -- IDE_LIBRARY_BASENAME=lib/$(DEB_HOST_MULTIARCH)
889+
890+override_dh_auto_install:
891+ mkdir -p $(CURDIR)/debian/tmp/usr/bin
892+ ln -s /usr/bin/qtcreator debian/tmp/usr/bin/ubuntu-sdk
893+ cp -r $(CURDIR)/share $(CURDIR)/debian/tmp/usr
894+ dh_auto_install --destdir=debian/tmp/usr
895+
896+override_dh_shlibdeps:
897+ dh_shlibdeps -XlibUbuntu.so -XlibCordovaUbuntuProjectManager.so
898
899=== added file 'debian/ubuntusdk.desktop'
900--- debian/ubuntusdk.desktop 1970-01-01 00:00:00 +0000
901+++ debian/ubuntusdk.desktop 2013-11-20 07:46:30 +0000
902@@ -0,0 +1,11 @@
903+[Desktop Entry]
904+Exec=qtcreator %F
905+Icon=ubuntu-qtcreator
906+Type=Application
907+Terminal=false
908+Name=Ubuntu SDK
909+GenericName=Integrated Development Environment
910+MimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.nokia.qt.qmakeprofile;application/vnd.nokia.xml.qt.resource;application/x-cordovaproject;application/x-qmlproject;
911+Categories=Qt;Development;IDE;
912+InitialPreference=9
913+Keywords=Ubuntu SDK;SDK;Ubuntu Touch;Qt Creator;Qt
914
915=== added file 'qtcreator-plugin-ubuntu.pro'
916--- qtcreator-plugin-ubuntu.pro 1970-01-01 00:00:00 +0000
917+++ qtcreator-plugin-ubuntu.pro 2013-11-20 07:46:30 +0000
918@@ -0,0 +1,2 @@
919+TEMPLATE = subdirs
920+SUBDIRS = src/ubuntu src/cordovaubuntuprojectmanager
921
922=== added directory 'share'
923=== added directory 'share/qtcreator'
924=== added directory 'share/qtcreator/templates'
925=== added directory 'share/qtcreator/templates/wizards'
926=== added directory 'share/qtcreator/templates/wizards/ubuntu'
927=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend'
928=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro'
929--- share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro 1970-01-01 00:00:00 +0000
930+++ share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro 2013-11-20 07:46:30 +0000
931@@ -0,0 +1,8 @@
932+TEMPLATE = subdirs
933+SUBDIRS = modules/%DISPLAYNAME%
934+
935+check.target = check
936+check.commands = qmltestrunner -import modules -platform ubuntu
937+check.depends = modules/%DISPLAYNAME%
938+QMAKE_EXTRA_TARGETS += check
939+
940
941=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/modules'
942=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName'
943=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp'
944--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp 1970-01-01 00:00:00 +0000
945+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp 2013-11-20 07:46:30 +0000
946@@ -0,0 +1,17 @@
947+#include <QtQml>
948+#include <QtQml/QQmlContext>
949+#include "backend.h"
950+#include "mytype.h"
951+
952+
953+void BackendPlugin::registerTypes(const char *uri)
954+{
955+ Q_ASSERT(uri == QLatin1String("%DISPLAYNAME%"));
956+
957+ qmlRegisterType<MyType>(uri, 1, 0, "MyType");
958+}
959+
960+void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
961+{
962+ QQmlExtensionPlugin::initializeEngine(engine, uri);
963+}
964
965=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h'
966--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h 1970-01-01 00:00:00 +0000
967+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h 2013-11-20 07:46:30 +0000
968@@ -0,0 +1,38 @@
969+#ifndef BACKEND_PLUGIN_H
970+#define BACKEND_PLUGIN_H
971+
972+#include <QtQml/QQmlEngine>
973+#include <QtQml/QQmlExtensionPlugin>
974+
975+/*
976+ ----8<-----
977+
978+ import %DISPLAYNAME% 1.0
979+
980+ Rectangle {
981+ width: 200
982+ height: 200
983+
984+ MyType {
985+ id: helloType
986+ }
987+
988+ Text {
989+ anchors.centerIn: parent
990+ text: helloType.helloworld
991+ }
992+ }
993+
994+ -----8<------
995+*/
996+class BackendPlugin : public QQmlExtensionPlugin
997+{
998+ Q_OBJECT
999+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
1000+
1001+public:
1002+ void registerTypes(const char *uri);
1003+ void initializeEngine(QQmlEngine *engine, const char *uri);
1004+};
1005+#endif // BACKEND_PLUGIN_H
1006+
1007
1008=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro'
1009--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro 1970-01-01 00:00:00 +0000
1010+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro 2013-11-20 07:46:30 +0000
1011@@ -0,0 +1,34 @@
1012+TEMPLATE = lib
1013+TARGET = %DISPLAYNAME%
1014+QT += qml quick
1015+CONFIG += qt plugin no_keywords
1016+
1017+#comment in the following line to disable traces
1018+DEFINES += QT_NO_DEBUG_OUTPUT
1019+
1020+TARGET = $$qtLibraryTarget($$TARGET)
1021+uri = %DISPLAYNAME%
1022+
1023+INCLUDEPATH += .
1024+
1025+# Input
1026+HEADERS += backend.h mytype.h
1027+SOURCES += backend.cpp mytype.cpp
1028+
1029+# Install path for the plugin
1030+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
1031+target.path = $$installPath
1032+INSTALLS += target
1033+
1034+# find files
1035+QMLDIR_FILE = qmldir
1036+
1037+# make visible to qt creator
1038+OTHER_FILES += $$QMLDIR_FILE
1039+
1040+# create install targets for files
1041+qmldir.path = $$installPath
1042+qmldir.files = $$QMLDIR_FILE
1043+
1044+INSTALLS += qmldir
1045+
1046
1047=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp'
1048--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp 1970-01-01 00:00:00 +0000
1049+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp 2013-11-20 07:46:30 +0000
1050@@ -0,0 +1,12 @@
1051+#include "mytype.h"
1052+
1053+MyType::MyType(QObject *parent) :
1054+ QObject(parent),
1055+ m_message("")
1056+{
1057+
1058+}
1059+
1060+MyType::~MyType() {
1061+
1062+}
1063
1064=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h'
1065--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h 1970-01-01 00:00:00 +0000
1066+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h 2013-11-20 07:46:30 +0000
1067@@ -0,0 +1,25 @@
1068+#ifndef MYTYPE_H
1069+#define MYTYPE_H
1070+
1071+#include <QObject>
1072+
1073+class MyType : public QObject
1074+{
1075+ Q_OBJECT
1076+ Q_PROPERTY( QString helloWorld READ helloWorld WRITE setHelloWorld NOTIFY helloWorldChanged )
1077+
1078+public:
1079+ explicit MyType(QObject *parent = 0);
1080+ ~MyType();
1081+
1082+Q_SIGNALS:
1083+ void helloWorldChanged();
1084+
1085+protected:
1086+ QString helloWorld() { return m_message; }
1087+ void setHelloWorld(QString msg) { m_message = msg; Q_EMIT helloWorldChanged(); }
1088+
1089+ QString m_message;
1090+};
1091+
1092+#endif // MYTYPE_H
1093
1094=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir'
1095--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir 1970-01-01 00:00:00 +0000
1096+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir 2013-11-20 07:46:30 +0000
1097@@ -0,0 +1,2 @@
1098+module %DISPLAYNAME%
1099+plugin %DISPLAYNAME%
1100
1101=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/tests'
1102=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/tests/unit'
1103=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml'
1104--- share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml 1970-01-01 00:00:00 +0000
1105+++ share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml 2013-11-20 07:46:30 +0000
1106@@ -0,0 +1,49 @@
1107+import QtQuick 2.0
1108+import QtTest 1.0
1109+import Ubuntu.Components 0.1
1110+import %DISPLAYNAME% 1.0
1111+
1112+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1113+
1114+// Execute tests with:
1115+// qmltestrunner
1116+
1117+Item {
1118+ // The objects
1119+ MyType {
1120+ id: objectUnderTest
1121+ }
1122+
1123+ TestCase {
1124+ name: "MyType"
1125+
1126+ function init() {
1127+ console.debug(">> init");
1128+ compare("",objectUnderTest.helloWorld,"text was not empty on init");
1129+ console.debug("<< init");
1130+ }
1131+
1132+ function cleanup() {
1133+ console.debug(">> cleanup");
1134+ console.debug("<< cleanup");
1135+ }
1136+
1137+ function initTestCase() {
1138+ console.debug(">> initTestCase");
1139+ console.debug("<< initTestCase");
1140+ }
1141+
1142+ function cleanupTestCase() {
1143+ console.debug(">> cleanupTestCase");
1144+ console.debug("<< cleanupTestCase");
1145+ }
1146+
1147+ function test_canReadAndWriteText() {
1148+ var expected = "Hello World 2";
1149+
1150+ objectUnderTest.helloWorld = expected;
1151+
1152+ compare(expected,objectUnderTest.helloWorld,"expected did not equal result");
1153+ }
1154+ }
1155+}
1156
1157=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs'
1158=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app'
1159=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile'
1160--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile 1970-01-01 00:00:00 +0000
1161+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile 2013-11-20 07:46:30 +0000
1162@@ -0,0 +1,21 @@
1163+# More information: https://wiki.ubuntu.com/Touch/Testing
1164+#
1165+# Notes for autopilot tests:
1166+# -----------------------------------------------------------
1167+# In order to run autopilot tests:
1168+# sudo apt-add-repository ppa:autopilot/ppa
1169+# sudo apt-get update
1170+# sudo apt-get install python-autopilot autopilot-qt
1171+#############################################################
1172+
1173+all:
1174+
1175+autopilot:
1176+ chmod +x tests/autopilot/run
1177+ tests/autopilot/run
1178+
1179+check:
1180+ qmltestrunner -input tests/unit -import ../backend/modules
1181+
1182+run:
1183+ /usr/bin/qmlscene -I ../backend/modules $@ %DISPLAYNAME%.qml
1184
1185=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components'
1186=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml'
1187--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
1188+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 2013-11-20 07:46:30 +0000
1189@@ -0,0 +1,14 @@
1190+import QtQuick 2.0
1191+import Ubuntu.Components 0.1
1192+
1193+UbuntuShape {
1194+ width: 200
1195+ height: width
1196+
1197+ property alias text : myText.text
1198+
1199+ Label {
1200+ id: myText
1201+ anchors.centerIn: parent
1202+ }
1203+}
1204
1205=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop'
1206--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop 1970-01-01 00:00:00 +0000
1207+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop 2013-11-20 07:46:30 +0000
1208@@ -0,0 +1,8 @@
1209+[Desktop Entry]
1210+Name=%DISPLAYNAME%
1211+Comment=My project description
1212+Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
1213+Icon=qmlscene
1214+Terminal=false
1215+Type=Application
1216+X-Ubuntu-Touch=true
1217
1218=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml'
1219--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml 1970-01-01 00:00:00 +0000
1220+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml 2013-11-20 07:46:30 +0000
1221@@ -0,0 +1,38 @@
1222+import QtQuick 2.0
1223+import Ubuntu.Components 0.1
1224+import "ui"
1225+
1226+/*!
1227+ \brief MainView with Tabs element.
1228+ First Tab has a single Label and
1229+ second Tab has a single ToolbarAction.
1230+*/
1231+
1232+MainView {
1233+ // objectName for functional testing purposes (autopilot-qt5)
1234+ objectName: "mainView"
1235+
1236+ // Note! applicationName needs to match the "name" field of the click manifest
1237+ applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
1238+
1239+ /*
1240+ This property enables the application to change orientation
1241+ when the device is rotated. The default is false.
1242+ */
1243+ //automaticOrientation: true
1244+
1245+ width: units.gu(100)
1246+ height: units.gu(75)
1247+
1248+ Tabs {
1249+ id: tabs
1250+
1251+ HelloTab {
1252+ objectName: "helloTab"
1253+ }
1254+
1255+ WorldTab {
1256+ objectName: "worldTab"
1257+ }
1258+ }
1259+}
1260
1261=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics'
1262=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics/toolbarIcon@8.png'
1263Binary files share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics/toolbarIcon@8.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics/toolbarIcon@8.png 2013-11-20 07:46:30 +0000 differ
1264=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests'
1265=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot'
1266=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName'
1267=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py'
1268--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
1269+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py 2013-11-20 07:46:30 +0000
1270@@ -0,0 +1,132 @@
1271+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1272+
1273+"""Ubuntu Touch App autopilot tests."""
1274+
1275+from os import remove
1276+import os.path
1277+from tempfile import mktemp
1278+import subprocess
1279+
1280+from autopilot.input import Mouse, Touch, Pointer
1281+from autopilot.matchers import Eventually
1282+from autopilot.platform import model
1283+from testtools.matchers import Is, Not, Equals
1284+from autopilot.testcase import AutopilotTestCase
1285+
1286+def get_module_include_path():
1287+ return os.path.abspath(
1288+ os.path.join(
1289+ os.path.dirname(__file__),
1290+ '..',
1291+ '..',
1292+ '..',
1293+ '..',
1294+ 'backend',
1295+ 'modules')
1296+ )
1297+
1298+
1299+class UbuntuTouchAppTestCase(AutopilotTestCase):
1300+ """A common test case class that provides several useful methods for the tests."""
1301+
1302+ if model() == 'Desktop':
1303+ scenarios = [
1304+ ('with mouse', dict(input_device_class=Mouse))
1305+ ]
1306+ else:
1307+ scenarios = [
1308+ ('with touch', dict(input_device_class=Touch))
1309+ ]
1310+
1311+ @property
1312+ def main_window(self):
1313+ return MainWindow(self.app)
1314+
1315+
1316+ def setUp(self):
1317+ self.pointing_device = Pointer(self.input_device_class.create())
1318+ super(UbuntuTouchAppTestCase, self).setUp()
1319+ self.launch_test_qml()
1320+
1321+
1322+ def launch_test_qml(self):
1323+ # If the test class has defined a 'test_qml' class attribute then we
1324+ # write it to disk and launch it inside the QML Scene. If not, then we
1325+ # silently do nothing (presumably the test has something else planned).
1326+ arch = subprocess.check_output(["dpkg-architecture",
1327+ "-qDEB_HOST_MULTIARCH"]).strip()
1328+ if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
1329+ qml_path = mktemp(suffix='.qml')
1330+ open(qml_path, 'w').write(self.test_qml)
1331+ self.addCleanup(remove, qml_path)
1332+
1333+ self.app = self.launch_test_application(
1334+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
1335+ "-I", get_module_include_path(),
1336+ qml_path,
1337+ app_type='qt')
1338+
1339+ if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
1340+ qml_path = self.test_qml_file
1341+ self.app = self.launch_test_application(
1342+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
1343+ "-I", get_module_include_path(),
1344+ qml_path,
1345+ app_type='qt')
1346+
1347+ self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
1348+
1349+
1350+ def get_qml_view(self):
1351+ """Get the main QML view"""
1352+
1353+ return self.app.select_single("QQuickView")
1354+
1355+ def get_mainview(self):
1356+ """Get the QML MainView"""
1357+
1358+ mainView = self.app.select_single("MainView")
1359+ self.assertThat(mainView, Not(Is(None)))
1360+ return mainView
1361+
1362+
1363+ def get_object(self,objectName):
1364+ """Get a object based on the objectName"""
1365+
1366+ obj = self.app.select_single(objectName=objectName)
1367+ self.assertThat(obj, Not(Is(None)))
1368+ return obj
1369+
1370+
1371+ def mouse_click(self,objectName):
1372+ """Move mouse on top of the object and click on it"""
1373+
1374+ obj = self.get_object(objectName)
1375+ self.pointing_device.move_to_object(obj)
1376+ self.pointing_device.click()
1377+
1378+
1379+ def mouse_press(self,objectName):
1380+ """Move mouse on top of the object and press mouse button (without releasing it)"""
1381+
1382+ obj = self.get_object(objectName)
1383+ self.pointing_device.move_to_object(obj)
1384+ self.pointing_device.press()
1385+
1386+
1387+ def mouse_release(self):
1388+ """Release mouse button"""
1389+
1390+ self.pointing_device.release()
1391+
1392+
1393+ def type_string(self, string):
1394+ """Type a string with keyboard"""
1395+
1396+ self.keyboard.type(string)
1397+
1398+
1399+ def type_key(self, key):
1400+ """Type a single key with keyboard"""
1401+
1402+ self.keyboard.key(key)
1403
1404=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main'
1405=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py'
1406--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
1407+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:46:30 +0000
1408@@ -0,0 +1,1 @@
1409+""" A main.qml test suite """
1410
1411=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py'
1412--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
1413+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:46:30 +0000
1414@@ -0,0 +1,23 @@
1415+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1416+
1417+"""Tests for the Hello World"""
1418+
1419+from autopilot.matchers import Eventually
1420+from textwrap import dedent
1421+from testtools.matchers import Is, Not, Equals
1422+from testtools import skip
1423+import os
1424+from %DISPLAYNAME% import UbuntuTouchAppTestCase
1425+
1426+
1427+class MainTests(UbuntuTouchAppTestCase):
1428+ """Generic tests for the Hello World"""
1429+
1430+ test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
1431+
1432+ def test_0_can_select_mainView(self):
1433+ """Must be able to select the mainview."""
1434+
1435+ mainView = self.get_mainview()
1436+ self.assertThat(mainView.visible,Eventually(Equals(True)))
1437+
1438
1439=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run'
1440--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run 1970-01-01 00:00:00 +0000
1441+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run 2013-11-20 07:46:30 +0000
1442@@ -0,0 +1,11 @@
1443+#!/bin/bash
1444+
1445+if [[ -z `which autopilot` ]]; then
1446+ echo "Autopilot is not installed. Skip"
1447+ exit
1448+fi
1449+
1450+SCRIPTPATH=`dirname $0`
1451+pushd ${SCRIPTPATH}
1452+autopilot run %DISPLAYNAME%
1453+popd
1454
1455=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit'
1456=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml'
1457--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
1458+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 2013-11-20 07:46:30 +0000
1459@@ -0,0 +1,49 @@
1460+import QtQuick 2.0
1461+import QtTest 1.0
1462+import Ubuntu.Components 0.1
1463+import "../../components"
1464+
1465+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1466+
1467+// Execute tests with:
1468+// qmltestrunner
1469+
1470+Item {
1471+ // The objects
1472+ HelloComponent {
1473+ id: objectUnderTest
1474+ }
1475+
1476+ TestCase {
1477+ name: "HelloComponent"
1478+
1479+ function init() {
1480+ console.debug(">> init");
1481+ compare("",objectUnderTest.text,"text was not empty on init");
1482+ console.debug("<< init");
1483+ }
1484+
1485+ function cleanup() {
1486+ console.debug(">> cleanup");
1487+ console.debug("<< cleanup");
1488+ }
1489+
1490+ function initTestCase() {
1491+ console.debug(">> initTestCase");
1492+ console.debug("<< initTestCase");
1493+ }
1494+
1495+ function cleanupTestCase() {
1496+ console.debug(">> cleanupTestCase");
1497+ console.debug("<< cleanupTestCase");
1498+ }
1499+
1500+ function test_canReadAndWriteText() {
1501+ var expected = "Hello World";
1502+
1503+ objectUnderTest.text = expected;
1504+
1505+ compare(expected,objectUnderTest.text,"expected did not equal result");
1506+ }
1507+ }
1508+}
1509
1510=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui'
1511=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml'
1512--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
1513+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 2013-11-20 07:46:30 +0000
1514@@ -0,0 +1,39 @@
1515+import QtQuick 2.0
1516+import Ubuntu.Components 0.1
1517+import %DISPLAYNAME% 1.0
1518+import "../components"
1519+
1520+Tab {
1521+ title: i18n.tr("Hello..")
1522+
1523+ page: Page {
1524+ Column {
1525+ spacing: units.gu(2)
1526+ anchors.centerIn: parent
1527+
1528+ MyType {
1529+ id: myType
1530+
1531+ Component.onCompleted: {
1532+ myType.helloWorld = "Cpp Backend + Tabbed UI"
1533+ }
1534+ }
1535+
1536+ HelloComponent {
1537+ objectName: "helloTab_HelloComponent"
1538+
1539+ anchors.horizontalCenter: parent.horizontalCenter
1540+
1541+ text: i18n.tr(myType.helloWorld)
1542+ }
1543+
1544+ Label {
1545+ objectName: "helloTab_label"
1546+
1547+ anchors.horizontalCenter: parent.horizontalCenter
1548+
1549+ text: i18n.tr("You can change the Tab from Page title above.")
1550+ }
1551+ }
1552+ }
1553+}
1554
1555=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml'
1556--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
1557+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 2013-11-20 07:46:30 +0000
1558@@ -0,0 +1,35 @@
1559+import QtQuick 2.0
1560+import Ubuntu.Components 0.1
1561+import "../components"
1562+
1563+Tab {
1564+ title: i18n.tr("..World!")
1565+
1566+ page: Page {
1567+ tools: WorldTabTools {
1568+ objectName: "worldTab_tools"
1569+ }
1570+
1571+ Column {
1572+ spacing: units.gu(2)
1573+ anchors.centerIn: parent
1574+
1575+ HelloComponent {
1576+ objectName: "worldTab_HelloComponent"
1577+
1578+ anchors.horizontalCenter: parent.horizontalCenter
1579+
1580+ text: i18n.tr("WorldTab")
1581+ }
1582+
1583+ Label {
1584+ id: label
1585+ objectName: "worldTab_label"
1586+
1587+ anchors.horizontalCenter: parent.horizontalCenter
1588+
1589+ text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
1590+ }
1591+ }
1592+ }
1593+}
1594
1595=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml'
1596--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
1597+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 2013-11-20 07:46:30 +0000
1598@@ -0,0 +1,13 @@
1599+import QtQuick 2.0
1600+import Ubuntu.Components 0.1
1601+
1602+ToolbarItems {
1603+ ToolbarButton {
1604+ iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
1605+ text: i18n.tr("Tap me!")
1606+
1607+ onTriggered: {
1608+ label.text = i18n.tr("Toolbar tapped")
1609+ }
1610+ }
1611+}
1612
1613=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend'
1614=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro'
1615--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro 1970-01-01 00:00:00 +0000
1616+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro 2013-11-20 07:46:30 +0000
1617@@ -0,0 +1,10 @@
1618+TEMPLATE = subdirs
1619+SUBDIRS = modules/%DISPLAYNAME%
1620+
1621+OTHER_FILES += $$system(find tests -type f)
1622+
1623+check.target = check
1624+check.commands = qmltestrunner -import modules -platform ubuntu
1625+check.depends = modules/%DISPLAYNAME%
1626+QMAKE_EXTRA_TARGETS += check
1627+
1628
1629=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules'
1630=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName'
1631=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp'
1632--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp 1970-01-01 00:00:00 +0000
1633+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp 2013-11-20 07:46:30 +0000
1634@@ -0,0 +1,17 @@
1635+#include <QtQml>
1636+#include <QtQml/QQmlContext>
1637+#include "backend.h"
1638+#include "mytype.h"
1639+
1640+
1641+void BackendPlugin::registerTypes(const char *uri)
1642+{
1643+ Q_ASSERT(uri == QLatin1String("%DISPLAYNAME%"));
1644+
1645+ qmlRegisterType<MyType>(uri, 1, 0, "MyType");
1646+}
1647+
1648+void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
1649+{
1650+ QQmlExtensionPlugin::initializeEngine(engine, uri);
1651+}
1652
1653=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h'
1654--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h 1970-01-01 00:00:00 +0000
1655+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h 2013-11-20 07:46:30 +0000
1656@@ -0,0 +1,38 @@
1657+#ifndef BACKEND_PLUGIN_H
1658+#define BACKEND_PLUGIN_H
1659+
1660+#include <QtQml/QQmlEngine>
1661+#include <QtQml/QQmlExtensionPlugin>
1662+
1663+/*
1664+ ----8<-----
1665+
1666+ import %DISPLAYNAME% 1.0
1667+
1668+ Rectangle {
1669+ width: 200
1670+ height: 200
1671+
1672+ MyType {
1673+ id: helloType
1674+ }
1675+
1676+ Text {
1677+ anchors.centerIn: parent
1678+ text: helloType.helloworld
1679+ }
1680+ }
1681+
1682+ -----8<------
1683+*/
1684+class BackendPlugin : public QQmlExtensionPlugin
1685+{
1686+ Q_OBJECT
1687+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
1688+
1689+public:
1690+ void registerTypes(const char *uri);
1691+ void initializeEngine(QQmlEngine *engine, const char *uri);
1692+};
1693+#endif // BACKEND_PLUGIN_H
1694+
1695
1696=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro'
1697--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro 1970-01-01 00:00:00 +0000
1698+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro 2013-11-20 07:46:30 +0000
1699@@ -0,0 +1,34 @@
1700+TEMPLATE = lib
1701+TARGET = %DISPLAYNAME%
1702+QT += qml quick
1703+CONFIG += qt plugin no_keywords
1704+
1705+#comment in the following line to disable traces
1706+DEFINES += QT_NO_DEBUG_OUTPUT
1707+
1708+TARGET = $$qtLibraryTarget($$TARGET)
1709+uri = %DISPLAYNAME%
1710+
1711+INCLUDEPATH += .
1712+
1713+# Input
1714+HEADERS += backend.h mytype.h
1715+SOURCES += backend.cpp mytype.cpp
1716+
1717+# Install path for the plugin
1718+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
1719+target.path = $$installPath
1720+INSTALLS += target
1721+
1722+# find files
1723+QMLDIR_FILE = qmldir
1724+
1725+# make visible to qt creator
1726+OTHER_FILES += $$QMLDIR_FILE
1727+
1728+# create install targets for files
1729+qmldir.path = $$installPath
1730+qmldir.files = $$QMLDIR_FILE
1731+
1732+INSTALLS += qmldir
1733+
1734
1735=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp'
1736--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp 1970-01-01 00:00:00 +0000
1737+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp 2013-11-20 07:46:30 +0000
1738@@ -0,0 +1,12 @@
1739+#include "mytype.h"
1740+
1741+MyType::MyType(QObject *parent) :
1742+ QObject(parent),
1743+ m_message("")
1744+{
1745+
1746+}
1747+
1748+MyType::~MyType() {
1749+
1750+}
1751
1752=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h'
1753--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h 1970-01-01 00:00:00 +0000
1754+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h 2013-11-20 07:46:30 +0000
1755@@ -0,0 +1,25 @@
1756+#ifndef MYTYPE_H
1757+#define MYTYPE_H
1758+
1759+#include <QObject>
1760+
1761+class MyType : public QObject
1762+{
1763+ Q_OBJECT
1764+ Q_PROPERTY( QString helloWorld READ helloWorld WRITE setHelloWorld NOTIFY helloWorldChanged )
1765+
1766+public:
1767+ explicit MyType(QObject *parent = 0);
1768+ ~MyType();
1769+
1770+Q_SIGNALS:
1771+ void helloWorldChanged();
1772+
1773+protected:
1774+ QString helloWorld() { return m_message; }
1775+ void setHelloWorld(QString msg) { m_message = msg; Q_EMIT helloWorldChanged(); }
1776+
1777+ QString m_message;
1778+};
1779+
1780+#endif // MYTYPE_H
1781
1782=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir'
1783--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir 1970-01-01 00:00:00 +0000
1784+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir 2013-11-20 07:46:30 +0000
1785@@ -0,0 +1,2 @@
1786+module %DISPLAYNAME%
1787+plugin %DISPLAYNAME%
1788
1789=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests'
1790=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit'
1791=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml'
1792--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml 1970-01-01 00:00:00 +0000
1793+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml 2013-11-20 07:46:30 +0000
1794@@ -0,0 +1,49 @@
1795+import QtQuick 2.0
1796+import QtTest 1.0
1797+import Ubuntu.Components 0.1
1798+import %DISPLAYNAME% 1.0
1799+
1800+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
1801+
1802+// Execute tests with:
1803+// qmltestrunner
1804+
1805+Item {
1806+ // The objects
1807+ MyType {
1808+ id: objectUnderTest
1809+ }
1810+
1811+ TestCase {
1812+ name: "MyType"
1813+
1814+ function init() {
1815+ console.debug(">> init");
1816+ compare("",objectUnderTest.helloWorld,"text was not empty on init");
1817+ console.debug("<< init");
1818+ }
1819+
1820+ function cleanup() {
1821+ console.debug(">> cleanup");
1822+ console.debug("<< cleanup");
1823+ }
1824+
1825+ function initTestCase() {
1826+ console.debug(">> initTestCase");
1827+ console.debug("<< initTestCase");
1828+ }
1829+
1830+ function cleanupTestCase() {
1831+ console.debug(">> cleanupTestCase");
1832+ console.debug("<< cleanupTestCase");
1833+ }
1834+
1835+ function test_canReadAndWriteText() {
1836+ var expected = "Hello World 2";
1837+
1838+ objectUnderTest.helloWorld = expected;
1839+
1840+ compare(expected,objectUnderTest.helloWorld,"expected did not equal result");
1841+ }
1842+ }
1843+}
1844
1845=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro'
1846--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro 1970-01-01 00:00:00 +0000
1847+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro 2013-11-20 07:46:30 +0000
1848@@ -0,0 +1,11 @@
1849+TEMPLATE = subdirs
1850+
1851+SUBDIRS += \
1852+ backend
1853+
1854+OTHER_FILES += $$system(find app -type f)
1855+
1856+check.target = check
1857+check.commands = cd backend; qmake; make; make check; cd ../app; make check
1858+check.depends = backend
1859+QMAKE_EXTRA_TARGETS += check
1860
1861=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu'
1862=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js'
1863--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 1970-01-01 00:00:00 +0000
1864+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 2013-11-20 07:46:30 +0000
1865@@ -0,0 +1,27 @@
1866+/* Create UI instance */
1867+
1868+var UI = new UbuntuUI();
1869+
1870+/* Initializatino after window load */
1871+window.onload = function () {
1872+ /* REQUIRED: initialize UI */
1873+ UI.init();
1874+
1875+ /* Start pagestack with main page */
1876+ UI.pagestack.push("main");
1877+
1878+ /* GUI intial state: show loading dialog (is removed on deviceready event) */
1879+ UI.dialog("loading").show();
1880+
1881+ /* Connect button to function */
1882+ UI.button("devicereadyOK").click(function() {
1883+ UI.dialog("deviceready").hide();
1884+ });
1885+
1886+};
1887+
1888+/* Respond to deviceready event */
1889+document.addEventListener("deviceready", function() {
1890+ UI.dialog("loading").hide();
1891+ UI.dialog("deviceready").show();
1892+ }, false);
1893
1894=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css'
1895=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css'
1896--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 1970-01-01 00:00:00 +0000
1897+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 2013-11-20 07:46:30 +0000
1898@@ -0,0 +1,57 @@
1899+/*
1900+ * Licensed to the Apache Software Foundation (ASF) under one
1901+ * or more contributor license agreements. See the NOTICE file
1902+ * distributed with this work for additional information
1903+ * regarding copyright ownership. The ASF licenses this file
1904+ * to you under the Apache License, Version 2.0 (the
1905+ * "License"); you may not use this file except in compliance
1906+ * with the License. You may obtain a copy of the License at
1907+ *
1908+ * http://www.apache.org/licenses/LICENSE-2.0
1909+ *
1910+ * Unless required by applicable law or agreed to in writing,
1911+ * software distributed under the License is distributed on an
1912+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1913+ * KIND, either express or implied. See the License for the
1914+ * specific language governing permissions and limitations
1915+ * under the License.
1916+ */
1917+* {
1918+ -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
1919+}
1920+
1921+body {
1922+ -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
1923+ -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
1924+ -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
1925+ background-color:#E4E4E4;
1926+ background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
1927+ background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
1928+ background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
1929+ background-image:-webkit-gradient(
1930+ linear,
1931+ left top,
1932+ left bottom,
1933+ color-stop(0, #A7A7A7),
1934+ color-stop(0.51, #E4E4E4)
1935+ );
1936+ background-attachment:fixed;
1937+ font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
1938+ font-size:12px;
1939+ height:100%;
1940+ margin:0px;
1941+ padding:0px;
1942+ text-transform:uppercase;
1943+ width:100%;
1944+}
1945+@keyframes fade {
1946+ from { opacity: 1.0; }
1947+ 50% { opacity: 0.4; }
1948+ to { opacity: 1.0; }
1949+}
1950+
1951+@-webkit-keyframes fade {
1952+ from { opacity: 1.0; }
1953+ 50% { opacity: 0.4; }
1954+ to { opacity: 1.0; }
1955+}
1956
1957=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop'
1958--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop 1970-01-01 00:00:00 +0000
1959+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop 2013-11-20 07:46:30 +0000
1960@@ -0,0 +1,8 @@
1961+[Desktop Entry]
1962+Name=%DISPLAYNAME%
1963+Comment=Description of %DISPLAYNAME%
1964+Exec=cordova-ubuntu-2.8 .
1965+Icon=qmlscene
1966+Terminal=false
1967+Type=Application
1968+X-Ubuntu-Touch=true
1969
1970=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img'
1971=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img/logo.png'
1972Binary files share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img/logo.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img/logo.png 2013-11-20 07:46:30 +0000 differ
1973=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html'
1974--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 1970-01-01 00:00:00 +0000
1975+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 2013-11-20 07:46:30 +0000
1976@@ -0,0 +1,90 @@
1977+<!DOCTYPE html>
1978+<!--
1979+ Licensed to the Apache Software Foundation (ASF) under one
1980+ or more contributor license agreements. See the NOTICE file
1981+ distributed with this work for additional information
1982+ regarding copyright ownership. The ASF licenses this file
1983+ to you under the Apache License, Version 2.0 (the
1984+ "License"); you may not use this file except in compliance
1985+ with the License. You may obtain a copy of the License at
1986+
1987+ http://www.apache.org/licenses/LICENSE-2.0
1988+
1989+ Unless required by applicable law or agreed to in writing,
1990+ software distributed under the License is distributed on an
1991+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1992+ KIND, either express or implied. See the License for the
1993+ specific language governing permissions and limitations
1994+ under the License.
1995+-->
1996+<html>
1997+ <head>
1998+ <meta charset="utf-8" />
1999+ <meta name="format-detection" content="telephone=no" />
2000+ <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
2001+ <link rel="stylesheet" type="text/css" href="css/index.css" />
2002+
2003+ <!-- Use Ubuntu Cordova -->
2004+ <script language="javascript" type="text/javascript" src="file:///usr/share/cordova-ubuntu-2.8/www/cordova-2.8.js"></script>
2005+
2006+ <!-- Ubuntu UI Style imports - Ambiance theme -->
2007+ <link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
2008+
2009+ <!-- Ubuntu UI javascript imports - Ambiance theme -->
2010+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
2011+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
2012+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
2013+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
2014+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>
2015+
2016+ <!-- Application script -->
2017+ <script src="app.js"></script>
2018+
2019+ <title>Hello World Cordova</title>
2020+ </head>
2021+
2022+ <body>
2023+
2024+ <div data-role="page">
2025+
2026+ <header data-role="header">
2027+ <nav data-role="navbar" class="tabs" >
2028+ <div class="tabs-inner">
2029+ <ul>
2030+ <li class="active" role="tab">
2031+ <a href="#item1" class="tab-item">HTML5/Cordova</a>
2032+ </li>
2033+ </ul>
2034+ </div>
2035+ </nav>
2036+ </header>
2037+
2038+ <div data-role="content">
2039+ <div data-role="pagestack">
2040+ <div data-role="page" id="main">
2041+ <h1>Apache Cordova Loaded</h1>
2042+ <img src="img/logo.png"/>
2043+ </div>
2044+ </div>
2045+ </div>
2046+
2047+ <div data-role="dialog" id="loading">
2048+ <section>
2049+ <h1>Apache Cordova Loading</h1>
2050+ <progress></progress>
2051+ </section>
2052+ </div>
2053+
2054+ <div data-role="dialog" id="deviceready">
2055+ <section>
2056+ <h1>Deviceready event received</h1>
2057+ <button data-role="button" id="devicereadyOK" class="success">OK</button>
2058+ </section>
2059+ </div>
2060+ </div>
2061+ </body>
2062+</html>
2063+
2064+
2065+
2066+
2067
2068=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml'
2069--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml 1970-01-01 00:00:00 +0000
2070+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml 2013-11-20 07:46:30 +0000
2071@@ -0,0 +1,43 @@
2072+<?xml version="1.0" encoding="utf-8"?>
2073+<!--
2074+
2075+ Licensed to the Apache Software Foundation (ASF) under one
2076+ or more contributor license agreements. See the NOTICE file
2077+ distributed with this work for additional information
2078+ regarding copyright ownership. The ASF licenses this file
2079+ to you under the Apache License, Version 2.0 (the
2080+ "License"); you may not use this file except in compliance
2081+ with the License. You may obtain a copy of the License at
2082+
2083+ http://www.apache.org/licenses/LICENSE-2.0
2084+
2085+ Unless required by applicable law or agreed to in writing,
2086+ software distributed under the License is distributed on an
2087+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
2088+ KIND, either express or implied. See the License for the
2089+ specific language governing permissions and limitations
2090+ under the License.
2091+
2092+-->
2093+
2094+<plugins>
2095+ <plugin name="File" value="com.cordova.File"/>
2096+ <plugin name="Notification" value="com.cordova.Notification"/>
2097+ <plugin name="Accelerometer" value="com.cordova.Accelerometer"/>
2098+ <plugin name="Events" value="com.cordova.Events"/>
2099+ <plugin name="Geolocation" value="com.cordova.Geolocation"/>
2100+ <plugin name="Device" value="com.cordova.Device"/>
2101+ <plugin name="Console" value="com.cordova.Console"/>
2102+ <plugin name="Connection" value="com.cordova.Connection"/>
2103+ <plugin name="Compass" value="com.cordova.Compass"/>
2104+ <plugin name="Camera" value="com.cordova.Camera"/>
2105+ <plugin name="Contacts" value="com.cordova.Contacts"/>
2106+ <plugin name="Media" value="com.cordova.Media"/>
2107+ <plugin name="Globalization" value="com.cordova.Globalization"/>
2108+ <plugin name="Capture" value="com.cordova.Capture"/>
2109+ <plugin name="Splashscreen" value="com.cordova.Splashscreen"/>
2110+ <plugin name="InAppBrowser" value="com.cordova.InAppBrowser"/>
2111+
2112+<!-- Non-standard -->
2113+ <plugin name="App" value="com.cordova.App"/>
2114+</plugins>
2115
2116=== added directory 'share/qtcreator/templates/wizards/ubuntu/html5'
2117=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop'
2118--- share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop 1970-01-01 00:00:00 +0000
2119+++ share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop 2013-11-20 07:46:30 +0000
2120@@ -0,0 +1,8 @@
2121+[Desktop Entry]
2122+Name=%DISPLAYNAME%
2123+Comment=My project description
2124+Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
2125+Icon=qmlscene
2126+Terminal=false
2127+Type=Application
2128+X-Ubuntu-Touch=true
2129
2130=== added directory 'share/qtcreator/templates/wizards/ubuntu/html5/html'
2131=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/html/app.js'
2132--- share/qtcreator/templates/wizards/ubuntu/html5/html/app.js 1970-01-01 00:00:00 +0000
2133+++ share/qtcreator/templates/wizards/ubuntu/html5/html/app.js 2013-11-20 07:46:30 +0000
2134@@ -0,0 +1,22 @@
2135+window.onload = function () {
2136+ var UI = new UbuntuUI();
2137+ UI.init();
2138+
2139+ UI.pagestack.push("main");
2140+
2141+ UI.button('pressme').click(function () {
2142+ UI.dialog('mydialog').show();
2143+ });
2144+
2145+ UI.button('yes').click(function () {
2146+ UI.dialog('mydialog').hide();
2147+ });
2148+
2149+ [].forEach.call(document.querySelectorAll('[data-role="list"] li a'),
2150+ function (a) {
2151+ a.onclick = function (e) {
2152+ UI.pagestack.push("item-view");
2153+ };
2154+ });
2155+};
2156+
2157
2158=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/html/index.html'
2159--- share/qtcreator/templates/wizards/ubuntu/html5/html/index.html 1970-01-01 00:00:00 +0000
2160+++ share/qtcreator/templates/wizards/ubuntu/html5/html/index.html 2013-11-20 07:46:30 +0000
2161@@ -0,0 +1,75 @@
2162+<!DOCTYPE html>
2163+<html>
2164+ <head>
2165+ <meta charset="utf-8">
2166+ <title>Ubuntu SDK: HTML5 App</title>
2167+ <meta name="description" content="An example HTML5 application">
2168+ <meta name="viewport" content="width=device-width">
2169+
2170+ <!-- Ubuntu UI Style imports - Ambiance theme -->
2171+ <link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
2172+
2173+ <!-- Ubuntu UI javascript imports - Ambiance theme -->
2174+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
2175+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
2176+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
2177+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
2178+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>
2179+ <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/popovers.js"></script>
2180+
2181+ <!-- Application script -->
2182+ <script src="app.js"></script>
2183+ </head>
2184+ <body>
2185+ <div data-role="page">
2186+
2187+ <header data-role="header">
2188+ <nav data-role="navbar" class="tabs" >
2189+ <div class="tabs-inner">
2190+ <ul>
2191+ <li class="active" role="tab">
2192+ <a href="#item1" class="tab-item">My Header</a>
2193+ </li>
2194+ </ul>
2195+ </div>
2196+ </nav>
2197+ </header>
2198+
2199+ <div data-role="content">
2200+
2201+ <div data-role="pagestack">
2202+
2203+ <div data-role="page" id="main">
2204+ <section data-role="list">
2205+ <ul data-role="listview">
2206+ <li><a href="#">My Item 1</a></li>
2207+ <li><a href="#">My Item 2</a></li>
2208+ <li><a href="#">My Item 3</a></li>
2209+ </ul>
2210+ </section>
2211+
2212+ <button data-role="button" class="success" id="pressme">Press Me!</button>
2213+ </div>
2214+
2215+ <div data-role="page" id="item-view">
2216+ <h1>Hello from page2</h1>
2217+ <section data-role="list" id="item-view-content">
2218+ </section>
2219+ </div>
2220+
2221+ </div>
2222+
2223+ <!-- PageStack -->
2224+ <div data-role="dialog" id="mydialog">
2225+ <section>
2226+ <h1>Hello world!</h1>
2227+ <menu>
2228+ <button data-role="button" class="success" id="yes">OK</button>
2229+ </menu>
2230+ </section>
2231+ </div>
2232+
2233+ </div>
2234+ </div>
2235+ </body>
2236+</html>
2237\ No newline at end of file
2238
2239=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/main.qml'
2240--- share/qtcreator/templates/wizards/ubuntu/html5/main.qml 1970-01-01 00:00:00 +0000
2241+++ share/qtcreator/templates/wizards/ubuntu/html5/main.qml 2013-11-20 07:46:30 +0000
2242@@ -0,0 +1,35 @@
2243+import QtQuick 2.0
2244+import Ubuntu.Components 0.1
2245+import QtWebKit 3.0
2246+
2247+/*!
2248+ \brief MainView with a Flickable WebView.
2249+*/
2250+
2251+MainView {
2252+ // objectName for functional testing purposes (autopilot-qt5)
2253+ objectName: "mainView"
2254+
2255+ // Note! applicationName needs to match the "name" field of the click manifest
2256+ applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
2257+
2258+ /*
2259+ This property enables the application to change orientation
2260+ when the device is rotated. The default is false.
2261+ */
2262+ automaticOrientation: true
2263+
2264+ width: units.gu(100)
2265+ height: units.gu(75)
2266+
2267+ Flickable {
2268+ id: webViewFlickable
2269+ anchors.fill: parent
2270+
2271+ WebView {
2272+ id: webView
2273+ anchors.fill: parent
2274+ url: "html/index.html"
2275+ }
2276+ }
2277+}
2278
2279=== added file 'share/qtcreator/templates/wizards/ubuntu/projectypes.json'
2280--- share/qtcreator/templates/wizards/ubuntu/projectypes.json 1970-01-01 00:00:00 +0000
2281+++ share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-11-20 07:46:30 +0000
2282@@ -0,0 +1,217 @@
2283+[
2284+ {
2285+ "type": "qmlproject",
2286+ "folder": "simple",
2287+ "displayName": "Simple Touch UI",
2288+ "id": "UbuntuAppSimple",
2289+ "description": "A simple Ubuntu Touch UI with a Label and a Button.\n\nIncludes also unit and functional tests.",
2290+ "mainFile" : "main.qml",
2291+ "hasTests" : true,
2292+ "files": [
2293+ {
2294+ "fileName": "displayName.desktop"
2295+ },
2296+ {
2297+ "fileName": "tests/unit/tst_hellocomponent.qml"
2298+ },
2299+ {
2300+ "fileName": "components/HelloComponent.qml"
2301+ },
2302+ {
2303+ "fileName": "Makefile"
2304+ },
2305+ {
2306+ "fileName": "tests/autopilot/run"
2307+ },
2308+ {
2309+ "fileName": "tests/autopilot/displayName/main/test_main.py"
2310+ },
2311+ {
2312+ "fileName": "tests/autopilot/displayName/__init__.py"
2313+ },
2314+ {
2315+ "fileName": "tests/autopilot/displayName/main/__init__.py"
2316+ }
2317+ ]
2318+ },
2319+ {
2320+ "type": "scriptgeneratedproject",
2321+ "folder": "webapp",
2322+ "displayName": "Webapp",
2323+ "id": "UbuntuWebApp",
2324+ "description": "A simple webapp template",
2325+ "mainFile": "app.desktop",
2326+ "hasTests": false,
2327+ "files": [
2328+ {
2329+ "fileName": "app.json"
2330+ }
2331+ ]
2332+ },
2333+ {
2334+ "type": "qmlproject",
2335+ "folder": "tabs",
2336+ "displayName": "Tabbed Touch UI",
2337+ "id": "UbuntuAppTabs",
2338+ "description": "A multi-page Ubuntu Touch UI using the Tabs component.\n\nIncludes also unit and functional tests.",
2339+ "mainFile" : "main.qml",
2340+ "hasTests" : true,
2341+ "files": [
2342+ {
2343+ "fileName": "graphics/toolbarIcon@8.png"
2344+ },
2345+ {
2346+ "fileName": "displayName.desktop"
2347+ },
2348+ {
2349+ "fileName": "tests/unit/tst_hellocomponent.qml"
2350+ },
2351+ {
2352+ "fileName": "components/HelloComponent.qml"
2353+ },
2354+ {
2355+ "fileName": "ui/WorldTabTools.qml"
2356+ },
2357+ {
2358+ "fileName": "ui/WorldTab.qml"
2359+ },
2360+ {
2361+ "fileName": "ui/HelloTab.qml"
2362+ },
2363+ {
2364+ "fileName": "Makefile"
2365+ },
2366+ {
2367+ "fileName": "tests/autopilot/run"
2368+ },
2369+ {
2370+ "fileName": "tests/autopilot/displayName/main/test_main.py"
2371+ },
2372+ {
2373+ "fileName": "tests/autopilot/displayName/__init__.py"
2374+ },
2375+ {
2376+ "fileName": "tests/autopilot/displayName/main/__init__.py"
2377+ }
2378+ ]
2379+ },
2380+ {
2381+ "type": "qmlproject",
2382+ "folder": "html5",
2383+ "displayName": "HTML5 Touch UI",
2384+ "id": "UbuntuAppWebView",
2385+ "description": "An HTML5 UI using the QML WebView component",
2386+ "mainFile" : "main.qml",
2387+ "files": [
2388+ {
2389+ "fileName": "displayName.desktop"
2390+ },
2391+ {
2392+ "fileName": "html/index.html"
2393+ },
2394+ {
2395+ "fileName": "html/app.js"
2396+ }
2397+ ]
2398+ },
2399+ {
2400+ "type": "cordovaproject",
2401+ "folder": "cordovaubuntu",
2402+ "displayName": "Cordova Ubuntu HTML5 Touch UI",
2403+ "id": "UbuntuCordovaUbuntuProject",
2404+ "description": "An HTML5 app that makes use of the Apache Cordova APIs with a native Ubuntu Touch look and feel",
2405+ "mainFile" : "index.html",
2406+ "files": [
2407+ {
2408+ "fileName": "css/index.css"
2409+ },
2410+ {
2411+ "fileName": "img/logo.png"
2412+ },
2413+ {
2414+ "fileName": "plugins.xml"
2415+ },
2416+ {
2417+ "fileName": "displayName.desktop"
2418+ }
2419+
2420+ ]
2421+ },
2422+ {
2423+ "type": "pro",
2424+ "folder": "backend",
2425+ "displayName": "QML Extension Library",
2426+ "id": "UbuntuAppWBackend",
2427+ "description": "A simple C++ based QML Extension Library.\n\nIncludes also a unit test.",
2428+ "mainFile" : "modules/displayName/backend.h",
2429+ "projectFile" : "displayName.pro",
2430+ "files": [
2431+ { "fileName": "modules/displayName/displayName.pro" },
2432+ { "fileName": "modules/displayName/backend.cpp" },
2433+ { "fileName": "modules/displayName/mytype.h" },
2434+ { "fileName": "modules/displayName/mytype.cpp" },
2435+ { "fileName": "modules/displayName/qmldir" },
2436+ { "fileName": "tests/unit/tst_mytype.qml" }
2437+ ]
2438+ },
2439+ {
2440+ "type": "pro",
2441+ "folder": "backendplustabs",
2442+ "displayName": "QML Extension Library + Tabbed Touch UI",
2443+ "id": "UbuntuAppWBackendPlusTabs",
2444+ "description": "A simple C++ based QML Extension Library with\nTabbed Touch UI written in QML.\n\nIncludes also\n - a unit test for C++\n - unit and functional tests for QML\n",
2445+ "mainFile" : "backend/modules/displayName/backend.h",
2446+ "projectFile" : "displayName.pro",
2447+ "files": [
2448+ { "fileName": "backend/modules/displayName/displayName.pro" },
2449+ { "fileName": "backend/modules/displayName/backend.cpp" },
2450+ { "fileName": "backend/modules/displayName/mytype.h" },
2451+ { "fileName": "backend/modules/displayName/mytype.cpp" },
2452+ { "fileName": "backend/modules/displayName/qmldir" },
2453+ { "fileName": "backend/tests/unit/tst_mytype.qml" },
2454+ { "fileName": "app/graphics/toolbarIcon@8.png" },
2455+ { "fileName": "app/displayName.desktop" },
2456+ { "fileName": "app/displayName.qml" },
2457+ { "fileName": "app/tests/unit/tst_hellocomponent.qml" },
2458+ { "fileName": "app/components/HelloComponent.qml" },
2459+ { "fileName": "app/ui/WorldTabTools.qml" },
2460+ { "fileName": "app/ui/WorldTab.qml" },
2461+ { "fileName": "app/ui/HelloTab.qml" },
2462+ { "fileName": "app/Makefile" },
2463+ { "fileName": "app/tests/autopilot/run" },
2464+ { "fileName": "app/tests/autopilot/displayName/main/test_main.py" },
2465+ { "fileName": "app/tests/autopilot/displayName/__init__.py" },
2466+ { "fileName": "app/tests/autopilot/displayName/main/__init__.py" },
2467+ { "fileName": "Makefile" },
2468+ { "fileName": "backend/backend.pro" }
2469+ ]
2470+ },
2471+ {
2472+ "type": "pro",
2473+ "folder": "scope",
2474+ "displayName": "Unity Scope",
2475+ "id": "UbuntuUnityScope",
2476+ "description": "A Unity Scope template",
2477+ "mainFile" : "displayName.c",
2478+ "projectFile" : "displayName.pro",
2479+ "requiredFeature": "Ubuntu.Wizards.FeatureUnityScope",
2480+ "files": [
2481+ {
2482+ "fileName": "data/unity-scope-displayName_lower.service.in"
2483+ },
2484+ {
2485+ "fileName": "data/displayName_lower.scope"
2486+ },
2487+ {
2488+ "fileName": "config.h"
2489+ },
2490+ {
2491+ "fileName": "displayName-parser.c"
2492+ },
2493+ {
2494+ "fileName": "displayName-parser.h"
2495+ }
2496+ ]
2497+ }
2498+
2499+]
2500
2501=== added directory 'share/qtcreator/templates/wizards/ubuntu/scope'
2502=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/config.h'
2503--- share/qtcreator/templates/wizards/ubuntu/scope/config.h 1970-01-01 00:00:00 +0000
2504+++ share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-11-20 07:46:30 +0000
2505@@ -0,0 +1,9 @@
2506+#ifndef __CONFIG_H__
2507+#define __CONFIG_H__
2508+
2509+#define GROUP_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%"
2510+#define UNIQUE_NAME "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%"
2511+
2512+#define CATEGORY_ICON_PATH "/usr/share/icons/unity-icon-theme/places/svg/service-%DISPLAYNAME_LOWER%.svg"
2513+
2514+#endif /* __CONFIG_H__ */
2515
2516=== added directory 'share/qtcreator/templates/wizards/ubuntu/scope/data'
2517=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope'
2518--- share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 1970-01-01 00:00:00 +0000
2519+++ share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-11-20 07:46:30 +0000
2520@@ -0,0 +1,18 @@
2521+[Scope]
2522+DBusName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
2523+DBusPath=/com/canonical/unity/scope/%DISPLAYNAME_LOWER%
2524+Icon=
2525+QueryBinary=
2526+Keywords=%DISPLAYNAME_LOWER%;
2527+RequiredMetadata=
2528+OptionalMetadata=
2529+Loader=
2530+RemoteContent=false
2531+Type=%DISPLAYNAME_LOWER%
2532+Name=%DISPLAYNAME_CAPITAL%
2533+Description=Find %DISPLAYNAME_CAPITAL% items
2534+SearchHint=Search %DISPLAYNAME_CAPITAL%
2535+CategoryIcon=/usr/share/icons/unity-icon-theme/places/svg/service-%DISPLAYNAME_LOWER%.svg
2536+
2537+[Desktop Entry]
2538+X-Ubuntu-Gettext-Domain=unity-scope-%DISPLAYNAME_LOWER%
2539
2540=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in'
2541--- share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 1970-01-01 00:00:00 +0000
2542+++ share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 2013-11-20 07:46:30 +0000
2543@@ -0,0 +1,3 @@
2544+[D-BUS Service]
2545+Name=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
2546+Exec=
2547
2548=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c'
2549--- share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 1970-01-01 00:00:00 +0000
2550+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 2013-11-20 07:46:30 +0000
2551@@ -0,0 +1,87 @@
2552+/*
2553+ * Feed parser backend
2554+ *
2555+ * In this module you'll be implementing the feed parser backend.
2556+ * This code will not be Unity-specific, and it will vary depending
2557+ * on the type of data returned by your source. Common feed types
2558+ * returned when doing search queries to sources are JSON, RSS, XML.
2559+ *
2560+ * You'll simply need to implement a parser for the type of feed your
2561+ * source returns and send the results back to Unity via the get_results()
2562+ * function.
2563+ */
2564+
2565+#include <stdio.h>
2566+#include <stdlib.h>
2567+#include <string.h>
2568+#include <glib.h>
2569+#include "%DISPLAYNAME_LOWER%-parser.h"
2570+
2571+/*
2572+ * This is the URI against which you'll be submitting your
2573+ * search query from the Dash, which you'll need to adapt
2574+ * to your source.
2575+ */
2576+#define BASE_URI "http://%DISPLAYNAME_LOWER%.org/api/search/?query="
2577+
2578+/**
2579+ * @brief Cleans up (frees the memory allocated memory)
2580+ * of the given results structure
2581+ * @param data Structure that contains the data to free
2582+ */
2583+void
2584+result_cleanup(gpointer data) {
2585+ /* This is specific to a type of result, so you'll
2586+ * need to adapt it to the results sent by your
2587+ * source.
2588+ */
2589+ result_t *result = (result_t *)data;
2590+ if (result->link) {
2591+ free(result->link);
2592+ }
2593+ if (result->icon_url) {
2594+ free(result->icon_url);
2595+ }
2596+ if (result->title) {
2597+ free(result->title);
2598+ }
2599+ if (result->description) {
2600+ free(result->description);
2601+ }
2602+ if (result->creation_date) {
2603+ free(result->creation_date);
2604+ }
2605+ if (result->author) {
2606+ free(result->author);
2607+ }
2608+}
2609+
2610+/**
2611+ * @brief get_results Get and parse the results from a search query
2612+ * @param search_term String submitted as the search term
2613+ * @return Search results
2614+ */
2615+GSList *
2616+get_results(const char *search_term) {
2617+ GString *url = NULL;
2618+ GSList *results = NULL;
2619+
2620+ /* Check if an actual search term was submitted, return otherwise */
2621+ if (search_term == NULL) {
2622+ g_warning("get_results: search_term cannot be null");
2623+ return results;
2624+ }
2625+
2626+ /* Construct the full search query */
2627+ url = g_string_new(BASE_URI);
2628+ g_string_append(url, search_term);
2629+ g_debug("Searching %s", url->str);
2630+ g_string_free(url, TRUE);
2631+
2632+ /*
2633+ * Submit the query to the source, parse the results and populate
2634+ * the results list here.
2635+ */
2636+
2637+ return results;
2638+}
2639
2640=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h'
2641--- share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 1970-01-01 00:00:00 +0000
2642+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 2013-11-20 07:46:30 +0000
2643@@ -0,0 +1,21 @@
2644+#ifndef __%DISPLAYNAME_UPPER%_PARSER_H__
2645+#define __%DISPLAYNAME_UPPER%_PARSER_H__
2646+
2647+GSList *get_results(const char *search_term);
2648+void result_cleanup(gpointer data);
2649+
2650+/**
2651+ * This is just an example result type with some sample
2652+ * fields. You should modify the fields to match the
2653+ * data you are expecting from your search source
2654+ */
2655+typedef struct {
2656+ gchar *link;
2657+ gchar *icon_url;
2658+ gchar *title;
2659+ gchar *description;
2660+ gchar *creation_date;
2661+ gchar *author;
2662+} result_t;
2663+
2664+#endif /* __%DISPLAYNAME_UPPER%_PARSER_H__ */
2665
2666=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName.c'
2667--- share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 1970-01-01 00:00:00 +0000
2668+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-11-20 07:46:30 +0000
2669@@ -0,0 +1,203 @@
2670+/*
2671+ * Unity %DISPLAYNAME_CAPITAL% scope
2672+ *
2673+ * This module implements the interface to the Unity Dash and
2674+ * constitutes the frontend of the scope.
2675+ *
2676+ * Follow the scopes tutorial to learn how to create a scope:
2677+ * http://developer.ubuntu.com/resources/tutorials/unity-scopes/writing-a-unity-scope/
2678+ *
2679+ */
2680+
2681+#include <stdio.h>
2682+#include <stdlib.h>
2683+#include <string.h>
2684+#include <mrss.h>
2685+#include <unity.h>
2686+#include <glib.h>
2687+#include <gio/gio.h>
2688+#include "config.h"
2689+#include "%DISPLAYNAME_LOWER%-parser.h"
2690+
2691+/**
2692+ * In this function the results from the backend are obtained and
2693+ * added to the search results in the Dash
2694+ *
2695+ * @brief Search function
2696+ * @param search Search term
2697+ * @param user_data Additional user data
2698+ */
2699+static void
2700+search_func(UnityScopeSearchBase* search, void* user_data)
2701+{
2702+ GSList *results = NULL;
2703+ GSList *iter = NULL;
2704+ GHashTable *metadata = NULL;
2705+ result_t *result = NULL;
2706+ UnityScopeResult scope_result = { 0, };
2707+
2708+ /* Avoid compiler warning if we're not using the parameter */
2709+ user_data = user_data;
2710+
2711+ /* Fetch the results from the backend */
2712+ results = get_results(search->search_context->search_query);
2713+
2714+ /* Iterate through the returned results and add them to the
2715+ * Unity's result set
2716+ */
2717+ for (iter = results; iter; iter = iter->next) {
2718+
2719+ /* Get the result */
2720+ result = (result_t *)iter->data;
2721+
2722+ /* Build and populate a scope result from the source data */
2723+ scope_result.uri = result->link;
2724+ scope_result.title = result->title;
2725+ scope_result.icon_hint = result->icon_url;
2726+ scope_result.category = 0;
2727+ scope_result.result_type = UNITY_RESULT_TYPE_DEFAULT;
2728+ scope_result.mimetype = "text/html";
2729+ scope_result.comment = result->description;
2730+ scope_result.dnd_uri = result->link;
2731+
2732+ /* Insert the metadata, if available */
2733+ metadata = g_hash_table_new(g_str_hash, g_str_equal);
2734+ if (result->author) {
2735+ g_hash_table_insert(metadata, "author",
2736+ g_variant_new_string(result->author));
2737+ }
2738+ if (result->creation_date) {
2739+ g_hash_table_insert(metadata, "creation_date",
2740+ g_variant_new_string(result->creation_date));
2741+ }
2742+ scope_result.metadata = metadata;
2743+
2744+ /*
2745+ * Add the returned result to the search results list, taking a
2746+ * copy of the data passed in via scope_result
2747+ */
2748+ unity_result_set_add_result(search->search_context->result_set,
2749+ &scope_result);
2750+ g_hash_table_unref(metadata);
2751+ }
2752+
2753+ /*
2754+ * Clear out the data copied to the result set earlier on
2755+ */
2756+ g_slist_free_full(results, (GDestroyNotify) result_cleanup);
2757+}
2758+
2759+/**
2760+ * This function will be invoked when the user clicks on the result and
2761+ * its preview is shown in the Dash.
2762+ * There are a set of predefined preview types: simply pick one, instantiate
2763+ * it, add metadata to it if available, and return it.
2764+ *
2765+ * @brief Dash preview function
2766+ * @param previewer Result previewer
2767+ * @param user_data Additional user data
2768+ * @return Preview populated with the result's data
2769+ */
2770+static UnityAbstractPreview *
2771+preview_func(UnityResultPreviewer *previewer, void *user_data)
2772+{
2773+ UnityPreview *preview = NULL;
2774+ UnityPreviewAction *action = NULL;
2775+ UnityInfoHint *author_hint, *creation_date_hint = NULL;
2776+ GVariant *gv_author, *gv_creation_date = NULL;
2777+ const char *creation_date = NULL;
2778+
2779+ /* Avoid compiler warning if we're not using the parameter */
2780+ user_data = user_data;
2781+
2782+ /* Create a generic preview */
2783+ preview = UNITY_PREVIEW(unity_generic_preview_new(
2784+ previewer->result.title,
2785+ previewer->result.comment,
2786+ g_icon_new_for_string(previewer->result.icon_hint, NULL)));
2787+
2788+ /* Set up the preview's action */
2789+ action = unity_preview_action_new_with_uri(previewer->result.uri, "Open",
2790+ NULL);
2791+ unity_preview_add_action(preview, action);
2792+ unity_object_unref(action);
2793+
2794+ /* If the result contains metadata, add it to the preview */
2795+ if (previewer->result.metadata) {
2796+ gv_author = g_hash_table_lookup(previewer->result.metadata, "author");
2797+
2798+ /* There are 2 ways to do this, the first method just directly
2799+ * uses the GVariant from the hash. The second extracts the string
2800+ * first, which might be useful for debugging. */
2801+ if (gv_author) {
2802+ author_hint = unity_info_hint_new_with_variant("author", "Author",
2803+ NULL, gv_author);
2804+ /* The ref call here and unref below are to work-around a bug in
2805+ * libunity, see:
2806+ * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
2807+ g_object_ref(author_hint);
2808+ unity_preview_add_info(preview, author_hint);
2809+ g_object_unref(author_hint);
2810+ }
2811+ gv_creation_date = g_hash_table_lookup(previewer->result.metadata,
2812+ "creation_date");
2813+ if (gv_creation_date) {
2814+ g_variant_get(gv_creation_date, "&s", &creation_date);
2815+ creation_date_hint = unity_info_hint_new("creation_date",
2816+ "Creation Date", NULL, creation_date);
2817+ /* The ref call here and unref below are to work-around a bug in
2818+ * libunity, see:
2819+ * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
2820+ g_object_ref(creation_date_hint);
2821+ unity_preview_add_info(preview, creation_date_hint);
2822+ g_object_unref(creation_date_hint);
2823+ }
2824+ }
2825+
2826+ return UNITY_ABSTRACT_PREVIEW(preview);
2827+}
2828+
2829+/**
2830+ * This is the main function: the scope is defined and exported, a DBUS
2831+ * connector is created and the main loop is run
2832+ */
2833+int
2834+main(void) {
2835+ UnitySimpleScope *scope = NULL;
2836+ UnityScopeDBusConnector *connector = NULL;
2837+ UnityCategorySet *cats = NULL;
2838+ UnityCategory *cat = NULL;
2839+ GIcon *icon = NULL;
2840+
2841+ /* Create and set a category for the scope, including an icon */
2842+ icon = g_themed_icon_new(CATEGORY_ICON_PATH);
2843+
2844+ cat = unity_category_new("global", "%DISPLAYNAME_CAPITAL%", icon,
2845+ UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE);
2846+ cats = unity_category_set_new();
2847+ unity_category_set_add(cats, cat);
2848+
2849+ /* Create and set up the scope */
2850+ scope = unity_simple_scope_new();
2851+ unity_simple_scope_set_group_name(scope, GROUP_NAME);
2852+ unity_simple_scope_set_unique_name(scope, UNIQUE_NAME);
2853+ unity_simple_scope_set_search_func(scope, search_func, NULL, NULL);
2854+ unity_simple_scope_set_preview_func(scope, preview_func, NULL, NULL);
2855+ unity_simple_scope_set_category_set(scope, cats);
2856+
2857+ g_object_unref (icon);
2858+ unity_object_unref (cat);
2859+ unity_object_unref (cats);
2860+
2861+ /*
2862+ * Setting up the connector is an action that will not be required
2863+ * in future revisions of the API. In particular, we only need it here
2864+ * since the scope is running locally on the device as opposed to
2865+ * running on the Smart Scopes server
2866+ */
2867+ connector = unity_scope_dbus_connector_new(UNITY_ABSTRACT_SCOPE(scope));
2868+ unity_scope_dbus_connector_export(connector, NULL);
2869+ unity_scope_dbus_connector_run();
2870+
2871+ return 0;
2872+}
2873
2874=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro'
2875--- share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 1970-01-01 00:00:00 +0000
2876+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-11-20 07:46:30 +0000
2877@@ -0,0 +1,73 @@
2878+# This file is used by Qt Creator as a project file to load all files that are part of
2879+# the project as specified in SOURCES, HEADERS and OTHER_FILES, and to build the final
2880+# executable
2881+#
2882+# You can also use it from the command line:
2883+# If you run `qmake` (without the quotes) from the top of the source tree, it will
2884+# generate a Makefile from this .pro file. From there you can use the usual make targets
2885+# e.g. `make`, `sudo make install`, `sudo make uninstall`, `make clean`, `make distclean`, etc.
2886+# To regenerate the Makefile, simply invoke `qmake` again
2887+
2888+TEMPLATE = app
2889+CONFIG += link_pkgconfig
2890+CONFIG -= app_bundle
2891+CONFIG -= qt
2892+
2893+
2894+###########################################################
2895+# To install dependencies:
2896+# sudo apt-get install libunity-dev
2897+PKGCONFIG += \
2898+ unity
2899+
2900+# Pkg-config takes care of the includes for the build, so the following variable is not
2901+# strictly needed. We need this simply for Qt Creator to find the
2902+# headers in the editor, as it seems not to use the PGKCONFIG variable.
2903+INCLUDEPATH += \
2904+ /usr/include/glib-2.0 \
2905+ /usr/include/unity/unity
2906+
2907+TARGET = %DISPLAYNAME%
2908+DAEMON_PATH = $$[QT_INSTALL_LIBS]/unity-scope-$${TARGET}
2909+
2910+DATA_DIR = $$_PRO_FILE_PWD_/data
2911+SCOPE_FILE = $$DATA_DIR/$${TARGET}.scope
2912+SERVICE_FILE = $$DATA_DIR/unity-scope-$${TARGET}.service
2913+
2914+SOURCES += \
2915+ %DISPLAYNAME%.c \
2916+ %DISPLAYNAME%-parser.c
2917+
2918+HEADERS += \
2919+ config.h \
2920+ %DISPLAYNAME%-parser.h
2921+
2922+OTHER_FILES += \
2923+ $$SCOPE_FILE \
2924+ $${SERVICE_FILE}.in
2925+
2926+# Rule to generate the DBUS .service file, including the architecture-dependent installation path
2927+# generated at build time
2928+servicefilegen.target = servicefilegen
2929+servicefilegen.commands = sed -e \"s,\\(Exec=\\).*\$$,\1$$DAEMON_PATH/$$TARGET,\" $${SERVICE_FILE}.in > $$SERVICE_FILE
2930+QMAKE_EXTRA_TARGETS += servicefilegen
2931+QMAKE_CLEAN += $$SERVICE_FILE
2932+QMAKE_CLEAN += $$DATA_DIR/*~
2933+PRE_TARGETDEPS += \
2934+ servicefilegen
2935+
2936+# Rule to install the scope's binary
2937+target.path = $$DAEMON_PATH
2938+
2939+# Rule to install the DBUS .service file
2940+servicefile.path = /usr/share/dbus-1/services
2941+servicefile.files = $$SERVICE_FILE
2942+
2943+# Rule to install the .scope file
2944+scopefile.path = /usr/share/unity/scopes
2945+scopefile.files = $$SCOPE_FILE
2946+
2947+INSTALLS += \
2948+ target \
2949+ scopefile \
2950+ servicefile
2951
2952=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple'
2953=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/Makefile'
2954--- share/qtcreator/templates/wizards/ubuntu/simple/Makefile 1970-01-01 00:00:00 +0000
2955+++ share/qtcreator/templates/wizards/ubuntu/simple/Makefile 2013-11-20 07:46:30 +0000
2956@@ -0,0 +1,21 @@
2957+# More information: https://wiki.ubuntu.com/Touch/Testing
2958+#
2959+# Notes for autopilot tests:
2960+# -----------------------------------------------------------
2961+# In order to run autopilot tests:
2962+# sudo apt-add-repository ppa:autopilot/ppa
2963+# sudo apt-get update
2964+# sudo apt-get install python-autopilot autopilot-qt
2965+#############################################################
2966+
2967+all:
2968+
2969+autopilot:
2970+ chmod +x tests/autopilot/run
2971+ tests/autopilot/run
2972+
2973+check:
2974+ qmltestrunner -input tests/unit
2975+
2976+run:
2977+ /usr/bin/qmlscene $@ %DISPLAYNAME%.qml
2978
2979=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/components'
2980=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml'
2981--- share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
2982+++ share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml 2013-11-20 07:46:30 +0000
2983@@ -0,0 +1,14 @@
2984+import QtQuick 2.0
2985+import Ubuntu.Components 0.1
2986+
2987+UbuntuShape {
2988+ width: 200
2989+ height: width
2990+
2991+ property alias text : myText.text
2992+
2993+ Label {
2994+ id: myText
2995+ anchors.centerIn: parent
2996+ }
2997+}
2998
2999=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop'
3000--- share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop 1970-01-01 00:00:00 +0000
3001+++ share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop 2013-11-20 07:46:30 +0000
3002@@ -0,0 +1,8 @@
3003+[Desktop Entry]
3004+Name=%DISPLAYNAME%
3005+Comment=My project description
3006+Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
3007+Icon=qmlscene
3008+Terminal=false
3009+Type=Application
3010+X-Ubuntu-Touch=true
3011
3012=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/main.qml'
3013--- share/qtcreator/templates/wizards/ubuntu/simple/main.qml 1970-01-01 00:00:00 +0000
3014+++ share/qtcreator/templates/wizards/ubuntu/simple/main.qml 2013-11-20 07:46:30 +0000
3015@@ -0,0 +1,54 @@
3016+import QtQuick 2.0
3017+import Ubuntu.Components 0.1
3018+import "components"
3019+
3020+/*!
3021+ \brief MainView with a Label and Button elements.
3022+*/
3023+
3024+MainView {
3025+ // objectName for functional testing purposes (autopilot-qt5)
3026+ objectName: "mainView"
3027+
3028+ // Note! applicationName needs to match the "name" field of the click manifest
3029+ applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
3030+
3031+ /*
3032+ This property enables the application to change orientation
3033+ when the device is rotated. The default is false.
3034+ */
3035+ //automaticOrientation: true
3036+
3037+ width: units.gu(100)
3038+ height: units.gu(75)
3039+
3040+ Page {
3041+ title: i18n.tr("Simple")
3042+
3043+ Column {
3044+ spacing: units.gu(1)
3045+ anchors {
3046+ margins: units.gu(2)
3047+ fill: parent
3048+ }
3049+
3050+ HelloComponent {
3051+ id: label
3052+ objectName: "label"
3053+
3054+ text: i18n.tr("Hello..")
3055+ }
3056+
3057+ Button {
3058+ objectName: "button"
3059+ width: parent.width
3060+
3061+ text: i18n.tr("Tap me!")
3062+
3063+ onClicked: {
3064+ label.text = i18n.tr("..world!")
3065+ }
3066+ }
3067+ }
3068+ }
3069+}
3070
3071=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests'
3072=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot'
3073=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName'
3074=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py'
3075--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
3076+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py 2013-11-20 07:46:30 +0000
3077@@ -0,0 +1,131 @@
3078+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3079+
3080+"""Ubuntu Touch App autopilot tests."""
3081+
3082+from os import remove
3083+import os.path
3084+from tempfile import mktemp
3085+import subprocess
3086+
3087+from autopilot.input import Mouse, Touch, Pointer
3088+from autopilot.matchers import Eventually
3089+from autopilot.platform import model
3090+from testtools.matchers import Is, Not, Equals
3091+from autopilot.testcase import AutopilotTestCase
3092+
3093+def get_module_include_path():
3094+ return os.path.abspath(
3095+ os.path.join(
3096+ os.path.dirname(__file__),
3097+ '..',
3098+ '..',
3099+ '..',
3100+ '..',
3101+ 'modules')
3102+ )
3103+
3104+
3105+class UbuntuTouchAppTestCase(AutopilotTestCase):
3106+ """A common test case class that provides several useful methods for the tests."""
3107+
3108+ if model() == 'Desktop':
3109+ scenarios = [
3110+ ('with mouse', dict(input_device_class=Mouse))
3111+ ]
3112+ else:
3113+ scenarios = [
3114+ ('with touch', dict(input_device_class=Touch))
3115+ ]
3116+
3117+ @property
3118+ def main_window(self):
3119+ return MainWindow(self.app)
3120+
3121+
3122+ def setUp(self):
3123+ self.pointing_device = Pointer(self.input_device_class.create())
3124+ super(UbuntuTouchAppTestCase, self).setUp()
3125+ self.launch_test_qml()
3126+
3127+
3128+ def launch_test_qml(self):
3129+ # If the test class has defined a 'test_qml' class attribute then we
3130+ # write it to disk and launch it inside the QML Scene. If not, then we
3131+ # silently do nothing (presumably the test has something else planned).
3132+ arch = subprocess.check_output(["dpkg-architecture",
3133+ "-qDEB_HOST_MULTIARCH"]).strip()
3134+ if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
3135+ qml_path = mktemp(suffix='.qml')
3136+ open(qml_path, 'w').write(self.test_qml)
3137+ self.addCleanup(remove, qml_path)
3138+
3139+ self.app = self.launch_test_application(
3140+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
3141+ "-I", get_module_include_path(),
3142+ qml_path,
3143+ app_type='qt')
3144+
3145+ if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
3146+ qml_path = self.test_qml_file
3147+ self.app = self.launch_test_application(
3148+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
3149+ "-I", get_module_include_path(),
3150+ qml_path,
3151+ app_type='qt')
3152+
3153+ self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
3154+
3155+
3156+ def get_qml_view(self):
3157+ """Get the main QML view"""
3158+
3159+ return self.app.select_single("QQuickView")
3160+
3161+ def get_mainview(self):
3162+ """Get the QML MainView"""
3163+
3164+ mainView = self.app.select_single("MainView")
3165+ self.assertThat(mainView, Not(Is(None)))
3166+ return mainView
3167+
3168+
3169+ def get_object(self,objectName):
3170+ """Get a object based on the objectName"""
3171+
3172+ obj = self.app.select_single(objectName=objectName)
3173+ self.assertThat(obj, Not(Is(None)))
3174+ return obj
3175+
3176+
3177+ def mouse_click(self,objectName):
3178+ """Move mouse on top of the object and click on it"""
3179+
3180+ obj = self.get_object(objectName)
3181+ self.pointing_device.move_to_object(obj)
3182+ self.pointing_device.click()
3183+
3184+
3185+ def mouse_press(self,objectName):
3186+ """Move mouse on top of the object and press mouse button (without releasing it)"""
3187+
3188+ obj = self.get_object(objectName)
3189+ self.pointing_device.move_to_object(obj)
3190+ self.pointing_device.press()
3191+
3192+
3193+ def mouse_release(self):
3194+ """Release mouse button"""
3195+
3196+ self.pointing_device.release()
3197+
3198+
3199+ def type_string(self, string):
3200+ """Type a string with keyboard"""
3201+
3202+ self.keyboard.type(string)
3203+
3204+
3205+ def type_key(self, key):
3206+ """Type a single key with keyboard"""
3207+
3208+ self.keyboard.key(key)
3209
3210=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main'
3211=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py'
3212--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
3213+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:46:30 +0000
3214@@ -0,0 +1,1 @@
3215+""" A Generic test suite """
3216
3217=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py'
3218--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
3219+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:46:30 +0000
3220@@ -0,0 +1,38 @@
3221+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3222+
3223+"""Tests for the Hello World"""
3224+
3225+from autopilot.matchers import Eventually
3226+from textwrap import dedent
3227+from testtools.matchers import Is, Not, Equals
3228+from testtools import skip
3229+import os
3230+from %DISPLAYNAME% import UbuntuTouchAppTestCase
3231+
3232+
3233+class GenericTests(UbuntuTouchAppTestCase):
3234+ """Generic tests for the Hello World"""
3235+
3236+ test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
3237+
3238+ def test_0_can_select_mainView(self):
3239+ """Must be able to select the mainview."""
3240+
3241+ mainView = self.get_mainview()
3242+ self.assertThat(mainView.visible,Eventually(Equals(True)))
3243+
3244+
3245+ def test_1_init_label(self):
3246+ """Check the initial text of the label"""
3247+
3248+ lbl = self.get_object(objectName="label")
3249+ self.assertThat(lbl.text, Equals("Hello.."))
3250+
3251+
3252+ def test_can_tap_button(self):
3253+ """Must be able to tap the button"""
3254+
3255+ lbl = self.get_object(objectName="label")
3256+ self.mouse_click(objectName="button")
3257+ self.assertThat(lbl.text, Eventually(Equals("..world!")))
3258+
3259
3260=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run'
3261--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run 1970-01-01 00:00:00 +0000
3262+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run 2013-11-20 07:46:30 +0000
3263@@ -0,0 +1,11 @@
3264+#!/bin/bash
3265+
3266+if [[ -z `which autopilot` ]]; then
3267+ echo "Autopilot is not installed. Skip"
3268+ exit
3269+fi
3270+
3271+SCRIPTPATH=`dirname $0`
3272+pushd ${SCRIPTPATH}
3273+autopilot run %DISPLAYNAME%
3274+popd
3275
3276=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit'
3277=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml'
3278--- share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
3279+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 2013-11-20 07:46:30 +0000
3280@@ -0,0 +1,49 @@
3281+import QtQuick 2.0
3282+import QtTest 1.0
3283+import Ubuntu.Components 0.1
3284+import "../../components"
3285+
3286+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
3287+
3288+// Execute tests with:
3289+// qmltestrunner
3290+
3291+Item {
3292+ // The objects
3293+ HelloComponent {
3294+ id: objectUnderTest
3295+ }
3296+
3297+ TestCase {
3298+ name: "HelloComponent"
3299+
3300+ function init() {
3301+ console.debug(">> init");
3302+ compare("",objectUnderTest.text,"text was not empty on init");
3303+ console.debug("<< init");
3304+ }
3305+
3306+ function cleanup() {
3307+ console.debug(">> cleanup");
3308+ console.debug("<< cleanup");
3309+ }
3310+
3311+ function initTestCase() {
3312+ console.debug(">> initTestCase");
3313+ console.debug("<< initTestCase");
3314+ }
3315+
3316+ function cleanupTestCase() {
3317+ console.debug(">> cleanupTestCase");
3318+ console.debug("<< cleanupTestCase");
3319+ }
3320+
3321+ function test_canReadAndWriteText() {
3322+ var expected = "Hello World";
3323+
3324+ objectUnderTest.text = expected;
3325+
3326+ compare(expected,objectUnderTest.text,"expected did not equal result");
3327+ }
3328+ }
3329+}
3330
3331=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs'
3332=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/Makefile'
3333--- share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 1970-01-01 00:00:00 +0000
3334+++ share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 2013-11-20 07:46:30 +0000
3335@@ -0,0 +1,21 @@
3336+# More information: https://wiki.ubuntu.com/Touch/Testing
3337+#
3338+# Notes for autopilot tests:
3339+# -----------------------------------------------------------
3340+# In order to run autopilot tests:
3341+# sudo apt-add-repository ppa:autopilot/ppa
3342+# sudo apt-get update
3343+# sudo apt-get install python-autopilot autopilot-qt
3344+#############################################################
3345+
3346+all:
3347+
3348+autopilot:
3349+ chmod +x tests/autopilot/run
3350+ tests/autopilot/run
3351+
3352+check:
3353+ qmltestrunner -input tests/unit
3354+
3355+run:
3356+ /usr/bin/qmlscene $@ %DISPLAYNAME%.qml
3357
3358=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/components'
3359=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml'
3360--- share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
3361+++ share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 2013-11-20 07:46:30 +0000
3362@@ -0,0 +1,14 @@
3363+import QtQuick 2.0
3364+import Ubuntu.Components 0.1
3365+
3366+UbuntuShape {
3367+ width: 200
3368+ height: width
3369+
3370+ property alias text : myText.text
3371+
3372+ Label {
3373+ id: myText
3374+ anchors.centerIn: parent
3375+ }
3376+}
3377
3378=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop'
3379--- share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 1970-01-01 00:00:00 +0000
3380+++ share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 2013-11-20 07:46:30 +0000
3381@@ -0,0 +1,8 @@
3382+[Desktop Entry]
3383+Name=%DISPLAYNAME%
3384+Comment=My project description
3385+Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
3386+Icon=qmlscene
3387+Terminal=false
3388+Type=Application
3389+X-Ubuntu-Touch=true
3390
3391=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics'
3392=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png'
3393Binary files share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png 1970-01-01 00:00:00 +0000 and share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png 2013-11-20 07:46:30 +0000 differ
3394=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/main.qml'
3395--- share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 1970-01-01 00:00:00 +0000
3396+++ share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 2013-11-20 07:46:30 +0000
3397@@ -0,0 +1,38 @@
3398+import QtQuick 2.0
3399+import Ubuntu.Components 0.1
3400+import "ui"
3401+
3402+/*!
3403+ \brief MainView with Tabs element.
3404+ First Tab has a single Label and
3405+ second Tab has a single ToolbarAction.
3406+*/
3407+
3408+MainView {
3409+ // objectName for functional testing purposes (autopilot-qt5)
3410+ objectName: "mainView"
3411+
3412+ // Note! applicationName needs to match the "name" field of the click manifest
3413+ applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
3414+
3415+ /*
3416+ This property enables the application to change orientation
3417+ when the device is rotated. The default is false.
3418+ */
3419+ //automaticOrientation: true
3420+
3421+ width: units.gu(100)
3422+ height: units.gu(75)
3423+
3424+ Tabs {
3425+ id: tabs
3426+
3427+ HelloTab {
3428+ objectName: "helloTab"
3429+ }
3430+
3431+ WorldTab {
3432+ objectName: "worldTab"
3433+ }
3434+ }
3435+}
3436
3437=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests'
3438=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot'
3439=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName'
3440=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py'
3441--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
3442+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 2013-11-20 07:46:30 +0000
3443@@ -0,0 +1,131 @@
3444+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3445+
3446+"""Ubuntu Touch App autopilot tests."""
3447+
3448+from os import remove
3449+import os.path
3450+from tempfile import mktemp
3451+import subprocess
3452+
3453+from autopilot.input import Mouse, Touch, Pointer
3454+from autopilot.matchers import Eventually
3455+from autopilot.platform import model
3456+from testtools.matchers import Is, Not, Equals
3457+from autopilot.testcase import AutopilotTestCase
3458+
3459+def get_module_include_path():
3460+ return os.path.abspath(
3461+ os.path.join(
3462+ os.path.dirname(__file__),
3463+ '..',
3464+ '..',
3465+ '..',
3466+ '..',
3467+ 'modules')
3468+ )
3469+
3470+
3471+class UbuntuTouchAppTestCase(AutopilotTestCase):
3472+ """A common test case class that provides several useful methods for the tests."""
3473+
3474+ if model() == 'Desktop':
3475+ scenarios = [
3476+ ('with mouse', dict(input_device_class=Mouse))
3477+ ]
3478+ else:
3479+ scenarios = [
3480+ ('with touch', dict(input_device_class=Touch))
3481+ ]
3482+
3483+ @property
3484+ def main_window(self):
3485+ return MainWindow(self.app)
3486+
3487+
3488+ def setUp(self):
3489+ self.pointing_device = Pointer(self.input_device_class.create())
3490+ super(UbuntuTouchAppTestCase, self).setUp()
3491+ self.launch_test_qml()
3492+
3493+
3494+ def launch_test_qml(self):
3495+ # If the test class has defined a 'test_qml' class attribute then we
3496+ # write it to disk and launch it inside the QML Scene. If not, then we
3497+ # silently do nothing (presumably the test has something else planned).
3498+ arch = subprocess.check_output(["dpkg-architecture",
3499+ "-qDEB_HOST_MULTIARCH"]).strip()
3500+ if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
3501+ qml_path = mktemp(suffix='.qml')
3502+ open(qml_path, 'w').write(self.test_qml)
3503+ self.addCleanup(remove, qml_path)
3504+
3505+ self.app = self.launch_test_application(
3506+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
3507+ "-I", get_module_include_path(),
3508+ qml_path,
3509+ app_type='qt')
3510+
3511+ if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
3512+ qml_path = self.test_qml_file
3513+ self.app = self.launch_test_application(
3514+ "/usr/lib/" + arch + "/qt5/bin/qmlscene",
3515+ "-I", get_module_include_path(),
3516+ qml_path,
3517+ app_type='qt')
3518+
3519+ self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
3520+
3521+
3522+ def get_qml_view(self):
3523+ """Get the main QML view"""
3524+
3525+ return self.app.select_single("QQuickView")
3526+
3527+ def get_mainview(self):
3528+ """Get the QML MainView"""
3529+
3530+ mainView = self.app.select_single("MainView")
3531+ self.assertThat(mainView, Not(Is(None)))
3532+ return mainView
3533+
3534+
3535+ def get_object(self,objectName):
3536+ """Get a object based on the objectName"""
3537+
3538+ obj = self.app.select_single(objectName=objectName)
3539+ self.assertThat(obj, Not(Is(None)))
3540+ return obj
3541+
3542+
3543+ def mouse_click(self,objectName):
3544+ """Move mouse on top of the object and click on it"""
3545+
3546+ obj = self.get_object(objectName)
3547+ self.pointing_device.move_to_object(obj)
3548+ self.pointing_device.click()
3549+
3550+
3551+ def mouse_press(self,objectName):
3552+ """Move mouse on top of the object and press mouse button (without releasing it)"""
3553+
3554+ obj = self.get_object(objectName)
3555+ self.pointing_device.move_to_object(obj)
3556+ self.pointing_device.press()
3557+
3558+
3559+ def mouse_release(self):
3560+ """Release mouse button"""
3561+
3562+ self.pointing_device.release()
3563+
3564+
3565+ def type_string(self, string):
3566+ """Type a string with keyboard"""
3567+
3568+ self.keyboard.type(string)
3569+
3570+
3571+ def type_key(self, key):
3572+ """Type a single key with keyboard"""
3573+
3574+ self.keyboard.key(key)
3575
3576=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main'
3577=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py'
3578--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
3579+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:46:30 +0000
3580@@ -0,0 +1,1 @@
3581+""" A main.qml test suite """
3582
3583=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py'
3584--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
3585+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:46:30 +0000
3586@@ -0,0 +1,23 @@
3587+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3588+
3589+"""Tests for the Hello World"""
3590+
3591+from autopilot.matchers import Eventually
3592+from textwrap import dedent
3593+from testtools.matchers import Is, Not, Equals
3594+from testtools import skip
3595+import os
3596+from %DISPLAYNAME% import UbuntuTouchAppTestCase
3597+
3598+
3599+class MainTests(UbuntuTouchAppTestCase):
3600+ """Generic tests for the Hello World"""
3601+
3602+ test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
3603+
3604+ def test_0_can_select_mainView(self):
3605+ """Must be able to select the mainview."""
3606+
3607+ mainView = self.get_mainview()
3608+ self.assertThat(mainView.visible,Eventually(Equals(True)))
3609+
3610
3611=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run'
3612--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 1970-01-01 00:00:00 +0000
3613+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 2013-11-20 07:46:30 +0000
3614@@ -0,0 +1,11 @@
3615+#!/bin/bash
3616+
3617+if [[ -z `which autopilot` ]]; then
3618+ echo "Autopilot is not installed. Skip"
3619+ exit
3620+fi
3621+
3622+SCRIPTPATH=`dirname $0`
3623+pushd ${SCRIPTPATH}
3624+autopilot run %DISPLAYNAME%
3625+popd
3626
3627=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit'
3628=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml'
3629--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
3630+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 2013-11-20 07:46:30 +0000
3631@@ -0,0 +1,49 @@
3632+import QtQuick 2.0
3633+import QtTest 1.0
3634+import Ubuntu.Components 0.1
3635+import "../../components"
3636+
3637+// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
3638+
3639+// Execute tests with:
3640+// qmltestrunner
3641+
3642+Item {
3643+ // The objects
3644+ HelloComponent {
3645+ id: objectUnderTest
3646+ }
3647+
3648+ TestCase {
3649+ name: "HelloComponent"
3650+
3651+ function init() {
3652+ console.debug(">> init");
3653+ compare("",objectUnderTest.text,"text was not empty on init");
3654+ console.debug("<< init");
3655+ }
3656+
3657+ function cleanup() {
3658+ console.debug(">> cleanup");
3659+ console.debug("<< cleanup");
3660+ }
3661+
3662+ function initTestCase() {
3663+ console.debug(">> initTestCase");
3664+ console.debug("<< initTestCase");
3665+ }
3666+
3667+ function cleanupTestCase() {
3668+ console.debug(">> cleanupTestCase");
3669+ console.debug("<< cleanupTestCase");
3670+ }
3671+
3672+ function test_canReadAndWriteText() {
3673+ var expected = "Hello World";
3674+
3675+ objectUnderTest.text = expected;
3676+
3677+ compare(expected,objectUnderTest.text,"expected did not equal result");
3678+ }
3679+ }
3680+}
3681
3682=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/ui'
3683=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml'
3684--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
3685+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 2013-11-20 07:46:30 +0000
3686@@ -0,0 +1,30 @@
3687+import QtQuick 2.0
3688+import Ubuntu.Components 0.1
3689+import "../components"
3690+
3691+Tab {
3692+ title: i18n.tr("Hello..")
3693+
3694+ page: Page {
3695+ Column {
3696+ spacing: units.gu(2)
3697+ anchors.centerIn: parent
3698+
3699+ HelloComponent {
3700+ objectName: "helloTab_HelloComponent"
3701+
3702+ anchors.horizontalCenter: parent.horizontalCenter
3703+
3704+ text: i18n.tr("HelloTab")
3705+ }
3706+
3707+ Label {
3708+ objectName: "helloTab_label"
3709+
3710+ anchors.horizontalCenter: parent.horizontalCenter
3711+
3712+ text: i18n.tr("You can change the Tab from Page title above.")
3713+ }
3714+ }
3715+ }
3716+}
3717
3718=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml'
3719--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
3720+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 2013-11-20 07:46:30 +0000
3721@@ -0,0 +1,35 @@
3722+import QtQuick 2.0
3723+import Ubuntu.Components 0.1
3724+import "../components"
3725+
3726+Tab {
3727+ title: i18n.tr("..World!")
3728+
3729+ page: Page {
3730+ tools: WorldTabTools {
3731+ objectName: "worldTab_tools"
3732+ }
3733+
3734+ Column {
3735+ spacing: units.gu(2)
3736+ anchors.centerIn: parent
3737+
3738+ HelloComponent {
3739+ objectName: "worldTab_HelloComponent"
3740+
3741+ anchors.horizontalCenter: parent.horizontalCenter
3742+
3743+ text: i18n.tr("WorldTab")
3744+ }
3745+
3746+ Label {
3747+ id: label
3748+ objectName: "worldTab_label"
3749+
3750+ anchors.horizontalCenter: parent.horizontalCenter
3751+
3752+ text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
3753+ }
3754+ }
3755+ }
3756+}
3757
3758=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml'
3759--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
3760+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 2013-11-20 07:46:30 +0000
3761@@ -0,0 +1,13 @@
3762+import QtQuick 2.0
3763+import Ubuntu.Components 0.1
3764+
3765+ToolbarItems {
3766+ ToolbarButton {
3767+ iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
3768+ text: i18n.tr("Tap me!")
3769+
3770+ onTriggered: {
3771+ label.text = i18n.tr("Toolbar tapped")
3772+ }
3773+ }
3774+}
3775
3776=== added directory 'share/qtcreator/templates/wizards/ubuntu/webapp'
3777=== added file 'share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop'
3778--- share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop 1970-01-01 00:00:00 +0000
3779+++ share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop 2013-11-20 07:46:30 +0000
3780@@ -0,0 +1,8 @@
3781+[Desktop Entry]
3782+Name=%DISPLAYNAME%
3783+Comment=%DISPLAYNAME% Webapp
3784+Type=Application
3785+Icon=app.png
3786+Exec=webbrowser-app --webapp --enable-back-forward --webappUrlPatterns=https?://m.%DISPLAYNAME%.com/* http://m.%DISPLAYNAME%.com
3787+Terminal=false
3788+X-Ubuntu-Touch=true
3789
3790=== added file 'share/qtcreator/templates/wizards/ubuntu/webapp/app.json'
3791--- share/qtcreator/templates/wizards/ubuntu/webapp/app.json 1970-01-01 00:00:00 +0000
3792+++ share/qtcreator/templates/wizards/ubuntu/webapp/app.json 2013-11-20 07:46:30 +0000
3793@@ -0,0 +1,7 @@
3794+{
3795+"template": "ubuntu-webapp",
3796+"policy_groups": [
3797+"networking"
3798+],
3799+"policy_version": 1.0
3800+}
3801
3802=== added directory 'share/qtcreator/ubuntu'
3803=== added file 'share/qtcreator/ubuntu/menu.json'
3804--- share/qtcreator/ubuntu/menu.json 1970-01-01 00:00:00 +0000
3805+++ share/qtcreator/ubuntu/menu.json 2013-11-20 07:46:30 +0000
3806@@ -0,0 +1,438 @@
3807+{
3808+ "ubuntu.make": {
3809+ "name": "make",
3810+ "id": "Ubuntu.Make",
3811+ "parent": "Build",
3812+ "projectRequired": true,
3813+ "group": "ProjectExplorer.Group.Run",
3814+ "submenu": [
3815+ {
3816+ "name": "check",
3817+ "id": "Ubuntu.Make.Check",
3818+ "projectRequired": true,
3819+ "actions": [
3820+ "%SCRIPTDIRECTORY%/qtc_project_make check"
3821+ ]
3822+ },
3823+ {
3824+ "name": "autopilot",
3825+ "id": "Ubuntu.Make.Autopilot",
3826+ "projectRequired": true,
3827+ "actions": [
3828+ "%SCRIPTDIRECTORY%/qtc_project_make autopilot"
3829+ ]
3830+ },
3831+ {
3832+ "name": "install",
3833+ "id": "Ubuntu.Make.Install",
3834+ "projectRequired": true,
3835+ "actions": [
3836+ "%SCRIPTDIRECTORY%/qtc_project_make install"
3837+ ]
3838+ },
3839+ {
3840+ "name": "uninstall",
3841+ "id": "Ubuntu.Make.Uninstall",
3842+ "projectRequired": true,
3843+ "actions": [
3844+ "%SCRIPTDIRECTORY%/qtc_project_make uninstall"
3845+ ]
3846+ }
3847+ ]
3848+ },
3849+ "ubuntu": {
3850+ "name": "Ubuntu Touch",
3851+ "id": "Ubuntu.Build",
3852+ "parent": "Build",
3853+ "group": "ProjectExplorer.Group.Run",
3854+ "submenu": [
3855+ {
3856+ "name": "Run Application on Device",
3857+ "id": "Ubuntu.Build.Run",
3858+ "workingDirectory": "%0/..",
3859+ "projectRequired": true,
3860+ "keysequence": "Ctrl+F12",
3861+ "deviceRequired": true,
3862+ "qmlProjectRequired": true,
3863+ "saveRequired": true,
3864+ "actions": [
3865+ "%SCRIPTDIRECTORY%/qtc_device_run_app %SERIALNUMBER% %FOLDERNAME% %DISPLAYNAME%.desktop %DISPLAYNAME%.qml /home/%USERNAME%/dev_tmp /home/%USERNAME%/.local/share/applications %USERNAME%@%IP% %PORT%"
3866+ ]
3867+ },
3868+ {
3869+ "name": "Close Application on Device",
3870+ "id": "Ubuntu.Build.CancelRun",
3871+ "keysequence": "Ctrl+Shift+F12",
3872+ "projectRequired": true,
3873+ "deviceRequired": true,
3874+ "qmlProjectRequired": true,
3875+ "actions": [
3876+ "%SCRIPTDIRECTORY%/qtc_device_close_all_apps %SERIALNUMBER% %DISPLAYNAME%"
3877+ ]
3878+ },
3879+ {
3880+ "name": "Create Application Package",
3881+ "id": "Ubuntu.Build.Package",
3882+ "workingDirectory": "%0/..",
3883+ "projectRequired": true,
3884+ "ubuntuProjectRequired": true,
3885+ "saveRequired": true,
3886+ "actions": [
3887+ "%SCRIPTDIRECTORY%/qtc_project_click_create %FOLDERNAME%"
3888+ ]
3889+ },
3890+ {
3891+ "name": "Install Application on Device",
3892+ "id": "Ubuntu.Build.PackageInstall",
3893+ "workingDirectory": "%0/..",
3894+ "projectRequired": true,
3895+ "deviceRequired": true,
3896+ "ubuntuProjectRequired": true,
3897+ "saveRequired": true,
3898+ "actions": [
3899+ "%SCRIPTDIRECTORY%/qtc_project_click_createanddeploy %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp %USERNAME%"
3900+ ]
3901+ },
3902+ {
3903+ "name": "Build Application on Device",
3904+ "id": "Ubuntu.Build.Cpp",
3905+ "workingDirectory": "%0/..",
3906+ "projectRequired": true,
3907+ "deviceRequired": true,
3908+ "qmakeProjectRequired": true,
3909+ "saveRequired": true,
3910+ "actions": [
3911+ "%SCRIPTDIRECTORY%/qtc_device_buildpackage %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp"
3912+ ]
3913+ },
3914+ {
3915+ "name": "Build and Install Application on Device",
3916+ "id": "Ubuntu.BuildAndInstall.Cpp",
3917+ "workingDirectory": "%0/..",
3918+ "projectRequired": true,
3919+ "deviceRequired": true,
3920+ "qmakeProjectRequired": true,
3921+ "saveRequired": true,
3922+ "actions": [
3923+ "%SCRIPTDIRECTORY%/qtc_device_buildanddeploypackage %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp"
3924+ ]
3925+ },
3926+ {
3927+ "name": "Translations",
3928+ "id": "Ubuntu.Menu.i18n",
3929+ "submenu": [
3930+ {
3931+ "name": "Update Translations Template",
3932+ "id": "Ubuntu.Menu.i18n.pot",
3933+ "projectRequired": true,
3934+ "qmlProjectRequired": true,
3935+ "saveRequired": true,
3936+ "actions": [
3937+ "%SCRIPTDIRECTORY%/i18n_update_template %DISPLAYNAME% %PROJECTFILES%"
3938+ ]
3939+ },
3940+ {
3941+ "name": "Build Translations",
3942+ "id": "Ubuntu.Menu.i18n.mo",
3943+ "projectRequired": true,
3944+ "qmlProjectRequired": true,
3945+ "saveRequired": true,
3946+ "actions": [
3947+ "msgfmt po/*.po"
3948+ ]
3949+ }
3950+ ]
3951+ }
3952+ ]
3953+ },
3954+ "ubuntuhelp": {
3955+ "name": "Ubuntu Touch",
3956+ "id": "Ubuntu.Help",
3957+ "parent": "Help",
3958+ "submenu": [
3959+ {
3960+ "name": "Getting Started",
3961+ "id": "Ubuntu.Help.GettingStarted",
3962+ "submenu": [
3963+ {
3964+ "name": "Go Mobile at developer.ubuntu.com",
3965+ "id": "Ubuntu.Help.GettingStarted.GoMobile",
3966+ "actions": [
3967+ "xdg-open http://developer.ubuntu.com/get-started/gomobile"
3968+ ]
3969+ },
3970+ {
3971+ "name": "App Design Guides at design.ubuntu.com",
3972+ "id": "Ubuntu.Help.GettingStarted.AppDesignGuides",
3973+ "actions": [
3974+ "xdg-open http://design.ubuntu.com/apps"
3975+ ]
3976+ }
3977+ ]
3978+ },
3979+ {
3980+ "name": "Launchpad",
3981+ "id": "Ubuntu.Help.Launchpad",
3982+ "submenu": [
3983+ {
3984+ "name": "Create an Account",
3985+ "id": "Ubuntu.Help.Launchpad.CreateAccount",
3986+ "actions": [
3987+ "xdg-open https://launchpad.net/+login"
3988+ ]
3989+ },
3990+ {
3991+ "name": "Register a Project",
3992+ "id": "Ubuntu.Help.Launchpad.RegisterProject",
3993+ "actions": [
3994+ "xdg-open https://launchpad.net/projects/+new"
3995+ ]
3996+ },
3997+ {
3998+ "name": "User Guide",
3999+ "id": "Ubuntu.Help.Launchpad.UserGuide",
4000+ "actions": [
4001+ "xdg-open https://help.launchpad.net"
4002+ ]
4003+ }
4004+ ]
4005+ }
4006+ ]
4007+ },
4008+ "ubuntutools": {
4009+ "name": "Ubuntu Touch",
4010+ "id": "Ubuntu.Menu",
4011+ "parent": "Tools",
4012+ "submenu": [
4013+ {
4014+ "name": "Ubuntu Touch Showcase Gallery",
4015+ "keysequence": "Ctrl+Shift+S",
4016+ "id": "Ubuntu.Menu.Showcase",
4017+ "actions": [
4018+ "%SCRIPTDIRECTORY%/qtc_launch_gallery"
4019+ ]
4020+ },
4021+ {
4022+ "name": "Take a screenshot",
4023+ "id": "Ubuntu.Menu.Screenshot",
4024+ "keysequence": "Ctrl+Shift+P",
4025+ "deviceRequired": true,
4026+ "actions": [
4027+ "adb -s %SERIALNUMBER% root",
4028+ "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /tmp/screenshot.png",
4029+ "adb -s %SERIALNUMBER% pull /tmp/screenshot.png /tmp/screenshot.png",
4030+ "eog -s %SERIALNUMBER% /tmp/screenshot.png"
4031+ ]
4032+ },
4033+ {
4034+ "name": "Mount Device Filesystem",
4035+ "id": "Ubuntu.Menu.MountDeviceFileSystem",
4036+ "keysequence": "Ctrl+Shift+F1",
4037+ "deviceRequired": true,
4038+ "actions": [
4039+ "nautilus ssh://%USERNAME%@%IP%:%PORT%"
4040+ ]
4041+ },
4042+ {
4043+ "name": "GPG",
4044+ "id": "Ubuntu.Menu.gpg",
4045+ "submenu": [
4046+ {
4047+ "name": "Passwords && Keys",
4048+ "id": "Ubuntu.Menu.gpg.seahorse",
4049+ "actions": [
4050+ "seahorse"
4051+ ]
4052+ }
4053+ ]
4054+ },
4055+ {
4056+ "name": "Device Control",
4057+ "id": "Ubuntu.Menu.Device",
4058+ "submenu": [
4059+ {
4060+ "name": "SSH to Device",
4061+ "id": "Ubuntu.Menu.Device.SSH",
4062+ "keysequence": "Ctrl+F10",
4063+ "deviceRequired": true,
4064+ "actions": [
4065+ "x-terminal-emulator -e \"ssh -i ~/.ssh/ubuntudevice_%SERIALNUMBER%_id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null %USERNAME%@%IP% -p%PORT%\""
4066+ ]
4067+ },
4068+ {
4069+ "name": "Enable platform development mode",
4070+ "id": "Ubuntu.Menu.Device.EnablePlatformDevelopmentMode",
4071+ "deviceRequired": true,
4072+ "actions": [
4073+ "%SCRIPTDIRECTORY%/qtc_device_developertools %SERIALNUMBER%"
4074+ ]
4075+ },
4076+ {
4077+ "name": "Close All Applications on Device",
4078+ "id": "Ubuntu.Menu.Device.CloseAllApps",
4079+ "deviceRequired": true,
4080+ "actions": [
4081+ "%SCRIPTDIRECTORY%/qtc_device_close_all_apps %SERIALNUMBER%"
4082+ ]
4083+ },
4084+ {
4085+ "name": "Flash daily image on device",
4086+ "id": "Ubuntu.Menu.Device.FlashDaily",
4087+ "deviceRequired": true,
4088+ "actions": [
4089+ "%SCRIPTDIRECTORY%/device_flashdaily %SERIALNUMBER%"
4090+ ]
4091+ },
4092+ {
4093+ "name": "Flash daily image on device (with bootstrap)",
4094+ "id": "Ubuntu.Menu.Device.FlashDailyBootstrap",
4095+ "deviceRequired": true,
4096+ "actions": [
4097+ "%SCRIPTDIRECTORY%/device_flashdaily_bootstrap %SERIALNUMBER%"
4098+ ]
4099+ },
4100+ {
4101+ "name": "Enable",
4102+ "id": "Ubuntu.Menu.Device.Enable",
4103+ "submenu": [
4104+ {
4105+ "name": "Developer Tools",
4106+ "id": "Ubuntu.Menu.Device.Enable.DeveloperMode",
4107+ "keysequence": "Ctrl+F11",
4108+ "deviceRequired": true,
4109+ "actions": [
4110+ "%SCRIPTDIRECTORY%/qtc_device_developertools %SERIALNUMBER%"
4111+ ]
4112+ }
4113+ ]
4114+ },
4115+ {
4116+ "name": "State",
4117+ "id": "Ubuntu.Menu.Device.State",
4118+ "submenu": [
4119+ {
4120+ "name": "Reboot",
4121+ "id": "Ubuntu.Menu.Device.Reboot",
4122+ "keysequence": "Ctrl+F8",
4123+ "deviceRequired": true,
4124+ "actions": [
4125+ "adb -s %SERIALNUMBER% root",
4126+ "adb -s %SERIALNUMBER% wait-for-device",
4127+ "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin reboot"
4128+ ]
4129+ },
4130+ {
4131+ "name": "Shutdown",
4132+ "id": "Ubuntu.Menu.Device.Shutdown",
4133+ "keysequence": "Ctrl+F9",
4134+ "deviceRequired": true,
4135+ "actions": [
4136+ "adb -s %SERIALNUMBER% root",
4137+ "adb -s %SERIALNUMBER% wait-for-device",
4138+ "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin shutdown -h now"
4139+ ]
4140+ }
4141+ ]
4142+ }
4143+ ]
4144+ },
4145+ {
4146+ "name": "Device Package Management",
4147+ "id": "Ubuntu.Menu.Device.AptGet",
4148+ "submenu": [
4149+ {
4150+ "name": "Run Package Update",
4151+ "id": "Ubuntu.Menu.Device.AptGet.Update",
4152+ "deviceRequired": true,
4153+ "actions": [
4154+ "adb -s %SERIALNUMBER% root",
4155+ "adb -s %SERIALNUMBER% wait-for-device",
4156+ "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get update"
4157+ ]
4158+ },
4159+ {
4160+ "name": "Upgrade Packages",
4161+ "id": "Ubuntu.Menu.Device.AptGet.Upgrade",
4162+ "deviceRequired": true,
4163+ "actions": [
4164+ "adb -s %SERIALNUMBER% root",
4165+ "adb -s %SERIALNUMBER% wait-for-device",
4166+ "x-terminal-emulator -e \"adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get upgrade\""
4167+ ]
4168+ },
4169+ {
4170+ "name": "Install Package",
4171+ "id": "Ubuntu.Menu.Device.AptGet.Install",
4172+ "deviceRequired": true,
4173+ "actions": [
4174+ {
4175+ "queryDialog": {
4176+ "title": "Install Package",
4177+ "message": "Package Name:",
4178+ "value": "<packagename>"
4179+ }
4180+ },
4181+ "adb -s %SERIALNUMBER% root",
4182+ "adb -s %SERIALNUMBER% wait-for-device",
4183+ "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get -y install %0"
4184+ ]
4185+ },
4186+ {
4187+ "name": "Install Package Build Dependencies",
4188+ "id": "Ubuntu.Menu.Device.AptGet.BuildDep",
4189+ "deviceRequired": true,
4190+ "actions": [
4191+ "adb -s %SERIALNUMBER% root",
4192+ "adb -s %SERIALNUMBER% wait-for-device",
4193+ {
4194+ "queryDialog": {
4195+ "title": "Install Package Build Dependencies",
4196+ "message": "Package Name:",
4197+ "value": "<packagename>"
4198+ }
4199+ },
4200+ "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get -y build-dep %0"
4201+ ]
4202+ }
4203+ ]
4204+ },
4205+ {
4206+ "name": "Android Debugging",
4207+ "id": "Ubuntu.Menu.Device.ADB",
4208+ "submenu": [
4209+ {
4210+ "name": "adb shell",
4211+ "id": "Ubuntu.Menu.Device.ADB.shell",
4212+ "deviceRequired": true,
4213+ "actions": [
4214+ "x-terminal-emulator -e \"adb -s %SERIALNUMBER% shell\""
4215+ ]
4216+ },
4217+ {
4218+ "name": "adb root",
4219+ "id": "Ubuntu.Menu.Device.ADB.root",
4220+ "deviceRequired": true,
4221+ "actions": [
4222+ "adb -s %SERIALNUMBER% root"
4223+ ]
4224+ },
4225+ {
4226+ "name": "adb devices",
4227+ "id": "Ubuntu.Menu.Device.ADB.devices",
4228+ "actions": [
4229+ "adb devices"
4230+ ]
4231+ },
4232+ {
4233+ "name": "adb shell setprop persist.sys.usb.config ptp,adb",
4234+ "id": "Ubuntu.Menu.Device.ADB.setUsbConfigPtpAdb",
4235+ "deviceRequired": true,
4236+ "actions": [
4237+ "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%"
4238+ ]
4239+ }
4240+ ]
4241+ }
4242+ ]
4243+ }
4244+}
4245
4246=== added directory 'share/qtcreator/ubuntu/scripts'
4247=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_has'
4248--- share/qtcreator/ubuntu/scripts/device_developertools_has 1970-01-01 00:00:00 +0000
4249+++ share/qtcreator/ubuntu/scripts/device_developertools_has 2013-11-20 07:46:30 +0000
4250@@ -0,0 +1,30 @@
4251+#!/bin/bash
4252+# Copyright 2013 Canonical Ltd.
4253+#
4254+# This program is free software; you can redistribute it and/or modify
4255+# it under the terms of the GNU Lesser General Public License as published by
4256+# the Free Software Foundation; version 2.1.
4257+#
4258+# This program is distributed in the hope that it will be useful,
4259+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4260+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4261+# GNU Lesser General Public License for more details.
4262+#
4263+# You should have received a copy of the GNU Lesser General Public License
4264+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4265+#
4266+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4267+
4268+. `dirname $0`/functions.inc
4269+
4270+PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
4271+
4272+for PACKAGE in ${PACKAGES}
4273+do
4274+ IS_INSTALLED=`adb_shell dpkg -s ${PACKAGE} |grep Status|grep -o "install ok installed"|wc -l`
4275+ if [[ ${IS_INSTALLED} -eq "0" ]]; then
4276+ echo "0"
4277+ exit
4278+ fi
4279+done
4280+echo "1"
4281\ No newline at end of file
4282
4283=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_install'
4284--- share/qtcreator/ubuntu/scripts/device_developertools_install 1970-01-01 00:00:00 +0000
4285+++ share/qtcreator/ubuntu/scripts/device_developertools_install 2013-11-20 07:46:30 +0000
4286@@ -0,0 +1,25 @@
4287+#!/bin/bash
4288+# Copyright 2013 Canonical Ltd.
4289+#
4290+# This program is free software; you can redistribute it and/or modify
4291+# it under the terms of the GNU Lesser General Public License as published by
4292+# the Free Software Foundation; version 2.1.
4293+#
4294+# This program is distributed in the hope that it will be useful,
4295+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4296+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4297+# GNU Lesser General Public License for more details.
4298+#
4299+# You should have received a copy of the GNU Lesser General Public License
4300+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4301+#
4302+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4303+
4304+. `dirname $0`/functions.inc
4305+
4306+PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
4307+
4308+adb_shell apt-get -y -f install
4309+adb_shell apt-get update
4310+adb_shell apt-get upgrade -y
4311+adb_shell apt-get install ${PACKAGES} -y
4312\ No newline at end of file
4313
4314=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_packages'
4315--- share/qtcreator/ubuntu/scripts/device_developertools_packages 1970-01-01 00:00:00 +0000
4316+++ share/qtcreator/ubuntu/scripts/device_developertools_packages 2013-11-20 07:46:30 +0000
4317@@ -0,0 +1,1 @@
4318+autopilot-touch qtdeclarative5-test-plugin gdebi-core fakeroot dh-make build-essential qt5-default qtbase5-dev libqt5v8-5-dev qtdeclarative5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qt3d5-dev qtmultimedia5-dev libqt5svg5-dev qtdeclarative5-dev-tools qttools5-dev-tools qtlocation5-dev qtsensors5-dev qtpim5-dev ubuntu-dev-tools debhelper
4319\ No newline at end of file
4320
4321=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_remove'
4322--- share/qtcreator/ubuntu/scripts/device_developertools_remove 1970-01-01 00:00:00 +0000
4323+++ share/qtcreator/ubuntu/scripts/device_developertools_remove 2013-11-20 07:46:30 +0000
4324@@ -0,0 +1,23 @@
4325+#!/bin/bash
4326+# Copyright 2013 Canonical Ltd.
4327+#
4328+# This program is free software; you can redistribute it and/or modify
4329+# it under the terms of the GNU Lesser General Public License as published by
4330+# the Free Software Foundation; version 2.1.
4331+#
4332+# This program is distributed in the hope that it will be useful,
4333+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4334+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4335+# GNU Lesser General Public License for more details.
4336+#
4337+# You should have received a copy of the GNU Lesser General Public License
4338+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4339+#
4340+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4341+
4342+. `dirname $0`/functions.inc
4343+
4344+PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
4345+
4346+adb_shell apt-get -y -f install
4347+adb_shell apt-get remove ${PACKAGES} -y
4348\ No newline at end of file
4349
4350=== added file 'share/qtcreator/ubuntu/scripts/device_flashdaily'
4351--- share/qtcreator/ubuntu/scripts/device_flashdaily 1970-01-01 00:00:00 +0000
4352+++ share/qtcreator/ubuntu/scripts/device_flashdaily 2013-11-20 07:46:30 +0000
4353@@ -0,0 +1,39 @@
4354+#!/bin/bash
4355+# Copyright 2013 Canonical Ltd.
4356+#
4357+# This program is free software; you can redistribute it and/or modify
4358+# it under the terms of the GNU Lesser General Public License as published by
4359+# the Free Software Foundation; version 2.1.
4360+#
4361+# This program is distributed in the hope that it will be useful,
4362+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4363+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4364+# GNU Lesser General Public License for more details.
4365+#
4366+# You should have received a copy of the GNU Lesser General Public License
4367+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4368+#
4369+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4370+
4371+. `dirname $0`/functions.inc
4372+
4373+if [[ !does_device_hw_match_image_hw ]]; then
4374+ IMAGE_HARDWARE=`device_image_hardware`
4375+ DEVICE_HARDWARE=`device_hardware`
4376+ echo
4377+ echo " WARNING! Device image hardware version"
4378+ echo " does not match the detected device hardware."
4379+ echo
4380+ echo -n " Device Image Version: "
4381+ echo ${IMAGE_HARDWARE}
4382+ echo -n " Device Version: "
4383+ echo ${DEVICE_HARDWARE}
4384+ echo
4385+ echo " In order to flash your device, you must do it manually:"
4386+ echo " phablet-flash cdimage-touch -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE}"
4387+ echo
4388+elif [[ phablet_tools_new_syntax ]]; then
4389+ x-terminal-emulator -e "bash -ic 'phablet-flash ubuntu-system -s ${SERIALNUMBER}'"
4390+else
4391+ x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'"
4392+fi
4393
4394=== added file 'share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap'
4395--- share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 1970-01-01 00:00:00 +0000
4396+++ share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-11-20 07:46:30 +0000
4397@@ -0,0 +1,39 @@
4398+#!/bin/bash
4399+# Copyright 2013 Canonical Ltd.
4400+#
4401+# This program is free software; you can redistribute it and/or modify
4402+# it under the terms of the GNU Lesser General Public License as published by
4403+# the Free Software Foundation; version 2.1.
4404+#
4405+# This program is distributed in the hope that it will be useful,
4406+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4407+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4408+# GNU Lesser General Public License for more details.
4409+#
4410+# You should have received a copy of the GNU Lesser General Public License
4411+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4412+#
4413+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4414+
4415+. `dirname $0`/functions.inc
4416+
4417+if [[ !does_device_hw_match_image_hw ]]; then
4418+ IMAGE_HARDWARE=`device_image_hardware`
4419+ DEVICE_HARDWARE=`device_hardware`
4420+ echo
4421+ echo " WARNING! Device image hardware version"
4422+ echo " does not match the detected device hardware."
4423+ echo
4424+ echo -n " Device Image Version: "
4425+ echo ${IMAGE_HARDWARE}
4426+ echo -n " Device Version: "
4427+ echo ${DEVICE_HARDWARE}
4428+ echo
4429+ echo " In order to flash your device, you must do it manually:"
4430+ echo " phablet-flash cdimage-touch -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE} -b"
4431+ echo
4432+elif [[ phablet_tools_new_syntax ]]; then
4433+ x-terminal-emulator -e "bash -ic 'phablet-flash ubuntu-system -s ${SERIALNUMBER}' -b"
4434+else
4435+ x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}' -b"
4436+fi
4437
4438=== added file 'share/qtcreator/ubuntu/scripts/device_hasnetwork'
4439--- share/qtcreator/ubuntu/scripts/device_hasnetwork 1970-01-01 00:00:00 +0000
4440+++ share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-11-20 07:46:30 +0000
4441@@ -0,0 +1,20 @@
4442+#!/bin/bash
4443+# Copyright 2013 Canonical Ltd.
4444+#
4445+# This program is free software; you can redistribute it and/or modify
4446+# it under the terms of the GNU Lesser General Public License as published by
4447+# the Free Software Foundation; version 2.1.
4448+#
4449+# This program is distributed in the hope that it will be useful,
4450+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4451+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4452+# GNU Lesser General Public License for more details.
4453+#
4454+# You should have received a copy of the GNU Lesser General Public License
4455+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4456+#
4457+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4458+
4459+. `dirname $0`/functions.inc
4460+
4461+device_network_state_connected
4462
4463=== added file 'share/qtcreator/ubuntu/scripts/device_network_clone'
4464--- share/qtcreator/ubuntu/scripts/device_network_clone 1970-01-01 00:00:00 +0000
4465+++ share/qtcreator/ubuntu/scripts/device_network_clone 2013-11-20 07:46:30 +0000
4466@@ -0,0 +1,23 @@
4467+#!/bin/bash
4468+# Copyright 2013 Canonical Ltd.
4469+#
4470+# This program is free software; you can redistribute it and/or modify
4471+# it under the terms of the GNU Lesser General Public License as published by
4472+# the Free Software Foundation; version 2.1.
4473+#
4474+# This program is distributed in the hope that it will be useful,
4475+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4476+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4477+# GNU Lesser General Public License for more details.
4478+#
4479+# You should have received a copy of the GNU Lesser General Public License
4480+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4481+#
4482+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4483+
4484+. `dirname $0`/functions.inc
4485+
4486+clone_network_setup_from_host_to_device
4487+wait_for_network_state_switch_on
4488+
4489+echo "The device has connected to a network."
4490\ No newline at end of file
4491
4492=== added file 'share/qtcreator/ubuntu/scripts/device_portforward'
4493--- share/qtcreator/ubuntu/scripts/device_portforward 1970-01-01 00:00:00 +0000
4494+++ share/qtcreator/ubuntu/scripts/device_portforward 2013-11-20 07:46:30 +0000
4495@@ -0,0 +1,33 @@
4496+#!/bin/bash
4497+# Copyright 2013 Canonical Ltd.
4498+#
4499+# This program is free software; you can redistribute it and/or modify
4500+# it under the terms of the GNU Lesser General Public License as published by
4501+# the Free Software Foundation; version 2.1.
4502+#
4503+# This program is distributed in the hope that it will be useful,
4504+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4505+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4506+# GNU Lesser General Public License for more details.
4507+#
4508+# You should have received a copy of the GNU Lesser General Public License
4509+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4510+#
4511+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4512+
4513+. `dirname $0`/functions.inc
4514+
4515+SSHPORT=$2
4516+QMLPORT=$3
4517+
4518+if [[ -z $SSHPORT ]]; then
4519+ SSHPORT=2222
4520+fi
4521+
4522+if [[ -z $QMLPORT ]]; then
4523+ QMLPORT=3768
4524+fi
4525+
4526+adb_forward_tcp ${SSHPORT} 22
4527+adb_forward_tcp ${QMLPORT} 3768
4528+
4529
4530=== added file 'share/qtcreator/ubuntu/scripts/device_reboot'
4531--- share/qtcreator/ubuntu/scripts/device_reboot 1970-01-01 00:00:00 +0000
4532+++ share/qtcreator/ubuntu/scripts/device_reboot 2013-11-20 07:46:30 +0000
4533@@ -0,0 +1,20 @@
4534+#!/bin/bash
4535+# Copyright 2013 Canonical Ltd.
4536+#
4537+# This program is free software; you can redistribute it and/or modify
4538+# it under the terms of the GNU Lesser General Public License as published by
4539+# the Free Software Foundation; version 2.1.
4540+#
4541+# This program is distributed in the hope that it will be useful,
4542+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4543+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4544+# GNU Lesser General Public License for more details.
4545+#
4546+# You should have received a copy of the GNU Lesser General Public License
4547+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4548+#
4549+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4550+
4551+. `dirname $0`/functions.inc
4552+
4553+device_reboot
4554
4555=== added file 'share/qtcreator/ubuntu/scripts/device_reboot2bootloader'
4556--- share/qtcreator/ubuntu/scripts/device_reboot2bootloader 1970-01-01 00:00:00 +0000
4557+++ share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-11-20 07:46:30 +0000
4558@@ -0,0 +1,21 @@
4559+#!/bin/bash
4560+# Copyright 2013 Canonical Ltd.
4561+#
4562+# This program is free software; you can redistribute it and/or modify
4563+# it under the terms of the GNU Lesser General Public License as published by
4564+# the Free Software Foundation; version 2.1.
4565+#
4566+# This program is distributed in the hope that it will be useful,
4567+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4568+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4569+# GNU Lesser General Public License for more details.
4570+#
4571+# You should have received a copy of the GNU Lesser General Public License
4572+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4573+#
4574+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4575+
4576+. `dirname $0`/functions.inc
4577+
4578+device_reboot_bootloader
4579+
4580
4581=== added file 'share/qtcreator/ubuntu/scripts/device_reboot2recovery'
4582--- share/qtcreator/ubuntu/scripts/device_reboot2recovery 1970-01-01 00:00:00 +0000
4583+++ share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-11-20 07:46:30 +0000
4584@@ -0,0 +1,20 @@
4585+#!/bin/bash
4586+# Copyright 2013 Canonical Ltd.
4587+#
4588+# This program is free software; you can redistribute it and/or modify
4589+# it under the terms of the GNU Lesser General Public License as published by
4590+# the Free Software Foundation; version 2.1.
4591+#
4592+# This program is distributed in the hope that it will be useful,
4593+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4594+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4595+# GNU Lesser General Public License for more details.
4596+#
4597+# You should have received a copy of the GNU Lesser General Public License
4598+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4599+#
4600+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4601+
4602+. `dirname $0`/functions.inc
4603+
4604+device_reboot_recovery
4605
4606=== added file 'share/qtcreator/ubuntu/scripts/device_rootshell'
4607--- share/qtcreator/ubuntu/scripts/device_rootshell 1970-01-01 00:00:00 +0000
4608+++ share/qtcreator/ubuntu/scripts/device_rootshell 2013-11-20 07:46:30 +0000
4609@@ -0,0 +1,20 @@
4610+#!/bin/bash
4611+# Copyright 2013 Canonical Ltd.
4612+#
4613+# This program is free software; you can redistribute it and/or modify
4614+# it under the terms of the GNU Lesser General Public License as published by
4615+# the Free Software Foundation; version 2.1.
4616+#
4617+# This program is distributed in the hope that it will be useful,
4618+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4619+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4620+# GNU Lesser General Public License for more details.
4621+#
4622+# You should have received a copy of the GNU Lesser General Public License
4623+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4624+#
4625+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4626+
4627+. `dirname $0`/functions.inc
4628+
4629+adb_shell
4630
4631=== added file 'share/qtcreator/ubuntu/scripts/device_search'
4632--- share/qtcreator/ubuntu/scripts/device_search 1970-01-01 00:00:00 +0000
4633+++ share/qtcreator/ubuntu/scripts/device_search 2013-11-20 07:46:30 +0000
4634@@ -0,0 +1,24 @@
4635+#!/bin/bash
4636+# Copyright 2013 Canonical Ltd.
4637+#
4638+# This program is free software; you can redistribute it and/or modify
4639+# it under the terms of the GNU Lesser General Public License as published by
4640+# the Free Software Foundation; version 2.1.
4641+#
4642+# This program is distributed in the hope that it will be useful,
4643+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4644+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4645+# GNU Lesser General Public License for more details.
4646+#
4647+# You should have received a copy of the GNU Lesser General Public License
4648+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4649+#
4650+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4651+
4652+adb kill-server > /dev/null
4653+adb start-server > /dev/null
4654+#adb root &> /dev/null
4655+#if [ $?==1 ]; then
4656+# exit
4657+#fi
4658+adb devices -l | grep -Ev "List of devices attached" | sed "/^$/d"
4659
4660=== added file 'share/qtcreator/ubuntu/scripts/device_service_ssh_start'
4661--- share/qtcreator/ubuntu/scripts/device_service_ssh_start 1970-01-01 00:00:00 +0000
4662+++ share/qtcreator/ubuntu/scripts/device_service_ssh_start 2013-11-20 07:46:30 +0000
4663@@ -0,0 +1,20 @@
4664+#!/bin/bash
4665+# Copyright 2013 Canonical Ltd.
4666+#
4667+# This program is free software; you can redistribute it and/or modify
4668+# it under the terms of the GNU Lesser General Public License as published by
4669+# the Free Software Foundation; version 2.1.
4670+#
4671+# This program is distributed in the hope that it will be useful,
4672+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4673+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4674+# GNU Lesser General Public License for more details.
4675+#
4676+# You should have received a copy of the GNU Lesser General Public License
4677+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4678+#
4679+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4680+
4681+. `dirname $0`/functions.inc
4682+
4683+adb_shell service ssh start &> /dev/null
4684
4685=== added file 'share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config'
4686--- share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 1970-01-01 00:00:00 +0000
4687+++ share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-11-20 07:46:30 +0000
4688@@ -0,0 +1,20 @@
4689+#!/bin/bash
4690+# Copyright 2013 Canonical Ltd.
4691+#
4692+# This program is free software; you can redistribute it and/or modify
4693+# it under the terms of the GNU Lesser General Public License as published by
4694+# the Free Software Foundation; version 2.1.
4695+#
4696+# This program is distributed in the hope that it will be useful,
4697+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4698+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4699+# GNU Lesser General Public License for more details.
4700+#
4701+# You should have received a copy of the GNU Lesser General Public License
4702+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4703+#
4704+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4705+
4706+. `dirname $0`/functions.inc
4707+
4708+adb_shell setprop persist.sys.usb.config ptp,adb
4709
4710=== added file 'share/qtcreator/ubuntu/scripts/device_shutdown'
4711--- share/qtcreator/ubuntu/scripts/device_shutdown 1970-01-01 00:00:00 +0000
4712+++ share/qtcreator/ubuntu/scripts/device_shutdown 2013-11-20 07:46:30 +0000
4713@@ -0,0 +1,20 @@
4714+#!/bin/bash
4715+# Copyright 2013 Canonical Ltd.
4716+#
4717+# This program is free software; you can redistribute it and/or modify
4718+# it under the terms of the GNU Lesser General Public License as published by
4719+# the Free Software Foundation; version 2.1.
4720+#
4721+# This program is distributed in the hope that it will be useful,
4722+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4723+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4724+# GNU Lesser General Public License for more details.
4725+#
4726+# You should have received a copy of the GNU Lesser General Public License
4727+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4728+#
4729+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4730+
4731+. `dirname $0`/functions.inc
4732+
4733+device_shutdown
4734
4735=== added file 'share/qtcreator/ubuntu/scripts/device_time_clone'
4736--- share/qtcreator/ubuntu/scripts/device_time_clone 1970-01-01 00:00:00 +0000
4737+++ share/qtcreator/ubuntu/scripts/device_time_clone 2013-11-20 07:46:30 +0000
4738@@ -0,0 +1,29 @@
4739+#!/bin/bash
4740+# Copyright 2013 Canonical Ltd.
4741+#
4742+# This program is free software; you can redistribute it and/or modify
4743+# it under the terms of the GNU Lesser General Public License as published by
4744+# the Free Software Foundation; version 2.1.
4745+#
4746+# This program is distributed in the hope that it will be useful,
4747+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4748+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4749+# GNU Lesser General Public License for more details.
4750+#
4751+# You should have received a copy of the GNU Lesser General Public License
4752+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4753+#
4754+# Author: Zoltán Balogh <zoltan.balogh@canonical.com>
4755+# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4756+
4757+. `dirname $0`/functions.inc
4758+
4759+LOCAL_DATE=`date +%Y%m%d`
4760+LOCAL_TIME=`date +%T`
4761+TIMEZONE=`cat /etc/timezone`
4762+
4763+adb_shell sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone
4764+adb_shell dpkg-reconfigure --frontend noninteractive tzdata > /dev/null
4765+adb_shell date +%Y%m%d -s "${LOCAL_DATE}" > /dev/null
4766+adb_shell date +%T -s "${LOCAL_TIME}" > /dev/null
4767+
4768
4769=== added file 'share/qtcreator/ubuntu/scripts/device_version'
4770--- share/qtcreator/ubuntu/scripts/device_version 1970-01-01 00:00:00 +0000
4771+++ share/qtcreator/ubuntu/scripts/device_version 2013-11-20 07:46:30 +0000
4772@@ -0,0 +1,21 @@
4773+#!/bin/bash
4774+# Copyright 2013 Canonical Ltd.
4775+#
4776+# This program is free software; you can redistribute it and/or modify
4777+# it under the terms of the GNU Lesser General Public License as published by
4778+# the Free Software Foundation; version 2.1.
4779+#
4780+# This program is distributed in the hope that it will be useful,
4781+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4782+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4783+# GNU Lesser General Public License for more details.
4784+#
4785+# You should have received a copy of the GNU Lesser General Public License
4786+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4787+#
4788+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4789+
4790+. `dirname $0`/functions.inc
4791+
4792+device_image_hardware
4793+device_image_version
4794
4795=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_has'
4796--- share/qtcreator/ubuntu/scripts/device_writableimage_has 1970-01-01 00:00:00 +0000
4797+++ share/qtcreator/ubuntu/scripts/device_writableimage_has 2013-11-20 07:46:30 +0000
4798@@ -0,0 +1,22 @@
4799+#!/bin/bash
4800+# Copyright 2013 Canonical Ltd.
4801+#
4802+# This program is free software; you can redistribute it and/or modify
4803+# it under the terms of the GNU Lesser General Public License as published by
4804+# the Free Software Foundation; version 2.1.
4805+#
4806+# This program is distributed in the hope that it will be useful,
4807+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4808+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4809+# GNU Lesser General Public License for more details.
4810+#
4811+# You should have received a copy of the GNU Lesser General Public License
4812+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4813+#
4814+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4815+
4816+. `dirname $0`/functions.inc
4817+
4818+WRITABLE_IMAGE_FILE=/userdata/.writable_image
4819+
4820+adb_shell cat ${WRITABLE_IMAGE_FILE} |grep -oi "no such file"|wc -l
4821
4822=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_set'
4823--- share/qtcreator/ubuntu/scripts/device_writableimage_set 1970-01-01 00:00:00 +0000
4824+++ share/qtcreator/ubuntu/scripts/device_writableimage_set 2013-11-20 07:46:30 +0000
4825@@ -0,0 +1,23 @@
4826+#!/bin/bash
4827+# Copyright 2013 Canonical Ltd.
4828+#
4829+# This program is free software; you can redistribute it and/or modify
4830+# it under the terms of the GNU Lesser General Public License as published by
4831+# the Free Software Foundation; version 2.1.
4832+#
4833+# This program is distributed in the hope that it will be useful,
4834+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4835+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4836+# GNU Lesser General Public License for more details.
4837+#
4838+# You should have received a copy of the GNU Lesser General Public License
4839+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4840+#
4841+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4842+
4843+. `dirname $0`/functions.inc
4844+
4845+WRITABLE_IMAGE_FILE=/userdata/.writable_image
4846+
4847+adb_shell touch ${WRITABLE_IMAGE_FILE}
4848+adb_shell reboot
4849\ No newline at end of file
4850
4851=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_unset'
4852--- share/qtcreator/ubuntu/scripts/device_writableimage_unset 1970-01-01 00:00:00 +0000
4853+++ share/qtcreator/ubuntu/scripts/device_writableimage_unset 2013-11-20 07:46:30 +0000
4854@@ -0,0 +1,23 @@
4855+#!/bin/bash
4856+# Copyright 2013 Canonical Ltd.
4857+#
4858+# This program is free software; you can redistribute it and/or modify
4859+# it under the terms of the GNU Lesser General Public License as published by
4860+# the Free Software Foundation; version 2.1.
4861+#
4862+# This program is distributed in the hope that it will be useful,
4863+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4864+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4865+# GNU Lesser General Public License for more details.
4866+#
4867+# You should have received a copy of the GNU Lesser General Public License
4868+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4869+#
4870+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4871+
4872+. `dirname $0`/functions.inc
4873+
4874+WRITABLE_IMAGE_FILE=/userdata/.writable_image
4875+
4876+adb_shell rm ${WRITABLE_IMAGE_FILE}
4877+adb_shell reboot
4878\ No newline at end of file
4879
4880=== added file 'share/qtcreator/ubuntu/scripts/functions.inc'
4881--- share/qtcreator/ubuntu/scripts/functions.inc 1970-01-01 00:00:00 +0000
4882+++ share/qtcreator/ubuntu/scripts/functions.inc 2013-11-20 07:46:30 +0000
4883@@ -0,0 +1,145 @@
4884+#!/bin/bash
4885+# Copyright 2013 Canonical Ltd.
4886+#
4887+# This program is free software; you can redistribute it and/or modify
4888+# it under the terms of the GNU Lesser General Public License as published by
4889+# the Free Software Foundation; version 2.1.
4890+#
4891+# This program is distributed in the hope that it will be useful,
4892+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4893+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4894+# GNU Lesser General Public License for more details.
4895+#
4896+# You should have received a copy of the GNU Lesser General Public License
4897+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4898+#
4899+# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
4900+
4901+set -e
4902+
4903+SCRIPTPATH=`dirname $0`
4904+SERIALNUMBER=$1
4905+SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
4906+USERNAME=phablet
4907+
4908+function adb_root {
4909+ adb -s ${SERIALNUMBER} root &> /dev/null
4910+ adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
4911+}
4912+
4913+function has_ubuntu_chroot {
4914+ local HAS_UBUNTU_CHROOT=`adb -s ${SERIALNUMBER} shell "which ubuntu_chroot"`
4915+ if [[ ${HAS_UBUNTU_CHROOT} ]]; then
4916+ echo 1
4917+ else
4918+ echo 0
4919+ fi
4920+}
4921+
4922+function adbd_restart {
4923+ adb kill-server &> /dev/null
4924+ adb start-server &> /dev/null
4925+}
4926+
4927+function adb_devices {
4928+ adb devices -l
4929+}
4930+
4931+function adb_forward_tcp {
4932+set +e
4933+ adb -s ${SERIALNUMBER} forward tcp:$1 tcp:$2
4934+set -e
4935+}
4936+
4937+function adb_shell {
4938+set +e
4939+ if [[ `has_ubuntu_chroot` -eq "1" ]]; then
4940+ adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin $@
4941+ else
4942+ adb -s ${SERIALNUMBER} shell $@
4943+ fi
4944+set -e
4945+}
4946+
4947+function phablet_shell {
4948+ adb_shell "su ${USERNAME} -c \"$@\""
4949+}
4950+
4951+function phablet_tools_new_syntax {
4952+ installed_version=$(dpkg-query --show --showformat '${Version}' phablet-tools)
4953+ dpkg --compare-versions $installed_version ge 1.0
4954+ echo $?
4955+}
4956+
4957+function ubuntu_stamp {
4958+ adb_shell cat /system/*ubuntu_stamp
4959+}
4960+
4961+function device_hardware {
4962+ adb_devices |grep -o device:.*|sed "s/device://"
4963+}
4964+
4965+function device_image_hardware {
4966+ ubuntu_stamp | grep HARDWARE|sed "s/HARDWARE=//g"
4967+}
4968+
4969+function does_device_hw_match_image_hw {
4970+ if [[ device_hardware == device_image_hardware ]]; then
4971+ echo 1
4972+ else
4973+ echo 0
4974+ fi
4975+}
4976+
4977+function device_image_version {
4978+ ubuntu_stamp | grep JENKINS|sed "s/JENKINS_BUILD=//g"
4979+}
4980+
4981+function device_network_state_connected {
4982+ local NM_STATE=`adb_shell nmcli nm | head -n+2 | awk '{print $2}'`
4983+ if [[ $NM_STATE != *disconnected* ]]; then
4984+ echo 1
4985+ else
4986+ echo 0
4987+ fi
4988+}
4989+
4990+function device_reboot {
4991+ adb_shell reboot
4992+}
4993+
4994+function device_reboot_bootloader {
4995+ adb -s ${SERIALNUMBER} reboot-bootloader
4996+}
4997+
4998+function device_reboot_recovery {
4999+ adb -s ${SERIALNUMBER} reboot recovery
5000+}
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: