diff options
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.h')
-rw-r--r-- | rbutil/rbutilqt/base/serverinfo.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.h b/rbutil/rbutilqt/base/serverinfo.h index e8d7cd5b74..9affcb6032 100644 --- a/rbutil/rbutilqt/base/serverinfo.h +++ b/rbutil/rbutilqt/base/serverinfo.h | |||
@@ -18,6 +18,9 @@ | |||
18 | * | 18 | * |
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | 20 | ||
21 | // Parse and provide information from build server via build-info file. | ||
22 | // This is a singleton. | ||
23 | |||
21 | #ifndef SERVERINFO_H | 24 | #ifndef SERVERINFO_H |
22 | #define SERVERINFO_H | 25 | #define SERVERINFO_H |
23 | 26 | ||
@@ -47,17 +50,21 @@ class ServerInfo : public QObject | |||
47 | RelCandidateUrl, | 50 | RelCandidateUrl, |
48 | }; | 51 | }; |
49 | 52 | ||
53 | static ServerInfo* instance(); | ||
54 | |||
50 | //! read in buildinfo file | 55 | //! read in buildinfo file |
51 | static void readBuildInfo(QString file); | 56 | void readBuildInfo(QString file); |
52 | //! get a value from server info for a named platform. | 57 | //! get a value from server info for a named platform. |
53 | static QVariant platformValue(enum ServerInfos setting, QString platform = ""); | 58 | QVariant platformValue(enum ServerInfos setting, QString platform = ""); |
54 | //! Convert status number to string | 59 | //! Get status number as string |
55 | static QString statusToString(int status); | 60 | QString statusAsString(QString platform = ""); |
56 | 61 | ||
57 | private: | 62 | protected: |
58 | //! you shouldnt call this, its a fully static class | 63 | ServerInfo() : serverSettings(nullptr) {} |
59 | ServerInfo() {} | ||
60 | 64 | ||
65 | private: | ||
66 | static ServerInfo* infoInstance; | ||
67 | QSettings* serverSettings; | ||
61 | 68 | ||
62 | }; | 69 | }; |
63 | 70 | ||