diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsqldatabase.cpp | 5 | ||||
-rw-r--r-- | src/sql/kernel/qsqlrecord.cpp | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index a53120c460..6aa45c46e1 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -133,11 +133,11 @@ class QSqlDatabasePrivate { public: QSqlDatabasePrivate(QSqlDatabase *d, QSqlDriver *dr = 0): + ref(1), q(d), driver(dr), port(-1) { - ref = 1; if(driver) precisionPolicy = driver->numericalPrecisionPolicy(); else @@ -171,9 +171,8 @@ public: static void cleanConnections(); }; -QSqlDatabasePrivate::QSqlDatabasePrivate(const QSqlDatabasePrivate &other) +QSqlDatabasePrivate::QSqlDatabasePrivate(const QSqlDatabasePrivate &other) : ref(1) { - ref = 1; q = other.q; dbname = other.dbname; uname = other.uname; diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp index 944f2fc9bc..3f14cba245 100644 --- a/src/sql/kernel/qsqlrecord.cpp +++ b/src/sql/kernel/qsqlrecord.cpp @@ -63,14 +63,12 @@ public: QAtomicInt ref; }; -QSqlRecordPrivate::QSqlRecordPrivate() +QSqlRecordPrivate::QSqlRecordPrivate() : ref(1) { - ref = 1; } -QSqlRecordPrivate::QSqlRecordPrivate(const QSqlRecordPrivate &other): fields(other.fields) +QSqlRecordPrivate::QSqlRecordPrivate(const QSqlRecordPrivate &other): fields(other.fields), ref(1) { - ref = 1; } /*! \internal |