Merge lp:~renatofilho/address-book-app/fix-1230404 into lp:address-book-app
- fix-1230404
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bill Filler |
Approved revision: | 94 |
Merged at revision: | 100 |
Proposed branch: | lp:~renatofilho/address-book-app/fix-1230404 |
Merge into: | lp:address-book-app |
Diff against target: |
593 lines (+50/-291) 14 files modified
data/address-book-app.desktop.in (+1/-1) debian/address-book-app.install (+1/-2) debian/control (+0/-1) src/app/AddressBookApp.xml (+0/-31) src/app/CMakeLists.txt (+1/-7) src/app/addressbookapp.cpp (+28/-87) src/app/addressbookapp.h (+5/-12) src/app/addressbookappdbus.cpp (+0/-79) src/app/addressbookappdbus.h (+0/-50) src/app/com.canonical.AddressBookApp.service.in (+0/-3) src/imports/ContactEdit/ContactEditor.qml (+2/-1) src/imports/ContactView/ContactDetailPhoneNumberView.qml (+2/-16) src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml (+1/-1) src/imports/main.qml (+9/-0) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/fix-1230404 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Bill Filler (community) | Approve | ||
Michael Terry | Approve | ||
Review via email: mp+188473@code.launchpad.net |
Commit message
Initial implementation for UriHandler.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:85
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
ABORTED: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:86
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:87
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:88
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : | # |
Looks about right, but I'm having problems testing bringing apps that are already open forward.
Michael Terry (mterry) wrote : | # |
OK, with latest upstart-app-launch and unity-mir, this works fine. Code changes look OK too.
Michael Terry (mterry) wrote : | # |
I just noticed that receiving "create" requests doesn't seem to work
Michael Terry (mterry) wrote : | # |
OK, figured it out. You need to promote parseUrl() from a private method to a public slot.
- 89. By Renato Araujo Oliveira Filho
-
Changed parseUrl function to be a public slot to make it visible into QML side.
- 90. By Renato Araujo Oliveira Filho
-
Fixed identation.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:90
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : | # |
With the slot change, this works fine for me.
- 91. By Renato Araujo Oliveira Filho
-
Merged mainline.
- 92. By Renato Araujo Oliveira Filho
- 93. By Renato Araujo Oliveira Filho
-
Added missing arg to exec entry.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:92
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Francis Ginther (fginther) wrote : | # |
The autopilot-
https:/
- 94. By Renato Araujo Oliveira Filho
-
Fixed argument handling during the first statup.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:93
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:94
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'data/address-book-app.desktop.in' |
2 | --- data/address-book-app.desktop.in 2013-09-19 18:36:07 +0000 |
3 | +++ data/address-book-app.desktop.in 2013-10-09 21:25:36 +0000 |
4 | @@ -6,7 +6,7 @@ |
5 | Name=tr("Contacts") |
6 | GenericName=tr("Contacts") |
7 | Comment=tr("Contacts Address Book") |
8 | -Exec=@CMAKE_INSTALL_FULL_BINDIR@/address-book-app |
9 | +Exec=@CMAKE_INSTALL_FULL_BINDIR@/address-book-app %u |
10 | Icon=contacts-app |
11 | X-Ubuntu-Touch=true |
12 | X-Ubuntu-StageHint=SideStage |
13 | |
14 | === modified file 'debian/address-book-app.install' |
15 | --- debian/address-book-app.install 2013-08-01 01:23:56 +0000 |
16 | +++ debian/address-book-app.install 2013-10-09 21:25:36 +0000 |
17 | @@ -1,5 +1,4 @@ |
18 | usr/bin/address-book-app |
19 | usr/share/address-book-app |
20 | usr/share/applications/address-book-app.desktop |
21 | -usr/share/icons/hicolor/48x48/apps/address-book-app.png |
22 | -usr/share/dbus-1/services/com.canonical.AddressBookApp.service |
23 | +usr/share/icons/hicolor/*/apps/address-book-app.png |
24 | |
25 | === modified file 'debian/control' |
26 | --- debian/control 2013-08-27 17:24:20 +0000 |
27 | +++ debian/control 2013-10-09 21:25:36 +0000 |
28 | @@ -26,7 +26,6 @@ |
29 | qtcontact5-galera, |
30 | qtdeclarative5-ubuntu-contacts0.1 (= ${binary:Version}), |
31 | qtdeclarative5-ubuntu-ui-toolkit-plugin, |
32 | - qtdeclarative5-ubuntu-telephony0.1, |
33 | qtdeclarative5-qtcontacts-plugin, |
34 | qtdeclarative5-qtquick2-plugin, |
35 | ${misc:Depends}, |
36 | |
37 | === removed file 'src/app/AddressBookApp.xml' |
38 | --- src/app/AddressBookApp.xml 2013-08-01 21:51:28 +0000 |
39 | +++ src/app/AddressBookApp.xml 1970-01-01 00:00:00 +0000 |
40 | @@ -1,31 +0,0 @@ |
41 | -<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> |
42 | -<node xmlns:dox="http://www.ayatana.org/dbus/dox.dtd"> |
43 | - <dox:d><![CDATA[ |
44 | - @mainpage |
45 | - |
46 | - An interface to the address book application. |
47 | - ]]></dox:d> |
48 | - <interface name="com.canonical.AddressBookApp" xmlns:dox="http://www.ayatana.org/dbus/dox.dtd"> |
49 | - <dox:d> |
50 | - An interface to the address book application. |
51 | - </dox:d> |
52 | - <method name="ShowContact"> |
53 | - <dox:d><![CDATA[ |
54 | - Request to show contact details of specific contact |
55 | - ]]></dox:d> |
56 | - <arg name="number" type="s" direction="in"/> |
57 | - </method> |
58 | - <method name="CreateContact"> |
59 | - <dox:d><![CDATA[ |
60 | - Request to create a new contact with a given phone number |
61 | - ]]></dox:d> |
62 | - <arg name="number" type="s" direction="in"/> |
63 | - </method> |
64 | - <method name="SendAppMessage"> |
65 | - <dox:d><![CDATA[ |
66 | - Send a message to the running application. |
67 | - ]]></dox:d> |
68 | - <arg name="message" type="s" direction="in"/> |
69 | - </method> |
70 | - </interface> |
71 | -</node> |
72 | |
73 | === modified file 'src/app/CMakeLists.txt' |
74 | --- src/app/CMakeLists.txt 2013-10-01 22:25:27 +0000 |
75 | +++ src/app/CMakeLists.txt 2013-10-09 21:25:36 +0000 |
76 | @@ -10,24 +10,18 @@ |
77 | set(ADDRESS_BOOK_APP_SRCS |
78 | addressbookapp.h |
79 | addressbookapp.cpp |
80 | - addressbookappdbus.h |
81 | - addressbookappdbus.cpp |
82 | imagescalethread.h |
83 | imagescalethread.cpp |
84 | main.cpp |
85 | ) |
86 | |
87 | -qt5_add_dbus_adaptor(ADDRESS_BOOK_APP_SRCS AddressBookApp.xml addressbookappdbus.h AddressBookAppDBus) |
88 | - |
89 | add_executable(${ADDRESS_BOOK_APP_BIN} |
90 | ${ADDRESS_BOOK_APP_SRCS} |
91 | ) |
92 | |
93 | -qt5_use_modules(${ADDRESS_BOOK_APP_BIN} Gui Core Qml Quick DBus) |
94 | +qt5_use_modules(${ADDRESS_BOOK_APP_BIN} Gui Core Qml Quick) |
95 | |
96 | install(TARGETS ${ADDRESS_BOOK_APP_BIN} |
97 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
98 | ) |
99 | |
100 | -configure_file(com.canonical.AddressBookApp.service.in com.canonical.AddressBookApp.service) |
101 | -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.AddressBookApp.service DESTINATION share/dbus-1/services) |
102 | |
103 | === modified file 'src/app/addressbookapp.cpp' |
104 | --- src/app/addressbookapp.cpp 2013-10-04 00:13:49 +0000 |
105 | +++ src/app/addressbookapp.cpp 2013-10-09 21:25:36 +0000 |
106 | @@ -16,7 +16,6 @@ |
107 | |
108 | #include "config.h" |
109 | #include "addressbookapp.h" |
110 | -#include "addressbookappdbus.h" |
111 | #include "imagescalethread.h" |
112 | |
113 | #include <QDir> |
114 | @@ -28,9 +27,6 @@ |
115 | #include <QQmlComponent> |
116 | #include <QQmlContext> |
117 | #include <QQuickView> |
118 | -#include <QDBusInterface> |
119 | -#include <QDBusReply> |
120 | -#include <QDBusConnectionInterface> |
121 | #include <QLibrary> |
122 | #include <QIcon> |
123 | #include <QTemporaryFile> |
124 | @@ -41,11 +37,9 @@ |
125 | { |
126 | qDebug() << "usage:" |
127 | << arguments.at(0).toUtf8().constData() |
128 | - << "[contact://CONTACT_ID]" |
129 | - << "[create://PHONE_NUMBER]" |
130 | - << "[addressbook://addphone?id=<contact-id>&phone=<phone-number>" |
131 | - << "[addressbook://contact?id=<contact-id>" |
132 | - << "[addressbook://create?phone=<phone-number>" |
133 | + << "[addressbook:///addphone?id=<contact-id>&phone=<phone-number>" |
134 | + << "[addressbook:///contact?id=<contact-id>" |
135 | + << "[addressbook:///create?phone=<phone-number>" |
136 | << "[--fullscreen]" |
137 | << "[--help]" |
138 | << "[-testability]"; |
139 | @@ -84,24 +78,16 @@ |
140 | } |
141 | |
142 | AddressBookApp::AddressBookApp(int &argc, char **argv) |
143 | - : QGuiApplication(argc, argv), m_view(0), m_applicationIsReady(false) |
144 | + : QGuiApplication(argc, argv), m_view(0) |
145 | { |
146 | setApplicationName("AddressBookApp"); |
147 | - m_dbus = new AddressBookAppDBus(this); |
148 | } |
149 | |
150 | bool AddressBookApp::setup() |
151 | { |
152 | installIconPath(); |
153 | - static QList<QString> validSchemes; |
154 | bool fullScreen = false; |
155 | |
156 | - if (validSchemes.isEmpty()) { |
157 | - validSchemes << "contact"; |
158 | - validSchemes << "create"; |
159 | - validSchemes << "addressbook"; |
160 | - } |
161 | - |
162 | QString contactKey; |
163 | QStringList arguments = this->arguments(); |
164 | |
165 | @@ -148,33 +134,14 @@ |
166 | } |
167 | } |
168 | |
169 | - if (arguments.size() == 2) { |
170 | - QUrl uri(arguments.at(1)); |
171 | - if (validSchemes.contains(uri.scheme())) { |
172 | - m_arg = arguments.at(1); |
173 | - } |
174 | - } |
175 | - |
176 | - // check if the app is already running, if it is, send the message to the running instance |
177 | - QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered(AddressBookAppDBus::serviceName()); |
178 | - if (reply.isValid() && reply.value()) { |
179 | - QDBusInterface appInterface(AddressBookAppDBus::serviceName(), |
180 | - AddressBookAppDBus::objectPath(), |
181 | - AddressBookAppDBus::interfaceName()); |
182 | - appInterface.call("SendAppMessage", m_arg); |
183 | - return false; |
184 | - } |
185 | - |
186 | - if (!m_dbus->connectToBus()) { |
187 | - qWarning() << "Failed to expose" << AddressBookAppDBus::interfaceName() << "on DBUS."; |
188 | - } |
189 | - |
190 | /* Configure "artwork:" prefix so that any access to a file whose name starts |
191 | with that prefix resolves properly. */ |
192 | QDir::addSearchPath("artwork", fullPath("/artwork")); |
193 | |
194 | m_view = new QQuickView(); |
195 | - QObject::connect(m_view, SIGNAL(statusChanged(QQuickView::Status)), this, SLOT(onViewStatusChanged(QQuickView::Status))); |
196 | + m_viewReady = false; |
197 | + QObject::connect(m_view, SIGNAL(statusChanged(QQuickView::Status)), |
198 | + this, SLOT(onViewStatusChanged(QQuickView::Status))); |
199 | QObject::connect(m_view->engine(), SIGNAL(quit()), SLOT(quit())); |
200 | |
201 | m_view->setResizeMode(QQuickView::SizeRootObjectToView); |
202 | @@ -182,7 +149,6 @@ |
203 | m_view->engine()->addImportPath(importPath("/imports/")); |
204 | m_view->rootContext()->setContextProperty("application", this); |
205 | m_view->rootContext()->setContextProperty("contactKey", contactKey); |
206 | - m_view->rootContext()->setContextProperty("dbus", m_dbus); |
207 | |
208 | QUrl source(fullPath("/imports/main.qml")); |
209 | m_view->setSource(source); |
210 | @@ -193,9 +159,13 @@ |
211 | m_view->show(); |
212 | } |
213 | |
214 | - connect(m_dbus, |
215 | - SIGNAL(request(QString)), |
216 | - SLOT(onMessageReceived(QString))); |
217 | + if (arguments.size() == 2) { |
218 | + if (!m_viewReady) { |
219 | + m_initialArg = arguments.at(1); |
220 | + } else { |
221 | + parseUrl(arguments.at(1)); |
222 | + } |
223 | + } |
224 | |
225 | return true; |
226 | } |
227 | @@ -210,17 +180,23 @@ |
228 | void AddressBookApp::onViewStatusChanged(QQuickView::Status status) |
229 | { |
230 | if (status == QQuickView::Ready) { |
231 | - m_applicationIsReady = true; |
232 | - parseArgument(m_arg); |
233 | - m_arg.clear(); |
234 | + m_viewReady = true; |
235 | + if (!m_initialArg.isEmpty()) { |
236 | + parseUrl(m_initialArg); |
237 | + m_initialArg.clear(); |
238 | + } |
239 | } |
240 | } |
241 | |
242 | void AddressBookApp::parseUrl(const QString &arg) |
243 | { |
244 | - QUrl url(arg); |
245 | + QUrl url = QUrl::fromPercentEncoding(arg.toUtf8()); |
246 | + if (url.scheme() != "addressbook") { |
247 | + return; |
248 | + } |
249 | |
250 | - QString methodName = url.host(); |
251 | + // Remove the first "/" |
252 | + QString methodName = url.path().right(url.path().length() -1); |
253 | QStringList args; |
254 | |
255 | QMap<QString, QStringList> methodsMetaData; |
256 | @@ -277,30 +253,6 @@ |
257 | callQMLMethod(methodName, args); |
258 | } |
259 | |
260 | -void AddressBookApp::parseArgument(const QString &arg) |
261 | -{ |
262 | - if (arg.isEmpty()) { |
263 | - return; |
264 | - } |
265 | - |
266 | - // new scheme |
267 | - if (arg.startsWith("addressbook://")) { |
268 | - parseUrl(arg); |
269 | - return; |
270 | - } |
271 | - |
272 | - QStringList args = arg.split("://"); |
273 | - if (args.size() != 2) { |
274 | - return; |
275 | - } |
276 | - |
277 | - QString scheme = args[0]; |
278 | - QStringList values; |
279 | - values << args[1]; |
280 | - |
281 | - callQMLMethod(scheme, values); |
282 | -} |
283 | - |
284 | void AddressBookApp::callQMLMethod(const QString name, QStringList args) |
285 | { |
286 | QQuickItem *mainView = m_view->rootObject(); |
287 | @@ -324,11 +276,11 @@ |
288 | method.invoke(mainView); |
289 | break; |
290 | case 1: |
291 | - method.invoke(mainView, Q_ARG(QVariant, QVariant(args[0]))); |
292 | + method.invoke(mainView, Q_ARG(QVariant, QVariant(args[0].toUtf8()))); |
293 | break; |
294 | case 2: |
295 | - method.invoke(mainView, Q_ARG(QVariant, QVariant(args[0])), |
296 | - Q_ARG(QVariant, QVariant(args[1]))); |
297 | + method.invoke(mainView, Q_ARG(QVariant, QVariant(args[0].toUtf8())), |
298 | + Q_ARG(QVariant, QVariant(args[1].toUtf8()))); |
299 | break; |
300 | default: |
301 | qWarning() << "Invalid arguments"; |
302 | @@ -337,17 +289,6 @@ |
303 | } |
304 | } |
305 | |
306 | -void AddressBookApp::onMessageReceived(const QString &message) |
307 | -{ |
308 | - if (m_applicationIsReady) { |
309 | - parseArgument(message); |
310 | - m_arg.clear(); |
311 | - activateWindow(); |
312 | - } else { |
313 | - m_arg = message; |
314 | - } |
315 | -} |
316 | - |
317 | void AddressBookApp::activateWindow() |
318 | { |
319 | if (m_view) { |
320 | |
321 | === modified file 'src/app/addressbookapp.h' |
322 | --- src/app/addressbookapp.h 2013-09-27 23:15:09 +0000 |
323 | +++ src/app/addressbookapp.h 2013-10-09 21:25:36 +0000 |
324 | @@ -21,8 +21,6 @@ |
325 | #include <QQuickView> |
326 | #include <QGuiApplication> |
327 | |
328 | -class AddressBookAppDBus; |
329 | - |
330 | class AddressBookApp : public QGuiApplication |
331 | { |
332 | Q_OBJECT |
333 | @@ -36,21 +34,16 @@ |
334 | public Q_SLOTS: |
335 | void activateWindow(); |
336 | QUrl copyImage(QObject *contact, const QUrl &imageUrl); |
337 | - |
338 | -private: |
339 | - void parseArgument(const QString &arg); |
340 | void parseUrl(const QString &arg); |
341 | + void onViewStatusChanged(QQuickView::Status status); |
342 | + |
343 | +private: |
344 | void callQMLMethod(const QString name, QStringList args); |
345 | |
346 | -private Q_SLOTS: |
347 | - void onMessageReceived(const QString &message); |
348 | - void onViewStatusChanged(QQuickView::Status status); |
349 | - |
350 | private: |
351 | QQuickView *m_view; |
352 | - AddressBookAppDBus *m_dbus; |
353 | - QString m_arg; |
354 | - bool m_applicationIsReady; |
355 | + QString m_initialArg; |
356 | + bool m_viewReady; |
357 | }; |
358 | |
359 | #endif |
360 | |
361 | === removed file 'src/app/addressbookappdbus.cpp' |
362 | --- src/app/addressbookappdbus.cpp 2013-09-17 22:19:02 +0000 |
363 | +++ src/app/addressbookappdbus.cpp 1970-01-01 00:00:00 +0000 |
364 | @@ -1,79 +0,0 @@ |
365 | -/* |
366 | - * Copyright (C) 2012-2013 Canonical, Ltd. |
367 | - * |
368 | - * This program is free software; you can redistribute it and/or modify |
369 | - * it under the terms of the GNU General Public License as published by |
370 | - * the Free Software Foundation; version 3. |
371 | - * |
372 | - * This program is distributed in the hope that it will be useful, |
373 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
374 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
375 | - * GNU General Public License for more details. |
376 | - * |
377 | - * You should have received a copy of the GNU General Public License |
378 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
379 | - */ |
380 | - |
381 | -#include "addressbookappdbus.h" |
382 | -#include "addressbookappadaptor.h" |
383 | - |
384 | -// Qt |
385 | -#include <QtDBus/QDBusConnection> |
386 | - |
387 | -AddressBookAppDBus::AddressBookAppDBus(QObject* parent) : QObject(parent) |
388 | -{ |
389 | -} |
390 | - |
391 | -AddressBookAppDBus::~AddressBookAppDBus() |
392 | -{ |
393 | -} |
394 | - |
395 | -QString AddressBookAppDBus::serviceName() |
396 | -{ |
397 | - return "com.canonical.AddressBookApp"; |
398 | -} |
399 | - |
400 | -QString AddressBookAppDBus::objectPath() |
401 | -{ |
402 | - return "/com/canonical/AddressBookApp"; |
403 | -} |
404 | - |
405 | -QString AddressBookAppDBus::interfaceName() |
406 | -{ |
407 | - return "com.canonical.AddressBookApp"; |
408 | -} |
409 | - |
410 | -bool |
411 | -AddressBookAppDBus::connectToBus() |
412 | -{ |
413 | - bool ok = QDBusConnection::sessionBus().registerService(serviceName()); |
414 | - if (!ok) { |
415 | - return false; |
416 | - } |
417 | - new AddressBookAppAdaptor(this); |
418 | - QDBusConnection::sessionBus().registerObject(objectPath(), this); |
419 | - |
420 | - return true; |
421 | -} |
422 | - |
423 | -void AddressBookAppDBus::ShowContact(const QVariant &contactId) |
424 | -{ |
425 | - Q_EMIT request(QString("contact://%1").arg(contactId.toString())); |
426 | -} |
427 | - |
428 | -void AddressBookAppDBus::CreateContact(const QString &phoneNumber) |
429 | -{ |
430 | - Q_EMIT request(QString("create://%1").arg(phoneNumber)); |
431 | -} |
432 | - |
433 | -void AddressBookAppDBus::SendAppMessage(const QString &message) |
434 | -{ |
435 | - qDebug() << "DBUS CALLL" << message; |
436 | - Q_EMIT request(message); |
437 | -} |
438 | - |
439 | -void AddressBookAppDBus::AddPhoneToContact(const QString &contactId, const QString &phoneNumber) |
440 | -{ |
441 | - Q_EMIT request(QString("addressbook://edit?%1&%2").arg(contactId).arg(phoneNumber)); |
442 | -} |
443 | - |
444 | |
445 | === removed file 'src/app/addressbookappdbus.h' |
446 | --- src/app/addressbookappdbus.h 2013-09-17 22:19:02 +0000 |
447 | +++ src/app/addressbookappdbus.h 1970-01-01 00:00:00 +0000 |
448 | @@ -1,50 +0,0 @@ |
449 | -/* |
450 | - * Copyright (C) 2012-2013 Canonical, Ltd. |
451 | - * |
452 | - * This program is free software; you can redistribute it and/or modify |
453 | - * it under the terms of the GNU General Public License as published by |
454 | - * the Free Software Foundation; version 3. |
455 | - * |
456 | - * This program is distributed in the hope that it will be useful, |
457 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
458 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
459 | - * GNU General Public License for more details. |
460 | - * |
461 | - * You should have received a copy of the GNU General Public License |
462 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
463 | - */ |
464 | - |
465 | -#ifndef ADDRESSBOOK_APPDBUS_H |
466 | -#define ADDRESSBOOK_APPDBUS_H |
467 | - |
468 | -#include <QtCore/QObject> |
469 | -#include <QtDBus/QDBusContext> |
470 | - |
471 | -/** |
472 | - * DBus interface for the phone app |
473 | - */ |
474 | -class AddressBookAppDBus : public QObject, protected QDBusContext |
475 | -{ |
476 | - Q_OBJECT |
477 | - |
478 | -public: |
479 | - AddressBookAppDBus(QObject* parent=0); |
480 | - ~AddressBookAppDBus(); |
481 | - |
482 | - bool connectToBus(); |
483 | - |
484 | - static QString serviceName(); |
485 | - static QString objectPath(); |
486 | - static QString interfaceName(); |
487 | - |
488 | -public Q_SLOTS: |
489 | - Q_NOREPLY void ShowContact(const QVariant &contactId); |
490 | - Q_NOREPLY void CreateContact(const QString &phoneNumber); |
491 | - Q_NOREPLY void SendAppMessage(const QString &message); |
492 | - Q_NOREPLY void AddPhoneToContact(const QString &contactId, const QString &phoneNumber); |
493 | - |
494 | -Q_SIGNALS: |
495 | - void request(const QString &message); |
496 | -}; |
497 | - |
498 | -#endif // ADDRESSBOOK_APPDBUS_H |
499 | |
500 | === removed file 'src/app/com.canonical.AddressBookApp.service.in' |
501 | --- src/app/com.canonical.AddressBookApp.service.in 2013-07-31 22:24:45 +0000 |
502 | +++ src/app/com.canonical.AddressBookApp.service.in 1970-01-01 00:00:00 +0000 |
503 | @@ -1,3 +0,0 @@ |
504 | -[D-BUS Service] |
505 | -Name=com.canonical.AddressBookApp |
506 | -Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/address-book-app |
507 | |
508 | === modified file 'src/imports/ContactEdit/ContactEditor.qml' |
509 | --- src/imports/ContactEdit/ContactEditor.qml 2013-10-07 18:41:15 +0000 |
510 | +++ src/imports/ContactEdit/ContactEditor.qml 2013-10-09 21:25:36 +0000 |
511 | @@ -281,7 +281,8 @@ |
512 | saving = false |
513 | pageStack.contactCreated(contactEditor.contact) |
514 | pageStack.pop() |
515 | - } else if (contactEditor.contact) { |
516 | + } else if (contactEditor.contact && |
517 | + (contactEditor.contact.contactId != "qtcontacts:::")) { |
518 | for (var i=0; i < contactEditor.model.contacts.length; i++) { |
519 | if (contactEditor.model.contacts[i].contactId == contactEditor.contact.contactId) { |
520 | return |
521 | |
522 | === modified file 'src/imports/ContactView/ContactDetailPhoneNumberView.qml' |
523 | --- src/imports/ContactView/ContactDetailPhoneNumberView.qml 2013-09-20 12:01:35 +0000 |
524 | +++ src/imports/ContactView/ContactDetailPhoneNumberView.qml 2013-10-09 21:25:36 +0000 |
525 | @@ -18,12 +18,6 @@ |
526 | import Ubuntu.Components 0.1 |
527 | import QtContacts 5.0 |
528 | import Ubuntu.Components.ListItems 0.1 as ListItem |
529 | - |
530 | -// FIXME: temporary import to provide the applicationUtils. |
531 | -// this should go away once the new inter-app communication mechanism |
532 | -// is in place. |
533 | -import Ubuntu.Telephony 0.1 |
534 | - |
535 | import "../Common" |
536 | |
537 | ContactDetailBase { |
538 | @@ -83,11 +77,7 @@ |
539 | } |
540 | width: height |
541 | iconName: "incoming-call" |
542 | - |
543 | - // FIXME: temporary import to provide the applicationUtils. |
544 | - // this should go away once the new inter-app communication mechanism |
545 | - // is in place. |
546 | - onClicked: applicationUtils.switchToDialerApp("call://" + view.values[0]) |
547 | + onClicked: Qt.openUrlExternally("tel:///" + encodeURIComponent(view.values[0])) |
548 | } |
549 | |
550 | Image { |
551 | @@ -113,10 +103,6 @@ |
552 | } |
553 | width: height |
554 | iconName: "messages" |
555 | - |
556 | - // FIXME: temporary import to provide the applicationUtils. |
557 | - // this should go away once the new inter-app communication mechanism |
558 | - // is in place. |
559 | - onClicked: applicationUtils.switchToMessagingApp("messages://" + view.values[0]) |
560 | + onClicked: Qt.openUrlExternally("message:///" + encodeURIComponent(view.values[0])) |
561 | } |
562 | } |
563 | |
564 | === modified file 'src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml' |
565 | --- src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2013-10-07 16:35:28 +0000 |
566 | +++ src/imports/Ubuntu/Contacts/ContactDetailPickerPhoneNumberDelegate.qml 2013-10-09 21:25:36 +0000 |
567 | @@ -112,7 +112,7 @@ |
568 | fontSize: "medium" |
569 | } |
570 | } |
571 | - onClicked: applicationUtils.switchToAddressbookApp("contact://" + contact.contactId) |
572 | + onClicked: Qt.openUrlExternally("addressbook:///contact?id=" + encodeURIComponent(contact.contactId)) |
573 | Icon { |
574 | height: units.gu(2) |
575 | width: units.gu(2) |
576 | |
577 | === modified file 'src/imports/main.qml' |
578 | --- src/imports/main.qml 2013-09-24 01:57:08 +0000 |
579 | +++ src/imports/main.qml 2013-10-09 21:25:36 +0000 |
580 | @@ -66,4 +66,13 @@ |
581 | mainStack.push(Qt.createComponent("ContactList/ContactListPage.qml")) |
582 | mainView.applicationReady() |
583 | } |
584 | + |
585 | + Connections { |
586 | + target: UriHandler |
587 | + onOpened: { |
588 | + for (var i = 0; i < uris.length; ++i) { |
589 | + application.parseUrl(uris[i]) |
590 | + } |
591 | + } |
592 | + } |
593 | } |
FAILED: Continuous integration, rev:84 jenkins. qa.ubuntu. com/job/ address- book-app- ci/189/ jenkins. qa.ubuntu. com/job/ address- book-app- saucy-amd64- ci/189/ console jenkins. qa.ubuntu. com/job/ address- book-app- saucy-armhf- ci/190/ console jenkins. qa.ubuntu. com/job/ address- book-app- saucy-i386- ci/189/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/4230/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/1898/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-amd64/ 97/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1900/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ address- book-app- ci/189/ rebuild
http://