summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:34:13 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:34:13 (GMT)
commit67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch)
tree1dbf50b3dff8d5ca7e9344733968c72704eb15ff /src/plugins/sqldrivers
downloadQt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip
Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz
Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2
Long live Qt!
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r--src/plugins/sqldrivers/README5
-rw-r--r--src/plugins/sqldrivers/db2/README6
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro10
-rw-r--r--src/plugins/sqldrivers/db2/main.cpp81
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro14
-rw-r--r--src/plugins/sqldrivers/ibase/main.cpp81
-rw-r--r--src/plugins/sqldrivers/mysql/README6
-rw-r--r--src/plugins/sqldrivers/mysql/main.cpp82
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro23
-rw-r--r--src/plugins/sqldrivers/oci/README6
-rw-r--r--src/plugins/sqldrivers/oci/main.cpp82
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro13
-rw-r--r--src/plugins/sqldrivers/odbc/README6
-rw-r--r--src/plugins/sqldrivers/odbc/main.cpp82
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro24
-rw-r--r--src/plugins/sqldrivers/psql/README6
-rw-r--r--src/plugins/sqldrivers/psql/main.cpp82
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro21
-rw-r--r--src/plugins/sqldrivers/qsqldriverbase.pri8
-rw-r--r--src/plugins/sqldrivers/sqldrivers.pro11
-rw-r--r--src/plugins/sqldrivers/sqlite/README6
-rw-r--r--src/plugins/sqldrivers/sqlite/smain.cpp81
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro17
-rw-r--r--src/plugins/sqldrivers/sqlite2/README6
-rw-r--r--src/plugins/sqldrivers/sqlite2/smain.cpp81
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro9
-rw-r--r--src/plugins/sqldrivers/tds/README6
-rw-r--r--src/plugins/sqldrivers/tds/main.cpp89
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro15
29 files changed, 959 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/README b/src/plugins/sqldrivers/README
new file mode 100644
index 0000000..7000fb5
--- /dev/null
+++ b/src/plugins/sqldrivers/README
@@ -0,0 +1,5 @@
+Please note that the DB2, Oracle and TDS client drivers are not distributed
+with the Qt Open Source Editions.
+
+This is because the client libraries are distributed under a license which
+is not compatible with the GPL license.
diff --git a/src/plugins/sqldrivers/db2/README b/src/plugins/sqldrivers/db2/README
new file mode 100644
index 0000000..5bebe6a
--- /dev/null
+++ b/src/plugins/sqldrivers/db2/README
@@ -0,0 +1,6 @@
+You will need IBM DB2 development headers and libraries installed before
+compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
new file mode 100644
index 0000000..5223beb
--- /dev/null
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -0,0 +1,10 @@
+TARGET = qsqldb2
+
+HEADERS = ../../../sql/drivers/db2/qsql_db2.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/db2/qsql_db2.cpp
+
+unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2
+win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/db2/main.cpp b/src/plugins/sqldrivers/db2/main.cpp
new file mode 100644
index 0000000..1381820
--- /dev/null
+++ b/src/plugins/sqldrivers/db2/main.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/db2/qsql_db2.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDB2DriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QDB2DriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QDB2DriverPlugin::QDB2DriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QDB2DriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QDB2")) {
+ QDB2Driver* driver = new QDB2Driver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QDB2DriverPlugin::keys() const
+{
+ QStringList l;
+ l.append(QLatin1String("QDB2"));
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QDB2DriverPlugin)
+Q_EXPORT_PLUGIN2(qsqldb2, QDB2DriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
new file mode 100644
index 0000000..ec2bc7b
--- /dev/null
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -0,0 +1,14 @@
+TARGET = qsqlibase
+
+HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/ibase/qsql_ibase.cpp
+
+unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds
+
+win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
+ !win32-borland:LIBS *= -lgds32_ms
+ win32-borland:LIBS += gds32.lib
+}
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/ibase/main.cpp b/src/plugins/sqldrivers/ibase/main.cpp
new file mode 100644
index 0000000..566f11f
--- /dev/null
+++ b/src/plugins/sqldrivers/ibase/main.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/ibase/qsql_ibase.h"
+
+QT_BEGIN_NAMESPACE
+
+class QIBaseDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QIBaseDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QIBaseDriverPlugin::QIBaseDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QIBaseDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QIBASE")) {
+ QIBaseDriver* driver = new QIBaseDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QIBaseDriverPlugin::keys() const
+{
+ QStringList l;
+ l << QLatin1String("QIBASE");
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QIBaseDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlibase, QIBaseDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/mysql/README b/src/plugins/sqldrivers/mysql/README
new file mode 100644
index 0000000..d1b3722
--- /dev/null
+++ b/src/plugins/sqldrivers/mysql/README
@@ -0,0 +1,6 @@
+You will need the MySQL development headers and libraries installed
+before compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/mysql/main.cpp b/src/plugins/sqldrivers/mysql/main.cpp
new file mode 100644
index 0000000..4557a28
--- /dev/null
+++ b/src/plugins/sqldrivers/mysql/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/mysql/qsql_mysql.h"
+
+QT_BEGIN_NAMESPACE
+
+class QMYSQLDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QMYSQLDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QMYSQLDriverPlugin::QMYSQLDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QMYSQLDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QMYSQL") || name == QLatin1String("QMYSQL3")) {
+ QMYSQLDriver* driver = new QMYSQLDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QMYSQLDriverPlugin::keys() const
+{
+ QStringList l;
+ l << QLatin1String("QMYSQL3");
+ l << QLatin1String("QMYSQL");
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QMYSQLDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlmysql, QMYSQLDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
new file mode 100644
index 0000000..9f5c619
--- /dev/null
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -0,0 +1,23 @@
+TARGET = qsqlmysql
+
+HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/mysql/qsql_mysql.cpp
+
+unix: {
+ isEmpty(QT_LFLAGS_MYSQL) {
+ !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
+ use_libmysqlclient_r:LIBS *= -lmysqlclient_r
+ else:LIBS *= -lmysqlclient
+ }
+ } else {
+ LIBS *= $$QT_LFLAGS_MYSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
+ }
+}
+
+win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
+ LIBS *= -llibmysql
+}
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/oci/README b/src/plugins/sqldrivers/oci/README
new file mode 100644
index 0000000..97c27c5
--- /dev/null
+++ b/src/plugins/sqldrivers/oci/README
@@ -0,0 +1,6 @@
+You will need the Oracle development headers and libraries installed
+before compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/oci/main.cpp b/src/plugins/sqldrivers/oci/main.cpp
new file mode 100644
index 0000000..1c47b21
--- /dev/null
+++ b/src/plugins/sqldrivers/oci/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/oci/qsql_oci.h"
+
+QT_BEGIN_NAMESPACE
+
+class QOCIDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QOCIDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QOCIDriverPlugin::QOCIDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QOCIDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QOCI") || name == QLatin1String("QOCI8")) {
+ QOCIDriver* driver = new QOCIDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QOCIDriverPlugin::keys() const
+{
+ QStringList l;
+ l.append(QLatin1String("QOCI8"));
+ l.append(QLatin1String("QOCI"));
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QOCIDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqloci, QOCIDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
new file mode 100644
index 0000000..3bf70a1
--- /dev/null
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -0,0 +1,13 @@
+TARGET = qsqloci
+
+HEADERS = ../../../sql/drivers/oci/qsql_oci.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/oci/qsql_oci.cpp
+
+win32:LIBS *= -loci
+
+unix:!contains( LIBS, .*clnts.* ):LIBS *= -lclntsh
+
+macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/odbc/README b/src/plugins/sqldrivers/odbc/README
new file mode 100644
index 0000000..279aa7f
--- /dev/null
+++ b/src/plugins/sqldrivers/odbc/README
@@ -0,0 +1,6 @@
+You will need ODBC development headers and libraries installed before
+compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/odbc/main.cpp b/src/plugins/sqldrivers/odbc/main.cpp
new file mode 100644
index 0000000..9b4045d
--- /dev/null
+++ b/src/plugins/sqldrivers/odbc/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/odbc/qsql_odbc.h"
+
+QT_BEGIN_NAMESPACE
+
+class QODBCDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QODBCDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QODBCDriverPlugin::QODBCDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QODBCDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QODBC") || name == QLatin1String("QODBC3")) {
+ QODBCDriver* driver = new QODBCDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QODBCDriverPlugin::keys() const
+{
+ QStringList l;
+ l.append(QLatin1String("QODBC3"));
+ l.append(QLatin1String("QODBC"));
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QODBCDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlodbc, QODBCDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
new file mode 100644
index 0000000..0835ce1
--- /dev/null
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -0,0 +1,24 @@
+TARGET = qsqlodbc
+
+HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/odbc/qsql_odbc.cpp
+
+mac {
+ !contains( LIBS, .*odbc.* ) {
+ LIBS *= -liodbc
+ }
+}
+
+unix {
+ !contains( LIBS, .*odbc.* ) {
+ LIBS *= -lodbc
+ }
+}
+
+win32 {
+ !win32-borland:LIBS *= -lodbc32
+ win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
+}
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/psql/README b/src/plugins/sqldrivers/psql/README
new file mode 100644
index 0000000..86bf16d
--- /dev/null
+++ b/src/plugins/sqldrivers/psql/README
@@ -0,0 +1,6 @@
+You will need the PostgreSQL development headers and libraries installed
+before compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/psql/main.cpp b/src/plugins/sqldrivers/psql/main.cpp
new file mode 100644
index 0000000..968368e
--- /dev/null
+++ b/src/plugins/sqldrivers/psql/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../sql/drivers/psql/qsql_psql.h"
+
+QT_BEGIN_NAMESPACE
+
+class QPSQLDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QPSQLDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QPSQLDriverPlugin::QPSQLDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QPSQLDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QPSQL") || name == QLatin1String("QPSQL7")) {
+ QPSQLDriver* driver = new QPSQLDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QPSQLDriverPlugin::keys() const
+{
+ QStringList l;
+ l.append(QLatin1String("QPSQL7"));
+ l.append(QLatin1String("QPSQL"));
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QPSQLDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlpsql, QPSQLDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
new file mode 100644
index 0000000..29fbada
--- /dev/null
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -0,0 +1,21 @@
+TARGET = qsqlpsql
+
+HEADERS = ../../../sql/drivers/psql/qsql_psql.h
+SOURCES = main.cpp \
+ ../../../sql/drivers/psql/qsql_psql.cpp
+
+unix: {
+ !isEmpty(QT_LFLAGS_PSQL) {
+ LIBS *= $$QT_LFLAGS_PSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
+ }
+ !contains(LIBS, .*pq.*):LIBS *= -lpq
+}
+
+win32:!contains(LIBS, .*pq.* ) {
+ !win32-g++:LIBS *= -llibpq
+ win32-g++:LIBS *= -lpq
+ LIBS *= -lws2_32 -ladvapi32
+}
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/qsqldriverbase.pri b/src/plugins/sqldrivers/qsqldriverbase.pri
new file mode 100644
index 0000000..2f6943a
--- /dev/null
+++ b/src/plugins/sqldrivers/qsqldriverbase.pri
@@ -0,0 +1,8 @@
+include(../qpluginbase.pri)
+QT = core sql
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/sqldrivers
+
+target.path += $$[QT_INSTALL_PLUGINS]/sqldrivers
+INSTALLS += target
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
diff --git a/src/plugins/sqldrivers/sqldrivers.pro b/src/plugins/sqldrivers/sqldrivers.pro
new file mode 100644
index 0000000..39c58d4
--- /dev/null
+++ b/src/plugins/sqldrivers/sqldrivers.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+
+contains(sql-plugins, psql) : SUBDIRS += psql
+contains(sql-plugins, mysql) : SUBDIRS += mysql
+contains(sql-plugins, odbc) : SUBDIRS += odbc
+contains(sql-plugins, tds) : SUBDIRS += tds
+contains(sql-plugins, oci) : SUBDIRS += oci
+contains(sql-plugins, db2) : SUBDIRS += db2
+contains(sql-plugins, sqlite) : SUBDIRS += sqlite
+contains(sql-plugins, sqlite2) : SUBDIRS += sqlite2
+contains(sql-plugins, ibase) : SUBDIRS += ibase
diff --git a/src/plugins/sqldrivers/sqlite/README b/src/plugins/sqldrivers/sqlite/README
new file mode 100644
index 0000000..899361a
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite/README
@@ -0,0 +1,6 @@
+You will need the SQLite development headers and libraries installed
+before compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/sqlite/smain.cpp b/src/plugins/sqldrivers/sqlite/smain.cpp
new file mode 100644
index 0000000..47208e0
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite/smain.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../../src/sql/drivers/sqlite/qsql_sqlite.h"
+
+QT_BEGIN_NAMESPACE
+
+class QSQLiteDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QSQLiteDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QSQLiteDriverPlugin::QSQLiteDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QSQLiteDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QSQLITE")) {
+ QSQLiteDriver* driver = new QSQLiteDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QSQLiteDriverPlugin::keys() const
+{
+ QStringList l;
+ l << QLatin1String("QSQLITE");
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QSQLiteDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlite, QSQLiteDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
new file mode 100644
index 0000000..c609a9e
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -0,0 +1,17 @@
+TARGET = qsqlite
+
+HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h
+SOURCES = smain.cpp \
+ ../../../sql/drivers/sqlite/qsql_sqlite.cpp
+
+!system-sqlite:!contains( LIBS, .*sqlite.* ) {
+ CONFIG(release, debug|release):DEFINES *= NDEBUG
+ DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
+ INCLUDEPATH += ../../../3rdparty/sqlite
+ SOURCES += ../../../3rdparty/sqlite/sqlite3.c
+} else {
+ LIBS *= $$QT_LFLAGS_SQLITE
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
+}
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite2/README b/src/plugins/sqldrivers/sqlite2/README
new file mode 100644
index 0000000..899361a
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite2/README
@@ -0,0 +1,6 @@
+You will need the SQLite development headers and libraries installed
+before compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/sqlite2/smain.cpp b/src/plugins/sqldrivers/sqlite2/smain.cpp
new file mode 100644
index 0000000..1c5a19e
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite2/smain.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#include "../../../../src/sql/drivers/sqlite2/qsql_sqlite2.h"
+
+QT_BEGIN_NAMESPACE
+
+class QSQLite2DriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QSQLite2DriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QSQLite2DriverPlugin::QSQLite2DriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QSQLite2DriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QSQLITE2")) {
+ QSQLite2Driver* driver = new QSQLite2Driver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QSQLite2DriverPlugin::keys() const
+{
+ QStringList l;
+ l << QLatin1String("QSQLITE2");
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QSQLite2DriverPlugin)
+Q_EXPORT_PLUGIN2(qsqlite2, QSQLite2DriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
new file mode 100644
index 0000000..88db22a
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -0,0 +1,9 @@
+TARGET = qsqlite2
+
+HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h
+SOURCES = smain.cpp \
+ ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp
+
+!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
+
+include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/tds/README b/src/plugins/sqldrivers/tds/README
new file mode 100644
index 0000000..3d27ed4
--- /dev/null
+++ b/src/plugins/sqldrivers/tds/README
@@ -0,0 +1,6 @@
+You will need the dblib development headers and libraries installed before
+compiling this plugin.
+
+See the Qt SQL documentation for more information on compiling Qt SQL
+driver plugins (sql-driver.html).
+
diff --git a/src/plugins/sqldrivers/tds/main.cpp b/src/plugins/sqldrivers/tds/main.cpp
new file mode 100644
index 0000000..de6f9ff
--- /dev/null
+++ b/src/plugins/sqldrivers/tds/main.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define Q_UUIDIMPL
+#include <qsqldriverplugin.h>
+#include <qstringlist.h>
+#ifdef Q_OS_WIN32 // We assume that MS SQL Server is used. Set Q_USE_SYBASE to force Sybase.
+// Conflicting declarations of LPCBYTE in sqlfront.h and winscard.h
+#define _WINSCARD_H_
+#include <windows.h>
+#endif
+#include "../../../sql/drivers/tds/qsql_tds.h"
+
+QT_BEGIN_NAMESPACE
+
+
+class QTDSDriverPlugin : public QSqlDriverPlugin
+{
+public:
+ QTDSDriverPlugin();
+
+ QSqlDriver* create(const QString &);
+ QStringList keys() const;
+};
+
+QTDSDriverPlugin::QTDSDriverPlugin()
+ : QSqlDriverPlugin()
+{
+}
+
+QSqlDriver* QTDSDriverPlugin::create(const QString &name)
+{
+ if (name == QLatin1String("QTDS") || name == QLatin1String("QTDS7")) {
+ QTDSDriver* driver = new QTDSDriver();
+ return driver;
+ }
+ return 0;
+}
+
+QStringList QTDSDriverPlugin::keys() const
+{
+ QStringList l;
+ l.append(QLatin1String("QTDS7"));
+ l.append(QLatin1String("QTDS"));
+ return l;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QTDSDriverPlugin)
+Q_EXPORT_PLUGIN2(qsqltds, QTDSDriverPlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
new file mode 100644
index 0000000..08a166b
--- /dev/null
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -0,0 +1,15 @@
+TARGET = qsqltds
+
+HEADERS = ../../../sql/drivers/tds/qsql_tds.h
+
+SOURCES = main.cpp \
+ ../../../sql/drivers/tds/qsql_tds.cpp
+
+unix:!contains( LIBS, .*sybdb.* ):LIBS *= -lsybdb
+
+win32 {
+ !win32-borland:LIBS *= -lNTWDBLIB
+ win32-borland:LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
+}
+
+include(../qsqldriverbase.pri)