summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-01-06 12:18:40 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-02-08 10:40:33 +0000
commit4fb7eb0da74798205f5cac693c921065492fa33e (patch)
tree2082182e4b640ef9233d1bd9108caccd30a5edb7 /src/sql
parent21861e6fd1fcd1e4642f3d4c06ee7181d2c81778 (diff)
Drop most "#ifndef QT_NO_LIBRARY"
As we can load plugins without QLibrary now, we don't have to #ifdef out the code that does so anymore. Change-Id: I1dc20216830a882dbd5a1b431183407e6b19c837 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqldatabase.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 8841106c0f..62e1b6a7a5 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -99,11 +99,9 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QSqlDriverFactoryInterface_iid,
QLatin1String("/sqldrivers")))
-#endif
#if !defined(Q_CC_MSVC) || _MSC_VER >= 1900
// ### Qt6: remove the #ifdef
@@ -577,7 +575,6 @@ QStringList QSqlDatabase::drivers()
list << QLatin1String("QIBASE");
#endif
-#ifndef QT_NO_LIBRARY
if (QFactoryLoader *fl = loader()) {
typedef QMultiMap<int, QString> PluginKeyMap;
typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;
@@ -588,7 +585,6 @@ QStringList QSqlDatabase::drivers()
if (!list.contains(it.value()))
list << it.value();
}
-#endif
DriverDict dict = QSqlDatabasePrivate::driverDict();
for (DriverDict::const_iterator i = dict.constBegin(); i != dict.constEnd(); ++i) {
@@ -778,10 +774,8 @@ void QSqlDatabasePrivate::init(const QString &type)
}
}
-#ifndef QT_NO_LIBRARY
if (!driver && loader())
driver = qLoadPlugin<QSqlDriver, QSqlDriverPlugin>(loader(), type);
-#endif // QT_NO_LIBRARY
if (!driver) {
qWarning("QSqlDatabase: %s driver not loaded", type.toLatin1().data());