QtCore: avoid unnecessary export in static build

We only need it to be exported in shared builds.
Without this change, there will always be an
exported symbol called "qt_startup_hook" for
executables that linked against QtCore statically,
this is absolutely not the Qt user would expect.

Change-Id: Icf19df09531e13184ea019aa708d6b93fa626f85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Zhao Yuhang 2024-04-05 23:33:12 +08:00 committed by Yuhang Zhao
parent 079578eadd
commit d12490f661

View File

@ -241,7 +241,11 @@ void QCoreApplicationPrivate::processCommandLineArguments()
// Support for introspection
extern "C" void Q_DECL_EXPORT_OVERRIDABLE qt_startup_hook()
extern "C" void
#ifdef QT_SHARED
Q_DECL_EXPORT_OVERRIDABLE
#endif
qt_startup_hook()
{
}