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

Proposed by Zoltan Balogh
Status: Needs review
Proposed branch: lp:~bzoltan/ubuntu-qtcreator-plugins/security_policy_groups_are_not_saved
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/security_policy_groups_are_not_saved
Reviewer Review Type Date Requested Status
Zsombor Egri Pending
Review via email: mp+195914@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
=== added directory '.bzr-builddeb'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf 2013-11-20 07:28:27 +0000
@@ -0,0 +1,3 @@
1[BUILDDEB]
2split = true
3
04
=== added file 'LICENSE.LGPL'
--- LICENSE.LGPL 1970-01-01 00:00:00 +0000
+++ LICENSE.LGPL 2013-11-20 07:28:27 +0000
@@ -0,0 +1,504 @@
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 2.1, February 1999
3
4 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9[This is the first released version of the Lesser GPL. It also counts
10 as the successor of the GNU Library Public License, version 2, hence
11 the version number 2.1.]
12
13 Preamble
14
15 The licenses for most software are designed to take away your
16freedom to share and change it. By contrast, the GNU General Public
17Licenses are intended to guarantee your freedom to share and change
18free software--to make sure the software is free for all its users.
19
20 This license, the Lesser General Public License, applies to some
21specially designated software packages--typically libraries--of the
22Free Software Foundation and other authors who decide to use it. You
23can use it too, but we suggest you first think carefully about whether
24this license or the ordinary General Public License is the better
25strategy to use in any particular case, based on the explanations below.
26
27 When we speak of free software, we are referring to freedom of use,
28not price. Our General Public Licenses are designed to make sure that
29you have the freedom to distribute copies of free software (and charge
30for this service if you wish); that you receive source code or can get
31it if you want it; that you can change the software and use pieces of
32it in new free programs; and that you are informed that you can do
33these things.
34
35 To protect your rights, we need to make restrictions that forbid
36distributors to deny you these rights or to ask you to surrender these
37rights. These restrictions translate to certain responsibilities for
38you if you distribute copies of the library or if you modify it.
39
40 For example, if you distribute copies of the library, whether gratis
41or for a fee, you must give the recipients all the rights that we gave
42you. You must make sure that they, too, receive or can get the source
43code. If you link other code with the library, you must provide
44complete object files to the recipients, so that they can relink them
45with the library after making changes to the library and recompiling
46it. And you must show them these terms so they know their rights.
47
48 We protect your rights with a two-step method: (1) we copyright the
49library, and (2) we offer you this license, which gives you legal
50permission to copy, distribute and/or modify the library.
51
52 To protect each distributor, we want to make it very clear that
53there is no warranty for the free library. Also, if the library is
54modified by someone else and passed on, the recipients should know
55that what they have is not the original version, so that the original
56author's reputation will not be affected by problems that might be
57introduced by others.
58
059
60 Finally, software patents pose a constant threat to the existence of
61any free program. We wish to make sure that a company cannot
62effectively restrict the users of a free program by obtaining a
63restrictive license from a patent holder. Therefore, we insist that
64any patent license obtained for a version of the library must be
65consistent with the full freedom of use specified in this license.
66
67 Most GNU software, including some libraries, is covered by the
68ordinary GNU General Public License. This license, the GNU Lesser
69General Public License, applies to certain designated libraries, and
70is quite different from the ordinary General Public License. We use
71this license for certain libraries in order to permit linking those
72libraries into non-free programs.
73
74 When a program is linked with a library, whether statically or using
75a shared library, the combination of the two is legally speaking a
76combined work, a derivative of the original library. The ordinary
77General Public License therefore permits such linking only if the
78entire combination fits its criteria of freedom. The Lesser General
79Public License permits more lax criteria for linking other code with
80the library.
81
82 We call this license the "Lesser" General Public License because it
83does Less to protect the user's freedom than the ordinary General
84Public License. It also provides other free software developers Less
85of an advantage over competing non-free programs. These disadvantages
86are the reason we use the ordinary General Public License for many
87libraries. However, the Lesser license provides advantages in certain
88special circumstances.
89
90 For example, on rare occasions, there may be a special need to
91encourage the widest possible use of a certain library, so that it becomes
92a de-facto standard. To achieve this, non-free programs must be
93allowed to use the library. A more frequent case is that a free
94library does the same job as widely used non-free libraries. In this
95case, there is little to gain by limiting the free library to free
96software only, so we use the Lesser General Public License.
97
98 In other cases, permission to use a particular library in non-free
99programs enables a greater number of people to use a large body of
100free software. For example, permission to use the GNU C Library in
101non-free programs enables many more people to use the whole GNU
102operating system, as well as its variant, the GNU/Linux operating
103system.
104
105 Although the Lesser General Public License is Less protective of the
106users' freedom, it does ensure that the user of a program that is
107linked with the Library has the freedom and the wherewithal to run
108that program using a modified version of the Library.
109
110 The precise terms and conditions for copying, distribution and
111modification follow. Pay close attention to the difference between a
112"work based on the library" and a "work that uses the library". The
113former contains code derived from the library, whereas the latter must
114be combined with the library in order to run.
115
1116
117 GNU LESSER GENERAL PUBLIC LICENSE
118 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
119
120 0. This License Agreement applies to any software library or other
121program which contains a notice placed by the copyright holder or
122other authorized party saying it may be distributed under the terms of
123this Lesser General Public License (also called "this License").
124Each licensee is addressed as "you".
125
126 A "library" means a collection of software functions and/or data
127prepared so as to be conveniently linked with application programs
128(which use some of those functions and data) to form executables.
129
130 The "Library", below, refers to any such software library or work
131which has been distributed under these terms. A "work based on the
132Library" means either the Library or any derivative work under
133copyright law: that is to say, a work containing the Library or a
134portion of it, either verbatim or with modifications and/or translated
135straightforwardly into another language. (Hereinafter, translation is
136included without limitation in the term "modification".)
137
138 "Source code" for a work means the preferred form of the work for
139making modifications to it. For a library, complete source code means
140all the source code for all modules it contains, plus any associated
141interface definition files, plus the scripts used to control compilation
142and installation of the library.
143
144 Activities other than copying, distribution and modification are not
145covered by this License; they are outside its scope. The act of
146running a program using the Library is not restricted, and output from
147such a program is covered only if its contents constitute a work based
148on the Library (independent of the use of the Library in a tool for
149writing it). Whether that is true depends on what the Library does
150and what the program that uses the Library does.
151
152 1. You may copy and distribute verbatim copies of the Library's
153complete source code as you receive it, in any medium, provided that
154you conspicuously and appropriately publish on each copy an
155appropriate copyright notice and disclaimer of warranty; keep intact
156all the notices that refer to this License and to the absence of any
157warranty; and distribute a copy of this License along with the
158Library.
159
160 You may charge a fee for the physical act of transferring a copy,
161and you may at your option offer warranty protection in exchange for a
162fee.
163
2164
165 2. You may modify your copy or copies of the Library or any portion
166of it, thus forming a work based on the Library, and copy and
167distribute such modifications or work under the terms of Section 1
168above, provided that you also meet all of these conditions:
169
170 a) The modified work must itself be a software library.
171
172 b) You must cause the files modified to carry prominent notices
173 stating that you changed the files and the date of any change.
174
175 c) You must cause the whole of the work to be licensed at no
176 charge to all third parties under the terms of this License.
177
178 d) If a facility in the modified Library refers to a function or a
179 table of data to be supplied by an application program that uses
180 the facility, other than as an argument passed when the facility
181 is invoked, then you must make a good faith effort to ensure that,
182 in the event an application does not supply such function or
183 table, the facility still operates, and performs whatever part of
184 its purpose remains meaningful.
185
186 (For example, a function in a library to compute square roots has
187 a purpose that is entirely well-defined independent of the
188 application. Therefore, Subsection 2d requires that any
189 application-supplied function or table used by this function must
190 be optional: if the application does not supply it, the square
191 root function must still compute square roots.)
192
193These requirements apply to the modified work as a whole. If
194identifiable sections of that work are not derived from the Library,
195and can be reasonably considered independent and separate works in
196themselves, then this License, and its terms, do not apply to those
197sections when you distribute them as separate works. But when you
198distribute the same sections as part of a whole which is a work based
199on the Library, the distribution of the whole must be on the terms of
200this License, whose permissions for other licensees extend to the
201entire whole, and thus to each and every part regardless of who wrote
202it.
203
204Thus, it is not the intent of this section to claim rights or contest
205your rights to work written entirely by you; rather, the intent is to
206exercise the right to control the distribution of derivative or
207collective works based on the Library.
208
209In addition, mere aggregation of another work not based on the Library
210with the Library (or with a work based on the Library) on a volume of
211a storage or distribution medium does not bring the other work under
212the scope of this License.
213
214 3. You may opt to apply the terms of the ordinary GNU General Public
215License instead of this License to a given copy of the Library. To do
216this, you must alter all the notices that refer to this License, so
217that they refer to the ordinary GNU General Public License, version 2,
218instead of to this License. (If a newer version than version 2 of the
219ordinary GNU General Public License has appeared, then you can specify
220that version instead if you wish.) Do not make any other change in
221these notices.
222
3223
224 Once this change is made in a given copy, it is irreversible for
225that copy, so the ordinary GNU General Public License applies to all
226subsequent copies and derivative works made from that copy.
227
228 This option is useful when you wish to copy part of the code of
229the Library into a program that is not a library.
230
231 4. You may copy and distribute the Library (or a portion or
232derivative of it, under Section 2) in object code or executable form
233under the terms of Sections 1 and 2 above provided that you accompany
234it with the complete corresponding machine-readable source code, which
235must be distributed under the terms of Sections 1 and 2 above on a
236medium customarily used for software interchange.
237
238 If distribution of object code is made by offering access to copy
239from a designated place, then offering equivalent access to copy the
240source code from the same place satisfies the requirement to
241distribute the source code, even though third parties are not
242compelled to copy the source along with the object code.
243
244 5. A program that contains no derivative of any portion of the
245Library, but is designed to work with the Library by being compiled or
246linked with it, is called a "work that uses the Library". Such a
247work, in isolation, is not a derivative work of the Library, and
248therefore falls outside the scope of this License.
249
250 However, linking a "work that uses the Library" with the Library
251creates an executable that is a derivative of the Library (because it
252contains portions of the Library), rather than a "work that uses the
253library". The executable is therefore covered by this License.
254Section 6 states terms for distribution of such executables.
255
256 When a "work that uses the Library" uses material from a header file
257that is part of the Library, the object code for the work may be a
258derivative work of the Library even though the source code is not.
259Whether this is true is especially significant if the work can be
260linked without the Library, or if the work is itself a library. The
261threshold for this to be true is not precisely defined by law.
262
263 If such an object file uses only numerical parameters, data
264structure layouts and accessors, and small macros and small inline
265functions (ten lines or less in length), then the use of the object
266file is unrestricted, regardless of whether it is legally a derivative
267work. (Executables containing this object code plus portions of the
268Library will still fall under Section 6.)
269
270 Otherwise, if the work is a derivative of the Library, you may
271distribute the object code for the work under the terms of Section 6.
272Any executables containing that work also fall under Section 6,
273whether or not they are linked directly with the Library itself.
274
4275
276 6. As an exception to the Sections above, you may also combine or
277link a "work that uses the Library" with the Library to produce a
278work containing portions of the Library, and distribute that work
279under terms of your choice, provided that the terms permit
280modification of the work for the customer's own use and reverse
281engineering for debugging such modifications.
282
283 You must give prominent notice with each copy of the work that the
284Library is used in it and that the Library and its use are covered by
285this License. You must supply a copy of this License. If the work
286during execution displays copyright notices, you must include the
287copyright notice for the Library among them, as well as a reference
288directing the user to the copy of this License. Also, you must do one
289of these things:
290
291 a) Accompany the work with the complete corresponding
292 machine-readable source code for the Library including whatever
293 changes were used in the work (which must be distributed under
294 Sections 1 and 2 above); and, if the work is an executable linked
295 with the Library, with the complete machine-readable "work that
296 uses the Library", as object code and/or source code, so that the
297 user can modify the Library and then relink to produce a modified
298 executable containing the modified Library. (It is understood
299 that the user who changes the contents of definitions files in the
300 Library will not necessarily be able to recompile the application
301 to use the modified definitions.)
302
303 b) Use a suitable shared library mechanism for linking with the
304 Library. A suitable mechanism is one that (1) uses at run time a
305 copy of the library already present on the user's computer system,
306 rather than copying library functions into the executable, and (2)
307 will operate properly with a modified version of the library, if
308 the user installs one, as long as the modified version is
309 interface-compatible with the version that the work was made with.
310
311 c) Accompany the work with a written offer, valid for at
312 least three years, to give the same user the materials
313 specified in Subsection 6a, above, for a charge no more
314 than the cost of performing this distribution.
315
316 d) If distribution of the work is made by offering access to copy
317 from a designated place, offer equivalent access to copy the above
318 specified materials from the same place.
319
320 e) Verify that the user has already received a copy of these
321 materials or that you have already sent this user a copy.
322
323 For an executable, the required form of the "work that uses the
324Library" must include any data and utility programs needed for
325reproducing the executable from it. However, as a special exception,
326the materials to be distributed need not include anything that is
327normally distributed (in either source or binary form) with the major
328components (compiler, kernel, and so on) of the operating system on
329which the executable runs, unless that component itself accompanies
330the executable.
331
332 It may happen that this requirement contradicts the license
333restrictions of other proprietary libraries that do not normally
334accompany the operating system. Such a contradiction means you cannot
335use both them and the Library together in an executable that you
336distribute.
337
5338
339 7. You may place library facilities that are a work based on the
340Library side-by-side in a single library together with other library
341facilities not covered by this License, and distribute such a combined
342library, provided that the separate distribution of the work based on
343the Library and of the other library facilities is otherwise
344permitted, and provided that you do these two things:
345
346 a) Accompany the combined library with a copy of the same work
347 based on the Library, uncombined with any other library
348 facilities. This must be distributed under the terms of the
349 Sections above.
350
351 b) Give prominent notice with the combined library of the fact
352 that part of it is a work based on the Library, and explaining
353 where to find the accompanying uncombined form of the same work.
354
355 8. You may not copy, modify, sublicense, link with, or distribute
356the Library except as expressly provided under this License. Any
357attempt otherwise to copy, modify, sublicense, link with, or
358distribute the Library is void, and will automatically terminate your
359rights under this License. However, parties who have received copies,
360or rights, from you under this License will not have their licenses
361terminated so long as such parties remain in full compliance.
362
363 9. You are not required to accept this License, since you have not
364signed it. However, nothing else grants you permission to modify or
365distribute the Library or its derivative works. These actions are
366prohibited by law if you do not accept this License. Therefore, by
367modifying or distributing the Library (or any work based on the
368Library), you indicate your acceptance of this License to do so, and
369all its terms and conditions for copying, distributing or modifying
370the Library or works based on it.
371
372 10. Each time you redistribute the Library (or any work based on the
373Library), the recipient automatically receives a license from the
374original licensor to copy, distribute, link with or modify the Library
375subject to these terms and conditions. You may not impose any further
376restrictions on the recipients' exercise of the rights granted herein.
377You are not responsible for enforcing compliance by third parties with
378this License.
379
6380
381 11. If, as a consequence of a court judgment or allegation of patent
382infringement or for any other reason (not limited to patent issues),
383conditions are imposed on you (whether by court order, agreement or
384otherwise) that contradict the conditions of this License, they do not
385excuse you from the conditions of this License. If you cannot
386distribute so as to satisfy simultaneously your obligations under this
387License and any other pertinent obligations, then as a consequence you
388may not distribute the Library at all. For example, if a patent
389license would not permit royalty-free redistribution of the Library by
390all those who receive copies directly or indirectly through you, then
391the only way you could satisfy both it and this License would be to
392refrain entirely from distribution of the Library.
393
394If any portion of this section is held invalid or unenforceable under any
395particular circumstance, the balance of the section is intended to apply,
396and the section as a whole is intended to apply in other circumstances.
397
398It is not the purpose of this section to induce you to infringe any
399patents or other property right claims or to contest validity of any
400such claims; this section has the sole purpose of protecting the
401integrity of the free software distribution system which is
402implemented by public license practices. Many people have made
403generous contributions to the wide range of software distributed
404through that system in reliance on consistent application of that
405system; it is up to the author/donor to decide if he or she is willing
406to distribute software through any other system and a licensee cannot
407impose that choice.
408
409This section is intended to make thoroughly clear what is believed to
410be a consequence of the rest of this License.
411
412 12. If the distribution and/or use of the Library is restricted in
413certain countries either by patents or by copyrighted interfaces, the
414original copyright holder who places the Library under this License may add
415an explicit geographical distribution limitation excluding those countries,
416so that distribution is permitted only in or among countries not thus
417excluded. In such case, this License incorporates the limitation as if
418written in the body of this License.
419
420 13. The Free Software Foundation may publish revised and/or new
421versions of the Lesser General Public License from time to time.
422Such new versions will be similar in spirit to the present version,
423but may differ in detail to address new problems or concerns.
424
425Each version is given a distinguishing version number. If the Library
426specifies a version number of this License which applies to it and
427"any later version", you have the option of following the terms and
428conditions either of that version or of any later version published by
429the Free Software Foundation. If the Library does not specify a
430license version number, you may choose any version ever published by
431the Free Software Foundation.
432
7433
434 14. If you wish to incorporate parts of the Library into other free
435programs whose distribution conditions are incompatible with these,
436write to the author to ask for permission. For software which is
437copyrighted by the Free Software Foundation, write to the Free
438Software Foundation; we sometimes make exceptions for this. Our
439decision will be guided by the two goals of preserving the free status
440of all derivatives of our free software and of promoting the sharing
441and reuse of software generally.
442
443 NO WARRANTY
444
445 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
446WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
447EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
448OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
449KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
450IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
451PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
452LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
453THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
454
455 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
456WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
457AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
458FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
459CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
460LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
461RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
462FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
463SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
464DAMAGES.
465
466 END OF TERMS AND CONDITIONS
467
8468
469 How to Apply These Terms to Your New Libraries
470
471 If you develop a new library, and you want it to be of the greatest
472possible use to the public, we recommend making it free software that
473everyone can redistribute and change. You can do so by permitting
474redistribution under these terms (or, alternatively, under the terms of the
475ordinary General Public License).
476
477 To apply these terms, attach the following notices to the library. It is
478safest to attach them to the start of each source file to most effectively
479convey the exclusion of warranty; and each file should have at least the
480"copyright" line and a pointer to where the full notice is found.
481
482 <one line to give the library's name and a brief idea of what it does.>
483 Copyright (C) <year> <name of author>
484
485 This library is free software; you can redistribute it and/or
486 modify it under the terms of the GNU Lesser General Public
487 License as published by the Free Software Foundation; either
488 version 2.1 of the License, or (at your option) any later version.
489
490 This library is distributed in the hope that it will be useful,
491 but WITHOUT ANY WARRANTY; without even the implied warranty of
492 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
493 Lesser General Public License for more details.
494
495 You should have received a copy of the GNU Lesser General Public
496 License along with this library; if not, write to the Free Software
497 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
498
499Also add information on how to contact you by electronic and paper mail.
500
501You should also get your employer (if you work as a programmer) or your
502school, if any, to sign a "copyright disclaimer" for the library, if
503necessary. Here is a sample; alter the names:
504
505 Yoyodyne, Inc., hereby disclaims all copyright interest in the
506 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
507
508 <signature of Ty Coon>, 1 April 1990
509 Ty Coon, President of Vice
510
511That's all there is to it!
512
513
9514
=== added directory 'debian'
=== added file 'debian/changelog'
--- debian/changelog 1970-01-01 00:00:00 +0000
+++ debian/changelog 2013-11-20 07:28:27 +0000
@@ -0,0 +1,131 @@
1qtcreator-plugin-ubuntu (2.8.1-0ubuntu2) UNRELEASED; urgency=low
2
3 * Automatic snapshot from revision 52 (bootstrap)
4
5 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Wed, 13 Nov 2013 11:55:29 +0200
6
7qtcreator-plugin-ubuntu (2.8.1-0ubuntu1) trusty; urgency=low
8
9 [ Juhapekka Piiroinen ]
10 * Fix plugin to compile against Qt Creator 2.8.1.
11 * Platfom development mode needs write access on the RO image (LP: #1229129)
12 * Do not hard code the phablet user (LP: #1223363)
13 * Click package script removes plugin includes from the desktop file (LP: #1220939)
14 * Fixed bug where click packaging manifest files wasnt created on new application creation.
15 * Moved misc buttons from Devices tabs under Settings page.
16 * Added more Settings pages.
17 * execute sanity checks for click packages after generation (LP: #1230413)
18 * Can't run html5 apps on device from SDK (LP: 1232061)
19 * created click pkg for cordova desktop has qmlscene exec (LP: #1232213)
20 * do not execute i18n stuff on all project files (LP: #1176433)
21 * Internationalization workflow improvements (LP: #1177449)
22 * [i18n] The .pot file generator should provide relative paths (LP: #1180325)
23 * Split out reserved security policies from regular ones (LP: #1227814)
24 * Fixed an issue where Click package creation or installation wasnt visible for cordova projects.
25
26 [ Maxim Ermilov ]
27 * Fixed CordovaUbuntuProjectManager to compile against Qt Creator 2.8
28
29 [ Zoltán Balogh ]
30 * Saving the AppArmor manifest file when Click package is created (LP: #1233683)
31
32 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 23 Sep 2013 10:01:41 +0300
33
34qtcreator-plugin-ubuntu (2.7.2-0ubuntu5) saucy; urgency=low
35
36 * Cannot add device: device key expected before created (LP: #1227820)
37
38 -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Fri, 20 Sep 2013 11:04:13 +0300
39
40qtcreator-plugin-ubuntu (2.7.2-0ubuntu4) saucy; urgency=low
41
42 * If no device is present, try to use the system package to
43 detect security policy groups, else, manual entry (LP: #1227618)
44
45 -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Thu, 19 Sep 2013 16:23:02 +0300
46
47qtcreator-plugin-ubuntu (2.7.2-0ubuntu3) saucy; urgency=low
48
49 * USB Device connection / disconnection detection.
50 * Refactored Menus.
51 * Can't set version number in Packaging form (LP: #1212326)
52 * QtC cuts folder names when building on the device (LP: #1212937)
53 * Click packages need to exclude the .bzr dir (LP: #1214628)
54 * Force lower case click package name (LP: #1219877)
55 * Packaging resets package name, other attributes to default every
56 time it's opened (LP: #1219948)
57 * please provide gui for security manifest (LP: #1221407)
58 * Cannot enable developer mode on read-only image (LP: #1223301)
59 * Cannot launch application through qtcreator (LP: #1225178)
60 * Application installation script problems (LP: #1213902)
61 * Comment field in .desktop file should be generated on the fly
62 (LP: #1223388)
63 * SDK should set applicationName to "name" value in the click manifest
64 (LP: #1227085)
65
66 -- Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com> Wed, 18 Sep 2013 15:36:58 +0300
67
68qtcreator-plugin-ubuntu (2.7.2-0ubuntu2) saucy; urgency=low
69
70 [ Zoltan Balogh ]
71 * Fix app id and the dbus session adress (LP: #1221414).
72 * Use pkcon to install click packages (LP: #1223014)
73
74 [ Timo Jyrinki ]
75 * Add Cordova dependencies to the Cordova plugin (LP: #1209385)
76 * Recommend ubuntu-sdk from qtcreator-plugin-ubuntu (LP: #1198084)
77
78 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 16 Sep 2013 08:58:21 +0300
79
80qtcreator-plugin-ubuntu (2.7.2-0ubuntu1) saucy; urgency=low
81
82 [ Juhapekka Piiroinen ]
83 * Move the plugin code from qtcreator source package to here, fix install
84 * Depend on qtcreator-dev
85
86 [ Zoltán Balogh ]
87 * Fixing the build dependencies
88
89 [ Timo Jyrinki ]
90 * Follow Qt Creator version numbering but slightly higher to allow upgrades
91 * Move icon out of debian/ directory
92 * Remove provides/conflicts/replaces for old PPA ubuntu-qtcreator-plugins
93 * Clean out packaging with wrap-and-sort -a -t
94 * Add recommended cflags and QT_SELECT to debian/rules
95 * Make dependencies stricter. Require Qt Creator >= 2.7.1 and recommend
96 the plugins from the -common packages.
97 * A file moved from ubuntu plugin package to cordova plugin package, adding
98 Replaces.
99
100 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Fri, 06 Sep 2013 07:12:02 +0300
101
102qtcreator-plugin-ubuntu (0.1-0ubuntu3) saucy; urgency=low
103
104 * The Cordova project type in the template definition file had a typo. The
105 fileName was wrongly filename. So the .desktop file was not created.
106 (LP: #1216046)
107
108 -- Zoltán Balogh <zoltan@bakter.hu> Tue, 27 Aug 2013 22:15:56 +0300
109
110qtcreator-plugin-ubuntu (0.1-0ubuntu2) saucy; urgency=low
111
112 * New snapshot relese from bazaar revision 17.
113 - Add desktop file to the Cordova template.
114 - Depend on gksu from the common packages (LP: #1209369)
115 - Fix bug #1197537 (LP: #1197537)
116 - xgettext is called using --from-code=UTF-8 (LP: #1183045)
117
118 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Tue, 27 Aug 2013 17:18:31 +0300
119
120qtcreator-plugin-ubuntu (0.1-0ubuntu1) saucy; urgency=low
121
122 [ Juhapekka Piiroinen ]
123 * Initial release
124
125 [ Timo Jyrinki ]
126 * Automatic snapshot from revision 3 (bootstrap)
127
128 [ Zoltán Balogh ]
129 * Adopt to new syntax of the phablet-flash
130
131 -- Zoltán Balogh <zoltan@bakter.hu> Thu, 15 Aug 2013 10:19:41 +0300
0132
=== added file 'debian/compat'
--- debian/compat 1970-01-01 00:00:00 +0000
+++ debian/compat 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
19
02
=== added file 'debian/control'
--- debian/control 1970-01-01 00:00:00 +0000
+++ debian/control 2013-11-20 07:28:27 +0000
@@ -0,0 +1,96 @@
1Source: qtcreator-plugin-ubuntu
2Section: devel
3Priority: optional
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: debhelper (>= 9),
6 libqt5script5 (>= 5.0.2~),
7 libqt5scripttools5 (>= 5.0.2~),
8 libqt5webkit5-dev,
9 libqt5widgets5 (>= 5.0.2~),
10 libsqlite3-dev,
11 qt5-qmake (>= 5.0.2~),
12 qtcreator-dev (>= 2.8.1),
13 qtdeclarative5-dev-tools (>= 5.0.2~),
14 qtdeclarative5-private-dev (>= 5.0.2~),
15 qtquick1-5-dev (>= 5.0.2~),
16 qtquick1-5-dev-tools (>= 5.0.2~),
17 qtscript5-private-dev (>= 5.0.2~),
18 qttools5-dev-tools (>= 5.0.2~),
19 qtxmlpatterns5-dev-tools,
20 libudev-dev,
21Standards-Version: 3.9.4
22Homepage: https://launchpad.net/qtcreator-plugin-ubuntu
23# If you aren't a member of ~ubuntu-sdk-team but need to upload packaging changes,
24# just go ahead. ~ubuntu-sdk-team will notice and sync up the code again.
25Vcs-Bzr: https://code.launchpad.net/~ubuntu-sdk-team/qtcreator-plugin-ubuntu/trunk
26
27Package: qtcreator-plugin-ubuntu
28Architecture: any
29Depends: android-tools-adb,
30 click,
31 click-dev,
32 click-doc,
33 devscripts,
34 dh-make,
35 libqt5scripttools5,
36 qtcreator (>= 2.8.1),
37 qtcreator-plugin-ubuntu-common,
38 ubuntu-html5-theme,
39 ubuntu-ui-toolkit-doc,
40 ubuntu-ui-toolkit-examples,
41 ${misc:Depends},
42Recommends: ubuntu-sdk
43Description: Ubuntu plugin for Qt Creator IDE
44 Qt Creator is a new, lightweight, cross-platform integrated development
45 environment (IDE) designed to make development with the Qt application
46 framework even faster and easier.
47 .
48 This package contains the Ubuntu plugin for Qt Creator, providing
49 deeper integration for developing applications for Ubuntu using the
50 Ubuntu UI Toolkit. It also introduces an Ubuntu themed welcome
51 screen.
52
53Package: qtcreator-plugin-ubuntu-common
54Architecture: all
55Depends: gksu,
56 ${misc:Depends},
57Recommends: qtcreator-plugin-ubuntu
58Replaces: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
59Conflicts: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu4),
60Description: Common data files for the Ubuntu plugin for Qt Creator IDE
61 Qt Creator is a new, lightweight, cross-platform integrated development
62 environment (IDE) designed to make development with the Qt application
63 framework even faster and easier.
64 .
65 This package contains the runtime data files for the Ubuntu plugin for
66 Qt Creator IDE.
67
68Package: qtcreator-plugin-ubuntu-cordova
69Architecture: any
70Depends: cordova-ubuntu-2.8,
71 cordova-ubuntu-2.8-dev,
72 qtcreator-plugin-ubuntu (= ${binary:Version}),
73 qtcreator-plugin-ubuntu-cordova-common,
74 ${misc:Depends},
75Replaces: qtcreator-plugin-ubuntu (<= 2.7.1-0ubuntu9)
76Description: Cordova Ubuntu plugin for Qt Creator IDE
77 Qt Creator is a new, lightweight, cross-platform integrated development
78 environment (IDE) designed to make development with the Qt application
79 framework even faster and easier.
80 .
81 This package contains the Cordova Ubuntu plugin for Qt Creator.
82
83Package: qtcreator-plugin-ubuntu-cordova-common
84Architecture: all
85Depends: gksu,
86 ${misc:Depends},
87Recommends: qtcreator-plugin-ubuntu-cordova
88Replaces: qtcreator-plugin-ubuntu-cordova (<= 2.7.1-0ubuntu4),
89Conflicts: qtcreator-plugin-ubuntu-cordova (<= 2.7.1-0ubuntu4),
90Description: Common data files for Cordova Ubuntu plugin for Qt Creator IDE
91 Qt Creator is a new, lightweight, cross-platform integrated development
92 environment (IDE) designed to make development with the Qt application
93 framework even faster and easier.
94 .
95 This package contains a data package for the Cordova Ubuntu plugin
96 for Qt Creator IDE.
097
=== added file 'debian/copyright'
--- debian/copyright 1970-01-01 00:00:00 +0000
+++ debian/copyright 2013-11-20 07:28:27 +0000
@@ -0,0 +1,50 @@
1Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2Upstream-Name: qtcreator-plugin-ubuntu
3Source: https://code.launchpad.net/~ubuntu-sdk-team/qtcreator-plugin-ubuntu/trunk
4
5Files: *
6Copyright: 2013 Canonical Ltd.
7License: LGPL-2.1
8
9License: LGPL-2.1
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; version 2.1.
13 .
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18 .
19 You should have received a copy of the GNU Lesser General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 .
22 On Debian systems, the complete text of the GNU Lesser General Public
23 License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.
24
25Files: share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html
26 share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml
27 share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css
28License: Apache-2.0
29Copyright: 2012 The Apache Software Foundation
30
31License: Apache-2.0
32 Licensed to the Apache Software Foundation (ASF) under one
33 or more contributor license agreements. See the NOTICE file
34 distributed with this work for additional information
35 regarding copyright ownership. The ASF licenses this file
36 to you under the Apache License, Version 2.0 (the
37 "License"); you may not use this file except in compliance
38 with the License. You may obtain a copy of the License at
39 .
40 http://www.apache.org/licenses/LICENSE-2.0
41 .
42 Unless required by applicable law or agreed to in writing,
43 software distributed under the License is distributed on an
44 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
45 KIND, either express or implied. See the License for the
46 specific language governing permissions and limitations
47 under the License.
48 .
49 On Debian systems, the complete text of the Apache License, Version 2.0
50 can be found in `/usr/share/common-licenses/Apache-2.0'.
051
=== added file 'debian/qtcreator-plugin-ubuntu-common.install'
--- debian/qtcreator-plugin-ubuntu-common.install 1970-01-01 00:00:00 +0000
+++ debian/qtcreator-plugin-ubuntu-common.install 2013-11-20 07:28:27 +0000
@@ -0,0 +1,10 @@
1usr/bin/ubuntu-sdk
2usr/share/qtcreator/templates/wizards/ubuntu/backend
3usr/share/qtcreator/templates/wizards/ubuntu/webapp
4usr/share/qtcreator/templates/wizards/ubuntu/backendplustabs
5usr/share/qtcreator/templates/wizards/ubuntu/html5
6usr/share/qtcreator/templates/wizards/ubuntu/projectypes.json
7usr/share/qtcreator/templates/wizards/ubuntu/scope
8usr/share/qtcreator/templates/wizards/ubuntu/simple
9usr/share/qtcreator/templates/wizards/ubuntu/tabs
10usr/share/qtcreator/ubuntu
011
=== added file 'debian/qtcreator-plugin-ubuntu-cordova-common.install'
--- debian/qtcreator-plugin-ubuntu-cordova-common.install 1970-01-01 00:00:00 +0000
+++ debian/qtcreator-plugin-ubuntu-cordova-common.install 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
1usr/share/qtcreator/templates/wizards/ubuntu/cordovaubuntu
02
=== added file 'debian/qtcreator-plugin-ubuntu-cordova.install'
--- debian/qtcreator-plugin-ubuntu-cordova.install 1970-01-01 00:00:00 +0000
+++ debian/qtcreator-plugin-ubuntu-cordova.install 2013-11-20 07:28:27 +0000
@@ -0,0 +1,3 @@
1src/cordovaubuntuprojectmanager/CordovaUbuntuProject.mimetypes.xml usr/share/mime/packages/
2usr/lib/*/qtcreator/plugins/Canonical/CordovaUbuntuProjectManager.pluginspec
3usr/lib/*/qtcreator/plugins/Canonical/libCordovaUbuntuProjectManager.so
04
=== added file 'debian/qtcreator-plugin-ubuntu.install'
--- debian/qtcreator-plugin-ubuntu.install 1970-01-01 00:00:00 +0000
+++ debian/qtcreator-plugin-ubuntu.install 2013-11-20 07:28:27 +0000
@@ -0,0 +1,4 @@
1debian/ubuntusdk.desktop usr/share/applications
2ubuntu-qtcreator.png usr/share/icons
3usr/lib/*/qtcreator/plugins/Canonical/Ubuntu.pluginspec
4usr/lib/*/qtcreator/plugins/Canonical/libUbuntu.so
05
=== added file 'debian/rules'
--- debian/rules 1970-01-01 00:00:00 +0000
+++ debian/rules 2013-11-20 07:28:27 +0000
@@ -0,0 +1,29 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
7export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
8export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
9export QT_SELECT := qt5
10
11DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
12
13# -----------------------------------
14
15%:
16 dh $@ --fail-missing
17
18override_dh_auto_configure:
19 mkdir -p builddir
20 dh_auto_configure -- IDE_LIBRARY_BASENAME=lib/$(DEB_HOST_MULTIARCH)
21
22override_dh_auto_install:
23 mkdir -p $(CURDIR)/debian/tmp/usr/bin
24 ln -s /usr/bin/qtcreator debian/tmp/usr/bin/ubuntu-sdk
25 cp -r $(CURDIR)/share $(CURDIR)/debian/tmp/usr
26 dh_auto_install --destdir=debian/tmp/usr
27
28override_dh_shlibdeps:
29 dh_shlibdeps -XlibUbuntu.so -XlibCordovaUbuntuProjectManager.so
030
=== added file 'debian/ubuntusdk.desktop'
--- debian/ubuntusdk.desktop 1970-01-01 00:00:00 +0000
+++ debian/ubuntusdk.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,11 @@
1[Desktop Entry]
2Exec=qtcreator %F
3Icon=ubuntu-qtcreator
4Type=Application
5Terminal=false
6Name=Ubuntu SDK
7GenericName=Integrated Development Environment
8MimeType=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;
9Categories=Qt;Development;IDE;
10InitialPreference=9
11Keywords=Ubuntu SDK;SDK;Ubuntu Touch;Qt Creator;Qt
012
=== added file 'qtcreator-plugin-ubuntu.pro'
--- qtcreator-plugin-ubuntu.pro 1970-01-01 00:00:00 +0000
+++ qtcreator-plugin-ubuntu.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,2 @@
1TEMPLATE = subdirs
2SUBDIRS = src/ubuntu src/cordovaubuntuprojectmanager
03
=== added directory 'share'
=== added directory 'share/qtcreator'
=== added directory 'share/qtcreator/templates'
=== added directory 'share/qtcreator/templates/wizards'
=== added directory 'share/qtcreator/templates/wizards/ubuntu'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro'
--- share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/displayName.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1TEMPLATE = subdirs
2SUBDIRS = modules/%DISPLAYNAME%
3
4check.target = check
5check.commands = qmltestrunner -import modules -platform ubuntu
6check.depends = modules/%DISPLAYNAME%
7QMAKE_EXTRA_TARGETS += check
8
09
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/modules'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.cpp 2013-11-20 07:28:27 +0000
@@ -0,0 +1,17 @@
1#include <QtQml>
2#include <QtQml/QQmlContext>
3#include "backend.h"
4#include "mytype.h"
5
6
7void BackendPlugin::registerTypes(const char *uri)
8{
9 Q_ASSERT(uri == QLatin1String("%DISPLAYNAME%"));
10
11 qmlRegisterType<MyType>(uri, 1, 0, "MyType");
12}
13
14void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
15{
16 QQmlExtensionPlugin::initializeEngine(engine, uri);
17}
018
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/backend.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,38 @@
1#ifndef BACKEND_PLUGIN_H
2#define BACKEND_PLUGIN_H
3
4#include <QtQml/QQmlEngine>
5#include <QtQml/QQmlExtensionPlugin>
6
7/*
8 ----8<-----
9
10 import %DISPLAYNAME% 1.0
11
12 Rectangle {
13 width: 200
14 height: 200
15
16 MyType {
17 id: helloType
18 }
19
20 Text {
21 anchors.centerIn: parent
22 text: helloType.helloworld
23 }
24 }
25
26 -----8<------
27*/
28class BackendPlugin : public QQmlExtensionPlugin
29{
30 Q_OBJECT
31 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
32
33public:
34 void registerTypes(const char *uri);
35 void initializeEngine(QQmlEngine *engine, const char *uri);
36};
37#endif // BACKEND_PLUGIN_H
38
039
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/displayName.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,34 @@
1TEMPLATE = lib
2TARGET = %DISPLAYNAME%
3QT += qml quick
4CONFIG += qt plugin no_keywords
5
6#comment in the following line to disable traces
7DEFINES += QT_NO_DEBUG_OUTPUT
8
9TARGET = $$qtLibraryTarget($$TARGET)
10uri = %DISPLAYNAME%
11
12INCLUDEPATH += .
13
14# Input
15HEADERS += backend.h mytype.h
16SOURCES += backend.cpp mytype.cpp
17
18# Install path for the plugin
19installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
20target.path = $$installPath
21INSTALLS += target
22
23# find files
24QMLDIR_FILE = qmldir
25
26# make visible to qt creator
27OTHER_FILES += $$QMLDIR_FILE
28
29# create install targets for files
30qmldir.path = $$installPath
31qmldir.files = $$QMLDIR_FILE
32
33INSTALLS += qmldir
34
035
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.cpp 2013-11-20 07:28:27 +0000
@@ -0,0 +1,12 @@
1#include "mytype.h"
2
3MyType::MyType(QObject *parent) :
4 QObject(parent),
5 m_message("")
6{
7
8}
9
10MyType::~MyType() {
11
12}
013
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/mytype.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,25 @@
1#ifndef MYTYPE_H
2#define MYTYPE_H
3
4#include <QObject>
5
6class MyType : public QObject
7{
8 Q_OBJECT
9 Q_PROPERTY( QString helloWorld READ helloWorld WRITE setHelloWorld NOTIFY helloWorldChanged )
10
11public:
12 explicit MyType(QObject *parent = 0);
13 ~MyType();
14
15Q_SIGNALS:
16 void helloWorldChanged();
17
18protected:
19 QString helloWorld() { return m_message; }
20 void setHelloWorld(QString msg) { m_message = msg; Q_EMIT helloWorldChanged(); }
21
22 QString m_message;
23};
24
25#endif // MYTYPE_H
026
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir'
--- share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/modules/displayName/qmldir 2013-11-20 07:28:27 +0000
@@ -0,0 +1,2 @@
1module %DISPLAYNAME%
2plugin %DISPLAYNAME%
03
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/tests'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backend/tests/unit'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml'
--- share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backend/tests/unit/tst_mytype.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.0
2import QtTest 1.0
3import Ubuntu.Components 0.1
4import %DISPLAYNAME% 1.0
5
6// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
7
8// Execute tests with:
9// qmltestrunner
10
11Item {
12 // The objects
13 MyType {
14 id: objectUnderTest
15 }
16
17 TestCase {
18 name: "MyType"
19
20 function init() {
21 console.debug(">> init");
22 compare("",objectUnderTest.helloWorld,"text was not empty on init");
23 console.debug("<< init");
24 }
25
26 function cleanup() {
27 console.debug(">> cleanup");
28 console.debug("<< cleanup");
29 }
30
31 function initTestCase() {
32 console.debug(">> initTestCase");
33 console.debug("<< initTestCase");
34 }
35
36 function cleanupTestCase() {
37 console.debug(">> cleanupTestCase");
38 console.debug("<< cleanupTestCase");
39 }
40
41 function test_canReadAndWriteText() {
42 var expected = "Hello World 2";
43
44 objectUnderTest.helloWorld = expected;
45
46 compare(expected,objectUnderTest.helloWorld,"expected did not equal result");
47 }
48 }
49}
050
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/Makefile 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1# More information: https://wiki.ubuntu.com/Touch/Testing
2#
3# Notes for autopilot tests:
4# -----------------------------------------------------------
5# In order to run autopilot tests:
6# sudo apt-add-repository ppa:autopilot/ppa
7# sudo apt-get update
8# sudo apt-get install python-autopilot autopilot-qt
9#############################################################
10
11all:
12
13autopilot:
14 chmod +x tests/autopilot/run
15 tests/autopilot/run
16
17check:
18 qmltestrunner -input tests/unit -import ../backend/modules
19
20run:
21 /usr/bin/qmlscene -I ../backend/modules $@ %DISPLAYNAME%.qml
022
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/components/HelloComponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,14 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4UbuntuShape {
5 width: 200
6 height: width
7
8 property alias text : myText.text
9
10 Label {
11 id: myText
12 anchors.centerIn: parent
13 }
14}
015
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=My project description
4Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
5Icon=qmlscene
6Terminal=false
7Type=Application
8X-Ubuntu-Touch=true
09
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/displayName.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,38 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "ui"
4
5/*!
6 \brief MainView with Tabs element.
7 First Tab has a single Label and
8 second Tab has a single ToolbarAction.
9*/
10
11MainView {
12 // objectName for functional testing purposes (autopilot-qt5)
13 objectName: "mainView"
14
15 // Note! applicationName needs to match the "name" field of the click manifest
16 applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
17
18 /*
19 This property enables the application to change orientation
20 when the device is rotated. The default is false.
21 */
22 //automaticOrientation: true
23
24 width: units.gu(100)
25 height: units.gu(75)
26
27 Tabs {
28 id: tabs
29
30 HelloTab {
31 objectName: "helloTab"
32 }
33
34 WorldTab {
35 objectName: "worldTab"
36 }
37 }
38}
039
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/graphics/toolbarIcon@8.png'
1Binary 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:28:27 +0000 differ40Binary 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:28:27 +0000 differ
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,132 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Ubuntu Touch App autopilot tests."""
4
5from os import remove
6import os.path
7from tempfile import mktemp
8import subprocess
9
10from autopilot.input import Mouse, Touch, Pointer
11from autopilot.matchers import Eventually
12from autopilot.platform import model
13from testtools.matchers import Is, Not, Equals
14from autopilot.testcase import AutopilotTestCase
15
16def get_module_include_path():
17 return os.path.abspath(
18 os.path.join(
19 os.path.dirname(__file__),
20 '..',
21 '..',
22 '..',
23 '..',
24 'backend',
25 'modules')
26 )
27
28
29class UbuntuTouchAppTestCase(AutopilotTestCase):
30 """A common test case class that provides several useful methods for the tests."""
31
32 if model() == 'Desktop':
33 scenarios = [
34 ('with mouse', dict(input_device_class=Mouse))
35 ]
36 else:
37 scenarios = [
38 ('with touch', dict(input_device_class=Touch))
39 ]
40
41 @property
42 def main_window(self):
43 return MainWindow(self.app)
44
45
46 def setUp(self):
47 self.pointing_device = Pointer(self.input_device_class.create())
48 super(UbuntuTouchAppTestCase, self).setUp()
49 self.launch_test_qml()
50
51
52 def launch_test_qml(self):
53 # If the test class has defined a 'test_qml' class attribute then we
54 # write it to disk and launch it inside the QML Scene. If not, then we
55 # silently do nothing (presumably the test has something else planned).
56 arch = subprocess.check_output(["dpkg-architecture",
57 "-qDEB_HOST_MULTIARCH"]).strip()
58 if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
59 qml_path = mktemp(suffix='.qml')
60 open(qml_path, 'w').write(self.test_qml)
61 self.addCleanup(remove, qml_path)
62
63 self.app = self.launch_test_application(
64 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
65 "-I", get_module_include_path(),
66 qml_path,
67 app_type='qt')
68
69 if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
70 qml_path = self.test_qml_file
71 self.app = self.launch_test_application(
72 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
73 "-I", get_module_include_path(),
74 qml_path,
75 app_type='qt')
76
77 self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
78
79
80 def get_qml_view(self):
81 """Get the main QML view"""
82
83 return self.app.select_single("QQuickView")
84
85 def get_mainview(self):
86 """Get the QML MainView"""
87
88 mainView = self.app.select_single("MainView")
89 self.assertThat(mainView, Not(Is(None)))
90 return mainView
91
92
93 def get_object(self,objectName):
94 """Get a object based on the objectName"""
95
96 obj = self.app.select_single(objectName=objectName)
97 self.assertThat(obj, Not(Is(None)))
98 return obj
99
100
101 def mouse_click(self,objectName):
102 """Move mouse on top of the object and click on it"""
103
104 obj = self.get_object(objectName)
105 self.pointing_device.move_to_object(obj)
106 self.pointing_device.click()
107
108
109 def mouse_press(self,objectName):
110 """Move mouse on top of the object and press mouse button (without releasing it)"""
111
112 obj = self.get_object(objectName)
113 self.pointing_device.move_to_object(obj)
114 self.pointing_device.press()
115
116
117 def mouse_release(self):
118 """Release mouse button"""
119
120 self.pointing_device.release()
121
122
123 def type_string(self, string):
124 """Type a string with keyboard"""
125
126 self.keyboard.type(string)
127
128
129 def type_key(self, key):
130 """Type a single key with keyboard"""
131
132 self.keyboard.key(key)
0133
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
1""" A main.qml test suite """
02
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Tests for the Hello World"""
4
5from autopilot.matchers import Eventually
6from textwrap import dedent
7from testtools.matchers import Is, Not, Equals
8from testtools import skip
9import os
10from %DISPLAYNAME% import UbuntuTouchAppTestCase
11
12
13class MainTests(UbuntuTouchAppTestCase):
14 """Generic tests for the Hello World"""
15
16 test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
17
18 def test_0_can_select_mainView(self):
19 """Must be able to select the mainview."""
20
21 mainView = self.get_mainview()
22 self.assertThat(mainView.visible,Eventually(Equals(True)))
23
024
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/autopilot/run 2013-11-20 07:28:27 +0000
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3if [[ -z `which autopilot` ]]; then
4 echo "Autopilot is not installed. Skip"
5 exit
6fi
7
8SCRIPTPATH=`dirname $0`
9pushd ${SCRIPTPATH}
10autopilot run %DISPLAYNAME%
11popd
012
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/tests/unit/tst_hellocomponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.0
2import QtTest 1.0
3import Ubuntu.Components 0.1
4import "../../components"
5
6// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
7
8// Execute tests with:
9// qmltestrunner
10
11Item {
12 // The objects
13 HelloComponent {
14 id: objectUnderTest
15 }
16
17 TestCase {
18 name: "HelloComponent"
19
20 function init() {
21 console.debug(">> init");
22 compare("",objectUnderTest.text,"text was not empty on init");
23 console.debug("<< init");
24 }
25
26 function cleanup() {
27 console.debug(">> cleanup");
28 console.debug("<< cleanup");
29 }
30
31 function initTestCase() {
32 console.debug(">> initTestCase");
33 console.debug("<< initTestCase");
34 }
35
36 function cleanupTestCase() {
37 console.debug(">> cleanupTestCase");
38 console.debug("<< cleanupTestCase");
39 }
40
41 function test_canReadAndWriteText() {
42 var expected = "Hello World";
43
44 objectUnderTest.text = expected;
45
46 compare(expected,objectUnderTest.text,"expected did not equal result");
47 }
48 }
49}
050
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/HelloTab.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,39 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import %DISPLAYNAME% 1.0
4import "../components"
5
6Tab {
7 title: i18n.tr("Hello..")
8
9 page: Page {
10 Column {
11 spacing: units.gu(2)
12 anchors.centerIn: parent
13
14 MyType {
15 id: myType
16
17 Component.onCompleted: {
18 myType.helloWorld = "Cpp Backend + Tabbed UI"
19 }
20 }
21
22 HelloComponent {
23 objectName: "helloTab_HelloComponent"
24
25 anchors.horizontalCenter: parent.horizontalCenter
26
27 text: i18n.tr(myType.helloWorld)
28 }
29
30 Label {
31 objectName: "helloTab_label"
32
33 anchors.horizontalCenter: parent.horizontalCenter
34
35 text: i18n.tr("You can change the Tab from Page title above.")
36 }
37 }
38 }
39}
040
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTab.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,35 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "../components"
4
5Tab {
6 title: i18n.tr("..World!")
7
8 page: Page {
9 tools: WorldTabTools {
10 objectName: "worldTab_tools"
11 }
12
13 Column {
14 spacing: units.gu(2)
15 anchors.centerIn: parent
16
17 HelloComponent {
18 objectName: "worldTab_HelloComponent"
19
20 anchors.horizontalCenter: parent.horizontalCenter
21
22 text: i18n.tr("WorldTab")
23 }
24
25 Label {
26 id: label
27 objectName: "worldTab_label"
28
29 anchors.horizontalCenter: parent.horizontalCenter
30
31 text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
32 }
33 }
34 }
35}
036
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/app/ui/WorldTabTools.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,13 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4ToolbarItems {
5 ToolbarButton {
6 iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
7 text: i18n.tr("Tap me!")
8
9 onTriggered: {
10 label.text = i18n.tr("Toolbar tapped")
11 }
12 }
13}
014
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/backend.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,10 @@
1TEMPLATE = subdirs
2SUBDIRS = modules/%DISPLAYNAME%
3
4OTHER_FILES += $$system(find tests -type f)
5
6check.target = check
7check.commands = qmltestrunner -import modules -platform ubuntu
8check.depends = modules/%DISPLAYNAME%
9QMAKE_EXTRA_TARGETS += check
10
011
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.cpp 2013-11-20 07:28:27 +0000
@@ -0,0 +1,17 @@
1#include <QtQml>
2#include <QtQml/QQmlContext>
3#include "backend.h"
4#include "mytype.h"
5
6
7void BackendPlugin::registerTypes(const char *uri)
8{
9 Q_ASSERT(uri == QLatin1String("%DISPLAYNAME%"));
10
11 qmlRegisterType<MyType>(uri, 1, 0, "MyType");
12}
13
14void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
15{
16 QQmlExtensionPlugin::initializeEngine(engine, uri);
17}
018
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/backend.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,38 @@
1#ifndef BACKEND_PLUGIN_H
2#define BACKEND_PLUGIN_H
3
4#include <QtQml/QQmlEngine>
5#include <QtQml/QQmlExtensionPlugin>
6
7/*
8 ----8<-----
9
10 import %DISPLAYNAME% 1.0
11
12 Rectangle {
13 width: 200
14 height: 200
15
16 MyType {
17 id: helloType
18 }
19
20 Text {
21 anchors.centerIn: parent
22 text: helloType.helloworld
23 }
24 }
25
26 -----8<------
27*/
28class BackendPlugin : public QQmlExtensionPlugin
29{
30 Q_OBJECT
31 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
32
33public:
34 void registerTypes(const char *uri);
35 void initializeEngine(QQmlEngine *engine, const char *uri);
36};
37#endif // BACKEND_PLUGIN_H
38
039
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/displayName.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,34 @@
1TEMPLATE = lib
2TARGET = %DISPLAYNAME%
3QT += qml quick
4CONFIG += qt plugin no_keywords
5
6#comment in the following line to disable traces
7DEFINES += QT_NO_DEBUG_OUTPUT
8
9TARGET = $$qtLibraryTarget($$TARGET)
10uri = %DISPLAYNAME%
11
12INCLUDEPATH += .
13
14# Input
15HEADERS += backend.h mytype.h
16SOURCES += backend.cpp mytype.cpp
17
18# Install path for the plugin
19installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
20target.path = $$installPath
21INSTALLS += target
22
23# find files
24QMLDIR_FILE = qmldir
25
26# make visible to qt creator
27OTHER_FILES += $$QMLDIR_FILE
28
29# create install targets for files
30qmldir.path = $$installPath
31qmldir.files = $$QMLDIR_FILE
32
33INSTALLS += qmldir
34
035
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.cpp 2013-11-20 07:28:27 +0000
@@ -0,0 +1,12 @@
1#include "mytype.h"
2
3MyType::MyType(QObject *parent) :
4 QObject(parent),
5 m_message("")
6{
7
8}
9
10MyType::~MyType() {
11
12}
013
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/mytype.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,25 @@
1#ifndef MYTYPE_H
2#define MYTYPE_H
3
4#include <QObject>
5
6class MyType : public QObject
7{
8 Q_OBJECT
9 Q_PROPERTY( QString helloWorld READ helloWorld WRITE setHelloWorld NOTIFY helloWorldChanged )
10
11public:
12 explicit MyType(QObject *parent = 0);
13 ~MyType();
14
15Q_SIGNALS:
16 void helloWorldChanged();
17
18protected:
19 QString helloWorld() { return m_message; }
20 void setHelloWorld(QString msg) { m_message = msg; Q_EMIT helloWorldChanged(); }
21
22 QString m_message;
23};
24
25#endif // MYTYPE_H
026
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/modules/displayName/qmldir 2013-11-20 07:28:27 +0000
@@ -0,0 +1,2 @@
1module %DISPLAYNAME%
2plugin %DISPLAYNAME%
03
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit'
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/backend/tests/unit/tst_mytype.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.0
2import QtTest 1.0
3import Ubuntu.Components 0.1
4import %DISPLAYNAME% 1.0
5
6// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
7
8// Execute tests with:
9// qmltestrunner
10
11Item {
12 // The objects
13 MyType {
14 id: objectUnderTest
15 }
16
17 TestCase {
18 name: "MyType"
19
20 function init() {
21 console.debug(">> init");
22 compare("",objectUnderTest.helloWorld,"text was not empty on init");
23 console.debug("<< init");
24 }
25
26 function cleanup() {
27 console.debug(">> cleanup");
28 console.debug("<< cleanup");
29 }
30
31 function initTestCase() {
32 console.debug(">> initTestCase");
33 console.debug("<< initTestCase");
34 }
35
36 function cleanupTestCase() {
37 console.debug(">> cleanupTestCase");
38 console.debug("<< cleanupTestCase");
39 }
40
41 function test_canReadAndWriteText() {
42 var expected = "Hello World 2";
43
44 objectUnderTest.helloWorld = expected;
45
46 compare(expected,objectUnderTest.helloWorld,"expected did not equal result");
47 }
48 }
49}
050
=== added file 'share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro'
--- share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/backendplustabs/displayName.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,11 @@
1TEMPLATE = subdirs
2
3SUBDIRS += \
4 backend
5
6OTHER_FILES += $$system(find app -type f)
7
8check.target = check
9check.commands = cd backend; qmake; make; make check; cd ../app; make check
10check.depends = backend
11QMAKE_EXTRA_TARGETS += check
012
=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu'
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/app.js 2013-11-20 07:28:27 +0000
@@ -0,0 +1,27 @@
1/* Create UI instance */
2
3var UI = new UbuntuUI();
4
5/* Initializatino after window load */
6window.onload = function () {
7 /* REQUIRED: initialize UI */
8 UI.init();
9
10 /* Start pagestack with main page */
11 UI.pagestack.push("main");
12
13 /* GUI intial state: show loading dialog (is removed on deviceready event) */
14 UI.dialog("loading").show();
15
16 /* Connect button to function */
17 UI.button("devicereadyOK").click(function() {
18 UI.dialog("deviceready").hide();
19 });
20
21};
22
23/* Respond to deviceready event */
24document.addEventListener("deviceready", function() {
25 UI.dialog("loading").hide();
26 UI.dialog("deviceready").show();
27 }, false);
028
=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css'
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/css/index.css 2013-11-20 07:28:27 +0000
@@ -0,0 +1,57 @@
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19* {
20 -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
21}
22
23body {
24 -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
25 -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
26 -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
27 background-color:#E4E4E4;
28 background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
29 background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
30 background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
31 background-image:-webkit-gradient(
32 linear,
33 left top,
34 left bottom,
35 color-stop(0, #A7A7A7),
36 color-stop(0.51, #E4E4E4)
37 );
38 background-attachment:fixed;
39 font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
40 font-size:12px;
41 height:100%;
42 margin:0px;
43 padding:0px;
44 text-transform:uppercase;
45 width:100%;
46}
47@keyframes fade {
48 from { opacity: 1.0; }
49 50% { opacity: 0.4; }
50 to { opacity: 1.0; }
51}
52
53@-webkit-keyframes fade {
54 from { opacity: 1.0; }
55 50% { opacity: 0.4; }
56 to { opacity: 1.0; }
57}
058
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/displayName.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=Description of %DISPLAYNAME%
4Exec=cordova-ubuntu-2.8 .
5Icon=qmlscene
6Terminal=false
7Type=Application
8X-Ubuntu-Touch=true
09
=== added directory 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img'
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/img/logo.png'
1Binary 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:28:27 +0000 differ10Binary 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:28:27 +0000 differ
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/index.html 2013-11-20 07:28:27 +0000
@@ -0,0 +1,90 @@
1<!DOCTYPE html>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19-->
20<html>
21 <head>
22 <meta charset="utf-8" />
23 <meta name="format-detection" content="telephone=no" />
24 <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" />
25 <link rel="stylesheet" type="text/css" href="css/index.css" />
26
27 <!-- Use Ubuntu Cordova -->
28 <script language="javascript" type="text/javascript" src="file:///usr/share/cordova-ubuntu-2.8/www/cordova-2.8.js"></script>
29
30 <!-- Ubuntu UI Style imports - Ambiance theme -->
31 <link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
32
33 <!-- Ubuntu UI javascript imports - Ambiance theme -->
34 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
35 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
36 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
37 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
38 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>
39
40 <!-- Application script -->
41 <script src="app.js"></script>
42
43 <title>Hello World Cordova</title>
44 </head>
45
46 <body>
47
48 <div data-role="page">
49
50 <header data-role="header">
51 <nav data-role="navbar" class="tabs" >
52 <div class="tabs-inner">
53 <ul>
54 <li class="active" role="tab">
55 <a href="#item1" class="tab-item">HTML5/Cordova</a>
56 </li>
57 </ul>
58 </div>
59 </nav>
60 </header>
61
62 <div data-role="content">
63 <div data-role="pagestack">
64 <div data-role="page" id="main">
65 <h1>Apache Cordova Loaded</h1>
66 <img src="img/logo.png"/>
67 </div>
68 </div>
69 </div>
70
71 <div data-role="dialog" id="loading">
72 <section>
73 <h1>Apache Cordova Loading</h1>
74 <progress></progress>
75 </section>
76 </div>
77
78 <div data-role="dialog" id="deviceready">
79 <section>
80 <h1>Deviceready event received</h1>
81 <button data-role="button" id="devicereadyOK" class="success">OK</button>
82 </section>
83 </div>
84 </div>
85 </body>
86</html>
87
88
89
90
091
=== added file 'share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml'
--- share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/cordovaubuntu/plugins.xml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,43 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3
4 Licensed to the Apache Software Foundation (ASF) under one
5 or more contributor license agreements. See the NOTICE file
6 distributed with this work for additional information
7 regarding copyright ownership. The ASF licenses this file
8 to you under the Apache License, Version 2.0 (the
9 "License"); you may not use this file except in compliance
10 with the License. You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing,
15 software distributed under the License is distributed on an
16 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 KIND, either express or implied. See the License for the
18 specific language governing permissions and limitations
19 under the License.
20
21-->
22
23<plugins>
24 <plugin name="File" value="com.cordova.File"/>
25 <plugin name="Notification" value="com.cordova.Notification"/>
26 <plugin name="Accelerometer" value="com.cordova.Accelerometer"/>
27 <plugin name="Events" value="com.cordova.Events"/>
28 <plugin name="Geolocation" value="com.cordova.Geolocation"/>
29 <plugin name="Device" value="com.cordova.Device"/>
30 <plugin name="Console" value="com.cordova.Console"/>
31 <plugin name="Connection" value="com.cordova.Connection"/>
32 <plugin name="Compass" value="com.cordova.Compass"/>
33 <plugin name="Camera" value="com.cordova.Camera"/>
34 <plugin name="Contacts" value="com.cordova.Contacts"/>
35 <plugin name="Media" value="com.cordova.Media"/>
36 <plugin name="Globalization" value="com.cordova.Globalization"/>
37 <plugin name="Capture" value="com.cordova.Capture"/>
38 <plugin name="Splashscreen" value="com.cordova.Splashscreen"/>
39 <plugin name="InAppBrowser" value="com.cordova.InAppBrowser"/>
40
41<!-- Non-standard -->
42 <plugin name="App" value="com.cordova.App"/>
43</plugins>
044
=== added directory 'share/qtcreator/templates/wizards/ubuntu/html5'
=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop'
--- share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/html5/displayName.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=My project description
4Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
5Icon=qmlscene
6Terminal=false
7Type=Application
8X-Ubuntu-Touch=true
09
=== added directory 'share/qtcreator/templates/wizards/ubuntu/html5/html'
=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/html/app.js'
--- share/qtcreator/templates/wizards/ubuntu/html5/html/app.js 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/html5/html/app.js 2013-11-20 07:28:27 +0000
@@ -0,0 +1,22 @@
1window.onload = function () {
2 var UI = new UbuntuUI();
3 UI.init();
4
5 UI.pagestack.push("main");
6
7 UI.button('pressme').click(function () {
8 UI.dialog('mydialog').show();
9 });
10
11 UI.button('yes').click(function () {
12 UI.dialog('mydialog').hide();
13 });
14
15 [].forEach.call(document.querySelectorAll('[data-role="list"] li a'),
16 function (a) {
17 a.onclick = function (e) {
18 UI.pagestack.push("item-view");
19 };
20 });
21};
22
023
=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/html/index.html'
--- share/qtcreator/templates/wizards/ubuntu/html5/html/index.html 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/html5/html/index.html 2013-11-20 07:28:27 +0000
@@ -0,0 +1,75 @@
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset="utf-8">
5 <title>Ubuntu SDK: HTML5 App</title>
6 <meta name="description" content="An example HTML5 application">
7 <meta name="viewport" content="width=device-width">
8
9 <!-- Ubuntu UI Style imports - Ambiance theme -->
10 <link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
11
12 <!-- Ubuntu UI javascript imports - Ambiance theme -->
13 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
14 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
15 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
16 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
17 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>
18 <script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/popovers.js"></script>
19
20 <!-- Application script -->
21 <script src="app.js"></script>
22 </head>
23 <body>
24 <div data-role="page">
25
26 <header data-role="header">
27 <nav data-role="navbar" class="tabs" >
28 <div class="tabs-inner">
29 <ul>
30 <li class="active" role="tab">
31 <a href="#item1" class="tab-item">My Header</a>
32 </li>
33 </ul>
34 </div>
35 </nav>
36 </header>
37
38 <div data-role="content">
39
40 <div data-role="pagestack">
41
42 <div data-role="page" id="main">
43 <section data-role="list">
44 <ul data-role="listview">
45 <li><a href="#">My Item 1</a></li>
46 <li><a href="#">My Item 2</a></li>
47 <li><a href="#">My Item 3</a></li>
48 </ul>
49 </section>
50
51 <button data-role="button" class="success" id="pressme">Press Me!</button>
52 </div>
53
54 <div data-role="page" id="item-view">
55 <h1>Hello from page2</h1>
56 <section data-role="list" id="item-view-content">
57 </section>
58 </div>
59
60 </div>
61
62 <!-- PageStack -->
63 <div data-role="dialog" id="mydialog">
64 <section>
65 <h1>Hello world!</h1>
66 <menu>
67 <button data-role="button" class="success" id="yes">OK</button>
68 </menu>
69 </section>
70 </div>
71
72 </div>
73 </div>
74 </body>
75</html>
0\ No newline at end of file76\ No newline at end of file
177
=== added file 'share/qtcreator/templates/wizards/ubuntu/html5/main.qml'
--- share/qtcreator/templates/wizards/ubuntu/html5/main.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/html5/main.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,35 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import QtWebKit 3.0
4
5/*!
6 \brief MainView with a Flickable WebView.
7*/
8
9MainView {
10 // objectName for functional testing purposes (autopilot-qt5)
11 objectName: "mainView"
12
13 // Note! applicationName needs to match the "name" field of the click manifest
14 applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
15
16 /*
17 This property enables the application to change orientation
18 when the device is rotated. The default is false.
19 */
20 automaticOrientation: true
21
22 width: units.gu(100)
23 height: units.gu(75)
24
25 Flickable {
26 id: webViewFlickable
27 anchors.fill: parent
28
29 WebView {
30 id: webView
31 anchors.fill: parent
32 url: "html/index.html"
33 }
34 }
35}
036
=== added file 'share/qtcreator/templates/wizards/ubuntu/projectypes.json'
--- share/qtcreator/templates/wizards/ubuntu/projectypes.json 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/projectypes.json 2013-11-20 07:28:27 +0000
@@ -0,0 +1,217 @@
1[
2 {
3 "type": "qmlproject",
4 "folder": "simple",
5 "displayName": "Simple Touch UI",
6 "id": "UbuntuAppSimple",
7 "description": "A simple Ubuntu Touch UI with a Label and a Button.\n\nIncludes also unit and functional tests.",
8 "mainFile" : "main.qml",
9 "hasTests" : true,
10 "files": [
11 {
12 "fileName": "displayName.desktop"
13 },
14 {
15 "fileName": "tests/unit/tst_hellocomponent.qml"
16 },
17 {
18 "fileName": "components/HelloComponent.qml"
19 },
20 {
21 "fileName": "Makefile"
22 },
23 {
24 "fileName": "tests/autopilot/run"
25 },
26 {
27 "fileName": "tests/autopilot/displayName/main/test_main.py"
28 },
29 {
30 "fileName": "tests/autopilot/displayName/__init__.py"
31 },
32 {
33 "fileName": "tests/autopilot/displayName/main/__init__.py"
34 }
35 ]
36 },
37 {
38 "type": "scriptgeneratedproject",
39 "folder": "webapp",
40 "displayName": "Webapp",
41 "id": "UbuntuWebApp",
42 "description": "A simple webapp template",
43 "mainFile": "app.desktop",
44 "hasTests": false,
45 "files": [
46 {
47 "fileName": "app.json"
48 }
49 ]
50 },
51 {
52 "type": "qmlproject",
53 "folder": "tabs",
54 "displayName": "Tabbed Touch UI",
55 "id": "UbuntuAppTabs",
56 "description": "A multi-page Ubuntu Touch UI using the Tabs component.\n\nIncludes also unit and functional tests.",
57 "mainFile" : "main.qml",
58 "hasTests" : true,
59 "files": [
60 {
61 "fileName": "graphics/toolbarIcon@8.png"
62 },
63 {
64 "fileName": "displayName.desktop"
65 },
66 {
67 "fileName": "tests/unit/tst_hellocomponent.qml"
68 },
69 {
70 "fileName": "components/HelloComponent.qml"
71 },
72 {
73 "fileName": "ui/WorldTabTools.qml"
74 },
75 {
76 "fileName": "ui/WorldTab.qml"
77 },
78 {
79 "fileName": "ui/HelloTab.qml"
80 },
81 {
82 "fileName": "Makefile"
83 },
84 {
85 "fileName": "tests/autopilot/run"
86 },
87 {
88 "fileName": "tests/autopilot/displayName/main/test_main.py"
89 },
90 {
91 "fileName": "tests/autopilot/displayName/__init__.py"
92 },
93 {
94 "fileName": "tests/autopilot/displayName/main/__init__.py"
95 }
96 ]
97 },
98 {
99 "type": "qmlproject",
100 "folder": "html5",
101 "displayName": "HTML5 Touch UI",
102 "id": "UbuntuAppWebView",
103 "description": "An HTML5 UI using the QML WebView component",
104 "mainFile" : "main.qml",
105 "files": [
106 {
107 "fileName": "displayName.desktop"
108 },
109 {
110 "fileName": "html/index.html"
111 },
112 {
113 "fileName": "html/app.js"
114 }
115 ]
116 },
117 {
118 "type": "cordovaproject",
119 "folder": "cordovaubuntu",
120 "displayName": "Cordova Ubuntu HTML5 Touch UI",
121 "id": "UbuntuCordovaUbuntuProject",
122 "description": "An HTML5 app that makes use of the Apache Cordova APIs with a native Ubuntu Touch look and feel",
123 "mainFile" : "index.html",
124 "files": [
125 {
126 "fileName": "css/index.css"
127 },
128 {
129 "fileName": "img/logo.png"
130 },
131 {
132 "fileName": "plugins.xml"
133 },
134 {
135 "fileName": "displayName.desktop"
136 }
137
138 ]
139 },
140 {
141 "type": "pro",
142 "folder": "backend",
143 "displayName": "QML Extension Library",
144 "id": "UbuntuAppWBackend",
145 "description": "A simple C++ based QML Extension Library.\n\nIncludes also a unit test.",
146 "mainFile" : "modules/displayName/backend.h",
147 "projectFile" : "displayName.pro",
148 "files": [
149 { "fileName": "modules/displayName/displayName.pro" },
150 { "fileName": "modules/displayName/backend.cpp" },
151 { "fileName": "modules/displayName/mytype.h" },
152 { "fileName": "modules/displayName/mytype.cpp" },
153 { "fileName": "modules/displayName/qmldir" },
154 { "fileName": "tests/unit/tst_mytype.qml" }
155 ]
156 },
157 {
158 "type": "pro",
159 "folder": "backendplustabs",
160 "displayName": "QML Extension Library + Tabbed Touch UI",
161 "id": "UbuntuAppWBackendPlusTabs",
162 "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",
163 "mainFile" : "backend/modules/displayName/backend.h",
164 "projectFile" : "displayName.pro",
165 "files": [
166 { "fileName": "backend/modules/displayName/displayName.pro" },
167 { "fileName": "backend/modules/displayName/backend.cpp" },
168 { "fileName": "backend/modules/displayName/mytype.h" },
169 { "fileName": "backend/modules/displayName/mytype.cpp" },
170 { "fileName": "backend/modules/displayName/qmldir" },
171 { "fileName": "backend/tests/unit/tst_mytype.qml" },
172 { "fileName": "app/graphics/toolbarIcon@8.png" },
173 { "fileName": "app/displayName.desktop" },
174 { "fileName": "app/displayName.qml" },
175 { "fileName": "app/tests/unit/tst_hellocomponent.qml" },
176 { "fileName": "app/components/HelloComponent.qml" },
177 { "fileName": "app/ui/WorldTabTools.qml" },
178 { "fileName": "app/ui/WorldTab.qml" },
179 { "fileName": "app/ui/HelloTab.qml" },
180 { "fileName": "app/Makefile" },
181 { "fileName": "app/tests/autopilot/run" },
182 { "fileName": "app/tests/autopilot/displayName/main/test_main.py" },
183 { "fileName": "app/tests/autopilot/displayName/__init__.py" },
184 { "fileName": "app/tests/autopilot/displayName/main/__init__.py" },
185 { "fileName": "Makefile" },
186 { "fileName": "backend/backend.pro" }
187 ]
188 },
189 {
190 "type": "pro",
191 "folder": "scope",
192 "displayName": "Unity Scope",
193 "id": "UbuntuUnityScope",
194 "description": "A Unity Scope template",
195 "mainFile" : "displayName.c",
196 "projectFile" : "displayName.pro",
197 "requiredFeature": "Ubuntu.Wizards.FeatureUnityScope",
198 "files": [
199 {
200 "fileName": "data/unity-scope-displayName_lower.service.in"
201 },
202 {
203 "fileName": "data/displayName_lower.scope"
204 },
205 {
206 "fileName": "config.h"
207 },
208 {
209 "fileName": "displayName-parser.c"
210 },
211 {
212 "fileName": "displayName-parser.h"
213 }
214 ]
215 }
216
217]
0218
=== added directory 'share/qtcreator/templates/wizards/ubuntu/scope'
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/config.h'
--- share/qtcreator/templates/wizards/ubuntu/scope/config.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/config.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,9 @@
1#ifndef __CONFIG_H__
2#define __CONFIG_H__
3
4#define GROUP_NAME "com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%"
5#define UNIQUE_NAME "/com/canonical/unity/scope/%DISPLAYNAME_LOWER%"
6
7#define CATEGORY_ICON_PATH "/usr/share/icons/unity-icon-theme/places/svg/service-%DISPLAYNAME_LOWER%.svg"
8
9#endif /* __CONFIG_H__ */
010
=== added directory 'share/qtcreator/templates/wizards/ubuntu/scope/data'
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope'
--- share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/data/displayName_lower.scope 2013-11-20 07:28:27 +0000
@@ -0,0 +1,18 @@
1[Scope]
2DBusName=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
3DBusPath=/com/canonical/unity/scope/%DISPLAYNAME_LOWER%
4Icon=
5QueryBinary=
6Keywords=%DISPLAYNAME_LOWER%;
7RequiredMetadata=
8OptionalMetadata=
9Loader=
10RemoteContent=false
11Type=%DISPLAYNAME_LOWER%
12Name=%DISPLAYNAME_CAPITAL%
13Description=Find %DISPLAYNAME_CAPITAL% items
14SearchHint=Search %DISPLAYNAME_CAPITAL%
15CategoryIcon=/usr/share/icons/unity-icon-theme/places/svg/service-%DISPLAYNAME_LOWER%.svg
16
17[Desktop Entry]
18X-Ubuntu-Gettext-Domain=unity-scope-%DISPLAYNAME_LOWER%
019
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in'
--- share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/data/unity-scope-displayName_lower.service.in 2013-11-20 07:28:27 +0000
@@ -0,0 +1,3 @@
1[D-BUS Service]
2Name=com.canonical.Unity.Scope.%DISPLAYNAME_CAPITAL%
3Exec=
04
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c'
--- share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.c 2013-11-20 07:28:27 +0000
@@ -0,0 +1,87 @@
1/*
2 * Feed parser backend
3 *
4 * In this module you'll be implementing the feed parser backend.
5 * This code will not be Unity-specific, and it will vary depending
6 * on the type of data returned by your source. Common feed types
7 * returned when doing search queries to sources are JSON, RSS, XML.
8 *
9 * You'll simply need to implement a parser for the type of feed your
10 * source returns and send the results back to Unity via the get_results()
11 * function.
12 */
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include <glib.h>
18#include "%DISPLAYNAME_LOWER%-parser.h"
19
20/*
21 * This is the URI against which you'll be submitting your
22 * search query from the Dash, which you'll need to adapt
23 * to your source.
24 */
25#define BASE_URI "http://%DISPLAYNAME_LOWER%.org/api/search/?query="
26
27/**
28 * @brief Cleans up (frees the memory allocated memory)
29 * of the given results structure
30 * @param data Structure that contains the data to free
31 */
32void
33result_cleanup(gpointer data) {
34 /* This is specific to a type of result, so you'll
35 * need to adapt it to the results sent by your
36 * source.
37 */
38 result_t *result = (result_t *)data;
39 if (result->link) {
40 free(result->link);
41 }
42 if (result->icon_url) {
43 free(result->icon_url);
44 }
45 if (result->title) {
46 free(result->title);
47 }
48 if (result->description) {
49 free(result->description);
50 }
51 if (result->creation_date) {
52 free(result->creation_date);
53 }
54 if (result->author) {
55 free(result->author);
56 }
57}
58
59/**
60 * @brief get_results Get and parse the results from a search query
61 * @param search_term String submitted as the search term
62 * @return Search results
63 */
64GSList *
65get_results(const char *search_term) {
66 GString *url = NULL;
67 GSList *results = NULL;
68
69 /* Check if an actual search term was submitted, return otherwise */
70 if (search_term == NULL) {
71 g_warning("get_results: search_term cannot be null");
72 return results;
73 }
74
75 /* Construct the full search query */
76 url = g_string_new(BASE_URI);
77 g_string_append(url, search_term);
78 g_debug("Searching %s", url->str);
79 g_string_free(url, TRUE);
80
81 /*
82 * Submit the query to the source, parse the results and populate
83 * the results list here.
84 */
85
86 return results;
87}
088
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h'
--- share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName-parser.h 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1#ifndef __%DISPLAYNAME_UPPER%_PARSER_H__
2#define __%DISPLAYNAME_UPPER%_PARSER_H__
3
4GSList *get_results(const char *search_term);
5void result_cleanup(gpointer data);
6
7/**
8 * This is just an example result type with some sample
9 * fields. You should modify the fields to match the
10 * data you are expecting from your search source
11 */
12typedef struct {
13 gchar *link;
14 gchar *icon_url;
15 gchar *title;
16 gchar *description;
17 gchar *creation_date;
18 gchar *author;
19} result_t;
20
21#endif /* __%DISPLAYNAME_UPPER%_PARSER_H__ */
022
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName.c'
--- share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName.c 2013-11-20 07:28:27 +0000
@@ -0,0 +1,203 @@
1/*
2 * Unity %DISPLAYNAME_CAPITAL% scope
3 *
4 * This module implements the interface to the Unity Dash and
5 * constitutes the frontend of the scope.
6 *
7 * Follow the scopes tutorial to learn how to create a scope:
8 * http://developer.ubuntu.com/resources/tutorials/unity-scopes/writing-a-unity-scope/
9 *
10 */
11
12#include <stdio.h>
13#include <stdlib.h>
14#include <string.h>
15#include <mrss.h>
16#include <unity.h>
17#include <glib.h>
18#include <gio/gio.h>
19#include "config.h"
20#include "%DISPLAYNAME_LOWER%-parser.h"
21
22/**
23 * In this function the results from the backend are obtained and
24 * added to the search results in the Dash
25 *
26 * @brief Search function
27 * @param search Search term
28 * @param user_data Additional user data
29 */
30static void
31search_func(UnityScopeSearchBase* search, void* user_data)
32{
33 GSList *results = NULL;
34 GSList *iter = NULL;
35 GHashTable *metadata = NULL;
36 result_t *result = NULL;
37 UnityScopeResult scope_result = { 0, };
38
39 /* Avoid compiler warning if we're not using the parameter */
40 user_data = user_data;
41
42 /* Fetch the results from the backend */
43 results = get_results(search->search_context->search_query);
44
45 /* Iterate through the returned results and add them to the
46 * Unity's result set
47 */
48 for (iter = results; iter; iter = iter->next) {
49
50 /* Get the result */
51 result = (result_t *)iter->data;
52
53 /* Build and populate a scope result from the source data */
54 scope_result.uri = result->link;
55 scope_result.title = result->title;
56 scope_result.icon_hint = result->icon_url;
57 scope_result.category = 0;
58 scope_result.result_type = UNITY_RESULT_TYPE_DEFAULT;
59 scope_result.mimetype = "text/html";
60 scope_result.comment = result->description;
61 scope_result.dnd_uri = result->link;
62
63 /* Insert the metadata, if available */
64 metadata = g_hash_table_new(g_str_hash, g_str_equal);
65 if (result->author) {
66 g_hash_table_insert(metadata, "author",
67 g_variant_new_string(result->author));
68 }
69 if (result->creation_date) {
70 g_hash_table_insert(metadata, "creation_date",
71 g_variant_new_string(result->creation_date));
72 }
73 scope_result.metadata = metadata;
74
75 /*
76 * Add the returned result to the search results list, taking a
77 * copy of the data passed in via scope_result
78 */
79 unity_result_set_add_result(search->search_context->result_set,
80 &scope_result);
81 g_hash_table_unref(metadata);
82 }
83
84 /*
85 * Clear out the data copied to the result set earlier on
86 */
87 g_slist_free_full(results, (GDestroyNotify) result_cleanup);
88}
89
90/**
91 * This function will be invoked when the user clicks on the result and
92 * its preview is shown in the Dash.
93 * There are a set of predefined preview types: simply pick one, instantiate
94 * it, add metadata to it if available, and return it.
95 *
96 * @brief Dash preview function
97 * @param previewer Result previewer
98 * @param user_data Additional user data
99 * @return Preview populated with the result's data
100 */
101static UnityAbstractPreview *
102preview_func(UnityResultPreviewer *previewer, void *user_data)
103{
104 UnityPreview *preview = NULL;
105 UnityPreviewAction *action = NULL;
106 UnityInfoHint *author_hint, *creation_date_hint = NULL;
107 GVariant *gv_author, *gv_creation_date = NULL;
108 const char *creation_date = NULL;
109
110 /* Avoid compiler warning if we're not using the parameter */
111 user_data = user_data;
112
113 /* Create a generic preview */
114 preview = UNITY_PREVIEW(unity_generic_preview_new(
115 previewer->result.title,
116 previewer->result.comment,
117 g_icon_new_for_string(previewer->result.icon_hint, NULL)));
118
119 /* Set up the preview's action */
120 action = unity_preview_action_new_with_uri(previewer->result.uri, "Open",
121 NULL);
122 unity_preview_add_action(preview, action);
123 unity_object_unref(action);
124
125 /* If the result contains metadata, add it to the preview */
126 if (previewer->result.metadata) {
127 gv_author = g_hash_table_lookup(previewer->result.metadata, "author");
128
129 /* There are 2 ways to do this, the first method just directly
130 * uses the GVariant from the hash. The second extracts the string
131 * first, which might be useful for debugging. */
132 if (gv_author) {
133 author_hint = unity_info_hint_new_with_variant("author", "Author",
134 NULL, gv_author);
135 /* The ref call here and unref below are to work-around a bug in
136 * libunity, see:
137 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
138 g_object_ref(author_hint);
139 unity_preview_add_info(preview, author_hint);
140 g_object_unref(author_hint);
141 }
142 gv_creation_date = g_hash_table_lookup(previewer->result.metadata,
143 "creation_date");
144 if (gv_creation_date) {
145 g_variant_get(gv_creation_date, "&s", &creation_date);
146 creation_date_hint = unity_info_hint_new("creation_date",
147 "Creation Date", NULL, creation_date);
148 /* The ref call here and unref below are to work-around a bug in
149 * libunity, see:
150 * http://code.launchpad.net/~mhr3/libunity/floating-fixes */
151 g_object_ref(creation_date_hint);
152 unity_preview_add_info(preview, creation_date_hint);
153 g_object_unref(creation_date_hint);
154 }
155 }
156
157 return UNITY_ABSTRACT_PREVIEW(preview);
158}
159
160/**
161 * This is the main function: the scope is defined and exported, a DBUS
162 * connector is created and the main loop is run
163 */
164int
165main(void) {
166 UnitySimpleScope *scope = NULL;
167 UnityScopeDBusConnector *connector = NULL;
168 UnityCategorySet *cats = NULL;
169 UnityCategory *cat = NULL;
170 GIcon *icon = NULL;
171
172 /* Create and set a category for the scope, including an icon */
173 icon = g_themed_icon_new(CATEGORY_ICON_PATH);
174
175 cat = unity_category_new("global", "%DISPLAYNAME_CAPITAL%", icon,
176 UNITY_CATEGORY_RENDERER_HORIZONTAL_TILE);
177 cats = unity_category_set_new();
178 unity_category_set_add(cats, cat);
179
180 /* Create and set up the scope */
181 scope = unity_simple_scope_new();
182 unity_simple_scope_set_group_name(scope, GROUP_NAME);
183 unity_simple_scope_set_unique_name(scope, UNIQUE_NAME);
184 unity_simple_scope_set_search_func(scope, search_func, NULL, NULL);
185 unity_simple_scope_set_preview_func(scope, preview_func, NULL, NULL);
186 unity_simple_scope_set_category_set(scope, cats);
187
188 g_object_unref (icon);
189 unity_object_unref (cat);
190 unity_object_unref (cats);
191
192 /*
193 * Setting up the connector is an action that will not be required
194 * in future revisions of the API. In particular, we only need it here
195 * since the scope is running locally on the device as opposed to
196 * running on the Smart Scopes server
197 */
198 connector = unity_scope_dbus_connector_new(UNITY_ABSTRACT_SCOPE(scope));
199 unity_scope_dbus_connector_export(connector, NULL);
200 unity_scope_dbus_connector_run();
201
202 return 0;
203}
0204
=== added file 'share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro'
--- share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/scope/displayName.pro 2013-11-20 07:28:27 +0000
@@ -0,0 +1,73 @@
1# This file is used by Qt Creator as a project file to load all files that are part of
2# the project as specified in SOURCES, HEADERS and OTHER_FILES, and to build the final
3# executable
4#
5# You can also use it from the command line:
6# If you run `qmake` (without the quotes) from the top of the source tree, it will
7# generate a Makefile from this .pro file. From there you can use the usual make targets
8# e.g. `make`, `sudo make install`, `sudo make uninstall`, `make clean`, `make distclean`, etc.
9# To regenerate the Makefile, simply invoke `qmake` again
10
11TEMPLATE = app
12CONFIG += link_pkgconfig
13CONFIG -= app_bundle
14CONFIG -= qt
15
16
17###########################################################
18# To install dependencies:
19# sudo apt-get install libunity-dev
20PKGCONFIG += \
21 unity
22
23# Pkg-config takes care of the includes for the build, so the following variable is not
24# strictly needed. We need this simply for Qt Creator to find the
25# headers in the editor, as it seems not to use the PGKCONFIG variable.
26INCLUDEPATH += \
27 /usr/include/glib-2.0 \
28 /usr/include/unity/unity
29
30TARGET = %DISPLAYNAME%
31DAEMON_PATH = $$[QT_INSTALL_LIBS]/unity-scope-$${TARGET}
32
33DATA_DIR = $$_PRO_FILE_PWD_/data
34SCOPE_FILE = $$DATA_DIR/$${TARGET}.scope
35SERVICE_FILE = $$DATA_DIR/unity-scope-$${TARGET}.service
36
37SOURCES += \
38 %DISPLAYNAME%.c \
39 %DISPLAYNAME%-parser.c
40
41HEADERS += \
42 config.h \
43 %DISPLAYNAME%-parser.h
44
45OTHER_FILES += \
46 $$SCOPE_FILE \
47 $${SERVICE_FILE}.in
48
49# Rule to generate the DBUS .service file, including the architecture-dependent installation path
50# generated at build time
51servicefilegen.target = servicefilegen
52servicefilegen.commands = sed -e \"s,\\(Exec=\\).*\$$,\1$$DAEMON_PATH/$$TARGET,\" $${SERVICE_FILE}.in > $$SERVICE_FILE
53QMAKE_EXTRA_TARGETS += servicefilegen
54QMAKE_CLEAN += $$SERVICE_FILE
55QMAKE_CLEAN += $$DATA_DIR/*~
56PRE_TARGETDEPS += \
57 servicefilegen
58
59# Rule to install the scope's binary
60target.path = $$DAEMON_PATH
61
62# Rule to install the DBUS .service file
63servicefile.path = /usr/share/dbus-1/services
64servicefile.files = $$SERVICE_FILE
65
66# Rule to install the .scope file
67scopefile.path = /usr/share/unity/scopes
68scopefile.files = $$SCOPE_FILE
69
70INSTALLS += \
71 target \
72 scopefile \
73 servicefile
074
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple'
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/Makefile'
--- share/qtcreator/templates/wizards/ubuntu/simple/Makefile 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/Makefile 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1# More information: https://wiki.ubuntu.com/Touch/Testing
2#
3# Notes for autopilot tests:
4# -----------------------------------------------------------
5# In order to run autopilot tests:
6# sudo apt-add-repository ppa:autopilot/ppa
7# sudo apt-get update
8# sudo apt-get install python-autopilot autopilot-qt
9#############################################################
10
11all:
12
13autopilot:
14 chmod +x tests/autopilot/run
15 tests/autopilot/run
16
17check:
18 qmltestrunner -input tests/unit
19
20run:
21 /usr/bin/qmlscene $@ %DISPLAYNAME%.qml
022
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/components'
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/components/HelloComponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,14 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4UbuntuShape {
5 width: 200
6 height: width
7
8 property alias text : myText.text
9
10 Label {
11 id: myText
12 anchors.centerIn: parent
13 }
14}
015
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop'
--- share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/displayName.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=My project description
4Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
5Icon=qmlscene
6Terminal=false
7Type=Application
8X-Ubuntu-Touch=true
09
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/main.qml'
--- share/qtcreator/templates/wizards/ubuntu/simple/main.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/main.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,54 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "components"
4
5/*!
6 \brief MainView with a Label and Button elements.
7*/
8
9MainView {
10 // objectName for functional testing purposes (autopilot-qt5)
11 objectName: "mainView"
12
13 // Note! applicationName needs to match the "name" field of the click manifest
14 applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
15
16 /*
17 This property enables the application to change orientation
18 when the device is rotated. The default is false.
19 */
20 //automaticOrientation: true
21
22 width: units.gu(100)
23 height: units.gu(75)
24
25 Page {
26 title: i18n.tr("Simple")
27
28 Column {
29 spacing: units.gu(1)
30 anchors {
31 margins: units.gu(2)
32 fill: parent
33 }
34
35 HelloComponent {
36 id: label
37 objectName: "label"
38
39 text: i18n.tr("Hello..")
40 }
41
42 Button {
43 objectName: "button"
44 width: parent.width
45
46 text: i18n.tr("Tap me!")
47
48 onClicked: {
49 label.text = i18n.tr("..world!")
50 }
51 }
52 }
53 }
54}
055
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName'
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,131 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Ubuntu Touch App autopilot tests."""
4
5from os import remove
6import os.path
7from tempfile import mktemp
8import subprocess
9
10from autopilot.input import Mouse, Touch, Pointer
11from autopilot.matchers import Eventually
12from autopilot.platform import model
13from testtools.matchers import Is, Not, Equals
14from autopilot.testcase import AutopilotTestCase
15
16def get_module_include_path():
17 return os.path.abspath(
18 os.path.join(
19 os.path.dirname(__file__),
20 '..',
21 '..',
22 '..',
23 '..',
24 'modules')
25 )
26
27
28class UbuntuTouchAppTestCase(AutopilotTestCase):
29 """A common test case class that provides several useful methods for the tests."""
30
31 if model() == 'Desktop':
32 scenarios = [
33 ('with mouse', dict(input_device_class=Mouse))
34 ]
35 else:
36 scenarios = [
37 ('with touch', dict(input_device_class=Touch))
38 ]
39
40 @property
41 def main_window(self):
42 return MainWindow(self.app)
43
44
45 def setUp(self):
46 self.pointing_device = Pointer(self.input_device_class.create())
47 super(UbuntuTouchAppTestCase, self).setUp()
48 self.launch_test_qml()
49
50
51 def launch_test_qml(self):
52 # If the test class has defined a 'test_qml' class attribute then we
53 # write it to disk and launch it inside the QML Scene. If not, then we
54 # silently do nothing (presumably the test has something else planned).
55 arch = subprocess.check_output(["dpkg-architecture",
56 "-qDEB_HOST_MULTIARCH"]).strip()
57 if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
58 qml_path = mktemp(suffix='.qml')
59 open(qml_path, 'w').write(self.test_qml)
60 self.addCleanup(remove, qml_path)
61
62 self.app = self.launch_test_application(
63 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
64 "-I", get_module_include_path(),
65 qml_path,
66 app_type='qt')
67
68 if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
69 qml_path = self.test_qml_file
70 self.app = self.launch_test_application(
71 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
72 "-I", get_module_include_path(),
73 qml_path,
74 app_type='qt')
75
76 self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
77
78
79 def get_qml_view(self):
80 """Get the main QML view"""
81
82 return self.app.select_single("QQuickView")
83
84 def get_mainview(self):
85 """Get the QML MainView"""
86
87 mainView = self.app.select_single("MainView")
88 self.assertThat(mainView, Not(Is(None)))
89 return mainView
90
91
92 def get_object(self,objectName):
93 """Get a object based on the objectName"""
94
95 obj = self.app.select_single(objectName=objectName)
96 self.assertThat(obj, Not(Is(None)))
97 return obj
98
99
100 def mouse_click(self,objectName):
101 """Move mouse on top of the object and click on it"""
102
103 obj = self.get_object(objectName)
104 self.pointing_device.move_to_object(obj)
105 self.pointing_device.click()
106
107
108 def mouse_press(self,objectName):
109 """Move mouse on top of the object and press mouse button (without releasing it)"""
110
111 obj = self.get_object(objectName)
112 self.pointing_device.move_to_object(obj)
113 self.pointing_device.press()
114
115
116 def mouse_release(self):
117 """Release mouse button"""
118
119 self.pointing_device.release()
120
121
122 def type_string(self, string):
123 """Type a string with keyboard"""
124
125 self.keyboard.type(string)
126
127
128 def type_key(self, key):
129 """Type a single key with keyboard"""
130
131 self.keyboard.key(key)
0132
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main'
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
1""" A Generic test suite """
02
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py'
--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,38 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Tests for the Hello World"""
4
5from autopilot.matchers import Eventually
6from textwrap import dedent
7from testtools.matchers import Is, Not, Equals
8from testtools import skip
9import os
10from %DISPLAYNAME% import UbuntuTouchAppTestCase
11
12
13class GenericTests(UbuntuTouchAppTestCase):
14 """Generic tests for the Hello World"""
15
16 test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
17
18 def test_0_can_select_mainView(self):
19 """Must be able to select the mainview."""
20
21 mainView = self.get_mainview()
22 self.assertThat(mainView.visible,Eventually(Equals(True)))
23
24
25 def test_1_init_label(self):
26 """Check the initial text of the label"""
27
28 lbl = self.get_object(objectName="label")
29 self.assertThat(lbl.text, Equals("Hello.."))
30
31
32 def test_can_tap_button(self):
33 """Must be able to tap the button"""
34
35 lbl = self.get_object(objectName="label")
36 self.mouse_click(objectName="button")
37 self.assertThat(lbl.text, Eventually(Equals("..world!")))
38
039
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run'
--- share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/autopilot/run 2013-11-20 07:28:27 +0000
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3if [[ -z `which autopilot` ]]; then
4 echo "Autopilot is not installed. Skip"
5 exit
6fi
7
8SCRIPTPATH=`dirname $0`
9pushd ${SCRIPTPATH}
10autopilot run %DISPLAYNAME%
11popd
012
=== added directory 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit'
=== added file 'share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/simple/tests/unit/tst_hellocomponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.0
2import QtTest 1.0
3import Ubuntu.Components 0.1
4import "../../components"
5
6// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
7
8// Execute tests with:
9// qmltestrunner
10
11Item {
12 // The objects
13 HelloComponent {
14 id: objectUnderTest
15 }
16
17 TestCase {
18 name: "HelloComponent"
19
20 function init() {
21 console.debug(">> init");
22 compare("",objectUnderTest.text,"text was not empty on init");
23 console.debug("<< init");
24 }
25
26 function cleanup() {
27 console.debug(">> cleanup");
28 console.debug("<< cleanup");
29 }
30
31 function initTestCase() {
32 console.debug(">> initTestCase");
33 console.debug("<< initTestCase");
34 }
35
36 function cleanupTestCase() {
37 console.debug(">> cleanupTestCase");
38 console.debug("<< cleanupTestCase");
39 }
40
41 function test_canReadAndWriteText() {
42 var expected = "Hello World";
43
44 objectUnderTest.text = expected;
45
46 compare(expected,objectUnderTest.text,"expected did not equal result");
47 }
48 }
49}
050
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/Makefile'
--- share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/Makefile 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1# More information: https://wiki.ubuntu.com/Touch/Testing
2#
3# Notes for autopilot tests:
4# -----------------------------------------------------------
5# In order to run autopilot tests:
6# sudo apt-add-repository ppa:autopilot/ppa
7# sudo apt-get update
8# sudo apt-get install python-autopilot autopilot-qt
9#############################################################
10
11all:
12
13autopilot:
14 chmod +x tests/autopilot/run
15 tests/autopilot/run
16
17check:
18 qmltestrunner -input tests/unit
19
20run:
21 /usr/bin/qmlscene $@ %DISPLAYNAME%.qml
022
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/components'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/components/HelloComponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,14 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4UbuntuShape {
5 width: 200
6 height: width
7
8 property alias text : myText.text
9
10 Label {
11 id: myText
12 anchors.centerIn: parent
13 }
14}
015
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop'
--- share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/displayName.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=My project description
4Exec=/usr/bin/qmlscene $@ /usr/share/%DISPLAYNAME%/%DISPLAYNAME%.qml
5Icon=qmlscene
6Terminal=false
7Type=Application
8X-Ubuntu-Touch=true
09
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/graphics/toolbarIcon@8.png'
1Binary 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:28:27 +0000 differ10Binary 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:28:27 +0000 differ
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/main.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/main.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,38 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "ui"
4
5/*!
6 \brief MainView with Tabs element.
7 First Tab has a single Label and
8 second Tab has a single ToolbarAction.
9*/
10
11MainView {
12 // objectName for functional testing purposes (autopilot-qt5)
13 objectName: "mainView"
14
15 // Note! applicationName needs to match the "name" field of the click manifest
16 applicationName: "com.ubuntu.developer.%BZR_USERNAME%.%DISPLAYNAME%"
17
18 /*
19 This property enables the application to change orientation
20 when the device is rotated. The default is false.
21 */
22 //automaticOrientation: true
23
24 width: units.gu(100)
25 height: units.gu(75)
26
27 Tabs {
28 id: tabs
29
30 HelloTab {
31 objectName: "helloTab"
32 }
33
34 WorldTab {
35 objectName: "worldTab"
36 }
37 }
38}
039
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot'
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,131 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Ubuntu Touch App autopilot tests."""
4
5from os import remove
6import os.path
7from tempfile import mktemp
8import subprocess
9
10from autopilot.input import Mouse, Touch, Pointer
11from autopilot.matchers import Eventually
12from autopilot.platform import model
13from testtools.matchers import Is, Not, Equals
14from autopilot.testcase import AutopilotTestCase
15
16def get_module_include_path():
17 return os.path.abspath(
18 os.path.join(
19 os.path.dirname(__file__),
20 '..',
21 '..',
22 '..',
23 '..',
24 'modules')
25 )
26
27
28class UbuntuTouchAppTestCase(AutopilotTestCase):
29 """A common test case class that provides several useful methods for the tests."""
30
31 if model() == 'Desktop':
32 scenarios = [
33 ('with mouse', dict(input_device_class=Mouse))
34 ]
35 else:
36 scenarios = [
37 ('with touch', dict(input_device_class=Touch))
38 ]
39
40 @property
41 def main_window(self):
42 return MainWindow(self.app)
43
44
45 def setUp(self):
46 self.pointing_device = Pointer(self.input_device_class.create())
47 super(UbuntuTouchAppTestCase, self).setUp()
48 self.launch_test_qml()
49
50
51 def launch_test_qml(self):
52 # If the test class has defined a 'test_qml' class attribute then we
53 # write it to disk and launch it inside the QML Scene. If not, then we
54 # silently do nothing (presumably the test has something else planned).
55 arch = subprocess.check_output(["dpkg-architecture",
56 "-qDEB_HOST_MULTIARCH"]).strip()
57 if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
58 qml_path = mktemp(suffix='.qml')
59 open(qml_path, 'w').write(self.test_qml)
60 self.addCleanup(remove, qml_path)
61
62 self.app = self.launch_test_application(
63 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
64 "-I", get_module_include_path(),
65 qml_path,
66 app_type='qt')
67
68 if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
69 qml_path = self.test_qml_file
70 self.app = self.launch_test_application(
71 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
72 "-I", get_module_include_path(),
73 qml_path,
74 app_type='qt')
75
76 self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
77
78
79 def get_qml_view(self):
80 """Get the main QML view"""
81
82 return self.app.select_single("QQuickView")
83
84 def get_mainview(self):
85 """Get the QML MainView"""
86
87 mainView = self.app.select_single("MainView")
88 self.assertThat(mainView, Not(Is(None)))
89 return mainView
90
91
92 def get_object(self,objectName):
93 """Get a object based on the objectName"""
94
95 obj = self.app.select_single(objectName=objectName)
96 self.assertThat(obj, Not(Is(None)))
97 return obj
98
99
100 def mouse_click(self,objectName):
101 """Move mouse on top of the object and click on it"""
102
103 obj = self.get_object(objectName)
104 self.pointing_device.move_to_object(obj)
105 self.pointing_device.click()
106
107
108 def mouse_press(self,objectName):
109 """Move mouse on top of the object and press mouse button (without releasing it)"""
110
111 obj = self.get_object(objectName)
112 self.pointing_device.move_to_object(obj)
113 self.pointing_device.press()
114
115
116 def mouse_release(self):
117 """Release mouse button"""
118
119 self.pointing_device.release()
120
121
122 def type_string(self, string):
123 """Type a string with keyboard"""
124
125 self.keyboard.type(string)
126
127
128 def type_key(self, key):
129 """Type a single key with keyboard"""
130
131 self.keyboard.key(key)
0132
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py'
--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/__init__.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
1""" A main.qml test suite """
02
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py'
--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/displayName/main/test_main.py 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Tests for the Hello World"""
4
5from autopilot.matchers import Eventually
6from textwrap import dedent
7from testtools.matchers import Is, Not, Equals
8from testtools import skip
9import os
10from %DISPLAYNAME% import UbuntuTouchAppTestCase
11
12
13class MainTests(UbuntuTouchAppTestCase):
14 """Generic tests for the Hello World"""
15
16 test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../%DISPLAYNAME%")
17
18 def test_0_can_select_mainView(self):
19 """Must be able to select the mainview."""
20
21 mainView = self.get_mainview()
22 self.assertThat(mainView.visible,Eventually(Equals(True)))
23
024
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run'
--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/autopilot/run 2013-11-20 07:28:27 +0000
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3if [[ -z `which autopilot` ]]; then
4 echo "Autopilot is not installed. Skip"
5 exit
6fi
7
8SCRIPTPATH=`dirname $0`
9pushd ${SCRIPTPATH}
10autopilot run %DISPLAYNAME%
11popd
012
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/tests/unit/tst_hellocomponent.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.0
2import QtTest 1.0
3import Ubuntu.Components 0.1
4import "../../components"
5
6// See more details @ http://qt-project.org/doc/qt-5.0/qtquick/qml-testcase.html
7
8// Execute tests with:
9// qmltestrunner
10
11Item {
12 // The objects
13 HelloComponent {
14 id: objectUnderTest
15 }
16
17 TestCase {
18 name: "HelloComponent"
19
20 function init() {
21 console.debug(">> init");
22 compare("",objectUnderTest.text,"text was not empty on init");
23 console.debug("<< init");
24 }
25
26 function cleanup() {
27 console.debug(">> cleanup");
28 console.debug("<< cleanup");
29 }
30
31 function initTestCase() {
32 console.debug(">> initTestCase");
33 console.debug("<< initTestCase");
34 }
35
36 function cleanupTestCase() {
37 console.debug(">> cleanupTestCase");
38 console.debug("<< cleanupTestCase");
39 }
40
41 function test_canReadAndWriteText() {
42 var expected = "Hello World";
43
44 objectUnderTest.text = expected;
45
46 compare(expected,objectUnderTest.text,"expected did not equal result");
47 }
48 }
49}
050
=== added directory 'share/qtcreator/templates/wizards/ubuntu/tabs/ui'
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/HelloTab.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,30 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "../components"
4
5Tab {
6 title: i18n.tr("Hello..")
7
8 page: Page {
9 Column {
10 spacing: units.gu(2)
11 anchors.centerIn: parent
12
13 HelloComponent {
14 objectName: "helloTab_HelloComponent"
15
16 anchors.horizontalCenter: parent.horizontalCenter
17
18 text: i18n.tr("HelloTab")
19 }
20
21 Label {
22 objectName: "helloTab_label"
23
24 anchors.horizontalCenter: parent.horizontalCenter
25
26 text: i18n.tr("You can change the Tab from Page title above.")
27 }
28 }
29 }
30}
031
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTab.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,35 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "../components"
4
5Tab {
6 title: i18n.tr("..World!")
7
8 page: Page {
9 tools: WorldTabTools {
10 objectName: "worldTab_tools"
11 }
12
13 Column {
14 spacing: units.gu(2)
15 anchors.centerIn: parent
16
17 HelloComponent {
18 objectName: "worldTab_HelloComponent"
19
20 anchors.horizontalCenter: parent.horizontalCenter
21
22 text: i18n.tr("WorldTab")
23 }
24
25 Label {
26 id: label
27 objectName: "worldTab_label"
28
29 anchors.horizontalCenter: parent.horizontalCenter
30
31 text: i18n.tr("Swipe from bottom to up to reveal the toolbar.")
32 }
33 }
34 }
35}
036
=== added file 'share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml'
--- share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/tabs/ui/WorldTabTools.qml 2013-11-20 07:28:27 +0000
@@ -0,0 +1,13 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4ToolbarItems {
5 ToolbarButton {
6 iconSource: Qt.resolvedUrl("../graphics/toolbarIcon.png")
7 text: i18n.tr("Tap me!")
8
9 onTriggered: {
10 label.text = i18n.tr("Toolbar tapped")
11 }
12 }
13}
014
=== added directory 'share/qtcreator/templates/wizards/ubuntu/webapp'
=== added file 'share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop'
--- share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/webapp/app.desktop 2013-11-20 07:28:27 +0000
@@ -0,0 +1,8 @@
1[Desktop Entry]
2Name=%DISPLAYNAME%
3Comment=%DISPLAYNAME% Webapp
4Type=Application
5Icon=app.png
6Exec=webbrowser-app --webapp --enable-back-forward --webappUrlPatterns=https?://m.%DISPLAYNAME%.com/* http://m.%DISPLAYNAME%.com
7Terminal=false
8X-Ubuntu-Touch=true
09
=== added file 'share/qtcreator/templates/wizards/ubuntu/webapp/app.json'
--- share/qtcreator/templates/wizards/ubuntu/webapp/app.json 1970-01-01 00:00:00 +0000
+++ share/qtcreator/templates/wizards/ubuntu/webapp/app.json 2013-11-20 07:28:27 +0000
@@ -0,0 +1,7 @@
1{
2"template": "ubuntu-webapp",
3"policy_groups": [
4"networking"
5],
6"policy_version": 1.0
7}
08
=== added directory 'share/qtcreator/ubuntu'
=== added file 'share/qtcreator/ubuntu/menu.json'
--- share/qtcreator/ubuntu/menu.json 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/menu.json 2013-11-20 07:28:27 +0000
@@ -0,0 +1,438 @@
1{
2 "ubuntu.make": {
3 "name": "make",
4 "id": "Ubuntu.Make",
5 "parent": "Build",
6 "projectRequired": true,
7 "group": "ProjectExplorer.Group.Run",
8 "submenu": [
9 {
10 "name": "check",
11 "id": "Ubuntu.Make.Check",
12 "projectRequired": true,
13 "actions": [
14 "%SCRIPTDIRECTORY%/qtc_project_make check"
15 ]
16 },
17 {
18 "name": "autopilot",
19 "id": "Ubuntu.Make.Autopilot",
20 "projectRequired": true,
21 "actions": [
22 "%SCRIPTDIRECTORY%/qtc_project_make autopilot"
23 ]
24 },
25 {
26 "name": "install",
27 "id": "Ubuntu.Make.Install",
28 "projectRequired": true,
29 "actions": [
30 "%SCRIPTDIRECTORY%/qtc_project_make install"
31 ]
32 },
33 {
34 "name": "uninstall",
35 "id": "Ubuntu.Make.Uninstall",
36 "projectRequired": true,
37 "actions": [
38 "%SCRIPTDIRECTORY%/qtc_project_make uninstall"
39 ]
40 }
41 ]
42 },
43 "ubuntu": {
44 "name": "Ubuntu Touch",
45 "id": "Ubuntu.Build",
46 "parent": "Build",
47 "group": "ProjectExplorer.Group.Run",
48 "submenu": [
49 {
50 "name": "Run Application on Device",
51 "id": "Ubuntu.Build.Run",
52 "workingDirectory": "%0/..",
53 "projectRequired": true,
54 "keysequence": "Ctrl+F12",
55 "deviceRequired": true,
56 "qmlProjectRequired": true,
57 "saveRequired": true,
58 "actions": [
59 "%SCRIPTDIRECTORY%/qtc_device_run_app %SERIALNUMBER% %FOLDERNAME% %DISPLAYNAME%.desktop %DISPLAYNAME%.qml /home/%USERNAME%/dev_tmp /home/%USERNAME%/.local/share/applications %USERNAME%@%IP% %PORT%"
60 ]
61 },
62 {
63 "name": "Close Application on Device",
64 "id": "Ubuntu.Build.CancelRun",
65 "keysequence": "Ctrl+Shift+F12",
66 "projectRequired": true,
67 "deviceRequired": true,
68 "qmlProjectRequired": true,
69 "actions": [
70 "%SCRIPTDIRECTORY%/qtc_device_close_all_apps %SERIALNUMBER% %DISPLAYNAME%"
71 ]
72 },
73 {
74 "name": "Create Application Package",
75 "id": "Ubuntu.Build.Package",
76 "workingDirectory": "%0/..",
77 "projectRequired": true,
78 "ubuntuProjectRequired": true,
79 "saveRequired": true,
80 "actions": [
81 "%SCRIPTDIRECTORY%/qtc_project_click_create %FOLDERNAME%"
82 ]
83 },
84 {
85 "name": "Install Application on Device",
86 "id": "Ubuntu.Build.PackageInstall",
87 "workingDirectory": "%0/..",
88 "projectRequired": true,
89 "deviceRequired": true,
90 "ubuntuProjectRequired": true,
91 "saveRequired": true,
92 "actions": [
93 "%SCRIPTDIRECTORY%/qtc_project_click_createanddeploy %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp %USERNAME%"
94 ]
95 },
96 {
97 "name": "Build Application on Device",
98 "id": "Ubuntu.Build.Cpp",
99 "workingDirectory": "%0/..",
100 "projectRequired": true,
101 "deviceRequired": true,
102 "qmakeProjectRequired": true,
103 "saveRequired": true,
104 "actions": [
105 "%SCRIPTDIRECTORY%/qtc_device_buildpackage %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp"
106 ]
107 },
108 {
109 "name": "Build and Install Application on Device",
110 "id": "Ubuntu.BuildAndInstall.Cpp",
111 "workingDirectory": "%0/..",
112 "projectRequired": true,
113 "deviceRequired": true,
114 "qmakeProjectRequired": true,
115 "saveRequired": true,
116 "actions": [
117 "%SCRIPTDIRECTORY%/qtc_device_buildanddeploypackage %SERIALNUMBER% %FOLDERNAME% %USERNAME%@%IP% %PORT% /home/%USERNAME%/dev_tmp"
118 ]
119 },
120 {
121 "name": "Translations",
122 "id": "Ubuntu.Menu.i18n",
123 "submenu": [
124 {
125 "name": "Update Translations Template",
126 "id": "Ubuntu.Menu.i18n.pot",
127 "projectRequired": true,
128 "qmlProjectRequired": true,
129 "saveRequired": true,
130 "actions": [
131 "%SCRIPTDIRECTORY%/i18n_update_template %DISPLAYNAME% %PROJECTFILES%"
132 ]
133 },
134 {
135 "name": "Build Translations",
136 "id": "Ubuntu.Menu.i18n.mo",
137 "projectRequired": true,
138 "qmlProjectRequired": true,
139 "saveRequired": true,
140 "actions": [
141 "msgfmt po/*.po"
142 ]
143 }
144 ]
145 }
146 ]
147 },
148 "ubuntuhelp": {
149 "name": "Ubuntu Touch",
150 "id": "Ubuntu.Help",
151 "parent": "Help",
152 "submenu": [
153 {
154 "name": "Getting Started",
155 "id": "Ubuntu.Help.GettingStarted",
156 "submenu": [
157 {
158 "name": "Go Mobile at developer.ubuntu.com",
159 "id": "Ubuntu.Help.GettingStarted.GoMobile",
160 "actions": [
161 "xdg-open http://developer.ubuntu.com/get-started/gomobile"
162 ]
163 },
164 {
165 "name": "App Design Guides at design.ubuntu.com",
166 "id": "Ubuntu.Help.GettingStarted.AppDesignGuides",
167 "actions": [
168 "xdg-open http://design.ubuntu.com/apps"
169 ]
170 }
171 ]
172 },
173 {
174 "name": "Launchpad",
175 "id": "Ubuntu.Help.Launchpad",
176 "submenu": [
177 {
178 "name": "Create an Account",
179 "id": "Ubuntu.Help.Launchpad.CreateAccount",
180 "actions": [
181 "xdg-open https://launchpad.net/+login"
182 ]
183 },
184 {
185 "name": "Register a Project",
186 "id": "Ubuntu.Help.Launchpad.RegisterProject",
187 "actions": [
188 "xdg-open https://launchpad.net/projects/+new"
189 ]
190 },
191 {
192 "name": "User Guide",
193 "id": "Ubuntu.Help.Launchpad.UserGuide",
194 "actions": [
195 "xdg-open https://help.launchpad.net"
196 ]
197 }
198 ]
199 }
200 ]
201 },
202 "ubuntutools": {
203 "name": "Ubuntu Touch",
204 "id": "Ubuntu.Menu",
205 "parent": "Tools",
206 "submenu": [
207 {
208 "name": "Ubuntu Touch Showcase Gallery",
209 "keysequence": "Ctrl+Shift+S",
210 "id": "Ubuntu.Menu.Showcase",
211 "actions": [
212 "%SCRIPTDIRECTORY%/qtc_launch_gallery"
213 ]
214 },
215 {
216 "name": "Take a screenshot",
217 "id": "Ubuntu.Menu.Screenshot",
218 "keysequence": "Ctrl+Shift+P",
219 "deviceRequired": true,
220 "actions": [
221 "adb -s %SERIALNUMBER% root",
222 "adb -s %SERIALNUMBER% shell /system/bin/screencap -p /tmp/screenshot.png",
223 "adb -s %SERIALNUMBER% pull /tmp/screenshot.png /tmp/screenshot.png",
224 "eog -s %SERIALNUMBER% /tmp/screenshot.png"
225 ]
226 },
227 {
228 "name": "Mount Device Filesystem",
229 "id": "Ubuntu.Menu.MountDeviceFileSystem",
230 "keysequence": "Ctrl+Shift+F1",
231 "deviceRequired": true,
232 "actions": [
233 "nautilus ssh://%USERNAME%@%IP%:%PORT%"
234 ]
235 },
236 {
237 "name": "GPG",
238 "id": "Ubuntu.Menu.gpg",
239 "submenu": [
240 {
241 "name": "Passwords && Keys",
242 "id": "Ubuntu.Menu.gpg.seahorse",
243 "actions": [
244 "seahorse"
245 ]
246 }
247 ]
248 },
249 {
250 "name": "Device Control",
251 "id": "Ubuntu.Menu.Device",
252 "submenu": [
253 {
254 "name": "SSH to Device",
255 "id": "Ubuntu.Menu.Device.SSH",
256 "keysequence": "Ctrl+F10",
257 "deviceRequired": true,
258 "actions": [
259 "x-terminal-emulator -e \"ssh -i ~/.ssh/ubuntudevice_%SERIALNUMBER%_id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null %USERNAME%@%IP% -p%PORT%\""
260 ]
261 },
262 {
263 "name": "Enable platform development mode",
264 "id": "Ubuntu.Menu.Device.EnablePlatformDevelopmentMode",
265 "deviceRequired": true,
266 "actions": [
267 "%SCRIPTDIRECTORY%/qtc_device_developertools %SERIALNUMBER%"
268 ]
269 },
270 {
271 "name": "Close All Applications on Device",
272 "id": "Ubuntu.Menu.Device.CloseAllApps",
273 "deviceRequired": true,
274 "actions": [
275 "%SCRIPTDIRECTORY%/qtc_device_close_all_apps %SERIALNUMBER%"
276 ]
277 },
278 {
279 "name": "Flash daily image on device",
280 "id": "Ubuntu.Menu.Device.FlashDaily",
281 "deviceRequired": true,
282 "actions": [
283 "%SCRIPTDIRECTORY%/device_flashdaily %SERIALNUMBER%"
284 ]
285 },
286 {
287 "name": "Flash daily image on device (with bootstrap)",
288 "id": "Ubuntu.Menu.Device.FlashDailyBootstrap",
289 "deviceRequired": true,
290 "actions": [
291 "%SCRIPTDIRECTORY%/device_flashdaily_bootstrap %SERIALNUMBER%"
292 ]
293 },
294 {
295 "name": "Enable",
296 "id": "Ubuntu.Menu.Device.Enable",
297 "submenu": [
298 {
299 "name": "Developer Tools",
300 "id": "Ubuntu.Menu.Device.Enable.DeveloperMode",
301 "keysequence": "Ctrl+F11",
302 "deviceRequired": true,
303 "actions": [
304 "%SCRIPTDIRECTORY%/qtc_device_developertools %SERIALNUMBER%"
305 ]
306 }
307 ]
308 },
309 {
310 "name": "State",
311 "id": "Ubuntu.Menu.Device.State",
312 "submenu": [
313 {
314 "name": "Reboot",
315 "id": "Ubuntu.Menu.Device.Reboot",
316 "keysequence": "Ctrl+F8",
317 "deviceRequired": true,
318 "actions": [
319 "adb -s %SERIALNUMBER% root",
320 "adb -s %SERIALNUMBER% wait-for-device",
321 "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin reboot"
322 ]
323 },
324 {
325 "name": "Shutdown",
326 "id": "Ubuntu.Menu.Device.Shutdown",
327 "keysequence": "Ctrl+F9",
328 "deviceRequired": true,
329 "actions": [
330 "adb -s %SERIALNUMBER% root",
331 "adb -s %SERIALNUMBER% wait-for-device",
332 "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin shutdown -h now"
333 ]
334 }
335 ]
336 }
337 ]
338 },
339 {
340 "name": "Device Package Management",
341 "id": "Ubuntu.Menu.Device.AptGet",
342 "submenu": [
343 {
344 "name": "Run Package Update",
345 "id": "Ubuntu.Menu.Device.AptGet.Update",
346 "deviceRequired": true,
347 "actions": [
348 "adb -s %SERIALNUMBER% root",
349 "adb -s %SERIALNUMBER% wait-for-device",
350 "adb -s %SERIALNUMBER% shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin apt-get update"
351 ]
352 },
353 {
354 "name": "Upgrade Packages",
355 "id": "Ubuntu.Menu.Device.AptGet.Upgrade",
356 "deviceRequired": true,
357 "actions": [
358 "adb -s %SERIALNUMBER% root",
359 "adb -s %SERIALNUMBER% wait-for-device",
360 "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\""
361 ]
362 },
363 {
364 "name": "Install Package",
365 "id": "Ubuntu.Menu.Device.AptGet.Install",
366 "deviceRequired": true,
367 "actions": [
368 {
369 "queryDialog": {
370 "title": "Install Package",
371 "message": "Package Name:",
372 "value": "<packagename>"
373 }
374 },
375 "adb -s %SERIALNUMBER% root",
376 "adb -s %SERIALNUMBER% wait-for-device",
377 "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"
378 ]
379 },
380 {
381 "name": "Install Package Build Dependencies",
382 "id": "Ubuntu.Menu.Device.AptGet.BuildDep",
383 "deviceRequired": true,
384 "actions": [
385 "adb -s %SERIALNUMBER% root",
386 "adb -s %SERIALNUMBER% wait-for-device",
387 {
388 "queryDialog": {
389 "title": "Install Package Build Dependencies",
390 "message": "Package Name:",
391 "value": "<packagename>"
392 }
393 },
394 "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"
395 ]
396 }
397 ]
398 },
399 {
400 "name": "Android Debugging",
401 "id": "Ubuntu.Menu.Device.ADB",
402 "submenu": [
403 {
404 "name": "adb shell",
405 "id": "Ubuntu.Menu.Device.ADB.shell",
406 "deviceRequired": true,
407 "actions": [
408 "x-terminal-emulator -e \"adb -s %SERIALNUMBER% shell\""
409 ]
410 },
411 {
412 "name": "adb root",
413 "id": "Ubuntu.Menu.Device.ADB.root",
414 "deviceRequired": true,
415 "actions": [
416 "adb -s %SERIALNUMBER% root"
417 ]
418 },
419 {
420 "name": "adb devices",
421 "id": "Ubuntu.Menu.Device.ADB.devices",
422 "actions": [
423 "adb devices"
424 ]
425 },
426 {
427 "name": "adb shell setprop persist.sys.usb.config ptp,adb",
428 "id": "Ubuntu.Menu.Device.ADB.setUsbConfigPtpAdb",
429 "deviceRequired": true,
430 "actions": [
431 "%SCRIPTDIRECTORY%/device_set_persist-sys-usb-config %SERIALNUMBER%"
432 ]
433 }
434 ]
435 }
436 ]
437 }
438}
0439
=== added directory 'share/qtcreator/ubuntu/scripts'
=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_has'
--- share/qtcreator/ubuntu/scripts/device_developertools_has 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_developertools_has 2013-11-20 07:28:27 +0000
@@ -0,0 +1,30 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
21
22for PACKAGE in ${PACKAGES}
23do
24 IS_INSTALLED=`adb_shell dpkg -s ${PACKAGE} |grep Status|grep -o "install ok installed"|wc -l`
25 if [[ ${IS_INSTALLED} -eq "0" ]]; then
26 echo "0"
27 exit
28 fi
29done
30echo "1"
0\ No newline at end of file31\ No newline at end of file
132
=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_install'
--- share/qtcreator/ubuntu/scripts/device_developertools_install 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_developertools_install 2013-11-20 07:28:27 +0000
@@ -0,0 +1,25 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
21
22adb_shell apt-get -y -f install
23adb_shell apt-get update
24adb_shell apt-get upgrade -y
25adb_shell apt-get install ${PACKAGES} -y
0\ No newline at end of file26\ No newline at end of file
127
=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_packages'
--- share/qtcreator/ubuntu/scripts/device_developertools_packages 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_developertools_packages 2013-11-20 07:28:27 +0000
@@ -0,0 +1,1 @@
1autopilot-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
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'share/qtcreator/ubuntu/scripts/device_developertools_remove'
--- share/qtcreator/ubuntu/scripts/device_developertools_remove 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_developertools_remove 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20PACKAGES=`cat ${SCRIPTPATH}/device_developertools_packages`
21
22adb_shell apt-get -y -f install
23adb_shell apt-get remove ${PACKAGES} -y
0\ No newline at end of file24\ No newline at end of file
125
=== added file 'share/qtcreator/ubuntu/scripts/device_flashdaily'
--- share/qtcreator/ubuntu/scripts/device_flashdaily 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_flashdaily 2013-11-20 07:28:27 +0000
@@ -0,0 +1,39 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20if [[ !does_device_hw_match_image_hw ]]; then
21 IMAGE_HARDWARE=`device_image_hardware`
22 DEVICE_HARDWARE=`device_hardware`
23 echo
24 echo " WARNING! Device image hardware version"
25 echo " does not match the detected device hardware."
26 echo
27 echo -n " Device Image Version: "
28 echo ${IMAGE_HARDWARE}
29 echo -n " Device Version: "
30 echo ${DEVICE_HARDWARE}
31 echo
32 echo " In order to flash your device, you must do it manually:"
33 echo " phablet-flash cdimage-touch -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE}"
34 echo
35elif [[ phablet_tools_new_syntax ]]; then
36 x-terminal-emulator -e "bash -ic 'phablet-flash ubuntu-system -s ${SERIALNUMBER}'"
37else
38 x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}'"
39fi
040
=== added file 'share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap'
--- share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_flashdaily_bootstrap 2013-11-20 07:28:27 +0000
@@ -0,0 +1,39 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20if [[ !does_device_hw_match_image_hw ]]; then
21 IMAGE_HARDWARE=`device_image_hardware`
22 DEVICE_HARDWARE=`device_hardware`
23 echo
24 echo " WARNING! Device image hardware version"
25 echo " does not match the detected device hardware."
26 echo
27 echo -n " Device Image Version: "
28 echo ${IMAGE_HARDWARE}
29 echo -n " Device Version: "
30 echo ${DEVICE_HARDWARE}
31 echo
32 echo " In order to flash your device, you must do it manually:"
33 echo " phablet-flash cdimage-touch -s ${SERIALNUMBER} -d ${IMAGE_HARDWARE} -b"
34 echo
35elif [[ phablet_tools_new_syntax ]]; then
36 x-terminal-emulator -e "bash -ic 'phablet-flash ubuntu-system -s ${SERIALNUMBER}' -b"
37else
38 x-terminal-emulator -e "bash -ic 'phablet-flash -s ${SERIALNUMBER}' -b"
39fi
040
=== added file 'share/qtcreator/ubuntu/scripts/device_hasnetwork'
--- share/qtcreator/ubuntu/scripts/device_hasnetwork 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_hasnetwork 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_network_state_connected
021
=== added file 'share/qtcreator/ubuntu/scripts/device_network_clone'
--- share/qtcreator/ubuntu/scripts/device_network_clone 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_network_clone 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20clone_network_setup_from_host_to_device
21wait_for_network_state_switch_on
22
23echo "The device has connected to a network."
0\ No newline at end of file24\ No newline at end of file
125
=== added file 'share/qtcreator/ubuntu/scripts/device_portforward'
--- share/qtcreator/ubuntu/scripts/device_portforward 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_portforward 2013-11-20 07:28:27 +0000
@@ -0,0 +1,33 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20SSHPORT=$2
21QMLPORT=$3
22
23if [[ -z $SSHPORT ]]; then
24 SSHPORT=2222
25fi
26
27if [[ -z $QMLPORT ]]; then
28 QMLPORT=3768
29fi
30
31adb_forward_tcp ${SSHPORT} 22
32adb_forward_tcp ${QMLPORT} 3768
33
034
=== added file 'share/qtcreator/ubuntu/scripts/device_reboot'
--- share/qtcreator/ubuntu/scripts/device_reboot 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_reboot 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_reboot
021
=== added file 'share/qtcreator/ubuntu/scripts/device_reboot2bootloader'
--- share/qtcreator/ubuntu/scripts/device_reboot2bootloader 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_reboot2bootloader 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_reboot_bootloader
21
022
=== added file 'share/qtcreator/ubuntu/scripts/device_reboot2recovery'
--- share/qtcreator/ubuntu/scripts/device_reboot2recovery 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_reboot2recovery 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_reboot_recovery
021
=== added file 'share/qtcreator/ubuntu/scripts/device_rootshell'
--- share/qtcreator/ubuntu/scripts/device_rootshell 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_rootshell 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20adb_shell
021
=== added file 'share/qtcreator/ubuntu/scripts/device_search'
--- share/qtcreator/ubuntu/scripts/device_search 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_search 2013-11-20 07:28:27 +0000
@@ -0,0 +1,24 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18adb kill-server > /dev/null
19adb start-server > /dev/null
20#adb root &> /dev/null
21#if [ $?==1 ]; then
22# exit
23#fi
24adb devices -l | grep -Ev "List of devices attached" | sed "/^$/d"
025
=== added file 'share/qtcreator/ubuntu/scripts/device_service_ssh_start'
--- share/qtcreator/ubuntu/scripts/device_service_ssh_start 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_service_ssh_start 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20adb_shell service ssh start &> /dev/null
021
=== added file 'share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config'
--- share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_set_persist-sys-usb-config 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20adb_shell setprop persist.sys.usb.config ptp,adb
021
=== added file 'share/qtcreator/ubuntu/scripts/device_shutdown'
--- share/qtcreator/ubuntu/scripts/device_shutdown 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_shutdown 2013-11-20 07:28:27 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_shutdown
021
=== added file 'share/qtcreator/ubuntu/scripts/device_time_clone'
--- share/qtcreator/ubuntu/scripts/device_time_clone 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_time_clone 2013-11-20 07:28:27 +0000
@@ -0,0 +1,29 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Zoltán Balogh <zoltan.balogh@canonical.com>
17# Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
18
19. `dirname $0`/functions.inc
20
21LOCAL_DATE=`date +%Y%m%d`
22LOCAL_TIME=`date +%T`
23TIMEZONE=`cat /etc/timezone`
24
25adb_shell sed -i "s#.*/.*#${TIMEZONE=}#" /etc/timezone
26adb_shell dpkg-reconfigure --frontend noninteractive tzdata > /dev/null
27adb_shell date +%Y%m%d -s "${LOCAL_DATE}" > /dev/null
28adb_shell date +%T -s "${LOCAL_TIME}" > /dev/null
29
030
=== added file 'share/qtcreator/ubuntu/scripts/device_version'
--- share/qtcreator/ubuntu/scripts/device_version 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_version 2013-11-20 07:28:27 +0000
@@ -0,0 +1,21 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20device_image_hardware
21device_image_version
022
=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_has'
--- share/qtcreator/ubuntu/scripts/device_writableimage_has 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_writableimage_has 2013-11-20 07:28:27 +0000
@@ -0,0 +1,22 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20WRITABLE_IMAGE_FILE=/userdata/.writable_image
21
22adb_shell cat ${WRITABLE_IMAGE_FILE} |grep -oi "no such file"|wc -l
023
=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_set'
--- share/qtcreator/ubuntu/scripts/device_writableimage_set 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_writableimage_set 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20WRITABLE_IMAGE_FILE=/userdata/.writable_image
21
22adb_shell touch ${WRITABLE_IMAGE_FILE}
23adb_shell reboot
0\ No newline at end of file24\ No newline at end of file
125
=== added file 'share/qtcreator/ubuntu/scripts/device_writableimage_unset'
--- share/qtcreator/ubuntu/scripts/device_writableimage_unset 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/device_writableimage_unset 2013-11-20 07:28:27 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18. `dirname $0`/functions.inc
19
20WRITABLE_IMAGE_FILE=/userdata/.writable_image
21
22adb_shell rm ${WRITABLE_IMAGE_FILE}
23adb_shell reboot
0\ No newline at end of file24\ No newline at end of file
125
=== added file 'share/qtcreator/ubuntu/scripts/functions.inc'
--- share/qtcreator/ubuntu/scripts/functions.inc 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/scripts/functions.inc 2013-11-20 07:28:27 +0000
@@ -0,0 +1,145 @@
1#!/bin/bash
2# Copyright 2013 Canonical Ltd.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation; version 2.1.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
18set -e
19
20SCRIPTPATH=`dirname $0`
21SERIALNUMBER=$1
22SSHIDENTITY=~/.ssh/ubuntudevice_${SERIALNUMBER}_id_rsa
23USERNAME=phablet
24
25function adb_root {
26 adb -s ${SERIALNUMBER} root &> /dev/null
27 adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
28}
29
30function has_ubuntu_chroot {
31 local HAS_UBUNTU_CHROOT=`adb -s ${SERIALNUMBER} shell "which ubuntu_chroot"`
32 if [[ ${HAS_UBUNTU_CHROOT} ]]; then
33 echo 1
34 else
35 echo 0
36 fi
37}
38
39function adbd_restart {
40 adb kill-server &> /dev/null
41 adb start-server &> /dev/null
42}
43
44function adb_devices {
45 adb devices -l
46}
47
48function adb_forward_tcp {
49set +e
50 adb -s ${SERIALNUMBER} forward tcp:$1 tcp:$2
51set -e
52}
53
54function adb_shell {
55set +e
56 if [[ `has_ubuntu_chroot` -eq "1" ]]; then
57 adb -s ${SERIALNUMBER} shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin $@
58 else
59 adb -s ${SERIALNUMBER} shell $@
60 fi
61set -e
62}
63
64function phablet_shell {
65 adb_shell "su ${USERNAME} -c \"$@\""
66}
67
68function phablet_tools_new_syntax {
69 installed_version=$(dpkg-query --show --showformat '${Version}' phablet-tools)
70 dpkg --compare-versions $installed_version ge 1.0
71 echo $?
72}
73
74function ubuntu_stamp {
75 adb_shell cat /system/*ubuntu_stamp
76}
77
78function device_hardware {
79 adb_devices |grep -o device:.*|sed "s/device://"
80}
81
82function device_image_hardware {
83 ubuntu_stamp | grep HARDWARE|sed "s/HARDWARE=//g"
84}
85
86function does_device_hw_match_image_hw {
87 if [[ device_hardware == device_image_hardware ]]; then
88 echo 1
89 else
90 echo 0
91 fi
92}
93
94function device_image_version {
95 ubuntu_stamp | grep JENKINS|sed "s/JENKINS_BUILD=//g"
96}
97
98function device_network_state_connected {
99 local NM_STATE=`adb_shell nmcli nm | head -n+2 | awk '{print $2}'`
100 if [[ $NM_STATE != *disconnected* ]]; then
101 echo 1
102 else
103 echo 0
104 fi
105}
106
107function device_reboot {
108 adb_shell reboot
109}
110
111function device_reboot_bootloader {
112 adb -s ${SERIALNUMBER} reboot-bootloader
113}
114
115function device_reboot_recovery {
116 adb -s ${SERIALNUMBER} reboot recovery
117}
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: