summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@nokia.com>2010-04-29 13:17:36 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-04-29 13:17:36 (GMT)
commite709077eff4d8b05cc9022d85dcb48587d96c720 (patch)
tree4b8262771ebf03739bcf79fb8dfc0838f3bc82b0 /src
parent4d312a6e635ce0cde0ae5c439541f315d7fddff3 (diff)
downloadQt-e709077eff4d8b05cc9022d85dcb48587d96c720.zip
Qt-e709077eff4d8b05cc9022d85dcb48587d96c720.tar.gz
Qt-e709077eff4d8b05cc9022d85dcb48587d96c720.tar.bz2
Fix QT_NO_LIBRARY
Some class uses QFactoryLoader without checking if QT_NO_LIBRARY is not defined. Remove QT_NO_SETTINGS used with QT_NO_LIBRARY for QFactoryLoader because LIBRARY depends on SETTINGS. Merge-request: 578 Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp10
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp2
-rw-r--r--src/corelib/plugin/qfactoryloader_p.h2
-rw-r--r--src/gui/accessible/qaccessible.cpp4
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/image/qimagereader.cpp14
-rw-r--r--src/gui/image/qimagewriter.cpp16
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.cpp6
-rw-r--r--src/gui/kernel/qguiplatformplugin.cpp2
-rw-r--r--src/gui/painting/qgraphicssystemfactory.cpp6
-rw-r--r--src/gui/styles/qstylefactory.cpp2
-rw-r--r--src/multimedia/multimedia/audio/qaudiodevicefactory.cpp14
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp4
-rw-r--r--src/sql/kernel/qsqldatabase.cpp6
15 files changed, 48 insertions, 50 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 59a601e..c9fbec8 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -105,7 +105,7 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_TEXTCODECPLUGIN
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_TEXTCODECPLUGIN)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QTextCodecFactoryInterface_iid, QLatin1String("/codecs")))
#endif
@@ -149,7 +149,7 @@ static bool nameMatch(const QByteArray &name, const QByteArray &test)
static QTextCodec *createForName(const QByteArray &name)
{
-#ifndef QT_NO_TEXTCODECPLUGIN
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_TEXTCODECPLUGIN)
QFactoryLoader *l = loader();
QStringList keys = l->keys();
for (int i = 0; i < keys.size(); ++i) {
@@ -1141,7 +1141,7 @@ QList<QByteArray> QTextCodec::availableCodecs()
locker.unlock();
#endif
-#ifndef QT_NO_TEXTCODECPLUGIN
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_TEXTCODECPLUGIN)
QFactoryLoader *l = loader();
QStringList keys = l->keys();
for (int i = 0; i < keys.size(); ++i) {
@@ -1181,7 +1181,7 @@ QList<int> QTextCodec::availableMibs()
locker.unlock();
#endif
-#ifndef QT_NO_TEXTCODECPLUGIN
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_TEXTCODECPLUGIN)
QFactoryLoader *l = loader();
QStringList keys = l->keys();
for (int i = 0; i < keys.size(); ++i) {
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index bf2e2e4..609e6b3 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -514,7 +514,7 @@ QCoreApplication::QCoreApplication(int &argc, char **argv)
{
init();
QCoreApplicationPrivate::eventDispatcher->startingUp();
-#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_LIBRARY)
// Refresh factoryloader, as text codecs are requested during lib path
// resolving process and won't be therefore properly loaded.
// Unknown if this is symbian specific issue.
@@ -2189,7 +2189,7 @@ QString QCoreApplication::applicationVersion()
return coreappdata()->applicationVersion;
}
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
@@ -2291,13 +2291,11 @@ QStringList QCoreApplication::libraryPaths()
*/
void QCoreApplication::setLibraryPaths(const QStringList &paths)
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QMutexLocker locker(libraryPathMutex());
if (!coreappdata()->app_libpaths)
coreappdata()->app_libpaths = new QStringList;
*(coreappdata()->app_libpaths) = paths;
QFactoryLoader::refreshAll();
-#endif
}
/*!
@@ -2318,7 +2316,6 @@ void QCoreApplication::setLibraryPaths(const QStringList &paths)
*/
void QCoreApplication::addLibraryPath(const QString &path)
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
if (path.isEmpty())
return;
@@ -2333,7 +2330,6 @@ void QCoreApplication::addLibraryPath(const QString &path)
coreappdata()->app_libpaths->prepend(canonicalPath);
QFactoryLoader::refreshAll();
}
-#endif
}
/*!
@@ -2344,7 +2340,6 @@ void QCoreApplication::addLibraryPath(const QString &path)
*/
void QCoreApplication::removeLibraryPath(const QString &path)
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
if (path.isEmpty())
return;
@@ -2356,7 +2351,6 @@ void QCoreApplication::removeLibraryPath(const QString &path)
QString canonicalPath = QDir(path).canonicalPath();
coreappdata()->app_libpaths->removeAll(canonicalPath);
QFactoryLoader::refreshAll();
-#endif
}
#endif //QT_NO_LIBRARY
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 87decc6..62d565a 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -41,7 +41,7 @@
#include "qfactoryloader_p.h"
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
#include "qfactoryinterface.h"
#include "qmap.h"
#include <qdir.h>
diff --git a/src/corelib/plugin/qfactoryloader_p.h b/src/corelib/plugin/qfactoryloader_p.h
index 51426ba..10e6e2a 100644
--- a/src/corelib/plugin/qfactoryloader_p.h
+++ b/src/corelib/plugin/qfactoryloader_p.h
@@ -57,7 +57,7 @@
#include "QtCore/qstringlist.h"
#include "private/qlibrary_p.h"
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QT_BEGIN_NAMESPACE
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index a55a061..0921bdb 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -389,7 +389,7 @@ QT_BEGIN_NAMESPACE
\internal
*/
-#if !defined(QT_NO_LIBRARY) && (!defined(QT_NO_SETTINGS) || !defined(Q_OS_WIN))
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAccessibleFactoryInterface_iid, QLatin1String("/accessible")))
#endif
@@ -532,7 +532,7 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
if (iface)
return iface;
}
-#if !defined(QT_NO_LIBRARY) && (!defined(QT_NO_SETTINGS) || !defined(Q_OS_WIN))
+#ifndef QT_NO_LIBRARY
QAccessibleFactoryInterface *factory = qobject_cast<QAccessibleFactoryInterface*>(loader()->instance(cn));
if (factory) {
iface = factory->create(cn, object);
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index bc52e99..891b1db 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -441,7 +441,7 @@ void QPixmapIconEngine::virtual_hook(int id, void *data)
}
}
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QIconEngineFactoryInterface_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loaderV2,
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 27f9627..93d5cd3 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -144,7 +144,7 @@
QT_BEGIN_NAMESPACE
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
#endif
@@ -205,7 +205,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
QByteArray form = format.toLower();
QImageIOHandler *handler = 0;
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
// check if we have plugins that support the image format
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -217,7 +217,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
<< keys.size() << "plugins available: " << keys;
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
int suffixPluginIndex = -1;
if (device && format.isEmpty() && autoDetectImageFormat && !ignoresFormatAndExtension) {
// if there's no format, see if \a device is a file, and if so, find
@@ -246,7 +246,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
if (ignoresFormatAndExtension)
testFormat = QByteArray();
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (suffixPluginIndex != -1) {
// check if the plugin that claims support for this format can load
// from this device with this format.
@@ -331,7 +331,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
#endif
}
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (!handler && (autoDetectImageFormat || ignoresFormatAndExtension)) {
// check if any of our plugins recognize the file from its contents.
const qint64 pos = device ? device->pos() : 0;
@@ -350,7 +350,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
if (device && !device->isSequential())
device->seek(pos);
}
-#endif
+#endif // QT_NO_LIBRARY
if (!handler && (autoDetectImageFormat || ignoresFormatAndExtension)) {
// check if any of our built-in handlers recognize the file from its
@@ -1414,7 +1414,7 @@ QList<QByteArray> QImageReader::supportedImageFormats()
for (int i = 0; i < _qt_NumFormats; ++i)
formats << _qt_BuiltInFormats[i].extension;
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QFactoryLoader *l = loader();
QStringList keys = l->keys();
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 503a1b2..552729f 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -117,7 +117,7 @@
QT_BEGIN_NAMESPACE
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
#endif
@@ -129,7 +129,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
QByteArray suffix;
QImageIOHandler *handler = 0;
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
// check if any plugins can write the image
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -142,7 +142,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
// this allows plugins to override our built-in handlers.
if (QFile *file = qobject_cast<QFile *>(device)) {
if (!(suffix = QFileInfo(file->fileName()).suffix().toLower().toLatin1()).isEmpty()) {
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
int index = keys.indexOf(QString::fromLatin1(suffix));
if (index != -1)
suffixPluginIndex = index;
@@ -153,7 +153,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
QByteArray testFormat = !form.isEmpty() ? form : suffix;
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (suffixPluginIndex != -1) {
// when format is missing, check if we can find a plugin for the
// suffix.
@@ -161,7 +161,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
if (plugin && (plugin->capabilities(device, suffix) & QImageIOPlugin::CanWrite))
handler = plugin->create(device, suffix);
}
-#endif // Q_NO_LIBRARY
+#endif // QT_NO_LIBRARY
// check if any built-in handlers can write the image
if (!handler && !testFormat.isEmpty()) {
@@ -192,7 +192,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (!testFormat.isEmpty()) {
for (int i = 0; i < keys.size(); ++i) {
QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
@@ -203,7 +203,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
}
-#endif
+#endif // QT_NO_LIBRARY
if (!handler)
return 0;
@@ -670,7 +670,7 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
formats << "png";
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QFactoryLoader *l = loader();
QStringList keys = l->keys();
for (int i = 0; i < keys.count(); ++i) {
diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp
index d47e343..ec8d8e2 100644
--- a/src/gui/inputmethod/qinputcontextfactory.cpp
+++ b/src/gui/inputmethod/qinputcontextfactory.cpp
@@ -81,7 +81,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QInputContextFactoryInterface_iid, QLatin1String("/inputmethods")))
#endif
@@ -153,7 +153,7 @@ QInputContext *QInputContextFactory::create( const QString& key, QObject *parent
result = new QCoeFepInputContext;
}
#endif
-#if defined(QT_NO_LIBRARY) || defined(QT_NO_SETTINGS)
+#ifdef QT_NO_LIBRARY
Q_UNUSED(key);
#else
if (QInputContextFactoryInterface *factory =
@@ -193,7 +193,7 @@ QStringList QInputContextFactory::keys()
#if defined(Q_WS_S60)
result << QLatin1String("coefep");
#endif
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
result += loader()->keys();
#endif // QT_NO_LIBRARY
return result;
diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp
index c4119af..2dd251b 100644
--- a/src/gui/kernel/qguiplatformplugin.cpp
+++ b/src/gui/kernel/qguiplatformplugin.cpp
@@ -81,7 +81,7 @@ QGuiPlatformPlugin *qt_guiPlatformPlugin()
static QGuiPlatformPlugin *plugin;
if (!plugin)
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QString key = QString::fromLocal8Bit(qgetenv("QT_PLATFORM_PLUGIN"));
#ifdef Q_WS_X11
diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp
index 29f24a3..3c09894 100644
--- a/src/gui/painting/qgraphicssystemfactory.cpp
+++ b/src/gui/painting/qgraphicssystemfactory.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QGraphicsSystemFactoryInterface_iid, QLatin1String("/graphicssystems"), Qt::CaseInsensitive))
#endif
@@ -79,7 +79,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key)
else if (system.isEmpty() || system == QLatin1String("native"))
return 0;
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (!ret) {
if (QGraphicsSystemFactoryInterface *factory = qobject_cast<QGraphicsSystemFactoryInterface*>(loader()->instance(system)))
ret = factory->create(system);
@@ -100,7 +100,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key)
*/
QStringList QGraphicsSystemFactory::keys()
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QStringList list = loader()->keys();
#else
QStringList list;
diff --git a/src/gui/styles/qstylefactory.cpp b/src/gui/styles/qstylefactory.cpp
index 0dbb21f..9009878 100644
--- a/src/gui/styles/qstylefactory.cpp
+++ b/src/gui/styles/qstylefactory.cpp
@@ -81,7 +81,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
QT_END_INCLUDE_NAMESPACE
#endif
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QStyleFactoryInterface_iid, QLatin1String("/styles"), Qt::CaseInsensitive))
#endif
diff --git a/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp
index 74add64..96545b4 100644
--- a/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp
+++ b/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp
@@ -67,7 +67,7 @@
QT_BEGIN_NAMESPACE
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
#endif
@@ -139,7 +139,7 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
#endif
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QFactoryLoader* l = loader();
foreach (QString const& key, l->keys()) {
@@ -158,7 +158,7 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
{
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -178,7 +178,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
{
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -207,7 +207,7 @@ QAbstractAudioDeviceInfo* QAudioDeviceFactory::audioDeviceInfo(const QString &re
#endif
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm));
@@ -238,7 +238,7 @@ QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo con
return new QAudioInputPrivate(deviceInfo.handle(), format);
#endif
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
@@ -260,7 +260,7 @@ QAbstractAudioOutput* QAudioDeviceFactory::createOutputDevice(QAudioDeviceInfo c
#endif
#endif
-#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index a7bd2d5..471927a 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -54,8 +54,10 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer")))
+#endif
QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
: pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true)
@@ -354,6 +356,7 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
updating = false;
+#ifndef QT_NO_LIBRARY
QFactoryLoader *l = loader();
QBearerEngine *generic = 0;
@@ -387,6 +390,7 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
if (generic)
sessionEngines.append(generic);
+#endif // QT_NO_LIBRARY
}
QBearerEngine *engine = qobject_cast<QBearerEngine *>(sender());
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 1416ee3..76bc2b0 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -98,7 +98,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QSqlDriverFactoryInterface_iid,
QLatin1String("/sqldrivers")))
@@ -576,7 +576,7 @@ QStringList QSqlDatabase::drivers()
list << QLatin1String("QIBASE");
#endif
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (QFactoryLoader *fl = loader()) {
QStringList keys = fl->keys();
for (QStringList::const_iterator i = keys.constBegin(); i != keys.constEnd(); ++i) {
@@ -774,7 +774,7 @@ void QSqlDatabasePrivate::init(const QString &type)
}
}
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#ifndef QT_NO_LIBRARY
if (!driver && loader()) {
if (QSqlDriverFactoryInterface *factory = qobject_cast<QSqlDriverFactoryInterface*>(loader()->instance(type)))
driver = factory->create(type);