Mercurial > hg > easyhg
annotate src/versiontester.h @ 724:c59c17665162
Further macOS deployment fixes
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 14 Dec 2018 17:28:31 +0000 |
parents | f9b805d8cab4 |
children |
rev | line source |
---|---|
Chris@491 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@491 | 2 |
Chris@491 | 3 /* |
Chris@491 | 4 EasyMercurial |
Chris@491 | 5 |
Chris@491 | 6 Based on hgExplorer by Jari Korhonen |
Chris@491 | 7 Copyright (c) 2010 Jari Korhonen |
Chris@644 | 8 Copyright (c) 2013 Chris Cannam |
Chris@644 | 9 Copyright (c) 2013 Queen Mary, University of London |
Chris@491 | 10 |
Chris@491 | 11 This program is free software; you can redistribute it and/or |
Chris@491 | 12 modify it under the terms of the GNU General Public License as |
Chris@491 | 13 published by the Free Software Foundation; either version 2 of the |
Chris@491 | 14 License, or (at your option) any later version. See the file |
Chris@491 | 15 COPYING included with this distribution for more information. |
Chris@491 | 16 */ |
Chris@491 | 17 |
Chris@491 | 18 #ifndef _VERSION_TESTER_H_ |
Chris@491 | 19 #define _VERSION_TESTER_H_ |
Chris@491 | 20 |
Chris@491 | 21 #include <QStringList> |
Chris@491 | 22 #include <QString> |
Chris@491 | 23 #include <QObject> |
Chris@663 | 24 #include <QNetworkReply> |
Chris@491 | 25 |
Chris@491 | 26 class VersionTester : public QObject |
Chris@491 | 27 { |
Chris@491 | 28 Q_OBJECT |
Chris@491 | 29 |
Chris@491 | 30 public: |
Chris@491 | 31 VersionTester(QString hostname, QString versionFilePath, QString myVersion); |
Chris@491 | 32 virtual ~VersionTester(); |
Chris@491 | 33 |
Chris@491 | 34 static bool isVersionNewerThan(QString, QString); |
Chris@491 | 35 |
Chris@491 | 36 signals: |
Chris@491 | 37 void newerVersionAvailable(QString); |
Chris@491 | 38 |
Chris@491 | 39 protected slots: |
Chris@663 | 40 void finished(); |
Chris@663 | 41 void error(QNetworkReply::NetworkError); |
Chris@491 | 42 |
Chris@491 | 43 private: |
Chris@663 | 44 QString m_myVersion; |
Chris@663 | 45 QNetworkReply *m_reply; |
Chris@491 | 46 bool m_httpFailed; |
Chris@491 | 47 }; |
Chris@491 | 48 |
Chris@491 | 49 #endif |
Chris@491 | 50 |