Port away from Controller::activeConnectionIndex

This commit is contained in:
Tobias Fella
2023-11-05 17:07:08 +01:00
committed by Joshua Goins
parent e9e1e223f7
commit 6ba2b715c3
3 changed files with 9 additions and 19 deletions

View File

@@ -346,7 +346,6 @@ void Controller::setActiveConnection(NeoChatConnection *connection)
}
NeoChatConfig::self()->save();
Q_EMIT activeConnectionChanged();
Q_EMIT activeConnectionIndexChanged();
}
void Controller::saveWindowGeometry()
@@ -407,14 +406,6 @@ void Controller::setApplicationProxy()
QNetworkProxy::setApplicationProxy(proxy);
}
int Controller::activeConnectionIndex() const
{
auto result = std::find_if(m_accountRegistry.accounts().begin(), m_accountRegistry.accounts().end(), [this](const auto &it) {
return it == m_connection;
});
return result - m_accountRegistry.accounts().begin();
}
bool Controller::isFlatpak() const
{
#ifdef NEOCHAT_FLATPAK