Fix broken logout.

This commit is contained in:
Black Hat 2018-10-09 11:06:15 +08:00
parent c11429cd50
commit 3dd4f18cc4
2 changed files with 6 additions and 5 deletions

View File

@ -132,7 +132,7 @@ Column {
highlighted: true
text: "Logout"
onClicked: connection.logout()
onClicked: spectralController.logout(connection)
}
}
}

View File

@ -1,8 +1,8 @@
#include "controller.h"
#include "settings.h"
#include "spectralroom.h"
#include "spectraluser.h"
#include "settings.h"
#include "events/eventcontent.h"
#include "events/roommessageevent.h"
@ -73,9 +73,10 @@ void Controller::loginWithCredentials(QString serverAddr, QString user,
account.sync();
addConnection(m_connection);
});
connect(m_connection, &Connection::loginError, [=] (QString error, QByteArray detail) {
emit errorOccured("Login", error);
});
connect(m_connection, &Connection::loginError,
[=](QString error, QByteArray detail) {
emit errorOccured("Login", error);
});
}
}