Merge lp:~phablet-team/telephony-service/expose_account_parameters into lp:telephony-service/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 1245
Merged at revision: 1248
Proposed branch: lp:~phablet-team/telephony-service/expose_account_parameters
Merge into: lp:telephony-service/staging
Prerequisite: lp:~phablet-team/telephony-service/add-participants-model
Diff against target: 54 lines (+12/-0)
2 files modified
libtelephonyservice/accountentry.cpp (+8/-0)
libtelephonyservice/accountentry.h (+4/-0)
To merge this branch: bzr merge lp:~phablet-team/telephony-service/expose_account_parameters
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
Review via email: mp+320631@code.launchpad.net

This proposal supersedes a proposal from 2017-02-24.

Commit message

Expose the account parameters to QML

Description of the change

Expose the account parameters to QML

To post a comment you must log in.
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Looks good.
thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libtelephonyservice/accountentry.cpp'
2--- libtelephonyservice/accountentry.cpp 2017-03-22 13:48:49 +0000
3+++ libtelephonyservice/accountentry.cpp 2017-03-22 13:48:50 +0000
4@@ -164,6 +164,11 @@
5 Q_EMIT accountPropertiesChanged();
6 }
7
8+QVariantMap AccountEntry::parameters() const
9+{
10+ return mAccount->parameters();
11+}
12+
13 Tp::AccountPtr AccountEntry::account() const
14 {
15 return mAccount;
16@@ -235,6 +240,9 @@
17 SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)),
18 SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)));
19
20+ connect(mAccount.data(), &Tp::Account::parametersChanged,
21+ this, &AccountEntry::parametersChanged);
22+
23 connect(this,
24 SIGNAL(connectedChanged()),
25 SIGNAL(activeChanged()));
26
27=== modified file 'libtelephonyservice/accountentry.h'
28--- libtelephonyservice/accountentry.h 2017-03-22 13:48:49 +0000
29+++ libtelephonyservice/accountentry.h 2017-03-22 13:48:50 +0000
30@@ -48,6 +48,7 @@
31 Q_PROPERTY(Protocol* protocolInfo READ protocolInfo CONSTANT)
32 Q_PROPERTY(Capabilities capabilities READ capabilities NOTIFY capabilitiesChanged)
33 Q_PROPERTY(QVariantMap accountProperties READ accountProperties WRITE setAccountProperties NOTIFY accountPropertiesChanged)
34+ Q_PROPERTY(QVariantMap parameters READ parameters NOTIFY parametersChanged)
35 Q_ENUMS(AccountType)
36 friend class AccountEntryFactory;
37
38@@ -86,6 +87,8 @@
39
40 QVariantMap accountProperties() const;
41 void setAccountProperties(const QVariantMap &properties);
42+
43+ QVariantMap parameters() const;
44
45 Protocol *protocolInfo() const;
46
47@@ -106,6 +109,7 @@
48 void connectionStatusChanged(Tp::ConnectionStatus status);
49 void capabilitiesChanged();
50 void accountPropertiesChanged();
51+ void parametersChanged();
52
53 protected Q_SLOTS:
54 virtual void initialize();

Subscribers

People subscribed via source and target branches

to all changes: