Load serverAddress using QUrl::fromUserInput()

Fixes login when 'https://' is not added to the server url
This commit is contained in:
Tobias Fella
2021-01-17 01:30:33 +01:00
parent 6893cb361e
commit a653be8be8

View File

@@ -103,7 +103,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)));