From 4074cc94248304e15eec5ab1cd53371ac9c1e1b6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 7 Jan 2025 10:10:00 -0300 Subject: [PATCH] QCoreApplication: make libraryPathsLocked() file-static Amends 08ad96404b4c915eece1a547bf12e91664e7cdff. There's no need to have it in QCoreApplication, if it isn't called from anywhere outside of qcoreapplication.cpp and (now) doesn't require access to any QCoreApplication privates. Pick-to: 6.9 Change-Id: I60a929aed02f71d25e00fffdcd42d092d5533cc4 Reviewed-by: Marc Mutz Reviewed-by: Ulf Hermann --- src/corelib/kernel/qcoreapplication.cpp | 4 +++- src/corelib/kernel/qcoreapplication.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e1d4171364e..107aab1c1bc 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2921,6 +2921,8 @@ void QCoreApplication::requestPermission(const QPermission &requestedPermission, #endif // QT_CONFIG(permissions) #if QT_CONFIG(library) +static QStringList libraryPathsLocked(); + /*! Returns a list of paths that the application will search when dynamically loading libraries. @@ -2959,7 +2961,7 @@ QStringList QCoreApplication::libraryPaths() /*! \internal */ -QStringList QCoreApplication::libraryPathsLocked() +static QStringList libraryPathsLocked() { QCoreApplicationData *d = coreappdata; if (d->libPathsManuallySet()) diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index e0253afa645..87e78035d60 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -229,9 +229,6 @@ private: static bool notifyInternal2(QObject *receiver, QEvent *); static bool forwardEvent(QObject *receiver, QEvent *event, QEvent *originatingEvent = nullptr); #endif -#if QT_CONFIG(library) - static QStringList libraryPathsLocked(); -#endif #if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) static QBasicAtomicPointer self;