Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-client-qt
Commits
9c073f63
Commit
9c073f63
authored
Feb 19, 2021
by
Ming Rui Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accountadapter: respond to profileUpdated signals
Gitlab:
#297
Change-Id: Iaff41075edc683bd976ff69cfd8f7a80547771cc
parent
5b33a1df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
src/accountadapter.cpp
src/accountadapter.cpp
+8
-0
src/accountadapter.h
src/accountadapter.h
+2
-1
No files found.
src/accountadapter.cpp
View file @
9c073f63
...
...
@@ -355,6 +355,7 @@ AccountAdapter::connectAccount(const QString& accountId)
auto
&
accInfo
=
LRCInstance
::
accountModel
().
getAccountInfo
(
accountId
);
QObject
::
disconnect
(
accountStatusChangedConnection_
);
QObject
::
disconnect
(
accountProfileUpdatedConnection_
);
QObject
::
disconnect
(
contactAddedConnection_
);
QObject
::
disconnect
(
addedToConferenceConnection_
);
QObject
::
disconnect
(
contactUnbannedConnection_
);
...
...
@@ -366,6 +367,13 @@ AccountAdapter::connectAccount(const QString& accountId)
emit
accountStatusChanged
(
accountId
);
});
accountProfileUpdatedConnection_
=
QObject
::
connect
(
accInfo
.
accountModel
,
&
lrc
::
api
::
NewAccountModel
::
profileUpdated
,
[
this
](
const
QString
&
accountId
)
{
emit
accountStatusChanged
(
accountId
);
});
contactAddedConnection_
=
QObject
::
connect
(
accInfo
.
contactModel
.
get
(),
&
lrc
::
api
::
ContactModel
::
contactAdded
,
...
...
src/accountadapter.h
View file @
9c073f63
/*
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
...
...
@@ -143,6 +143,7 @@ private:
void
connectFailure
();
QMetaObject
::
Connection
accountStatusChangedConnection_
;
QMetaObject
::
Connection
accountProfileUpdatedConnection_
;
QMetaObject
::
Connection
contactAddedConnection_
;
QMetaObject
::
Connection
addedToConferenceConnection_
;
QMetaObject
::
Connection
contactUnbannedConnection_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment