From d6330a19b29ebff359a6746250c78437dbcaf77d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 19 Dec 2016 10:34:32 +0100 Subject: Use QT_CONFIG(library) instead of QT_NO_LIBRARY For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen --- src/corelib/kernel/qcoreapplication.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication.cpp') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index c5f2e71f8c..baf140b3b2 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -339,7 +339,7 @@ struct QCoreApplicationData { QString applicationVersion; bool applicationNameSet; // true if setApplicationName was called -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QScopedPointer app_libpaths; QScopedPointer manual_libpaths; #endif @@ -534,7 +534,7 @@ void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver) void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths() { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QStringList *app_libpaths = coreappdata()->app_libpaths.data(); if (!app_libpaths) coreappdata()->app_libpaths.reset(app_libpaths = new QStringList); @@ -735,7 +735,7 @@ void QCoreApplicationPrivate::init() QLoggingRegistry::instance()->init(); -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) // Reset the lib paths, so that they will be recomputed, taking the availability of argv[0] // into account. If necessary, recompute right away and replay the manual changes on top of the // new lib paths. @@ -834,7 +834,7 @@ QCoreApplication::~QCoreApplication() QCoreApplicationPrivate::eventDispatcher = 0; #endif -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) coreappdata()->app_libpaths.reset(); coreappdata()->manual_libpaths.reset(); #endif @@ -2414,7 +2414,7 @@ QString QCoreApplication::applicationVersion() return coreappdata()->applicationVersion; } -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive)) @@ -2626,7 +2626,7 @@ void QCoreApplication::removeLibraryPath(const QString &path) QFactoryLoader::refreshAll(); } -#endif //QT_NO_LIBRARY +#endif // QT_CONFIG(library) #ifndef QT_NO_QOBJECT -- cgit v1.2.3