From 81e6ede3a8256cc92bb6dea37f8cbadf24bbc21e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 6 Sep 2024 11:08:24 +0200 Subject: [PATCH] Don't mark Q{Explicitly.}SharedDataPointer as Qt_6_PRIVATE_API The QT_DECLARE_Q{,E}SDP_SPECIALIZATION_DTOR_WITH_EXPORT macros make the destrcutor of the particular instantiations be out-of-line and exported from the library in question. In many cases, the class name that is being instantiated can found in a _p.h and this causes syncqt to mark any use of this class as private API, including this constructor that is meant to be used from inline (user) code. This patch marks all such instantiations to be "public" API. That will include some uses that shouldn't be so marked, but this is easier than having to do it piecemeal. The ELF version was changed for thsee Symbols changed in QtGui (for example): QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer()@@Qt_6 QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer()@@Qt_6 QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer() Task-number: QTBUG-128656 Task-number: QTBUG-117514 Change-Id: I1f25f1e61bb98159f9d3fffd63acbe04098cfef6 Reviewed-by: Dennis Oberst Reviewed-by: Alexandru Croitor (cherry picked from commit 33707235841981133edfdfcd88cc6e234aa4fc45) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtFlagHandlingHelpers.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index 3cfab2abf61..b7d71f7e809 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -87,6 +87,12 @@ function(qt_internal_add_linker_version_script target) get_target_property(target_type ${target} TYPE) if(NOT target_type STREQUAL "INTERFACE_LIBRARY") + # Export all specializations of the QExplicitlySharedDataPointer + # and QSharedDataPointer destructors; due to use of the + # QT_DECLARE_Q{,E}SDP_SPECIALIZATION_DTOR_WITH_EXPORT macros + string(APPEND contents "\n _ZN*18QSharedDataPointerI*D?Ev;") + string(APPEND contents "\n _ZN*28QExplicitlySharedDataPointerI*D?Ev;") + set(genex_prefix "\n ") set(genex_glue "$\n ") set(genex_suffix "$")