From c2e349f1c38b55fd12f8ae537e754fa6658ab631 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周一, 01 1月 2024 20:21:34 +0800
Subject: [PATCH] Tested 5.12.8

---
 examples/qml/main.cpp              |    2 +-
 examples/mainwindow/main.cpp       |    5 +++--
 qmsetup                            |    2 +-
 CMakeLists.txt                     |    2 +-
 examples/mainwindow/mainwindow.cpp |    1 +
 README.md                          |    2 +-
 6 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index aec37b0..0fb89c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.19)
 
 project(QWindowKit VERSION 1.0.1.0 LANGUAGES CXX)
 
diff --git a/README.md b/README.md
index 8fddefd..87609c0 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@
 |:---------:|:-----------:|:-------------------------:|
 |    Qt     |   \>=5.12   | Core, Gui, Widgets, Quick |
 | Compiler  |  \>=C++17   |   MSVC 2019, GCC, Clang   |
-|   CMake   |   \>=3.17   |   >=3.20 is recommended   |
+|   CMake   |   \>=3.19   |   >=3.20 is recommended   |
 
 ### Tested Compilers
 
diff --git a/examples/mainwindow/main.cpp b/examples/mainwindow/main.cpp
index 11f0b92..b25a7a0 100644
--- a/examples/mainwindow/main.cpp
+++ b/examples/mainwindow/main.cpp
@@ -13,10 +13,11 @@
     qputenv("QSG_RHI_BACKEND", "d3d12");
     qputenv("QSG_RHI_HDR", "scrgb");
     qputenv("QT_QPA_DISABLE_REDIRECTION_SURFACE", "1");
-#endif
-
+    
     QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
         Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
+#endif
+
     QApplication a(argc, argv);
 
 #if 0 && defined(Q_OS_WINDOWS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp
index 7c50fa8..574fc06 100644
--- a/examples/mainwindow/mainwindow.cpp
+++ b/examples/mainwindow/mainwindow.cpp
@@ -8,6 +8,7 @@
 #include <QtCore/QTime>
 #include <QtCore/QTimer>
 #include <QtGui/QPainter>
+#include <QtGui/QWindow>
 #include <QtWidgets/QApplication>
 #include <QtWidgets/QStyle>
 #include <QtWidgets/QPushButton>
diff --git a/examples/qml/main.cpp b/examples/qml/main.cpp
index 66b3a18..1a898bb 100644
--- a/examples/qml/main.cpp
+++ b/examples/qml/main.cpp
@@ -18,9 +18,9 @@
     qputenv("QSG_RHI_BACKEND", "opengl");
     //qputenv("QSG_RHI_HDR", "scrgb");
     //qputenv("QT_QPA_DISABLE_REDIRECTION_SURFACE", "1");
-#endif
     QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
         Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
+#endif
     QGuiApplication application(argc, argv);
     QQmlApplicationEngine engine;
     QWK::registerTypes(&engine);
diff --git a/qmsetup b/qmsetup
index 177eeff..99ca80f 160000
--- a/qmsetup
+++ b/qmsetup
@@ -1 +1 @@
-Subproject commit 177eeff54f410035b9ddb68fa3d5a53055aed131
+Subproject commit 99ca80fd63e34f4bb54dcc48db09a66e86f5517d

--
Gitblit v1.9.1