QGIS/src/app/qgsversioninfo.h
Nyall Dawson 42676dc93c Move some getters which are incorrectly marked as slots,
remove some unnecessary 'const's from signals

Thanks to clazy const-signal-or-slot check
2017-10-09 11:53:06 +10:00

64 lines
1.9 KiB
C++

/***************************************************************************
----------------------------------------------------
date : 18.8.2015
copyright : (C) 2015 by Matthias Kuhn
email : matthias (at) opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSVERSIONINFO_H
#define QGSVERSIONINFO_H
#include <QObject>
#include <QNetworkReply>
class QgsVersionInfo : public QObject
{
Q_OBJECT
public:
explicit QgsVersionInfo( QObject *parent = nullptr );
QString html() const { return mAdditionalHtml; }
QString downloadInfo() const { return mDownloadInfo; }
int latestVersionCode() const { return mLatestVersion; }
bool newVersionAvailable() const;
bool isDevelopmentVersion() const;
QNetworkReply::NetworkError error() const { return mError; }
QString errorString() const { return mErrorString; }
public slots:
/**
* Connects to qgis.org and checks for new versions.
*/
void checkVersion();
private slots:
void versionReplyFinished();
signals:
void versionInfoAvailable();
private:
int mLatestVersion = 0;
QString mDownloadInfo;
QString mAdditionalHtml;
QNetworkReply::NetworkError mError = QNetworkReply::NoError;
QString mErrorString;
};
#endif // QGSVERSIONINFO_H