summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorZhao Yuhang <2546789017@qq.com>2024-04-05 23:33:12 +0800
committerYuhang Zhao <yuhangzhao@deepin.org>2024-04-06 13:14:52 +0000
commitd12490f6614ca0ccf43a73fd938144aa5f1b4e8b (patch)
tree597da3489d354b90bfb553fc1f408d8c2610d011 /src/corelib/kernel
parent079578eadd1ffe593bf8afbfe7c401b7e3176c63 (diff)
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>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 2244f976a4..939965cff7 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -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()
{
}