Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Import and use QtGuiPrivate instead of using an implementation variable
Joshua Goinsf623a66d6788
diff --git a/CMakeLists.txt b/CMakeLists.txtindex 78dc9b05e8..1f8df457b9 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -509,6 +509,14 @@ find_package(Qt${QT_MAJOR_VERSION} ${MIN_QT_VERSION}Sql)+# Krita uses QtGuiPrivate headers+if (QT_MAJOR_VERSION STREQUAL "5")+ find_package(Qt${QT_MAJOR_VERSION}Gui ${MIN_QT_VERSION}+ REQUIRED COMPONENTS+ Private+ )+endif()+if (ANDROID)if (QT_MAJOR_VERSION STREQUAL "5")find_package(Qt${QT_MAJOR_VERSION} ${MIN_QT_VERSION}@@ -525,6 +533,7 @@ if (QT_MAJOR_VERSION STREQUAL "6")OpenGLOpenGLWidgetsSvgWidgets+ GuiPrivate)find_package(KF6 ${MIN_FRAMEWORKS_VERSION}diff --git a/krita/CMakeLists.txt b/krita/CMakeLists.txtindex a331441dec..8d7aa2eb4b 100644--- a/krita/CMakeLists.txt+++ b/krita/CMakeLists.txt@@ -28,15 +28,6 @@ else())endif()-if (WIN32)- # Private headers are needed for main.cc to enable WinTab support- set_source_files_properties(- main.cc- PROPERTIES- INCLUDE_DIRECTORIES "${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}"- )-endif()-if (WIN32)set(krita_windows_stub_ICONS_SRCS "")ecm_add_app_icon(krita_windows_stub_ICONS_SRCS ICONS ${ICON_SRCS} OUTFILE_BASENAME krita)@@ -112,6 +103,7 @@ elseif (WIN32)# Build the main implementation into a DLL to be called by a stub EXE.kis_add_library(krita SHARED ${krita_SRCS})set_target_properties(krita PROPERTIES PREFIX "")+ target_link_libraries(krita PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate)else()add_executable(krita ${krita_SRCS})endif()diff --git a/libs/ui/CMakeLists.txt b/libs/ui/CMakeLists.txtindex eecd482c1f..c94daac57d 100644--- a/libs/ui/CMakeLists.txt+++ b/libs/ui/CMakeLists.txt@@ -695,18 +695,11 @@ target_link_libraries(kritaui)if(WIN32)- # Private headers are needed for:+ # Private headers are needed for WinTab API:# * KisDlgCustomTabletResolution# * KisScreenInformationAdapter# * dialogs/kis_dlg_preferences.cc- set_source_files_properties(- dialogs/KisDlgCustomTabletResolution.cpp- opengl/KisScreenInformationAdapter.cpp- dialogs/kis_dlg_preferences.cc # for WinTab switching API- kis_config.cc # for logging the WinTab API- PROPERTIES- INCLUDE_DIRECTORIES "${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}"- )+ target_link_libraries(kritaui PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate)endif()if (QT_MAJOR_VERSION STREQUAL "6")diff --git a/libs/widgetutils/CMakeLists.txt b/libs/widgetutils/CMakeLists.txtindex 513f509345..a34c3ef036 100644--- a/libs/widgetutils/CMakeLists.txt+++ b/libs/widgetutils/CMakeLists.txt@@ -101,12 +101,6 @@ if (QT_MAJOR_VERSION STREQUAL "5"))endif()-# Add QtGui's private headers to KKeySequenceWidget, which are-# required for the shortcuts translation-set_source_files_properties(xmlgui/kkeysequencewidget.cpp- PROPERTIES- INCLUDE_DIRECTORIES "${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}"- )if (HAVE_DBUS)set(kritawidgetutils_LIB_SRCS ${kritawidgetutils_LIB_SRCS}@@ -155,6 +149,7 @@ target_link_libraries(kritawidgetutilskritaresourcesPRIVATEQt${QT_MAJOR_VERSION}::PrintSupport+ Qt${QT_MAJOR_VERSION}::GuiPrivate # required for the shortcuts translationKF${KF_MAJOR}::I18nKF${KF_MAJOR}::ConfigCoreKF${KF_MAJOR}::CoreAddons