Move qSharedBuild() from qglobal.h to qlibraryinfo.h

[ChangeLog][Potentially Source-Incompatible Changes] qSharedBuild() is
moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>'
needs to be added where it's used.

Task-number: QTBUG-99313
Change-Id: Ic64561a8eb129ba2934e2770ca02119de208a2a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Sona Kurazyan 2022-08-24 13:02:42 +02:00 committed by Yuhang Zhao
parent 52162eebe5
commit f5be5c6b14
4 changed files with 11 additions and 11 deletions

View File

@ -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
*****************************************************************************/

View File

@ -109,8 +109,6 @@ private:
#endif // Q_OS_DARWIN
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept;
/*
Debugging and error handling
*/

View File

@ -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)

View File

@ -53,6 +53,8 @@ private:
QLibraryInfo();
};
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept;
QT_END_NAMESPACE
#endif // QLIBRARYINFO_H