diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-13 06:01:44 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-13 06:01:44 (GMT) |
commit | c34ed14c2c185fcb6fee1f8091790f41270f8472 (patch) | |
tree | 87a9f3a2a442c03c9cfb62fbe13485407ef349a4 /src | |
parent | 8f3c8e8585db2a621badbf7059076f513421bf8a (diff) | |
parent | 0ce1c5b4e27b85a122a02e8cc9c3eb49c9bc806f (diff) | |
download | Qt-c34ed14c2c185fcb6fee1f8091790f41270f8472.zip Qt-c34ed14c2c185fcb6fee1f8091790f41270f8472.tar.gz Qt-c34ed14c2c185fcb6fee1f8091790f41270f8472.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/sql/kernel/qsqldatabase.cpp | 2 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index 821760f..193aa7c 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -455,6 +455,8 @@ void QSqlDatabasePrivate::disable() The database connection is referred to by \a connectionName. The newly added database connection is returned. + If \a type is not available or could not be loaded, isValid() returns false. + If \a connectionName is not specified, the new connection becomes the default connection for the application, and subsequent calls to database() without the connection name argument will return the diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index aebecf1..5f0a35d 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -569,7 +569,8 @@ QString QSqlRelationalTableModel::selectStatement() const QString displayColumn = relation.displayColumn(); if (d->db.driver()->isIdentifierEscaped(displayColumn, QSqlDriver::FieldName)) displayColumn = d->db.driver()->stripDelimiters(displayColumn, QSqlDriver::FieldName); - fList.append(QString::fromLatin1(" AS %1_%2").arg(relTableName).arg(displayColumn)); + fList.append(QString::fromLatin1(" AS %1_%2_%3").arg(relTableName).arg(displayColumn).arg(fieldNames.value(fieldList[i]))); + fieldNames.insert(fieldList[i], fieldNames.value(fieldList[i])-1); } // this needs fixing!! the below if is borken. |