More PR related changes

This commit is contained in:
Leonardo Murillo 2014-01-18 20:27:56 -06:00
parent cd9f2fd240
commit 7748002db7
4 changed files with 12 additions and 3 deletions

View file

@ -4384,6 +4384,10 @@ void Application::parseVersionXml() {
QString operatingSystem("mac"); QString operatingSystem("mac");
#endif #endif
#ifdef Q_OS_LINUX
QString operatingSystem("ubuntu");
#endif
QString releaseDate; QString releaseDate;
QString releaseNotes; QString releaseNotes;
QString latestVersion; QString latestVersion;

View file

@ -205,6 +205,7 @@ public:
void setIsHighlightVoxel(bool isHighlightVoxel) { _isHighlightVoxel = isHighlightVoxel; } void setIsHighlightVoxel(bool isHighlightVoxel) { _isHighlightVoxel = isHighlightVoxel; }
QUrl _downloadUrl; QUrl _downloadUrl;
void skipVersion(QString latestVersion);
public slots: public slots:
void domainChanged(const QString& domainHostname); void domainChanged(const QString& domainHostname);
@ -504,7 +505,6 @@ private:
void checkVersion(); void checkVersion();
void displayUpdateDialog(); void displayUpdateDialog();
bool shouldSkipVersion(QString latestVersion); bool shouldSkipVersion(QString latestVersion);
void skipVersion(QString latestVersion);
QNetworkReply* _latestVersionReply; QNetworkReply* _latestVersionReply;
}; };

View file

@ -20,10 +20,12 @@
#include "UpdateDialog.h" #include "UpdateDialog.h"
UpdateDialog::UpdateDialog(QWidget *parent, QString releaseNotes, QString latestVersion, QUrl downloadURL) : UpdateDialog::UpdateDialog(QWidget *parent, QString releaseNotes, QString latestVersion, QUrl downloadURL) :
QDialog(parent, Qt::Dialog) { QWidget(parent, Qt::Widget) {
Application* application = Application::getInstance(); Application* application = Application::getInstance();
QString _latestVersion(latestVersion);
QUiLoader updateDialogLoader; QUiLoader updateDialogLoader;
QFile updateDialogUi("resources/ui/updateDialog.ui"); QFile updateDialogUi("resources/ui/updateDialog.ui");
@ -57,6 +59,8 @@ void UpdateDialog::handleDownload() {
} }
void UpdateDialog::handleSkip() { void UpdateDialog::handleSkip() {
Application* application = Application::getInstance();
application->skipVersion(_latestVersion);
this->close(); this->close();
} }

View file

@ -14,7 +14,7 @@
#include <iostream> #include <iostream>
class UpdateDialog : public QDialog { class UpdateDialog : public QWidget {
Q_OBJECT Q_OBJECT
public: public:
@ -22,6 +22,7 @@ public:
private: private:
QWidget* _dialogWidget; QWidget* _dialogWidget;
QString _latestVersion;
private slots: private slots:
void handleDownload(); void handleDownload();