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/plugin/qfactoryloader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/corelib/plugin/qfactoryloader.cpp') diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index b8e18cc9a8..21f1007d5b 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -62,7 +62,7 @@ class QFactoryLoaderPrivate : public QObjectPrivate public: QFactoryLoaderPrivate(){} QByteArray iid; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) ~QFactoryLoaderPrivate(); mutable QMutex mutex; QList libraryList; @@ -73,7 +73,7 @@ public: #endif }; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) Q_GLOBAL_STATIC(QList, qt_factory_loaders) @@ -232,7 +232,7 @@ void QFactoryLoader::refreshAll() } } -#endif // QT_NO_LIBRARY +#endif // QT_CONFIG(library) QFactoryLoader::QFactoryLoader(const char *iid, const QString &suffix, @@ -242,7 +242,7 @@ QFactoryLoader::QFactoryLoader(const char *iid, moveToThread(QCoreApplicationPrivate::mainThread()); Q_D(QFactoryLoader); d->iid = iid; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) d->cs = cs; d->suffix = suffix; @@ -259,7 +259,7 @@ QList QFactoryLoader::metaData() const { Q_D(const QFactoryLoader); QList metaData; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QMutexLocker locker(&d->mutex); for (int i = 0; i < d->libraryList.size(); ++i) metaData.append(d->libraryList.at(i)->metaData); @@ -281,7 +281,7 @@ QObject *QFactoryLoader::instance(int index) const if (index < 0) return 0; -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QMutexLocker lock(&d->mutex); if (index < d->libraryList.size()) { QLibraryPrivate *library = d->libraryList.at(index); -- cgit v1.2.3