diff --git a/CMakeLists.txt b/CMakeLists.txt index ce2b04f3..f118069b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,11 @@ find_package( Qt6 6.5 COMPONENTS Widgets Qml Quick Test UiTools REQUIRED) - +if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.10.0") + set(QT_NO_PRIVATE_MODULE_WARNING ON) + find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE REQUIRED + COMPONENTS CorePrivate WidgetsPrivate QmlPrivate) +endif() # 3rdparty # ############################################################################## add_subdirectory(3rdparty) diff --git a/src/gui/qttsview.cpp b/src/gui/qttsview.cpp index bc5b170c..500225a5 100644 --- a/src/gui/qttsview.cpp +++ b/src/gui/qttsview.cpp @@ -121,8 +121,15 @@ class QtTsProxy : public QSortFilterProxyModel void setFilterText(const QString &str) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0) + beginFilterChange(); +#endif m_filterText = str; +#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0) + endFilterChange(); +#else invalidateFilter(); +#endif } protected: diff --git a/tests/tst_rcwriter.cpp b/tests/tst_rcwriter.cpp index e4343557..9a655842 100644 --- a/tests/tst_rcwriter.cpp +++ b/tests/tst_rcwriter.cpp @@ -39,8 +39,9 @@ private slots: } if (buffer.open(QIODevice::ReadOnly)) { QFile file(Test::testDataPath() + "/tst_rcwriter/qrc_expected_default.qrc"); - file.open(QIODevice::ReadOnly); - QCOMPARE(buffer.readAll(), file.readAll()); + if (file.open(QIODevice::ReadOnly)) { + QCOMPARE(buffer.readAll(), file.readAll()); + } } } @@ -54,8 +55,9 @@ private slots: } if (buffer.open(QIODevice::ReadOnly)) { QFile file(Test::testDataPath() + "/tst_rcwriter/qrc_expected_noalias_onlyexist.qrc"); - file.open(QIODevice::ReadOnly); - QCOMPARE(buffer.readAll(), file.readAll()); + if (file.open(QIODevice::ReadOnly)) { + QCOMPARE(buffer.readAll(), file.readAll()); + } } } } @@ -111,8 +113,9 @@ private slots: // file.write(buffer.data()); // file.close(); // } - file.open(QIODevice::ReadOnly); - QCOMPARE(buffer.readAll(), file.readAll()); + if (file.open(QIODevice::ReadOnly)) { + QCOMPARE(buffer.readAll(), file.readAll()); + } } else { QWidget *widget = loader.load(&buffer); QVERIFY2(loader.errorString().isEmpty(), dialog.id.toLatin1());