Use new plugin system for SQL drivers.
Change-Id: I1d4db9ecc7e1cbca66674d13748070f4b19d5b8c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
5f320e2f97
commit
71fe29711f
3
src/plugins/sqldrivers/db2/db2.json
Normal file
3
src/plugins/sqldrivers/db2/db2.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QDB2" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqldb2
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += db2.json
|
||||
include(../../../sql/drivers/db2/qsql_db2.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDB2DriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "db2.json")
|
||||
|
||||
public:
|
||||
QDB2DriverPlugin();
|
||||
|
||||
@ -70,12 +73,9 @@ QSqlDriver* QDB2DriverPlugin::create(const QString &name)
|
||||
|
||||
QStringList QDB2DriverPlugin::keys() const
|
||||
{
|
||||
QStringList l;
|
||||
l.append(QLatin1String("QDB2"));
|
||||
return l;
|
||||
return QStringList(QStringLiteral("QDB2"));
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QDB2DriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqldb2, QDB2DriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/ibase/ibase.json
Normal file
3
src/plugins/sqldrivers/ibase/ibase.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QIBASE" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlibase
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += ibase.json
|
||||
include(../../../sql/drivers/ibase/qsql_ibase.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIBaseDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "ibase.json")
|
||||
|
||||
public:
|
||||
QIBaseDriverPlugin();
|
||||
|
||||
@ -70,12 +73,9 @@ QSqlDriver* QIBaseDriverPlugin::create(const QString &name)
|
||||
|
||||
QStringList QIBaseDriverPlugin::keys() const
|
||||
{
|
||||
QStringList l;
|
||||
l << QLatin1String("QIBASE");
|
||||
return l;
|
||||
return QStringList(QStringLiteral("QIBASE"));
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QIBaseDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlibase, QIBaseDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QMYSQLDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "mysql.json")
|
||||
|
||||
public:
|
||||
QMYSQLDriverPlugin();
|
||||
|
||||
@ -76,7 +79,6 @@ QStringList QMYSQLDriverPlugin::keys() const
|
||||
return l;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QMYSQLDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlmysql, QMYSQLDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/mysql/mysql.json
Normal file
3
src/plugins/sqldrivers/mysql/mysql.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QMYSQL3", "QMYSQL" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlmysql
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += mysql.json
|
||||
include(../../../sql/drivers/mysql/qsql_mysql.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QOCIDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "oci.json")
|
||||
|
||||
public:
|
||||
QOCIDriverPlugin();
|
||||
|
||||
@ -76,7 +79,6 @@ QStringList QOCIDriverPlugin::keys() const
|
||||
return l;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QOCIDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqloci, QOCIDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/oci/oci.json
Normal file
3
src/plugins/sqldrivers/oci/oci.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QOCI8", "QOCI" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqloci
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += oci.json
|
||||
include(../../../sql/drivers/oci/qsql_oci.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QODBCDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "odbc.json")
|
||||
|
||||
public:
|
||||
QODBCDriverPlugin();
|
||||
|
||||
@ -76,7 +79,6 @@ QStringList QODBCDriverPlugin::keys() const
|
||||
return l;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QODBCDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlodbc, QODBCDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/odbc/odbc.json
Normal file
3
src/plugins/sqldrivers/odbc/odbc.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QODBC3", "QODBC" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlodbc
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += odbc.json
|
||||
include(../../../sql/drivers/odbc/qsql_odbc.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPSQLDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "psql.json")
|
||||
|
||||
public:
|
||||
QPSQLDriverPlugin();
|
||||
|
||||
@ -76,7 +79,6 @@ QStringList QPSQLDriverPlugin::keys() const
|
||||
return l;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QPSQLDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlpsql, QPSQLDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/psql/psql.json
Normal file
3
src/plugins/sqldrivers/psql/psql.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QPSQL7", "QPSQL" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlpsql
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += psql.json
|
||||
include(../../../sql/drivers/psql/qsql_psql.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSQLiteDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlite.json")
|
||||
|
||||
public:
|
||||
QSQLiteDriverPlugin();
|
||||
|
||||
@ -70,12 +73,9 @@ QSqlDriver* QSQLiteDriverPlugin::create(const QString &name)
|
||||
|
||||
QStringList QSQLiteDriverPlugin::keys() const
|
||||
{
|
||||
QStringList l;
|
||||
l << QLatin1String("QSQLITE");
|
||||
return l;
|
||||
return QStringList(QStringLiteral("QSQLITE"));
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QSQLiteDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlite, QSQLiteDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "smain.moc"
|
||||
|
3
src/plugins/sqldrivers/sqlite/sqlite.json
Normal file
3
src/plugins/sqldrivers/sqlite/sqlite.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QSQLITE" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlite
|
||||
|
||||
SOURCES = smain.cpp
|
||||
OTHER_FILES += sqlite.json
|
||||
include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
|
||||
|
||||
wince*: DEFINES += HAVE_LOCALTIME_S=0
|
||||
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSQLite2DriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlite2.json")
|
||||
|
||||
public:
|
||||
QSQLite2DriverPlugin();
|
||||
|
||||
@ -70,12 +73,9 @@ QSqlDriver* QSQLite2DriverPlugin::create(const QString &name)
|
||||
|
||||
QStringList QSQLite2DriverPlugin::keys() const
|
||||
{
|
||||
QStringList l;
|
||||
l << QLatin1String("QSQLITE2");
|
||||
return l;
|
||||
return QStringList(QStringLiteral("QSQLITE2"));
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QSQLite2DriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqlite2, QSQLite2DriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "smain.moc"
|
||||
|
3
src/plugins/sqldrivers/sqlite2/sqlite2.json
Normal file
3
src/plugins/sqldrivers/sqlite2/sqlite2.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QSQLITE2" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqlite2
|
||||
|
||||
SOURCES = smain.cpp
|
||||
OTHER_FILES += sqlite2.json
|
||||
include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QTDSDriverPlugin : public QSqlDriverPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "tds.json")
|
||||
|
||||
public:
|
||||
QTDSDriverPlugin();
|
||||
|
||||
@ -83,7 +86,6 @@ QStringList QTDSDriverPlugin::keys() const
|
||||
return l;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QTDSDriverPlugin)
|
||||
Q_EXPORT_PLUGIN2(qsqltds, QTDSDriverPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
3
src/plugins/sqldrivers/tds/tds.json
Normal file
3
src/plugins/sqldrivers/tds/tds.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "QTDS7", "QTDS" ]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
TARGET = qsqltds
|
||||
|
||||
SOURCES = main.cpp
|
||||
OTHER_FILES += tds.json
|
||||
include(../../../sql/drivers/tds/qsql_tds.pri)
|
||||
|
||||
include(../qsqldriverbase.pri)
|
||||
|
Loading…
Reference in New Issue
Block a user