Skip to content
Snippets Groups Projects
Commit b6737f1d authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Sébastien Blin
Browse files

misc: fix some connect warnings when starting with 0 accounts

Change-Id: I15f3a79107912d83a3c1ffe18538c26e37a419e8
parent 15eb51c7
No related branches found
No related tags found
No related merge requests found
......@@ -33,11 +33,11 @@ ContactAdapter::ContactAdapter(LRCInstance* instance, QObject* parent)
selectableProxyModel_.reset(new SelectableProxyModel(this));
if (lrcInstance_) {
connectSignals();
connect(lrcInstance_,
&LRCInstance::currentAccountIdChanged,
this,
&ContactAdapter::connectSignals);
connectSignals();
}
}
......@@ -261,8 +261,7 @@ ContactAdapter::updateConnectionInfo()
void
ContactAdapter::connectSignals()
{
if (!lrcInstance_->getCurrentContactModel()) {
qWarning() << Q_FUNC_INFO << "No contact model";
if (lrcInstance_->get_currentAccountId().isEmpty()) {
return;
}
......
......@@ -90,6 +90,9 @@ CurrentAccount::get_isLocalModeratorsEnabled()
void
CurrentAccount::setupForAccount()
{
if (lrcInstance_->get_currentAccountId().isEmpty())
return;
connect(lrcInstance_->getCurrentContactModel(),
&ContactModel::bannedStatusChanged,
this,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment