Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,15 @@ set(MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/m
set(QML_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml" CACHE STRING "Qml plugin install directory")

set(USE_QQuickStylePluginPrivate OFF)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR}QuickControls2)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core QuickControls2)

if (${QT_VERSION_MAJOR} STREQUAL "6")
if (${Qt6QuickControls2_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS CorePrivate QuickControls2Private)
endif()
endif()

if(EnableQt5)
if(TARGET Qt::QuickControls2 AND TARGET Qt::QuickControls2Private)
set(USE_QQuickStylePluginPrivate ON)
Expand Down
10 changes: 10 additions & 0 deletions chameleon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ if(EnableQt5)
find_package(Qt${QT_VERSION_MAJOR}QuickCompiler)
endif()

if("${QT_VERSION_MAJOR}" STREQUAL "6")
if(${Qt6Qml_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(
Qt6
COMPONENTS QmlPrivate QuickPrivate QuickControls2Private
REQUIRED)
endif()
endif()

set(QML_FILES
ApplicationWindow.qml
BusyIndicator.qml
Expand Down
4 changes: 2 additions & 2 deletions examples/exhibition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ if (EnableQt6)
set(QML_RCS ${CMAKE_CURRENT_LIST_DIR}/qml-qt6.qrc)
endif()
add_executable(${BIN_NAME}
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/assets.qrc
${QML_RCS}
)

target_compile_options(${BIN_NAME} PRIVATE "-fpic")

target_link_libraries(${BIN_NAME} PRIVATE
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::QuickControls2
Dtk${DTK_VERSION_MAJOR}::Core
Dtk${DTK_VERSION_MAJOR}::Gui
Expand Down
6 changes: 6 additions & 0 deletions qt6/src/qml/settings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ qt_add_qml_module(dtkdeclarativesettingsplugin

dtk_extend_target(dtkdeclarativesettingsplugin EnableCov ${ENABLE_COV})

if("${QT_VERSION_MAJOR}" STREQUAL "6")
if (${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0")
find_package(Qt6 REQUIRED COMPONENTS CorePrivate QuickPrivate QmlPrivate)
endif()
endif()

target_link_libraries(dtkdeclarativesettingsplugin
PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Expand Down
7 changes: 7 additions & 0 deletions src/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ endif()

find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick DBus QuickControls2 LinguistTools)

if ("${QT_VERSION_MAJOR}" STREQUAL "6")
if (${Qt6Quick_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 REQUIRED COMPONENTS QuickPrivate QuickControls2Private)
endif()
endif()

find_package(Dtk${DTK_VERSION_MAJOR}Core REQUIRED)
find_package(Dtk${DTK_VERSION_MAJOR}Gui REQUIRED)
find_package(PkgConfig REQUIRED)
Expand Down
10 changes: 5 additions & 5 deletions tests/ut_dqmlglobalobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ TEST(ut_DColor, construct)
pt.setBrush(QPalette::HighlightedText, Qt::blue);
ASSERT_EQ(color1.toColor(pt), Qt::blue);

DColor color2(QColor(Qt::red));
DColor color2{QColor(Qt::red)};
ASSERT_EQ(color2.color(), Qt::red);
}

TEST(ut_DColor, common)
{
DColor color(QColor(Qt::red));
DColor color{QColor(Qt::red)};
DColor color2(color.hue(1).opacity(1).saturation(1).lightness(1));

EXPECT_NE(color.data.hue, color2.data.hue);
Expand All @@ -231,9 +231,9 @@ TEST(ut_DColor, common)

TEST(ut_DColor, operatorEQ)
{
DColor color1(QColor(Qt::red));
DColor color2(QColor(Qt::blue));
DColor color3(QColor(Qt::blue));
DColor color1{QColor(Qt::red)};
DColor color2{QColor(Qt::blue)};
DColor color3{QColor(Qt::blue)};
EXPECT_NE(color1, color2);
EXPECT_EQ(color2, color3);
}
Loading