Getters should be constant
This commit is contained in:
parent
aaa1d12c68
commit
15838fb5e1
@ -17,7 +17,7 @@ QSimpleUpdater::QSimpleUpdater(QObject *parent)
|
||||
}
|
||||
|
||||
|
||||
QString QSimpleUpdater::changeLog() {
|
||||
QString QSimpleUpdater::changeLog() const {
|
||||
// Return the contents of the downloaded changelog
|
||||
if (!m_changelog.isEmpty()) {
|
||||
return m_changelog;
|
||||
@ -59,7 +59,7 @@ void QSimpleUpdater::checkForUpdates() {
|
||||
}
|
||||
}
|
||||
|
||||
QString QSimpleUpdater::latestVersion() {
|
||||
QString QSimpleUpdater::latestVersion() const {
|
||||
// Return the application version referenced by the string
|
||||
// that we downloaded
|
||||
if (!m_latest_version.isEmpty()) {
|
||||
@ -75,7 +75,7 @@ QString QSimpleUpdater::latestVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
QString QSimpleUpdater::installedVersion() {
|
||||
QString QSimpleUpdater::installedVersion() const {
|
||||
// Return the string issued by the user in the setApplicationVersion() function
|
||||
if (!m_installed_version.isEmpty()) {
|
||||
return m_installed_version;
|
||||
@ -103,7 +103,7 @@ void QSimpleUpdater::downloadLatestVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
bool QSimpleUpdater::newerVersionAvailable() {
|
||||
bool QSimpleUpdater::newerVersionAvailable() const {
|
||||
return m_new_version_available;
|
||||
}
|
||||
|
||||
|
@ -19,12 +19,12 @@ class QSimpleUpdater : public QObject {
|
||||
public:
|
||||
QSimpleUpdater(QObject *parent = 0);
|
||||
|
||||
QString changeLog();
|
||||
QString changeLog() const;
|
||||
void checkForUpdates();
|
||||
QString latestVersion();
|
||||
QString installedVersion();
|
||||
QString latestVersion() const;
|
||||
QString installedVersion() const;
|
||||
void downloadLatestVersion();
|
||||
bool newerVersionAvailable();
|
||||
bool newerVersionAvailable() const;
|
||||
|
||||
public slots:
|
||||
void setDownloadUrl(const QString &url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user