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
36#include <QNetworkReply>36#include <QNetworkReply>
37#include <QNetworkDiskCache>37#include <QNetworkDiskCache>
38#include <QOpenGLFramebufferObject>38#include <QOpenGLFramebufferObject>
39#include <QObject>
39#include <QWheelEvent>40#include <QWheelEvent>
40#include <QSettings>41#include <QSettings>
41#include <QShortcut>42#include <QShortcut>
@@ -4402,16 +4403,12 @@ void Application::updateLocalOctreeCache(bool firstTime) { · 4360 unmodified lines
4402}4403}
4403 4404
4404void Application::checkVersion() {4405void Application::checkVersion() {
4405 qDebug() << "################### in check version";
4406 QNetworkRequest latestVersionRequest((QUrl(CHECK_VERSION_URL)));4406 QNetworkRequest latestVersionRequest((QUrl(CHECK_VERSION_URL)));
4407 latestVersionRequest.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);4407 latestVersionRequest.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
4408 _latestVersionReply = Application::getInstance()->getNetworkAccessManager()->get(latestVersionRequest);4408 connect(Application::getInstance()->getNetworkAccessManager()->get(latestVersionRequest), SIGNAL(finished()), SLOT(parseVersionXml()));
4409
4410 connect(_latestVersionReply, SIGNAL(finished()), SLOT(parseVersionXml()));
4411}4409}
4412 4410
4413void Application::parseVersionXml() {4411void Application::parseVersionXml() {
4414 qDebug() << "################### in parse version xml";
4415 4412
4416 #ifdef Q_OS_WIN324413 #ifdef Q_OS_WIN32
4417 QString operatingSystem("win");4414 QString operatingSystem("win");
@@ -4430,7 +4427,7 @@ void Application::parseVersionXml() { · 12 unmodified lines
4430 QString latestVersion;4427 QString latestVersion;
4431 QUrl downloadUrl;4428 QUrl downloadUrl;
4432 4429
4433 QXmlStreamReader xml(_latestVersionReply);4430 QXmlStreamReader xml(qobject_cast<QNetworkReply*>(QObject::sender()));
4434 while (!xml.atEnd() && !xml.hasError()) {4431 while (!xml.atEnd() && !xml.hasError()) {
4435 QXmlStreamReader::TokenType token = xml.readNext();4432 QXmlStreamReader::TokenType token = xml.readNext();
4436 4433
@@ -4453,12 +4450,9 @@ void Application::parseVersionXml() { · 16 unmodified lines
4453 }4450 }
4454 }4451 }
4455 }4452 }
4456
4457 if (!shouldSkipVersion(latestVersion) && applicationVersion() != latestVersion) {4453 if (!shouldSkipVersion(latestVersion) && applicationVersion() != latestVersion) {
4458 new UpdateDialog(_glWidget, releaseNotes, latestVersion, downloadUrl);4454 new UpdateDialog(_glWidget, releaseNotes, latestVersion, downloadUrl);
4459 }4455 }
4460
4461 delete _latestVersionReply;
4462}4456}
4463 4457
4464bool Application::shouldSkipVersion(QString latestVersion) {4458bool 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