Skip to content

Commit

Permalink
fixup! Bugfix: Web View wont show correct URL
Browse files Browse the repository at this point in the history
  • Loading branch information
sieren committed May 18, 2016
1 parent 5632686 commit 2604b74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/syncconnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void SyncConnector::setURL(QUrl url, std::string username, std::string password,
url.setUserName(mAuthentication.first.c_str());
url.setPassword(mAuthentication.second.c_str());
mCurrentUrl = url;
url.setPath(tr("/rest/system/version"));
mConnectionStateCallback = setText;
testUrlAvailability();
}
Expand All @@ -75,7 +74,9 @@ void SyncConnector::setURL(QUrl url, std::string username, std::string password,

void SyncConnector::testUrlAvailability()
{
QNetworkRequest request(mCurrentUrl);
QUrl url = mCurrentUrl;
url.setPath(tr("/rest/system/version"));
QNetworkRequest request(url);
network.clearAccessCache();
QNetworkReply *reply = network.get(request);
requestMap[reply] = kRequestMethod::urlTested;
Expand Down Expand Up @@ -139,6 +140,7 @@ void SyncConnector::urlTested(QNetworkReply* reply)
{
mConnectionStateCallback(connectionInfo);
}
mpConnectionAvailabilityTimer->stop();
mpConnectionHealthTimer->start(mConnectionHealthTime);
}
reply->deleteLater();
Expand Down

0 comments on commit 2604b74

Please sign in to comment.