summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqldriver_p.h
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2013-04-03 21:44:30 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-04 13:13:37 +0200
commit0bdc86d9ef7be8e27598d245c6ca8026f08aff12 (patch)
tree53d6556f439ebfdd92a5dc24d4dac61daf3f9869 /src/sql/kernel/qsqldriver_p.h
parent708d39fa31368f80152440e94e4a361d024b19c1 (diff)
QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATE
406c8ef6e67da introduced deriving the private SQL driver classes from QSqlDriverPrivate. However, the drivers continued to keep their own pointer to the private class, even though QObject provides the same pointer. Worse yet, the private class is allocated too late and not even passed to QSqlDriver. The result is that QSqlDriver allocates a separate instance of QSqlDriverPrivate. This is likely to cause all kinds of chaos. The private class needs to be allocated in time pass it to QSqlDriver which passes it on to QObject. This commit covers the the base class and drivers: ibase mysql odbc psql sqlite tds Fixes for the remaining drivers will follow. Change-Id: Id8e7ec4205b0ca6cd00bd022c9cd24f137089245 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src/sql/kernel/qsqldriver_p.h')
-rw-r--r--src/sql/kernel/qsqldriver_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sql/kernel/qsqldriver_p.h b/src/sql/kernel/qsqldriver_p.h
index 899c85ab8a..05570e584c 100644
--- a/src/sql/kernel/qsqldriver_p.h
+++ b/src/sql/kernel/qsqldriver_p.h
@@ -61,6 +61,8 @@ QT_BEGIN_NAMESPACE
class QSqlDriverPrivate : public QObjectPrivate
{
+ Q_DECLARE_PUBLIC(QSqlDriver)
+
public:
enum DBMSType {UnknownDB, MSSqlServer, MySqlServer, PostgreSQL, Oracle, Sybase, SQLite, Interbase, DB2};
@@ -72,8 +74,6 @@ public:
dbmsType(UnknownDB)
{ }
- // @CHECK: this member is never used. It was named q, which expanded to q_func().
- QSqlDriver *q_func();
uint isOpen;
uint isOpenError;
QSqlError error;