summary refs log tree commit diff
path: root/src/MainWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWindow.cc')
-rw-r--r--src/MainWindow.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index 3989e096..2b4103ff 100644
--- a/src/MainWindow.cc
+++ b/src/MainWindow.cc
@@ -57,6 +57,11 @@ MainWindow::MainWindow(QWidget *parent)
 		this,
 		SLOT(matrixRegister(const QString &, const QString &, const QString &)));
 
+	connect(matrix_client_,
+		SIGNAL(registerError(const QString &)),
+		register_page_,
+		SLOT(registerError(const QString &)));
+
 	connect(matrix_client_, SIGNAL(loginError(QString)), login_page_, SLOT(loginError(QString)));
 	connect(matrix_client_,
 		SIGNAL(loginSuccess(QString, QString, QString)),
@@ -66,8 +71,7 @@ MainWindow::MainWindow(QWidget *parent)
 
 void MainWindow::matrixLogin(const QString &username, const QString &password, const QString &home_server)
 {
-	qDebug() << "About to login into Matrix";
-	qDebug() << "Userame: " << username;
+	qDebug() << "Logging in..." << username;
 
 	matrix_client_->setServer(home_server);
 	matrix_client_->login(username, password);
@@ -88,9 +92,8 @@ void MainWindow::showChatPage(QString userid, QString homeserver, QString token)
 
 void MainWindow::matrixRegister(const QString &username, const QString &password, const QString &server)
 {
-	Q_UNUSED(password);
-
 	qDebug() << "Registering" << username << "at" << server;
+	matrix_client_->registerUser(username, password, server);
 }
 
 void MainWindow::showWelcomePage()