From ed82950776e0eb59e7a5c32287ca488256883ba8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 23 Dec 2022 08:42:37 -0300 Subject: [PATCH] Fix improper ELF versions of certain symbols They got marked as Qt6_PRIVATE_API because of these private header defining classes that don't follow Qt's naming convention ("mutex", "condition_variable", "ControlElement"). We have an exclusion for classes whose name start with Q. Introduced by 5d903a64aca37ee7c2836e479e175336e9b7ca87 in the old Perl syncqt and ported over. Fixes: QTBUG-109605 Fixes: QTBUG-109604 Change-Id: I69ecc04064514f939896fffd173369623c960bcc Reviewed-by: Alexey Edelev (cherry picked from commit 41b38c802b2b6251bdd65f8bf0d2031c304d70f6) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/thread/qwaitcondition_p.h | 5 +++++ src/widgets/widgets/qmdisubwindow_p.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qwaitcondition_p.h b/src/corelib/thread/qwaitcondition_p.h index 0893e9dd351..cfb36ca30be 100644 --- a/src/corelib/thread/qwaitcondition_p.h +++ b/src/corelib/thread/qwaitcondition_p.h @@ -19,6 +19,11 @@ #include #include +// This header always defines a class called "mutex" and one called +// "condition_variable", so those mustn't be used to mark ELF symbol +// visibility. Don't add more classes to this header! +// ELFVERSION:stop + #include #include diff --git a/src/widgets/widgets/qmdisubwindow_p.h b/src/widgets/widgets/qmdisubwindow_p.h index 60909eb3bcb..2a1f83269a5 100644 --- a/src/widgets/widgets/qmdisubwindow_p.h +++ b/src/widgets/widgets/qmdisubwindow_p.h @@ -39,7 +39,7 @@ class QMouseEvent; namespace QMdi { template -class ControlElement : public T +class ControlElement : public T // ELFVERSION:ignore { public: ControlElement(QMdiSubWindow *child) : T(child, nullptr) @@ -58,7 +58,7 @@ public: QPointer mdiChild; }; -class ControlContainer : public QObject +class ControlContainer : public QObject // ELFVERSION:ignore { public: ControlContainer(QMdiSubWindow *mdiChild);