History

PR Fixes

Leonardo Murillo committed 12 years ago

Commit b2ef07f1 parent cc147bc3 files · +7 −16Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+3−9
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #include <QNetworkReply>
3737 #include <QNetworkDiskCache>
3838 #include <QOpenGLFramebufferObject>
39+#include <QObject>
3940 #include <QWheelEvent>
4041 #include <QSettings>
4142 #include <QShortcut>
@@ -4402,16 +4403,12 @@ void Application::updateLocalOctreeCache(bool firstTime) { · 4360 unmodified lines
44024403 }
44034404
44044405 void Application::checkVersion() {
4405− qDebug() << "################### in check version";
44064406 QNetworkRequest latestVersionRequest((QUrl(CHECK_VERSION_URL)));
44074407 latestVersionRequest.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
4408− _latestVersionReply = Application::getInstance()->getNetworkAccessManager()->get(latestVersionRequest);
4409−
4410− connect(_latestVersionReply, SIGNAL(finished()), SLOT(parseVersionXml()));
4408+ connect(Application::getInstance()->getNetworkAccessManager()->get(latestVersionRequest), SIGNAL(finished()), SLOT(parseVersionXml()));
44114409 }
44124410
44134411 void Application::parseVersionXml() {
4414− qDebug() << "################### in parse version xml";
44154412
44164413 #ifdef Q_OS_WIN32
44174414 QString operatingSystem("win");
@@ -4430,7 +4427,7 @@ void Application::parseVersionXml() { · 12 unmodified lines
44304427 QString latestVersion;
44314428 QUrl downloadUrl;
44324429
4433− QXmlStreamReader xml(_latestVersionReply);
4430+ QXmlStreamReader xml(qobject_cast<QNetworkReply*>(QObject::sender()));
44344431 while (!xml.atEnd() && !xml.hasError()) {
44354432 QXmlStreamReader::TokenType token = xml.readNext();
44364433
@@ -4453,12 +4450,9 @@ void Application::parseVersionXml() { · 16 unmodified lines
44534450 }
44544451 }
44554452 }
4456−
44574453 if (!shouldSkipVersion(latestVersion) && applicationVersion() != latestVersion) {
44584454 new UpdateDialog(_glWidget, releaseNotes, latestVersion, downloadUrl);
44594455 }
4460−
4461− delete _latestVersionReply;
44624456 }
44634457
44644458 bool Application::shouldSkipVersion(QString latestVersion) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t