Merge lp:~mardy/ubuntu-system-settings-online-accounts/mir-deprecations into lp:ubuntu-system-settings-online-accounts

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 420
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/mir-deprecations
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 71 lines (+15/-16)
3 files modified
debian/changelog (+8/-0)
debian/control (+1/-1)
online-accounts-service/mir-helper.cpp (+6/-15)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/mir-deprecations
Reviewer Review Type Date Requested Status
Alexandre Abreu (community) Approve
Review via email: mp+317949@code.launchpad.net

Commit message

Remove calls to deprecated mir_wait_handle() function.

Description of the change

Remove calls to deprecated mir_wait_handle() function.

To post a comment you must log in.
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-01-26 06:46:36 +0000
3+++ debian/changelog 2017-02-22 08:31:29 +0000
4@@ -1,3 +1,11 @@
5+ubuntu-system-settings-online-accounts (0.7+17.04.20170126-0ubuntu2) UNRELEASED; urgency=medium
6+
7+ * debian/control:
8+ - Bump dependency version on libmirclient-dev
9+ * Remove calls to deprecated mir_wait_handle() function.
10+
11+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Wed, 22 Feb 2017 11:29:04 +0300
12+
13 ubuntu-system-settings-online-accounts (0.7+17.04.20170126-0ubuntu1) zesty; urgency=medium
14
15 * debian/control:
16
17=== modified file 'debian/control'
18--- debian/control 2017-01-26 06:38:15 +0000
19+++ debian/control 2017-02-22 08:31:29 +0000
20@@ -8,7 +8,7 @@
21 libaccounts-qt5-dev (>= 1.13),
22 libapparmor-dev,
23 libclick-0.4-dev,
24- libmirclient-dev (>= 0.14.0),
25+ libmirclient-dev (>= 0.26.1),
26 libnotify-dev,
27 libqtdbusmock1-dev,
28 libqtdbustest1-dev,
29
30=== modified file 'online-accounts-service/mir-helper.cpp'
31--- online-accounts-service/mir-helper.cpp 2014-11-25 13:18:32 +0000
32+++ online-accounts-service/mir-helper.cpp 2017-02-22 08:31:29 +0000
33@@ -44,7 +44,6 @@
34
35 MirPromptSession *m_mirSession;
36 pid_t m_initiatorPid;
37- QList<int> m_fds;
38 mutable PromptSession *q_ptr;
39 };
40
41@@ -96,24 +95,16 @@
42 delete d_ptr;
43 }
44
45-static void client_fd_callback(MirPromptSession *, size_t count,
46- int const *fds, void *context)
47-{
48- PromptSessionPrivate *priv = (PromptSessionPrivate *)context;
49- for (size_t i = 0; i < count; i++) {
50- priv->m_fds.append(fds[i]);
51- }
52-}
53-
54 QString PromptSession::requestSocket()
55 {
56 Q_D(PromptSession);
57
58- d->m_fds.clear();
59- mir_wait_for(mir_prompt_session_new_fds_for_prompt_providers(
60- d->m_mirSession, 1, client_fd_callback, d));
61- if (!d->m_fds.isEmpty()) {
62- return QString("fd://%1").arg(d->m_fds[0]);
63+ int fd = -1;
64+ auto count =
65+ mir_prompt_session_new_fds_for_prompt_providers_sync(d->m_mirSession,
66+ 1, &fd);
67+ if (count == 1 && fd >= 0) {
68+ return QString("fd://%1").arg(fd);
69 } else {
70 return QString();
71 }

Subscribers

People subscribed via source and target branches