summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-07-05 18:30:35 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-06 12:03:30 +0200
commitf306d18fe6555a9a5c60560745773b0bf5685ec3 (patch)
tree9f9604b495a535ef256a96c0f33ea5c99033a032 /src/sql
parentceceb3796fbfdcd944fc7da7c8b2198fca69cb44 (diff)
Remove QT3_SUPPORT from qsql, qxml
Change-Id: Iab36ef60de2f0201efa4eb86d8ed5e514d6244fb Reviewed-on: http://codereview.qt.nokia.com/1188 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsql.h19
-rw-r--r--src/sql/kernel/qsqldatabase.cpp20
-rw-r--r--src/sql/kernel/qsqldatabase.h9
-rw-r--r--src/sql/kernel/qsqldriver.h14
-rw-r--r--src/sql/kernel/qsqlerror.h7
-rw-r--r--src/sql/kernel/qsqlfield.h4
-rw-r--r--src/sql/kernel/qsqlindex.cpp54
-rw-r--r--src/sql/kernel/qsqlindex.h8
-rw-r--r--src/sql/kernel/qsqlquery.h3
-rw-r--r--src/sql/kernel/qsqlrecord.cpp71
-rw-r--r--src/sql/kernel/qsqlrecord.h9
-rw-r--r--src/sql/kernel/qsqlresult.h4
12 files changed, 0 insertions, 222 deletions
diff --git a/src/sql/kernel/qsql.h b/src/sql/kernel/qsql.h
index 5a1c32381d..f23b518bfb 100644
--- a/src/sql/kernel/qsql.h
+++ b/src/sql/kernel/qsql.h
@@ -56,10 +56,6 @@ namespace QSql
{
BeforeFirstRow = -1,
AfterLastRow = -2
-#ifdef QT3_SUPPORT
- , BeforeFirst = BeforeFirstRow,
- AfterLast = AfterLastRow
-#endif
};
enum ParamTypeFlag
@@ -87,21 +83,6 @@ namespace QSql
HighPrecision = 0
};
-
-#ifdef QT3_SUPPORT
- enum Op {
- None = -1,
- Insert = 0,
- Update = 1,
- Delete = 2
- };
-
- enum Confirm {
- Cancel = -1,
- No = 0,
- Yes = 1
- };
-#endif
}
Q_DECLARE_OPERATORS_FOR_FLAGS(QSql::ParamType)
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index c5eac194f5..cd36d5d591 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1434,26 +1434,6 @@ bool QSqlDatabase::isValid() const
return d->driver && d->driver != d->shared_null()->driver;
}
-#ifdef QT3_SUPPORT
-/*!
- Use query.record() instead.
-*/
-QSqlRecord QSqlDatabase::record(const QSqlQuery& query) const
-{ return query.record(); }
-
-/*!
- Use query.record() instead.
-*/
-QSqlRecord QSqlDatabase::recordInfo(const QSqlQuery& query) const
-{ return query.record(); }
-
-/*!
- \fn QSqlRecord QSqlDatabase::recordInfo(const QString& tablename) const
-
- Use record() instead.
-*/
-#endif
-
/*!
Clones the database connection \a other and and stores it as \a
connectionName. All the settings from the original database, e.g.
diff --git a/src/sql/kernel/qsqldatabase.h b/src/sql/kernel/qsqldatabase.h
index c8cde8557e..72c5694ceb 100644
--- a/src/sql/kernel/qsqldatabase.h
+++ b/src/sql/kernel/qsqldatabase.h
@@ -44,9 +44,6 @@
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
-#ifdef QT3_SUPPORT
-#include <QtSql/qsqlrecord.h>
-#endif
QT_BEGIN_HEADER
@@ -92,12 +89,6 @@ public:
QStringList tables(QSql::TableType type = QSql::Tables) const;
QSqlIndex primaryIndex(const QString& tablename) const;
QSqlRecord record(const QString& tablename) const;
-#ifdef QT3_SUPPORT
- QT3_SUPPORT QSqlRecord record(const QSqlQuery& query) const;
- inline QT3_SUPPORT QSqlRecord recordInfo(const QString& tablename) const
- { return record(tablename); }
- QT3_SUPPORT QSqlRecord recordInfo(const QSqlQuery& query) const;
-#endif
QSqlQuery exec(const QString& query = QString()) const;
QSqlError lastError() const;
bool isValid() const;
diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h
index 479d3ac990..ee1e52538a 100644
--- a/src/sql/kernel/qsqldriver.h
+++ b/src/sql/kernel/qsqldriver.h
@@ -46,9 +46,6 @@
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
#include <QtSql/qsql.h>
-#ifdef QT3_SUPPORT
-#include <QtSql/qsqlquery.h>
-#endif
QT_BEGIN_HEADER
@@ -93,17 +90,6 @@ public:
virtual QStringList tables(QSql::TableType tableType) const;
virtual QSqlIndex primaryIndex(const QString &tableName) const;
virtual QSqlRecord record(const QString &tableName) const;
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT QSqlRecord record(const QSqlQuery& query) const
- { return query.record(); }
- inline QT3_SUPPORT QSqlRecord recordInfo(const QString& tablename) const
- { return record(tablename); }
- inline QT3_SUPPORT QSqlRecord recordInfo(const QSqlQuery& query) const
- { return query.record(); }
- inline QT3_SUPPORT QString nullText() const { return QLatin1String("NULL"); }
- inline QT3_SUPPORT QString formatValue(const QSqlField *field, bool trimStrings = false) const
- { return field ? formatValue(*field, trimStrings) : QString(); }
-#endif
virtual QString formatValue(const QSqlField& field, bool trimStrings = false) const;
virtual QString escapeIdentifier(const QString &identifier, IdentifierType type) const;
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index 87136ecda9..fea3ca8526 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -59,13 +59,6 @@ public:
StatementError,
TransactionError,
UnknownError
-#ifdef QT3_SUPPORT
- , None = NoError,
- Connection = ConnectionError,
- Statement = StatementError,
- Transaction = TransactionError,
- Unknown = UnknownError
-#endif
};
QSqlError( const QString& driverText = QString(),
const QString& databaseText = QString(),
diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h
index 182b5318e2..93992ea9d4 100644
--- a/src/sql/kernel/qsqlfield.h
+++ b/src/sql/kernel/qsqlfield.h
@@ -98,10 +98,6 @@ public:
bool isGenerated() const;
bool isValid() const;
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void setNull() { clear(); }
-#endif
-
private:
void detach();
QVariant val;
diff --git a/src/sql/kernel/qsqlindex.cpp b/src/sql/kernel/qsqlindex.cpp
index 33e3c1ce34..764e93a678 100644
--- a/src/sql/kernel/qsqlindex.cpp
+++ b/src/sql/kernel/qsqlindex.cpp
@@ -164,60 +164,6 @@ void QSqlIndex::setDescending(int i, bool desc)
sorts[i] = desc;
}
-#ifdef QT3_SUPPORT
-
-/*!
- Returns a comma-separated list of all the index's field names as a
- string. This string is suitable, for example, for generating a
- SQL SELECT statement. Only generated fields are included in the
- list (see \l{isGenerated()}). If a \a prefix is specified, e.g. a
- table name, it is prepended before all field names in the form:
-
- "\a{prefix}.<fieldname>"
-
- If \a sep is specified, each field is separated by \a sep. If \a
- verbose is true (the default), each field contains a suffix
- indicating an ASCending or DESCending sort order.
-*/
-
-QString QSqlIndex::toString(const QString& prefix, const QString& sep, bool verbose) const
-{
- QString s;
- bool comma = false;
- for (int i = 0; i < count(); ++i) {
- if(comma)
- s += sep + QLatin1Char(' ');
- s += createField(i, prefix, verbose);
- comma = true;
- }
- return s;
-}
-
-/*!
- Returns a list of all the index's field names. Only generated
- fields are included in the list (see \l{isGenerated()}). If a \a
- prefix is specified, e.g. a table name, all fields are prefixed in
- the form:
-
- "\a{prefix}.<fieldname>"
-
- If \a verbose is true (the default), each field contains a suffix
- indicating an ASCending or DESCending sort order.
-
- Note that if you want to iterate over the list, you should iterate
- over a copy, e.g.
- \snippet doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp 0
-
-*/
-QStringList QSqlIndex::toStringList(const QString& prefix, bool verbose) const
-{
- QStringList s;
- for (int i = 0; i < count(); ++i)
- s += createField(i, prefix, verbose);
- return s;
-}
-#endif
-
/*! \internal
Creates a string representing the field number \a i using prefix \a
diff --git a/src/sql/kernel/qsqlindex.h b/src/sql/kernel/qsqlindex.h
index 97874e24f6..c88e30603f 100644
--- a/src/sql/kernel/qsqlindex.h
+++ b/src/sql/kernel/qsqlindex.h
@@ -70,14 +70,6 @@ public:
bool isDescending(int i) const;
void setDescending(int i, bool desc);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT QString toString(const QString &prefix = QString(),
- const QString &sep = QLatin1String(","),
- bool verbose = true) const;
- QT3_SUPPORT QStringList toStringList(const QString& prefix = QString(),
- bool verbose = true) const;
-#endif
-
private:
QString createField(int i, const QString& prefix, bool verbose) const;
QString cursor;
diff --git a/src/sql/kernel/qsqlquery.h b/src/sql/kernel/qsqlquery.h
index e82380956c..bd498f344a 100644
--- a/src/sql/kernel/qsqlquery.h
+++ b/src/sql/kernel/qsqlquery.h
@@ -94,9 +94,6 @@ public:
bool seek(int i, bool relative = false);
bool next();
bool previous();
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool prev() { return previous(); }
-#endif
bool first();
bool last();
diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp
index dfeb3e0622..944f2fc9bc 100644
--- a/src/sql/kernel/qsqlrecord.cpp
+++ b/src/sql/kernel/qsqlrecord.cpp
@@ -244,34 +244,6 @@ int QSqlRecord::indexOf(const QString& name) const
return -1;
}
-#ifdef QT3_SUPPORT
-/*!
- \obsolete
- Use field() instead
-*/
-const QSqlField* QSqlRecord::fieldPtr(int index) const
-{
- if (!d->contains(index))
- return 0;
-
- return &d->fields.at(index);
-}
-
-/*!
- \obsolete
- Use field() instead
-*/
-
-const QSqlField* QSqlRecord::fieldPtr(const QString& name) const
-{
- int i = indexOf(name);
- if (!d->contains(i))
- return 0;
-
- return &d->fields.at(i);
-}
-#endif //QT3_SUPPORT
-
/*!
Returns the field at position \a index. If the position is out of
range, an empty field is returned.
@@ -496,49 +468,6 @@ bool QSqlRecord::isGenerated(int index) const
return d->fields.value(index).isGenerated();
}
-#ifdef QT3_SUPPORT
-/*!
- Returns a list of all the record's field names as a string
- separated by \a sep.
-
- In the unlikely event that you used this function in Qt 3, you
- can simulate it using the rest of the QSqlRecord public API.
-*/
-
-QString QSqlRecord::toString(const QString& prefix, const QString& sep) const
-{
- QString pflist;
- bool comma = false;
- for (int i = 0; i < count(); ++i) {
- if (!d->fields.value(i).isGenerated()) {
- if (comma)
- pflist += sep + QLatin1Char(' ');
- pflist += d->createField(i, prefix);
- comma = true;
- }
- }
- return pflist;
-}
-
-/*!
- Returns a list of all the record's field names, each having the
- prefix \a prefix.
-
- In the unlikely event that you used this function in Qt 3, you
- can simulate it using the rest of the QSqlRecord public API.
-*/
-
-QStringList QSqlRecord::toStringList(const QString& prefix) const
-{
- QStringList s;
- for (int i = 0; i < count(); ++i) {
- if (!d->fields.value(i).isGenerated())
- s += d->createField(i, prefix);
- }
- return s;
-}
-#endif // QT3_SUPPORT
-
/*!
Returns the number of fields in the record.
diff --git a/src/sql/kernel/qsqlrecord.h b/src/sql/kernel/qsqlrecord.h
index e697e8e170..8c7a17ab1d 100644
--- a/src/sql/kernel/qsqlrecord.h
+++ b/src/sql/kernel/qsqlrecord.h
@@ -87,15 +87,6 @@ public:
void setGenerated(const QString& name, bool generated);
void setGenerated(int i, bool generated);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT const QSqlField* fieldPtr(int i) const;
- QT3_SUPPORT const QSqlField* fieldPtr(const QString& name) const;
- inline QT3_SUPPORT int position(const QString& name) const { return indexOf(name); }
- QT3_SUPPORT QString toString(const QString& prefix = QString(),
- const QString& sep = QLatin1String(",")) const;
- QT3_SUPPORT QStringList toStringList(const QString& prefix = QString()) const;
-#endif
-
void append(const QSqlField& field);
void replace(int pos, const QSqlField& field);
void insert(int pos, const QSqlField& field);
diff --git a/src/sql/kernel/qsqlresult.h b/src/sql/kernel/qsqlresult.h
index 58b19c193d..984bd5e03f 100644
--- a/src/sql/kernel/qsqlresult.h
+++ b/src/sql/kernel/qsqlresult.h
@@ -74,10 +74,6 @@ protected:
enum BindingSyntax {
PositionalBinding,
NamedBinding
-#ifdef QT3_SUPPORT
- , BindByPosition = PositionalBinding,
- BindByName = NamedBinding
-#endif
};
explicit QSqlResult(const QSqlDriver * db);