summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/serverinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/serverinfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index 544348c3b1..08f7f770b7 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -21,7 +21,15 @@
#include "systeminfo.h"
#include "Logger.h"
-static QSettings* serverSettings = nullptr;
+ServerInfo* ServerInfo::infoInstance = nullptr;
+
+ServerInfo* ServerInfo::instance()
+{
+ if (infoInstance == nullptr) {
+ infoInstance = new ServerInfo();
+ }
+ return infoInstance;
+}
// server infos
const static struct {
@@ -131,10 +139,10 @@ QVariant ServerInfo::platformValue(enum ServerInfos info, QString platform)
return value;
}
-QString ServerInfo::statusToString(int status)
+QString ServerInfo::statusAsString(QString platform)
{
QString value;
- switch(status)
+ switch(platformValue(CurStatus, platform).toInt())
{
case STATUS_RETIRED:
value = tr("Stable (Retired)");