Merge lp:~kalikiana/u1db-qt/creator into lp:u1db-qt

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 88
Merged at revision: 85
Proposed branch: lp:~kalikiana/u1db-qt/creator
Merge into: lp:u1db-qt
Diff against target: 325 lines (+237/-3)
10 files modified
CMakeLists.txt (+3/-0)
debian/changelog (+5/-0)
debian/libu1db-qt5-dev.install (+2/-0)
documentation/CMakeLists.txt (+11/-3)
modules/U1db/CMakeLists.txt (+11/-0)
qtcreator/CMakeLists.txt (+10/-0)
qtcreator/contacts/main.qml (+90/-0)
qtcreator/contacts/template.xml (+7/-0)
qtcreator/settings/main.qml (+91/-0)
qtcreator/settings/template.xml (+7/-0)
To merge this branch: bzr merge lp:~kalikiana/u1db-qt/creator
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+161752@code.launchpad.net

Commit message

Add QtCreator Application templates and plugins.qmltypes to -dev package

Description of the change

Add QtCreator Application templates to -dev package

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~kalikiana/u1db-qt/creator updated
87. By Cris Dywan

Install generated plugins.qmltypes for QtCreator

88. By Cris Dywan

Split up custom commands and disable build during install

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-04-24 09:02:41 +0000
+++ CMakeLists.txt 2013-05-01 22:53:25 +0000
@@ -17,6 +17,8 @@
17# Build flags17# Build flags
18set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wundef -std=c++0x")18set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wundef -std=c++0x")
19add_definitions(-DQT_NO_KEYWORDS)19add_definitions(-DQT_NO_KEYWORDS)
20# Disable building during install to avoid file permission chaos
21set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY 1)
2022
21add_subdirectory(src)23add_subdirectory(src)
22enable_testing()24enable_testing()
@@ -25,6 +27,7 @@
25add_subdirectory(examples)27add_subdirectory(examples)
26add_subdirectory(gallery)28add_subdirectory(gallery)
27add_subdirectory(documentation)29add_subdirectory(documentation)
30add_subdirectory(qtcreator)
2831
29# PkgConfig file32# PkgConfig file
30set (PREFIX "${CMAKE_INSTALL_PREFIX}")33set (PREFIX "${CMAKE_INSTALL_PREFIX}")
3134
=== modified file 'debian/changelog'
--- debian/changelog 2013-04-23 11:02:54 +0000
+++ debian/changelog 2013-05-01 22:53:25 +0000
@@ -1,3 +1,8 @@
1u1db-qt (0.1.3) quantal; urgency=low
2 * Add QtCreator Application templates and plugins.qmltypes to -dev package
3
4 -- Christian Dywan <christian.dywan@canonical.com> Wed, 01 May 2013 10:40:08 -0700
5
1u1db-qt (0.1.2) quantal; urgency=low6u1db-qt (0.1.2) quantal; urgency=low
2 * Documentation packages -doc and -examples7 * Documentation packages -doc and -examples
3 8
49
=== modified file 'debian/libu1db-qt5-dev.install'
--- debian/libu1db-qt5-dev.install 2013-03-27 11:39:41 +0000
+++ debian/libu1db-qt5-dev.install 2013-05-01 22:53:25 +0000
@@ -1,3 +1,5 @@
1usr/lib/lib*.so1usr/lib/lib*.so
2usr/include/lib*/*.h2usr/include/lib*/*.h
3usr/lib/pkgconfig/lib*.pc3usr/lib/pkgconfig/lib*.pc
4usr/lib/*/qt5/qml/*/plugins.qmltypes
5usr/share/qtcreator/templates/qml/*
46
=== modified file 'documentation/CMakeLists.txt'
--- documentation/CMakeLists.txt 2013-04-23 16:18:23 +0000
+++ documentation/CMakeLists.txt 2013-05-01 22:53:25 +0000
@@ -4,14 +4,22 @@
4endif ()4endif ()
55
6set(U1DB_DOCS "${CMAKE_CURRENT_BINARY_DIR}/output")6set(U1DB_DOCS "${CMAKE_CURRENT_BINARY_DIR}/output")
7add_custom_target(doc ${ALL} "mkdir" "-p" "${U1DB_DOCS}"7
8add_custom_command(OUTPUT overview.html
9 COMMAND "mkdir" "-p" "${U1DB_DOCS}"
8 COMMAND "qdoc" "-outputdir" "${U1DB_DOCS}" "${CMAKE_CURRENT_SOURCE_DIR}/u1db.qdocconf" "2>" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"10 COMMAND "qdoc" "-outputdir" "${U1DB_DOCS}" "${CMAKE_CURRENT_SOURCE_DIR}/u1db.qdocconf" "2>" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"
9 COMMAND "cat" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"11 COMMAND "cat" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"
10 COMMAND "test" "!" "-s" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"12 COMMAND "test" "!" "-s" "${CMAKE_CURRENT_BINARY_DIR}/qdoc.err"
11 COMMAND "sed" "-r" "-i" "'s@(</head>)@<link rel=\"stylesheet\" type=\"text/css\" href=\"style/base.css\" />\\1@'" "${U1DB_DOCS}/*.html"13 COMMAND "sed" "-r" "-i" "'s@(</head>)@<link rel=\"stylesheet\" type=\"text/css\" href=\"style/base.css\" />\\1@'" "${U1DB_DOCS}/*.html"
14 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
15 DEPENDS U1DBPlugin
16 )
17add_custom_command(OUTPUT u1dbqt.qhp
12 COMMAND "qhelpgenerator" "${U1DB_DOCS}/u1dbqt.qhp"18 COMMAND "qhelpgenerator" "${U1DB_DOCS}/u1dbqt.qhp"
13 SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/u1db.qdocconf"19 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
14 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")20 DEPENDS overview.html
21 )
22add_custom_target(doc ${ALL} DEPENDS u1dbqt.qhp overview.html)
1523
16if (BUILD_DOCS)24if (BUILD_DOCS)
17 install(FILES "${U1DB_DOCS}/u1dbqt.qch"25 install(FILES "${U1DB_DOCS}/u1dbqt.qch"
1826
=== modified file 'modules/U1db/CMakeLists.txt'
--- modules/U1db/CMakeLists.txt 2013-04-23 10:39:54 +0000
+++ modules/U1db/CMakeLists.txt 2013-05-01 22:53:25 +0000
@@ -42,3 +42,14 @@
42install(FILES qmldir42install(FILES qmldir
43 DESTINATION ${QT_IMPORTS_DIR}/U1db43 DESTINATION ${QT_IMPORTS_DIR}/U1db
44 )44 )
45
46add_custom_command(
47 TARGET U1DBPlugin
48 POST_BUILD
49 COMMAND "qmlplugindump" "U1db" "1.0" "${CMAKE_BINARY_DIR}/modules" ">" "plugins.qmltypes"
50 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
51 )
52
53install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
54 DESTINATION ${QT_IMPORTS_DIR}/U1db
55 )
4556
=== added directory 'qtcreator'
=== added file 'qtcreator/CMakeLists.txt'
--- qtcreator/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ qtcreator/CMakeLists.txt 2013-05-01 22:53:25 +0000
@@ -0,0 +1,10 @@
1set(U1DB_WIZARDS "${CMAKE_INSTALL_PREFIX}/share/qtcreator/templates/qml")
2
3install(DIRECTORY "settings"
4 DESTINATION "${U1DB_WIZARDS}"
5 )
6
7install(DIRECTORY "contacts"
8 DESTINATION "${U1DB_WIZARDS}"
9 )
10
011
=== added directory 'qtcreator/contacts'
=== added file 'qtcreator/contacts/main.qml'
--- qtcreator/contacts/main.qml 1970-01-01 00:00:00 +0000
+++ qtcreator/contacts/main.qml 2013-05-01 22:53:25 +0000
@@ -0,0 +1,90 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Christian Dywan <christian.dywan@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20import QtQuick 2.0
21import U1db 1.0 as U1db
22import Ubuntu.Components 0.1
23import Ubuntu.Components.ListItems 0.1 as ListItem
24
25MainView {
26 width: units.gu(45)
27 height: units.gu(80)
28
29 U1db.Database {
30 id: contactsDatabase
31 /*
32 Uncomment to persistently store contacts on disk
33 path: "contacts.db"
34 */
35 }
36
37 U1db.Document {
38 database: contactsDatabase
39 docId: 'person0'
40 create: true
41 defaults: { 'name': 'John', 'city': 'Dublin', 'phone': 65849 }
42 }
43
44 U1db.Document {
45 database: contactsDatabase
46 docId: 'person1'
47 create: true
48 defaults: { 'name': 'Ivanka', 'city': 'Dublin', 'phone': 98765 }
49 }
50
51 U1db.Document {
52 database: contactsDatabase
53 docId: 'person2'
54 create: true
55 defaults: { 'name': 'Leonardo', 'city': 'Rome', 'phone': 12345 }
56 }
57
58 U1db.Index {
59 database: contactsDatabase
60 id: byCityName
61 expression: [ "city" ]
62 }
63
64 U1db.Query {
65 id: numberOne
66 index: byCityName
67 query: [ "Dublin" ]
68 }
69
70 Page {
71 Tabs {
72 Tab {
73 title: i18n.tr("People living in Dublin")
74 page: Page {
75 anchors.centerIn: parent
76 ListView {
77 width: units.gu(45)
78 height: units.gu(80)
79 model: numberOne
80 delegate: ListItem.Subtitled {
81 text: contents.name
82 subText: contents.city
83 }
84 }
85 }
86 }
87 }
88 }
89}
90
091
=== added file 'qtcreator/contacts/template.xml'
--- qtcreator/contacts/template.xml 1970-01-01 00:00:00 +0000
+++ qtcreator/contacts/template.xml 2013-05-01 22:53:25 +0000
@@ -0,0 +1,7 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<template openeditor="main.qml" priority="2"
3 featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2"
4 id="QB.U1DbContactsWithUbuntuComponents">
5 <displayname>Showing a U1Db query in a ListView</displayname>
6 <description>Ubuntu Components can be used to display a U1Db query.&lt;br/&gt;Any changes are updated automatically.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
7</template>
08
=== added directory 'qtcreator/settings'
=== added file 'qtcreator/settings/main.qml'
--- qtcreator/settings/main.qml 1970-01-01 00:00:00 +0000
+++ qtcreator/settings/main.qml 2013-05-01 22:53:25 +0000
@@ -0,0 +1,91 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Christian Dywan <christian.dywan@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20import QtQuick 2.0
21import U1db 1.0 as U1db
22import Ubuntu.Components 0.1
23
24MainView {
25 width: units.gu(45)
26 height: units.gu(80)
27
28 U1db.Database {
29 id: settingsDatabase
30 /*
31 Uncomment to persistently store settings on disk
32 path: "settings.db"
33 */
34 }
35
36 U1db.Document {
37 id: settingsDocument
38 database: settingsDatabase
39 docId: 'settings'
40 create: true
41 defaults: { "sound": true, "music": false, "username": "Joe User" }
42 }
43
44 Page {
45 Tabs {
46 Tab {
47 title: i18n.tr("Game Settings")
48 page: Page {
49 anchors.centerIn: parent
50 Column {
51 spacing: units.gu(2)
52 Row {
53 spacing: units.gu(2)
54 Label {
55 text: i18n.tr("Username")
56 width: units.gu(19)
57 anchors.verticalCenter: parent.verticalCenter
58 }
59 TextField {
60 placeholderText: settingsDocument.contents.username
61 }
62 }
63 Row {
64 spacing: units.gu(2)
65 Label {
66 text: i18n.tr("Sound")
67 width: units.gu(19)
68 anchors.verticalCenter: parent.verticalCenter
69 }
70 Switch {
71 checked: settingsDocument.contents.sound
72 }
73 }
74 Row {
75 spacing: units.gu(2)
76 Label {
77 text: i18n.tr("Music")
78 width: units.gu(19)
79 anchors.verticalCenter: parent.verticalCenter
80 }
81 Switch {
82 checked: settingsDocument.contents.music
83 }
84 }
85 }
86 }
87 }
88 }
89 }
90}
91
092
=== added file 'qtcreator/settings/template.xml'
--- qtcreator/settings/template.xml 1970-01-01 00:00:00 +0000
+++ qtcreator/settings/template.xml 2013-05-01 22:53:25 +0000
@@ -0,0 +1,7 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<template openeditor="main.qml" priority="2"
3 featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2"
4 id="QB.U1DbSettingsWithQtQuick2.0">
5 <displayname>Storing app settings in U1Db</displayname>
6 <description>A straightforward example of storing data in a U1Db document.&lt;br/&gt;The data can be displayed using standard QML items.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
7</template>

Subscribers

People subscribed via source and target branches

to all changes: