Mercurial > hg > svapp
annotate framework/VersionTester.h @ 285:32d8084f8543
Merge from branch "qt5". This revision actually builds with Qt4 (late releases) or Qt5, though it will warn on configure with Qt4.
author | Chris Cannam |
---|---|
date | Tue, 14 May 2013 12:37:31 +0100 |
parents | 3c236d31cccd |
children | 8cb01cd2441d |
rev | line source |
---|---|
Chris@180 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@180 | 2 |
Chris@180 | 3 /* |
Chris@180 | 4 Sonic Visualiser |
Chris@180 | 5 An audio file viewer and annotation editor. |
Chris@180 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@180 | 7 |
Chris@180 | 8 This program is free software; you can redistribute it and/or |
Chris@180 | 9 modify it under the terms of the GNU General Public License as |
Chris@180 | 10 published by the Free Software Foundation; either version 2 of the |
Chris@180 | 11 License, or (at your option) any later version. See the file |
Chris@180 | 12 COPYING included with this distribution for more information. |
Chris@180 | 13 */ |
Chris@180 | 14 |
Chris@180 | 15 /* |
Chris@180 | 16 This is a modified version of a source file from the |
Chris@180 | 17 Rosegarden MIDI and audio sequencer and notation editor. |
Chris@180 | 18 This file copyright 2000-2009 Chris Cannam. |
Chris@180 | 19 */ |
Chris@180 | 20 |
Chris@180 | 21 #ifndef _VERSION_TESTER_H_ |
Chris@180 | 22 #define _VERSION_TESTER_H_ |
Chris@180 | 23 |
Chris@180 | 24 #include <QStringList> |
Chris@180 | 25 #include <QString> |
Chris@180 | 26 #include <QObject> |
Chris@263 | 27 #include <QNetworkReply> |
Chris@180 | 28 |
Chris@180 | 29 class VersionTester : public QObject |
Chris@180 | 30 { |
Chris@180 | 31 Q_OBJECT |
Chris@180 | 32 |
Chris@180 | 33 public: |
Chris@180 | 34 VersionTester(QString hostname, QString versionFilePath, QString myVersion); |
Chris@180 | 35 virtual ~VersionTester(); |
Chris@180 | 36 |
Chris@180 | 37 static bool isVersionNewerThan(QString, QString); |
Chris@180 | 38 |
Chris@180 | 39 signals: |
Chris@180 | 40 void newerVersionAvailable(QString); |
Chris@180 | 41 |
Chris@180 | 42 protected slots: |
Chris@263 | 43 void finished(); |
Chris@263 | 44 void error(QNetworkReply::NetworkError); |
Chris@180 | 45 |
Chris@180 | 46 private: |
Chris@263 | 47 QString m_myVersion; |
Chris@263 | 48 QNetworkReply *m_reply; |
Chris@180 | 49 bool m_httpFailed; |
Chris@180 | 50 }; |
Chris@180 | 51 |
Chris@180 | 52 #endif |
Chris@180 | 53 |