Skip to content

Commit

Permalink
???
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFella committed Dec 14, 2024
1 parent 781924e commit d27c060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Quotient/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ void Connection::resolveServer(const QString& mxid)
d->resolverJob = callApi<GetWellknownJob>();
// Make sure baseUrl is restored in any case, even an abandon, and before any further processing
connect(d->resolverJob.get(), &BaseJob::finished, this,
[this, oldBaseUrl] { d->data->setBaseUrl(oldBaseUrl); });
[this, oldBaseUrl] {
qCWarning(MAIN) << "Restoring base url";
qCWarning(MAIN) << "Old base url" << oldBaseUrl;
d->data->setBaseUrl(oldBaseUrl);
});
d->resolverJob.onResult(this, [this, maybeBaseUrl]() mutable {
qCWarning(MAIN) << "ASDF";
if (d->resolverJob->error() != BaseJob::NotFound) {
if (!d->resolverJob->status().good()) {
qCWarning(MAIN) << "Fetching .well-known file failed, FAIL_PROMPT";
Expand All @@ -151,11 +156,11 @@ void Connection::resolveServer(const QString& mxid)
emit resolveError(tr("The homeserver base URL is invalid"));
return;
}
qCInfo(MAIN) << ".well-known URL for" << maybeBaseUrl.host() << "is"
qCWarning(MAIN) << ".well-known URL for" << maybeBaseUrl.host() << "is"
<< baseUrl.toString();
setHomeserver(baseUrl);
} else {
qCInfo(MAIN) << "No .well-known file, using" << maybeBaseUrl << "for base URL";
qCWarning(MAIN) << "No .well-known file, using" << maybeBaseUrl << "for base URL";
setHomeserver(maybeBaseUrl);
}
Q_ASSERT(d->loginFlowsJob != nullptr); // Ensured by setHomeserver()
Expand Down
1 change: 0 additions & 1 deletion quotest/quotest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ void TestManager::finalize(const QString& lastWords)
clog << "Logging out" << endl;
c->logout().then(
this, [this, lastWords] {
//clog << lastWords.toStdString() << endl;
QCoreApplication::exit(!testSuite ? -3
: succeeded.empty() && failed.empty()
&& running.empty()
Expand Down

0 comments on commit d27c060

Please sign in to comment.