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>
This commit is contained in:
parent
ceceb3796f
commit
f306d18fe6
@ -56,10 +56,6 @@ namespace QSql
|
|||||||
{
|
{
|
||||||
BeforeFirstRow = -1,
|
BeforeFirstRow = -1,
|
||||||
AfterLastRow = -2
|
AfterLastRow = -2
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
, BeforeFirst = BeforeFirstRow,
|
|
||||||
AfterLast = AfterLastRow
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ParamTypeFlag
|
enum ParamTypeFlag
|
||||||
@ -87,21 +83,6 @@ namespace QSql
|
|||||||
|
|
||||||
HighPrecision = 0
|
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)
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QSql::ParamType)
|
||||||
|
@ -1434,26 +1434,6 @@ bool QSqlDatabase::isValid() const
|
|||||||
return d->driver && d->driver != d->shared_null()->driver;
|
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
|
Clones the database connection \a other and and stores it as \a
|
||||||
connectionName. All the settings from the original database, e.g.
|
connectionName. All the settings from the original database, e.g.
|
||||||
|
@ -44,9 +44,6 @@
|
|||||||
|
|
||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtSql/qsql.h>
|
#include <QtSql/qsql.h>
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
#include <QtSql/qsqlrecord.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_HEADER
|
QT_BEGIN_HEADER
|
||||||
|
|
||||||
@ -92,12 +89,6 @@ public:
|
|||||||
QStringList tables(QSql::TableType type = QSql::Tables) const;
|
QStringList tables(QSql::TableType type = QSql::Tables) const;
|
||||||
QSqlIndex primaryIndex(const QString& tablename) const;
|
QSqlIndex primaryIndex(const QString& tablename) const;
|
||||||
QSqlRecord record(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;
|
QSqlQuery exec(const QString& query = QString()) const;
|
||||||
QSqlError lastError() const;
|
QSqlError lastError() const;
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
@ -46,9 +46,6 @@
|
|||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtSql/qsql.h>
|
#include <QtSql/qsql.h>
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
#include <QtSql/qsqlquery.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_HEADER
|
QT_BEGIN_HEADER
|
||||||
|
|
||||||
@ -93,17 +90,6 @@ public:
|
|||||||
virtual QStringList tables(QSql::TableType tableType) const;
|
virtual QStringList tables(QSql::TableType tableType) const;
|
||||||
virtual QSqlIndex primaryIndex(const QString &tableName) const;
|
virtual QSqlIndex primaryIndex(const QString &tableName) const;
|
||||||
virtual QSqlRecord record(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 formatValue(const QSqlField& field, bool trimStrings = false) const;
|
||||||
|
|
||||||
virtual QString escapeIdentifier(const QString &identifier, IdentifierType type) const;
|
virtual QString escapeIdentifier(const QString &identifier, IdentifierType type) const;
|
||||||
|
@ -59,13 +59,6 @@ public:
|
|||||||
StatementError,
|
StatementError,
|
||||||
TransactionError,
|
TransactionError,
|
||||||
UnknownError
|
UnknownError
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
, None = NoError,
|
|
||||||
Connection = ConnectionError,
|
|
||||||
Statement = StatementError,
|
|
||||||
Transaction = TransactionError,
|
|
||||||
Unknown = UnknownError
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
QSqlError( const QString& driverText = QString(),
|
QSqlError( const QString& driverText = QString(),
|
||||||
const QString& databaseText = QString(),
|
const QString& databaseText = QString(),
|
||||||
|
@ -98,10 +98,6 @@ public:
|
|||||||
bool isGenerated() const;
|
bool isGenerated() const;
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
inline QT3_SUPPORT void setNull() { clear(); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void detach();
|
void detach();
|
||||||
QVariant val;
|
QVariant val;
|
||||||
|
@ -164,60 +164,6 @@ void QSqlIndex::setDescending(int i, bool desc)
|
|||||||
sorts[i] = 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
|
/*! \internal
|
||||||
|
|
||||||
Creates a string representing the field number \a i using prefix \a
|
Creates a string representing the field number \a i using prefix \a
|
||||||
|
@ -70,14 +70,6 @@ public:
|
|||||||
bool isDescending(int i) const;
|
bool isDescending(int i) const;
|
||||||
void setDescending(int i, bool desc);
|
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:
|
private:
|
||||||
QString createField(int i, const QString& prefix, bool verbose) const;
|
QString createField(int i, const QString& prefix, bool verbose) const;
|
||||||
QString cursor;
|
QString cursor;
|
||||||
|
@ -94,9 +94,6 @@ public:
|
|||||||
bool seek(int i, bool relative = false);
|
bool seek(int i, bool relative = false);
|
||||||
bool next();
|
bool next();
|
||||||
bool previous();
|
bool previous();
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
inline QT3_SUPPORT bool prev() { return previous(); }
|
|
||||||
#endif
|
|
||||||
bool first();
|
bool first();
|
||||||
bool last();
|
bool last();
|
||||||
|
|
||||||
|
@ -244,34 +244,6 @@ int QSqlRecord::indexOf(const QString& name) const
|
|||||||
return -1;
|
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
|
Returns the field at position \a index. If the position is out of
|
||||||
range, an empty field is returned.
|
range, an empty field is returned.
|
||||||
@ -496,49 +468,6 @@ bool QSqlRecord::isGenerated(int index) const
|
|||||||
return d->fields.value(index).isGenerated();
|
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.
|
Returns the number of fields in the record.
|
||||||
|
|
||||||
|
@ -87,15 +87,6 @@ public:
|
|||||||
void setGenerated(const QString& name, bool generated);
|
void setGenerated(const QString& name, bool generated);
|
||||||
void setGenerated(int i, 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 append(const QSqlField& field);
|
||||||
void replace(int pos, const QSqlField& field);
|
void replace(int pos, const QSqlField& field);
|
||||||
void insert(int pos, const QSqlField& field);
|
void insert(int pos, const QSqlField& field);
|
||||||
|
@ -74,10 +74,6 @@ protected:
|
|||||||
enum BindingSyntax {
|
enum BindingSyntax {
|
||||||
PositionalBinding,
|
PositionalBinding,
|
||||||
NamedBinding
|
NamedBinding
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
, BindByPosition = PositionalBinding,
|
|
||||||
BindByName = NamedBinding
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit QSqlResult(const QSqlDriver * db);
|
explicit QSqlResult(const QSqlDriver * db);
|
||||||
|
@ -1324,29 +1324,6 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev)
|
|||||||
d->inputDevice->setTextModeEnabled(false);
|
d->inputDevice->setTextModeEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
/*!
|
|
||||||
Use the QXmlInputSource(QIODevice *) constructor instead, with
|
|
||||||
the device used by \a stream.
|
|
||||||
|
|
||||||
\sa QTextStream::device()
|
|
||||||
*/
|
|
||||||
QXmlInputSource::QXmlInputSource(QTextStream& stream)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
d->inputStream = &stream;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Use QXmlInputSource(&\a file) instead.
|
|
||||||
*/
|
|
||||||
QXmlInputSource::QXmlInputSource(QFile& file)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
d->inputDevice = &file;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Destructor.
|
Destructor.
|
||||||
*/
|
*/
|
||||||
|
@ -172,11 +172,6 @@ public:
|
|||||||
static const ushort EndOfData;
|
static const ushort EndOfData;
|
||||||
static const ushort EndOfDocument;
|
static const ushort EndOfDocument;
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
QT3_SUPPORT_CONSTRUCTOR QXmlInputSource(QFile& file);
|
|
||||||
QT3_SUPPORT_CONSTRUCTOR QXmlInputSource(QTextStream& stream);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QString fromRawData(const QByteArray &data, bool beginning = false);
|
virtual QString fromRawData(const QByteArray &data, bool beginning = false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user