Use Qt style "Windows", remove optional dependency on qtstyleplugins
authorWuzzy <Wuzzy2@mail.ru>
Tue, 30 Apr 2019 14:33:20 +0200
changeset 14877 cd0af25c7913
parent 14876 6d95d314ae8b
child 14878 38eadfc525ce
Use Qt style "Windows", remove optional dependency on qtstyleplugins
INSTALL.md
QTfrontend/main.cpp
--- a/INSTALL.md	Tue Apr 30 14:21:11 2019 +0200
+++ b/INSTALL.md	Tue Apr 30 14:33:20 2019 +0200
@@ -34,7 +34,6 @@
 usually better to have them installed. Hedgewars has fallback mechanisms
 in if these are not found on your system.
 
-- qtstyleplugins (for Qt 5)
 - Lua = 5.1.0
 
 ### Optional dependencies
--- a/QTfrontend/main.cpp	Tue Apr 30 14:21:11 2019 +0200
+++ b/QTfrontend/main.cpp	Tue Apr 30 14:33:20 2019 +0200
@@ -291,27 +291,14 @@
         // end of parameter parsing
 
         // Select Qt style
-        /* Qt5 Base removed Motif, Plastique. These are now in the Qt style plugins
-        (Ubuntu: qt5-style-plugins, which was NOT backported by Debian/Ubuntu to stable/LTS).
-        Windows appears to render best of the remaining options but still isn't quite right. */
-
-        // Try setting Plastique if available
         QStyle* coreStyle;
-        coreStyle = QStyleFactory::create("Plastique");
+        coreStyle = QStyleFactory::create("Windows");
         if(coreStyle != 0) {
             QApplication::setStyle(coreStyle);
-            qDebug("Qt style set: Plastique");
+            qDebug("Qt style set: Windows");
         } else {
-            // Use Windows as fallback.
-            // FIXME: Under Windows style, some widgets like scrollbars don't render as nicely
-            coreStyle = QStyleFactory::create("Windows");
-            if(coreStyle != 0) {
-                QApplication::setStyle(coreStyle);
-                qDebug("Qt style set: Windows");
-            } else {
-                // Windows style should not be missing in Qt5 Base. If it does, something went terribly wrong!
-                qWarning("No Qt style could be set! Using the default one.");
-            }
+            // Windows style should not be missing in Qt5 Base. If it does, something went terribly wrong!
+            qWarning("No Qt style could be set! Using the default one.");
         }
     }