mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 03:53:23 +02:00
misc: fix some connect warnings when starting with 0 accounts
Change-Id: I15f3a79107912d83a3c1ffe18538c26e37a419e8
This commit is contained in:
parent
15eb51c7ca
commit
b6737f1d50
2 changed files with 5 additions and 3 deletions
|
@ -33,11 +33,11 @@ ContactAdapter::ContactAdapter(LRCInstance* instance, QObject* parent)
|
||||||
|
|
||||||
selectableProxyModel_.reset(new SelectableProxyModel(this));
|
selectableProxyModel_.reset(new SelectableProxyModel(this));
|
||||||
if (lrcInstance_) {
|
if (lrcInstance_) {
|
||||||
connectSignals();
|
|
||||||
connect(lrcInstance_,
|
connect(lrcInstance_,
|
||||||
&LRCInstance::currentAccountIdChanged,
|
&LRCInstance::currentAccountIdChanged,
|
||||||
this,
|
this,
|
||||||
&ContactAdapter::connectSignals);
|
&ContactAdapter::connectSignals);
|
||||||
|
connectSignals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,8 +261,7 @@ ContactAdapter::updateConnectionInfo()
|
||||||
void
|
void
|
||||||
ContactAdapter::connectSignals()
|
ContactAdapter::connectSignals()
|
||||||
{
|
{
|
||||||
if (!lrcInstance_->getCurrentContactModel()) {
|
if (lrcInstance_->get_currentAccountId().isEmpty()) {
|
||||||
qWarning() << Q_FUNC_INFO << "No contact model";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,9 @@ CurrentAccount::get_isLocalModeratorsEnabled()
|
||||||
void
|
void
|
||||||
CurrentAccount::setupForAccount()
|
CurrentAccount::setupForAccount()
|
||||||
{
|
{
|
||||||
|
if (lrcInstance_->get_currentAccountId().isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
connect(lrcInstance_->getCurrentContactModel(),
|
connect(lrcInstance_->getCurrentContactModel(),
|
||||||
&ContactModel::bannedStatusChanged,
|
&ContactModel::bannedStatusChanged,
|
||||||
this,
|
this,
|
||||||
|
|
Loading…
Add table
Reference in a new issue