From 80d1787759e6bea318c7e39aaea7380b45d84a41 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 17 Sep 2024 07:43:59 -0700 Subject: [PATCH] QStorageInfo/Linux: Add missing static for doParseMountInfo() Amends 08c6d5c3fdfe9ad40053451ab3a9eb0492e273da, which accidentally made this an public, non-namespaced symbol out of QtCore. Pick-to: 6.8 Change-Id: I3217dee5b44730440f22fffd11a6888c4ee76e45 Reviewed-by: Ulf Hermann --- src/corelib/io/qstorageinfo_linux_p.h | 7 ++++++- tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qstorageinfo_linux_p.h b/src/corelib/io/qstorageinfo_linux_p.h index b9da13aa0a2..8f92b9e9783 100644 --- a/src/corelib/io/qstorageinfo_linux_p.h +++ b/src/corelib/io/qstorageinfo_linux_p.h @@ -35,7 +35,12 @@ enum class FilterMountInfo { Filtered, }; -Q_AUTOTEST_EXPORT std::vector doParseMountInfo( +#ifdef QT_BUILD_INTERNAL +Q_AUTOTEST_EXPORT +#else +static +#endif +std::vector doParseMountInfo( const QByteArray &mountinfo, FilterMountInfo filter = FilterMountInfo::All); QT_END_NAMESPACE diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp index 08fe3a782d0..10294585856 100644 --- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp @@ -22,7 +22,7 @@ #include "../../../../manual/qstorageinfo/printvolumes.cpp" -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && defined(QT_BUILD_INTERNAL) # include "../../../../../src/corelib/io/qstorageinfo_linux_p.h" #endif