mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-14 10:34:14 +02:00
cmake(qt6): verify Qt6::GuiPrivate at configure time, drop #warning
<private/qpdf_p.h> (QPdfEngine::drawHyperlink) needs Qt's private GUI module, previously flagged only by a #warning at compile time. Qt >= 6.7 ships GuiPrivate as a proper find_package component, but some distro packages (e.g. Ubuntu's qt6-base-private-dev, Qt 6.8.3) do not install Qt6GuiPrivateConfig.cmake and only provide the implicit Qt6::GuiPrivate target created alongside Qt6::Gui. Requesting the component unconditionally would therefore break distro-Qt builds. Instead: try the component quietly, then hard-verify the Qt6::GuiPrivate target exists after the main find_package, failing at configure time with an actionable message if the private headers are missing. The compile-time #warning in pdf_links.cpp and projectprintwindow.cpp is now redundant and removed. Verified: cmake configure + compile of both translation units on Ubuntu 25.04 / Qt 6.8.3 (system KF6), cmake configure on Qt 5.15. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
committed by
Andre Rummler
parent
c14d6a6dd6
commit
206c37f620
@@ -23,8 +23,8 @@
|
||||
#include "qetgraphicsitem/element.h"
|
||||
#include "qetgraphicsitem/elementtextitemgroup.h"
|
||||
|
||||
// Private Qt PDF engine for drawHyperlink() — not public API, stable since Qt4.
|
||||
// Requires QT += gui-private in qelectrotech.pro / gui-private in CMake.
|
||||
// Private Qt PDF engine for drawHyperlink() — not public API.
|
||||
// Availability of Qt::GuiPrivate is verified at configure time in CMakeLists.txt.
|
||||
#include <private/qpdf_p.h>
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
Reference in New Issue
Block a user