Port away from and remove Controller::initiated
This commit is contained in:
@@ -68,7 +68,6 @@ Controller::Controller(QObject *parent)
|
||||
connect(c, &Connection::connected, this, [c, this]() {
|
||||
m_accountRegistry.add(c);
|
||||
c->syncLoop();
|
||||
Q_EMIT initiated();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -220,7 +219,6 @@ void Controller::invokeLogin()
|
||||
Q_EMIT accountsLoadingChanged();
|
||||
if (connection->userId() == id) {
|
||||
setActiveConnection(connection);
|
||||
connectSingleShot(connection, &NeoChatConnection::syncDone, this, &Controller::initiated);
|
||||
}
|
||||
});
|
||||
connect(connection, &NeoChatConnection::loginError, this, [this, connection](const QString &error, const QString &) {
|
||||
@@ -236,7 +234,6 @@ void Controller::invokeLogin()
|
||||
Q_EMIT errorOccured(i18n("Login Failed: %1", error), {});
|
||||
connection->logout(true);
|
||||
}
|
||||
Q_EMIT initiated();
|
||||
});
|
||||
connect(connection, &NeoChatConnection::networkError, this, [this](const QString &error, const QString &, int, int) {
|
||||
Q_EMIT errorOccured(i18n("Network Error: %1", error), {});
|
||||
@@ -245,9 +242,6 @@ void Controller::invokeLogin()
|
||||
});
|
||||
}
|
||||
}
|
||||
if (accounts.isEmpty()) {
|
||||
Q_EMIT initiated();
|
||||
}
|
||||
}
|
||||
|
||||
QKeychain::ReadPasswordJob *Controller::loadAccessTokenFromKeyChain(const AccountSettings &account)
|
||||
|
||||
@@ -142,7 +142,6 @@ Q_SIGNALS:
|
||||
void errorOccured(const QString &error, const QString &detail);
|
||||
void connectionAdded(NeoChatConnection *connection);
|
||||
void connectionDropped(NeoChatConnection *connection);
|
||||
void initiated();
|
||||
void activeConnectionChanged();
|
||||
void userConsentRequired(QUrl url);
|
||||
void accountsLoadingChanged();
|
||||
|
||||
@@ -102,7 +102,6 @@ void LoginHelper::init()
|
||||
|
||||
connectSingleShot(m_connection, &Connection::syncDone, this, [this]() {
|
||||
Q_EMIT loaded();
|
||||
Q_EMIT Controller::instance().initiated();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ LoginStep {
|
||||
|
||||
Connections {
|
||||
target: Controller
|
||||
function onInitiated() {
|
||||
root.closeDialog()
|
||||
function onConnectionAdded(connection) {
|
||||
connection.syncDone.connect(() => root.closeDialog())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,6 @@ void Registration::registerAccount()
|
||||
Controller::instance().addConnection(connection);
|
||||
Controller::instance().setActiveConnection(connection);
|
||||
connectSingleShot(connection, &Connection::syncDone, this, []() {
|
||||
Q_EMIT Controller::instance().initiated();
|
||||
Q_EMIT LoginHelper::instance().loaded();
|
||||
});
|
||||
m_connection = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user