From f5be5c6b14acb84ba1dac954c0284ded467f1542 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 24 Aug 2022 13:02:42 +0200 Subject: [PATCH] Move qSharedBuild() from qglobal.h to qlibraryinfo.h [ChangeLog][Potentially Source-Incompatible Changes] qSharedBuild() is moved from qglobal.h to qlibraryinfo.h, '#include ' needs to be added where it's used. Task-number: QTBUG-99313 Change-Id: Ic64561a8eb129ba2934e2770ca02119de208a2a5 Reviewed-by: Thiago Macieira Reviewed-by: Yuhang Zhao <2546789017@qq.com> --- src/corelib/global/qglobal.cpp | 9 --------- src/corelib/global/qglobal.h | 2 -- src/corelib/global/qlibraryinfo.cpp | 9 +++++++++ src/corelib/global/qlibraryinfo.h | 2 ++ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index bcd0292cdbf..57892b4109a 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -807,15 +807,6 @@ const char *qVersion() noexcept return QT_VERSION_STR; } -bool qSharedBuild() noexcept -{ -#ifdef QT_SHARED - return true; -#else - return false; -#endif -} - /***************************************************************************** System detection routines *****************************************************************************/ diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 735143237c3..bdf484d2450 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -109,8 +109,6 @@ private: #endif // Q_OS_DARWIN -Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept; - /* Debugging and error handling */ diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index d931dfac483..755a4c6c392 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -646,6 +646,15 @@ QStringList QLibraryInfo::platformPluginArguments(const QString &platformName) \deprecated Use LibraryPath with QLibraryInfo::path() instead. */ +bool qSharedBuild() noexcept +{ +#ifdef QT_SHARED + return true; +#else + return false; +#endif +} + QT_END_NAMESPACE #if defined(Q_CC_GNU) && defined(ELF_INTERPRETER) diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h index e0f22737871..8e6788d0672 100644 --- a/src/corelib/global/qlibraryinfo.h +++ b/src/corelib/global/qlibraryinfo.h @@ -53,6 +53,8 @@ private: QLibraryInfo(); }; +Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept; + QT_END_NAMESPACE #endif // QLIBRARYINFO_H