Merge lp:~renatofilho/address-book-app/qsysteminfo-snap into lp:address-book-app
- qsysteminfo-snap
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Renato Araujo Oliveira Filho |
Approved revision: | 651 |
Merged at revision: | 649 |
Proposed branch: | lp:~renatofilho/address-book-app/qsysteminfo-snap |
Merge into: | lp:address-book-app |
Diff against target: |
223 lines (+26/-31) 9 files modified
CMakeLists.txt (+3/-14) address-book-app.wrapper (+0/-2) config.h.in (+0/-1) debian/control.in (+2/-1) src/app/addressbookapp.cpp (+3/-2) src/imports/ABContactListPage.qml (+7/-1) src/imports/ABNewContactBottomEdge.qml (+2/-0) src/imports/MainWindow.qml (+8/-7) tests/qml/tst_ContactList.qml (+1/-3) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/qsysteminfo-snap |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Sheldon (community) | Approve | ||
system-apps-ci-bot | continuous-integration | Approve | |
Review via email: mp+311135@code.launchpad.net |
Commit message
Use 'SNAP_PATH' to import files if available.
Do not use unity8 private API.
Do not use full path on desktop exec entry.
Description of the change
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:650
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:650
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:650
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 651. By Renato Araujo Oliveira Filho
-
Does not load bottom edge during the tests.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:651
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Sheldon (michael-sheldon) wrote : | # |
Looks good :)
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2016-07-05 17:56:31 +0000 |
3 | +++ CMakeLists.txt 2016-11-23 16:15:43 +0000 |
4 | @@ -64,32 +64,21 @@ |
5 | set(CMAKE_INSTALL_PREFIX /) |
6 | set(CMAKE_INSTALL_BINDIR /) |
7 | set(CLICK_TAG click) |
8 | - set(ADDRESS_BOOK_APP_BINDIR ".") |
9 | + set(ADDRESS_BOOK_APP_BINDIR "./") |
10 | set(QT_EXTRA_IMPORTS_DIR ${QT_IMPORTS_DIR}) |
11 | set(INSTALL_TESTS off) |
12 | else(CLICK_MODE) |
13 | set(CLICK_MODE_ENABLED 0) |
14 | - set(ADDRESS_BOOK_APP_BINDIR ${CMAKE_INSTALL_FULL_BINDIR}) |
15 | + set(ADDRESS_BOOK_APP_BINDIR "") |
16 | set(QT_EXTRA_IMPORTS_DIR "") |
17 | endif(CLICK_MODE) |
18 | |
19 | -set(DESKTOP_EXEC "${ADDRESS_BOOK_APP_BINDIR}/address-book-app") |
20 | +set(DESKTOP_EXEC "address-book-app") |
21 | set(QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/Ubuntu/Contacts.${API_VERSION}/") |
22 | set(ADDRESS_BOOK_QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/Ubuntu/AddressBook/") |
23 | set(ADDRESS_BOOK_APP_DESKTOP_FILE address-book-app.desktop) |
24 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") |
25 | |
26 | -#find unity8 qml libraries |
27 | -find_path(LIB_UNITY_QML_EXISTS NAMES libUnity-qml.so |
28 | - HINTS "/usr/lib/x86_64-linux-gnu/unity8/qml/Unity/" |
29 | - NO_CMAKE_PATH |
30 | - NO_CMAKE_ENVIRONMENT_PATH |
31 | - NO_SYSTEM_ENVIRONMENT_PATH |
32 | -) |
33 | -if(!LIB_UNITY_QML_EXISTS) |
34 | - MESSAGE(FATAL_ERROR "unity8 private package not-found") |
35 | -endif() |
36 | - |
37 | add_subdirectory(data) |
38 | add_subdirectory(src) |
39 | add_subdirectory(po) |
40 | |
41 | === modified file 'address-book-app.wrapper' |
42 | --- address-book-app.wrapper 2016-09-29 16:01:20 +0000 |
43 | +++ address-book-app.wrapper 2016-11-23 16:15:43 +0000 |
44 | @@ -17,8 +17,6 @@ |
45 | export QT_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/qt5/plugins |
46 | export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH/qt5/qml |
47 | export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/lib/$ARCH |
48 | -# Unity8 private |
49 | -export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/x86_64-linux-gnu/unity8/qml |
50 | |
51 | # Necessary for the SDK to find the translations directory |
52 | export APP_DIR=$SNAP |
53 | |
54 | === modified file 'config.h.in' |
55 | --- config.h.in 2016-08-01 22:30:34 +0000 |
56 | +++ config.h.in 2016-11-23 16:15:43 +0000 |
57 | @@ -11,7 +11,6 @@ |
58 | #define QT_EXTRA_IMPORTS_DIR "@QT_EXTRA_IMPORTS_DIR@" |
59 | #define ADDRESS_BOOK_APP_CLICK_PACKAGE "@CLICK_MODE@" |
60 | #define I18N_DIRECTORY "@CMAKE_INSTALL_PREFIX@/share/locale" |
61 | -#define UNITY8_QML_PATH "/usr/lib/@CMAKE_C_LIBRARY_ARCHITECTURE@/unity8/qml/" |
62 | |
63 | #define SETTINGS_ORGANIZATION_NAME "com.ubuntu.address-book" |
64 | #define SETTINGS_ORGANIZATION_DOMAIN "canonical.com" |
65 | |
66 | === modified file 'debian/control.in' |
67 | --- debian/control.in 2016-10-06 08:38:43 +0000 |
68 | +++ debian/control.in 2016-11-23 16:15:43 +0000 |
69 | @@ -11,6 +11,7 @@ |
70 | python3:any, |
71 | pkg-config, |
72 | qml-module-qttest [@ARCHS@], |
73 | + qml-module-qtsysteminfo (>= 5.0~) [@ARCHS@], |
74 | qtdeclarative5-dev-tools [@ARCHS@], |
75 | qtdeclarative5-gsettings1.0 [@ARCHS@], |
76 | qml-module-ofono [@ARCHS@], |
77 | @@ -44,6 +45,7 @@ |
78 | libqt5versit5, |
79 | ubuntu-ui-toolkit-theme (>= 0.1.49+14.10.20140707), |
80 | qmlscene, |
81 | + qml-module-qtsysteminfo (>= 5.0~), |
82 | qtcontact5-galera, |
83 | qtdeclarative5-gsettings1.0, |
84 | qtdeclarative5-qtcontacts-plugin, |
85 | @@ -53,7 +55,6 @@ |
86 | qtdeclarative5-ubuntu-history0.1, |
87 | qtdeclarative5-ubuntu-keyboard-extensions0.1, |
88 | qtdeclarative5-ubuntu-telephony-phonenumber0.1 (>= 0.1+14.10.20140715.1), |
89 | - unity8-private, |
90 | ${misc:Depends}, |
91 | ${shlibs:Depends}, |
92 | Description: Address Book application |
93 | |
94 | === modified file 'src/app/addressbookapp.cpp' |
95 | --- src/app/addressbookapp.cpp 2016-09-28 20:50:07 +0000 |
96 | +++ src/app/addressbookapp.cpp 2016-11-23 16:15:43 +0000 |
97 | @@ -79,7 +79,9 @@ |
98 | static QString importPath(const QString &suffix) |
99 | { |
100 | QString appPath = QCoreApplication::applicationDirPath(); |
101 | - if (ADDRESS_BOOK_APP_CLICK_MODE) { |
102 | + if (qEnvironmentVariableIsSet(SNAP_PATH)) { |
103 | + return qgetenv(SNAP_PATH) + suffix; |
104 | + } else if (ADDRESS_BOOK_APP_CLICK_MODE) { |
105 | return QString(QT_EXTRA_IMPORTS_DIR) + suffix; |
106 | } else if (appPath.startsWith(ADDRESS_BOOK_DEV_BINDIR)) { |
107 | return QString(ADDRESS_BOOK_APP_DEV_DATADIR) + suffix; |
108 | @@ -200,7 +202,6 @@ |
109 | m_view->setTitle("Contacts"); |
110 | qDebug() << "New import path:" << QCoreApplication::applicationDirPath() + "/" + importPath(""); |
111 | m_view->engine()->addImportPath(QCoreApplication::applicationDirPath() + "/" + importPath("")); |
112 | - m_view->engine()->addImportPath(UNITY8_QML_PATH); |
113 | m_view->rootContext()->setContextProperty("QTCONTACTS_MANAGER_OVERRIDE", defaultManager); |
114 | m_view->rootContext()->setContextProperty("application", this); |
115 | m_view->rootContext()->setContextProperty("contactKey", contactKey); |
116 | |
117 | === modified file 'src/imports/ABContactListPage.qml' |
118 | --- src/imports/ABContactListPage.qml 2016-11-08 09:20:36 +0000 |
119 | +++ src/imports/ABContactListPage.qml 2016-11-23 16:15:43 +0000 |
120 | @@ -42,6 +42,8 @@ |
121 | property bool _importingTestData: false |
122 | property bool _creatingContact: false |
123 | property string _newContactId: "" |
124 | + // used by tests |
125 | + property bool _bottomEdgeEnabled: true |
126 | |
127 | readonly property string currentViewContactId: viewPage && viewPage.contact ? viewPage.contact.contactId : "" |
128 | readonly property bool isEmpty: (contactList.count === 0) |
129 | @@ -743,7 +745,9 @@ |
130 | enabled: false |
131 | active: true |
132 | asynchronous: true |
133 | - Component.onCompleted: setSource(Qt.resolvedUrl("ABNewContactBottomEdge.qml"), |
134 | + Component.onCompleted: { |
135 | + if (mainPage._bottomEdgeEnabled) { |
136 | + setSource(Qt.resolvedUrl("ABNewContactBottomEdge.qml"), |
137 | {"parent": mainPage, |
138 | "modelToEdit": Qt.binding(function () {return mainPage.contactModel}), |
139 | "hint.flickable": Qt.binding(function () {return contactList.view}), |
140 | @@ -752,6 +756,8 @@ |
141 | "hintVisible": Qt.binding(function () {return mainPage.pageStack.columns === 1}), |
142 | "visible": Qt.binding(function () {return mainPage.pageStack.columns === 1}) |
143 | }) |
144 | + } |
145 | + } |
146 | } |
147 | |
148 | Binding { |
149 | |
150 | === modified file 'src/imports/ABNewContactBottomEdge.qml' |
151 | --- src/imports/ABNewContactBottomEdge.qml 2016-09-23 10:14:24 +0000 |
152 | +++ src/imports/ABNewContactBottomEdge.qml 2016-11-23 16:15:43 +0000 |
153 | @@ -74,6 +74,8 @@ |
154 | preloadContent: false |
155 | |
156 | Timer { |
157 | + id: delayPreload |
158 | + |
159 | interval: 1 |
160 | repeat: false |
161 | running: bottomEdge.visible |
162 | |
163 | === modified file 'src/imports/MainWindow.qml' |
164 | --- src/imports/MainWindow.qml 2016-09-23 10:34:06 +0000 |
165 | +++ src/imports/MainWindow.qml 2016-11-23 16:15:43 +0000 |
166 | @@ -17,8 +17,8 @@ |
167 | import QtQuick 2.4 |
168 | import Ubuntu.Components 1.3 |
169 | import Ubuntu.Components.Popups 1.3 as Popups |
170 | +import QtSystemInfo 5.5 |
171 | |
172 | -import Unity.InputInfo 0.1 |
173 | |
174 | MainView { |
175 | id: mainWindow |
176 | @@ -94,19 +94,20 @@ |
177 | height: units.gu(71) |
178 | anchorToKeyboard: false |
179 | |
180 | - InputDeviceModel { |
181 | + |
182 | + InputDeviceManager { |
183 | id: miceModel |
184 | - deviceFilter: InputInfo.Mouse |
185 | + filter: InputInfo.Mouse |
186 | } |
187 | |
188 | - InputDeviceModel { |
189 | + InputDeviceManager { |
190 | id: touchPadModel |
191 | - deviceFilter: InputInfo.TouchPad |
192 | + filter: InputInfo.TouchPad |
193 | } |
194 | |
195 | - InputDeviceModel { |
196 | + InputDeviceManager { |
197 | id: keyboardsModel |
198 | - deviceFilter: InputInfo.Keyboard |
199 | + filter: InputInfo.Keyboard |
200 | } |
201 | |
202 | ABAdaptivePageLayout { |
203 | |
204 | === modified file 'tests/qml/tst_ContactList.qml' |
205 | --- tests/qml/tst_ContactList.qml 2016-11-08 19:48:21 +0000 |
206 | +++ tests/qml/tst_ContactList.qml 2016-11-23 16:15:43 +0000 |
207 | @@ -54,6 +54,7 @@ |
208 | ABContactListPage { |
209 | id: contactListPage |
210 | anchors.fill: parent |
211 | + _bottomEdgeEnabled: false |
212 | } |
213 | |
214 | } |
215 | @@ -96,9 +97,6 @@ |
216 | |
217 | function cleanup() |
218 | { |
219 | - //WORKAROUND: avoid problems with async object |
220 | - //if the test run too fast it can cause problems with async objects |
221 | - wait(2000) |
222 | root.contactListPageObj.destroy() |
223 | } |
224 |
FAILED: Continuous integration, rev:650 /jenkins. canonical. com/system- apps/job/ lp-address- book-app- ci/31/ /jenkins. canonical. com/system- apps/job/ build/1988/ console /jenkins. canonical. com/system- apps/job/ build-0- fetch/1991 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1821/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1821/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= zesty/1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= zesty/1821/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1821/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1821/console /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= zesty/1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= zesty/1821/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1821/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1821 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1821/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= zesty/1821/ console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-address- book-app- ci/31/rebuild
https:/