Fix compatibility with Qt < 5.8

This commit is contained in:
Martchus 2017-06-09 12:16:25 +02:00
parent 2845f5883d
commit 5d05e9a5df
4 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,7 @@ set(META_APP_DESCRIPTION "Tray application for Syncthing")
set(META_APP_CATEGORIES "System;Utility;Network;FileTransfer")
set(META_VERSION_MAJOR 0)
set(META_VERSION_MINOR 6)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
set(META_VERSION_EXACT_SONAME ON)
project(${META_PROJECT_NAME})

View File

@ -33,10 +33,14 @@ struct SyncthingConnectionSettings;
QNetworkAccessManager LIB_SYNCTHING_CONNECTOR_EXPORT &networkAccessManager();
enum class SyncthingStatus { Disconnected, Reconnecting, Idle, Scanning, Paused, Synchronizing, OutOfSync, BeingDestroyed };
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
Q_ENUM_NS(SyncthingStatus)
#endif
enum class SyncthingErrorCategory { OverallConnection, SpecificRequest, Parsing };
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
Q_ENUM_NS(SyncthingErrorCategory)
#endif
struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingLogEntry {
SyncthingLogEntry(const QString &when = QString(), const QString &message = QString())

View File

@ -17,7 +17,9 @@ extern LIB_SYNCTHING_CONNECTOR_EXPORT const QMetaObject staticMetaObject;
QT_ANNOTATE_CLASS(qt_qnamespace, "") /*end*/
enum class SyncthingDevStatus { Unknown, Disconnected, OwnDevice, Idle, Synchronizing, OutOfSync, Rejected };
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
Q_ENUM_NS(SyncthingDevStatus)
#endif
QString statusString(SyncthingDevStatus status);

View File

@ -18,7 +18,9 @@ extern LIB_SYNCTHING_CONNECTOR_EXPORT const QMetaObject staticMetaObject;
QT_ANNOTATE_CLASS(qt_qnamespace, "") /*end*/
enum class SyncthingDirStatus { Unknown, Idle, Unshared, Scanning, Synchronizing, OutOfSync };
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
Q_ENUM_NS(SyncthingDirStatus)
#endif
QString statusString(SyncthingDirStatus status);