File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,8 +58,15 @@ set(MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/m
5858set (QML_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR} /qt${QT_VERSION_MAJOR} /qml" CACHE STRING "Qml plugin install directory" )
5959
6060set (USE_QQuickStylePluginPrivate OFF )
61- find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core )
62- find_package (Qt${QT_VERSION_MAJOR}QuickControls2 )
61+ find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core QuickControls2 )
62+
63+ if (${QT_VERSION_MAJOR} STREQUAL "6" )
64+ if (${Qt6QuickControls2_VERSION} VERSION_GREATER_EQUAL "6.10.0" )
65+ set (QT_NO_PRIVATE_MODULE_WARNING ON )
66+ find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS CorePrivate QuickControls2Private )
67+ endif ()
68+ endif ()
69+
6370if (EnableQt5)
6471if (TARGET Qt::QuickControls2 AND TARGET Qt::QuickControls2Private)
6572 set (USE_QQuickStylePluginPrivate ON )
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ if(EnableQt5)
1010 find_package (Qt${QT_VERSION_MAJOR}QuickCompiler )
1111endif ()
1212
13+ if ("${QT_VERSION_MAJOR} " STREQUAL "6" )
14+ if (${Qt6Qml_VERSION} VERSION_GREATER_EQUAL "6.10.0" )
15+ set (QT_NO_PRIVATE_MODULE_WARNING ON )
16+ find_package (
17+ Qt6
18+ COMPONENTS QmlPrivate QuickPrivate QuickControls2Private
19+ REQUIRED )
20+ endif ()
21+ endif ()
22+
1323set (QML_FILES
1424 ApplicationWindow.qml
1525 BusyIndicator.qml
Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ if (EnableQt6)
1313 set (QML_RCS ${CMAKE_CURRENT_LIST_DIR} /qml-qt6.qrc)
1414endif ()
1515add_executable (${BIN_NAME}
16- ${CMAKE_CURRENT_LIST_DIR} /main.cpp
16+ ${CMAKE_CURRENT_LIST_DIR} /main.cpp
1717 ${CMAKE_CURRENT_LIST_DIR} /assets.qrc
1818 ${QML_RCS}
1919)
2020
2121target_compile_options (${BIN_NAME} PRIVATE "-fpic" )
2222
2323target_link_libraries (${BIN_NAME} PRIVATE
24- Qt${QT_VERSION_MAJOR}::Quick
24+ Qt${QT_VERSION_MAJOR}::Quick
2525 Qt${QT_VERSION_MAJOR}::QuickControls2
2626 Dtk${DTK_VERSION_MAJOR}::Core
2727 Dtk${DTK_VERSION_MAJOR}::Gui
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ qt_add_qml_module(dtkdeclarativesettingsplugin
2424
2525dtk_extend_target (dtkdeclarativesettingsplugin EnableCov ${ENABLE_COV} )
2626
27+ if ("${QT_VERSION_MAJOR} " STREQUAL "6" )
28+ if (${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0" )
29+ find_package (Qt6 REQUIRED COMPONENTS CorePrivate QuickPrivate QmlPrivate )
30+ endif ()
31+ endif ()
32+
2733target_link_libraries (dtkdeclarativesettingsplugin
2834PRIVATE
2935 Qt${QT_VERSION_MAJOR}::Core
Original file line number Diff line number Diff line change 99
1010find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick DBus QuickControls2 LinguistTools )
1111
12+ if ("${QT_VERSION_MAJOR} " STREQUAL "6" )
13+ if (${Qt6Quick_VERSION} VERSION_GREATER_EQUAL "6.10.0" )
14+ set (QT_NO_PRIVATE_MODULE_WARNING ON )
15+ find_package (Qt6 REQUIRED COMPONENTS QuickPrivate QuickControls2Private )
16+ endif ()
17+ endif ()
18+
1219find_package (Dtk${DTK_VERSION_MAJOR}Core REQUIRED )
1320find_package (Dtk${DTK_VERSION_MAJOR}Gui REQUIRED )
1421find_package (PkgConfig REQUIRED )
Original file line number Diff line number Diff line change @@ -214,13 +214,13 @@ TEST(ut_DColor, construct)
214214 pt.setBrush (QPalette::HighlightedText, Qt::blue);
215215 ASSERT_EQ (color1.toColor (pt), Qt::blue);
216216
217- DColor color2 ( QColor (Qt::red)) ;
217+ DColor color2{ QColor (Qt::red)} ;
218218 ASSERT_EQ (color2.color (), Qt::red);
219219}
220220
221221TEST (ut_DColor, common)
222222{
223- DColor color ( QColor (Qt::red)) ;
223+ DColor color{ QColor (Qt::red)} ;
224224 DColor color2 (color.hue (1 ).opacity (1 ).saturation (1 ).lightness (1 ));
225225
226226 EXPECT_NE (color.data .hue , color2.data .hue );
@@ -231,9 +231,9 @@ TEST(ut_DColor, common)
231231
232232TEST (ut_DColor, operatorEQ)
233233{
234- DColor color1 ( QColor (Qt::red)) ;
235- DColor color2 ( QColor (Qt::blue)) ;
236- DColor color3 ( QColor (Qt::blue)) ;
234+ DColor color1{ QColor (Qt::red)} ;
235+ DColor color2{ QColor (Qt::blue)} ;
236+ DColor color3{ QColor (Qt::blue)} ;
237237 EXPECT_NE (color1, color2);
238238 EXPECT_EQ (color2, color3);
239239}
You can’t perform that action at this time.
0 commit comments