Skip to content

armgit / krita

Public Imported from GitHub
0

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++

Revert "Import and use QtGuiPrivate instead of using an implementation variable"

Dmitry Kazakovffa6cf13e2aa
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f8df457b9..78dc9b05e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -509,14 +509,6 @@ 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}
@@ -533,7 +525,6 @@ if (QT_MAJOR_VERSION STREQUAL "6")
OpenGL
OpenGLWidgets
SvgWidgets
- GuiPrivate
)
find_package(KF6 ${MIN_FRAMEWORKS_VERSION}
diff --git a/krita/CMakeLists.txt b/krita/CMakeLists.txt
index 8d7aa2eb4b..a331441dec 100644
--- a/krita/CMakeLists.txt
+++ b/krita/CMakeLists.txt
@@ -28,6 +28,15 @@ 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)
@@ -103,7 +112,6 @@ 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.txt
index c94daac57d..eecd482c1f 100644
--- a/libs/ui/CMakeLists.txt
+++ b/libs/ui/CMakeLists.txt
@@ -695,11 +695,18 @@ target_link_libraries(kritaui
)
if(WIN32)
- # Private headers are needed for WinTab API:
+ # Private headers are needed for:
# * KisDlgCustomTabletResolution
# * KisScreenInformationAdapter
# * dialogs/kis_dlg_preferences.cc
- target_link_libraries(kritaui PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate)
+ 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}"
+ )
endif()
if (QT_MAJOR_VERSION STREQUAL "6")
diff --git a/libs/widgetutils/CMakeLists.txt b/libs/widgetutils/CMakeLists.txt
index a34c3ef036..513f509345 100644
--- a/libs/widgetutils/CMakeLists.txt
+++ b/libs/widgetutils/CMakeLists.txt
@@ -101,6 +101,12 @@ 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}
@@ -149,7 +155,6 @@ target_link_libraries(kritawidgetutils
kritaresources
PRIVATE
Qt${QT_MAJOR_VERSION}::PrintSupport
- Qt${QT_MAJOR_VERSION}::GuiPrivate # required for the shortcuts translation
KF${KF_MAJOR}::I18n
KF${KF_MAJOR}::ConfigCore
KF${KF_MAJOR}::CoreAddons