Load serverAddress using QUrl::fromUserInput()

Fixes login when 'https://' is not added to the server url


(cherry picked from commit a653be8be8)
This commit is contained in:
Tobias Fella
2021-01-17 00:30:33 +00:00
parent 2cdc37c3d5
commit 2452f630d0

View File

@@ -105,7 +105,7 @@ void Controller::loginWithCredentials(const QString &serverAddr, const QString &
}
auto conn = new Connection(this);
const QUrl serverUrl = QUrl(serverAddr);
const QUrl serverUrl = QUrl::fromUserInput(serverAddr);
// we are using a fake mixd since resolveServer just set the homeserver url :sigh:
conn->resolveServer("@username:" + serverUrl.host() + ":" + QString::number(serverUrl.port(443)));