summaryrefslogtreecommitdiffstats
path: root/src/server/main.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2016-05-18 17:32:42 +0200
committerJonathan Bauer2016-05-18 17:32:42 +0200
commit7cf83493fdaca88fd3dbc736d5ca9d86dd7f9e83 (patch)
tree810d5c8265adc6273c7f05933778980608670249 /src/server/main.cpp
parentadded example switch scripts. (diff)
downloadpvs2-7cf83493fdaca88fd3dbc736d5ca9d86dd7f9e83.tar.gz
pvs2-7cf83493fdaca88fd3dbc736d5ca9d86dd7f9e83.tar.xz
pvs2-7cf83493fdaca88fd3dbc736d5ca9d86dd7f9e83.zip
[shared/server] define preferred styles and enable it if supported
Diffstat (limited to 'src/server/main.cpp')
-rw-r--r--src/server/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp
index d77d77f..8729af5 100644
--- a/src/server/main.cpp
+++ b/src/server/main.cpp
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include "mainwindow/mainwindow.h"
#include "util/util.h"
+#include "../shared/settings.h"
int main(int argc, char** argv)
{
@@ -16,7 +17,14 @@ int main(int argc, char** argv)
app.setOrganizationName("openslx");
app.setOrganizationDomain("openslx.org");
app.setApplicationName("pvsmgr");
-
+ QStringList supportedStyles = QStyleFactory::keys();
+ for (QString style : PREFERRED_STYLES) {
+ if (supportedStyles.contains(style)) {
+ qDebug() << "Setting style to: " << style;
+ app.setStyle(style);
+ break;
+ }
+ }
qsrand((uint)QDateTime::currentMSecsSinceEpoch());