Commit 0bdc86d9 authored by Mark Brand's avatar Mark Brand Committed by The Qt Project
Browse files

QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATE

406c8ef6

 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: default avatarAndy Shaw <andy.shaw@digia.com>
parent 708d39fa
No related merge requests found
Showing with 154 additions and 106 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment