[Development] Header diff for QtSql
Thiago Macieira
thiago.macieira at intel.com
Wed Jun 26 22:50:12 CEST 2013
diff --git a/src/sql/kernel/qsql.h b/src/sql/kernel/qsql.h
index 782733f..9b9381f 100644
--- a/src/sql/kernel/qsql.h
+++ b/src/sql/kernel/qsql.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -44,8 +44,6 @@
#include <QtCore/qglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
@@ -97,6 +95,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QSql::ParamType)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQL_H
diff --git a/src/sql/kernel/qsqldatabase.h b/src/sql/kernel/qsqldatabase.h
index 85457fb..7249e22 100644
--- a/src/sql/kernel/qsqldatabase.h
+++ b/src/sql/kernel/qsqldatabase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -45,8 +45,6 @@
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -146,6 +144,4 @@ Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlDatabase &);
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLDATABASE_H
diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h
index f017670..017ffd4 100644
--- a/src/sql/kernel/qsqldriver.h
+++ b/src/sql/kernel/qsqldriver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -47,8 +47,6 @@
#include <QtCore/qstringlist.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -128,6 +126,7 @@ Q_SIGNALS:
void notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload);
protected:
+ QSqlDriver(QSqlDriverPrivate &dd, QObject *parent = 0);
virtual void setOpen(bool o);
virtual void setOpenError(bool e);
virtual void setLastError(const QSqlError& e);
@@ -139,6 +138,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLDRIVER_H
diff --git a/src/sql/kernel/qsqldriverplugin.h b/src/sql/kernel/qsqldriverplugin.h
index 7c06edb..ca2e0f2 100644
--- a/src/sql/kernel/qsqldriverplugin.h
+++ b/src/sql/kernel/qsqldriverplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -46,8 +46,6 @@
#include <QtCore/qfactoryinterface.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -68,6 +66,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLDRIVERPLUGIN_H
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index 1ee4d9b..39c4cda 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -45,8 +45,6 @@
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -71,16 +69,19 @@ public:
~QSqlError();
QString driverText() const;
- void setDriverText(const QString& driverText);
QString databaseText() const;
- void setDatabaseText(const QString& databaseText);
ErrorType type() const;
- void setType(ErrorType type);
int number() const;
- void setNumber(int number);
QString text() const;
bool isValid() const;
+#if QT_DEPRECATED_SINCE(5, 1)
+ QT_DEPRECATED void setDriverText(const QString &driverText);
+ QT_DEPRECATED void setDatabaseText(const QString &databaseText);
+ QT_DEPRECATED void setType(ErrorType type);
+ QT_DEPRECATED void setNumber(int number);
+#endif
+
private:
QString driverError;
QString databaseError;
@@ -94,6 +95,4 @@ Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlError &);
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLERROR_H
diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h
index 1bef673..a642721 100644
--- a/src/sql/kernel/qsqlfield.h
+++ b/src/sql/kernel/qsqlfield.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -46,8 +46,6 @@
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -110,6 +108,4 @@ Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlField &);
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLFIELD_H
diff --git a/src/sql/kernel/qsqlindex.h b/src/sql/kernel/qsqlindex.h
index 588a6c6..96c2f61 100644
--- a/src/sql/kernel/qsqlindex.h
+++ b/src/sql/kernel/qsqlindex.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -46,8 +46,6 @@
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -78,6 +76,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLINDEX_H
diff --git a/src/sql/kernel/qsqlquery.h b/src/sql/kernel/qsqlquery.h
index 9d660e0..3719643 100644
--- a/src/sql/kernel/qsqlquery.h
+++ b/src/sql/kernel/qsqlquery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -46,8 +46,6 @@
#include <QtSql/qsqldatabase.h>
#include <QtCore/qstring.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -122,6 +120,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLQUERY_H
diff --git a/src/sql/kernel/qsqlrecord.h b/src/sql/kernel/qsqlrecord.h
index b9226c5..7799b96 100644
--- a/src/sql/kernel/qsqlrecord.h
+++ b/src/sql/kernel/qsqlrecord.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -45,8 +45,6 @@
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -97,6 +95,7 @@ public:
void clear();
void clearValues();
int count() const;
+ QSqlRecord keyValues(const QSqlRecord &keyFields) const;
private:
void detach();
@@ -109,6 +108,4 @@ Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlRecord &);
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLRECORD_H
diff --git a/src/sql/kernel/qsqlresult.h b/src/sql/kernel/qsqlresult.h
index 5037ce1..05f3d7f 100644
--- a/src/sql/kernel/qsqlresult.h
+++ b/src/sql/kernel/qsqlresult.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -46,8 +46,6 @@
#include <QtCore/qvector.h>
#include <QtSql/qsql.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -61,9 +59,9 @@ class QSqlResultPrivate;
class Q_SQL_EXPORT QSqlResult
{
+ Q_DECLARE_PRIVATE(QSqlResult)
friend class QSqlQuery;
friend class QSqlTableModelPrivate;
- friend class QSqlResultPrivate;
public:
virtual ~QSqlResult();
@@ -76,6 +74,7 @@ protected:
};
explicit QSqlResult(const QSqlDriver * db);
+ QSqlResult(QSqlResultPrivate &dd, const QSqlDriver *db);
int at() const;
QString lastQuery() const;
QSqlError lastError() const;
@@ -134,8 +133,7 @@ protected:
virtual bool nextResult();
void resetBindCount(); // HACK
-private:
- QSqlResultPrivate* d;
+ QSqlResultPrivate *d_ptr;
private:
Q_DISABLE_COPY(QSqlResult)
@@ -143,6 +141,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLRESULT_H
diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h
index 84d51d5..c00d905 100644
--- a/src/sql/models/qsqlquerymodel.h
+++ b/src/sql/models/qsqlquerymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -45,8 +45,6 @@
#include <QtCore/qabstractitemmodel.h>
#include <QtSql/qsqldatabase.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -113,6 +111,4 @@ protected:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLQUERYMODEL_H
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index 52a19db..b878280 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -49,8 +49,6 @@
#include <QtWidgets/qcombobox.h>
#include <QtSql/qsqlrelationaltablemodel.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -110,8 +108,6 @@ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_WIDGETS_LIB
#endif // QSQLRELATIONALDELEGATE_H
diff --git a/src/sql/models/qsqlrelationaltablemodel.h b/src/sql/models/qsqlrelationaltablemodel.h
index f82fbce..0ccfecd 100644
--- a/src/sql/models/qsqlrelationaltablemodel.h
+++ b/src/sql/models/qsqlrelationaltablemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -44,8 +44,6 @@
#include <QtSql/qsqltablemodel.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -112,6 +110,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLRELATIONALTABLEMODEL_H
diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h
index df1946f..1a4ce9b 100644
--- a/src/sql/models/qsqltablemodel.h
+++ b/src/sql/models/qsqltablemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSql module of the Qt Toolkit.
@@ -45,8 +45,6 @@
#include <QtSql/qsqldatabase.h>
#include <QtSql/qsqlquerymodel.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -136,10 +134,9 @@ protected:
void setPrimaryKey(const QSqlIndex &key);
void setQuery(const QSqlQuery &query);
QModelIndex indexInQuery(const QModelIndex &item) const;
+ QSqlRecord primaryValues(int row) const;
};
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSQLTABLEMODEL_H
More information about the Development
mailing list