summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-28 02:38:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-28 02:38:52 +0100
commit0d51e5e9073ff6965b3c80d2e86bd02a0d1db420 (patch)
tree3a92bd0abc4c6f7894f54b8a233369aed34e9e01
parent9a11ce772cacea29e31a399059e25f93c14f6dcc (diff)
gui/init: decruft
-rw-r--r--gui/init.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/gui/init.cpp b/gui/init.cpp
index b1018e39..91522867 100644
--- a/gui/init.cpp
+++ b/gui/init.cpp
@@ -1,5 +1,3 @@
-#include "init.hpp"
-
/* Copyright (c) 2013-2017 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -7,6 +5,7 @@
* copyright notice and this permission notice appear in all copies.
*/
+#include "init.hpp"
#include "migration/migration.hpp"
#include "options/options.hpp"
using namespace options;
@@ -27,10 +26,13 @@ using namespace options;
#include <QFile>
#include <QFileDialog>
#include <QString>
-#include <QSysInfo>
+#include <QOperatingSystemVersion>
#include <QDebug>
+#include <cfloat>
+#include <cfenv>
+
static void set_fp_mask()
{
#if defined OTR_ARCH_DENORM_DAZ
@@ -54,24 +56,22 @@ static void set_fp_mask()
static void set_qt_style()
{
-#if defined _WIN32
- if (QSysInfo::WindowsVersion == QSysInfo::WV_XP)
- return;
-#endif
-
#if defined _WIN32 || defined __APPLE__
// our layouts on OSX make some control wrongly sized -sh 20160908
{
- const char* const preferred[] { "fusion", "windowsvista", "macintosh" };
+ const char* const preferred[] {
+#ifdef __APPLE__
+ "macintosh", "fusion", "windowsvista", "windows",
+#else
+ "fusion", "windowsvista", "windows", "windowsxp",
+#endif
+ };
for (const char* style_name : preferred)
- {
- QStyle* s = QStyleFactory::create(style_name);
- if (s)
+ if (QStyle* s = QStyleFactory::create(style_name); s != nullptr)
{
QApplication::setStyle(s);
break;
}
- }
}
#endif
}