diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/doc/qtsql.qdocconf | 2 | ||||
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 4 | ||||
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 2 | ||||
-rw-r--r-- | src/sql/kernel/qsqldatabase.cpp | 1 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 2 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.cpp | 2 |
6 files changed, 8 insertions, 5 deletions
diff --git a/src/sql/doc/qtsql.qdocconf b/src/sql/doc/qtsql.qdocconf index a2a05d7c8a..7f37904039 100644 --- a/src/sql/doc/qtsql.qdocconf +++ b/src/sql/doc/qtsql.qdocconf @@ -2,7 +2,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtSql description = Qt SQL Reference Documentation -url = http://qt-project.org/doc/qt-$QT_VER/qtsql +url = http://qt-project.org/doc/qt-$QT_VER version = $QT_VERSION examplesinstallpath = sql diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 9331f5c371..fd5990f3ee 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -1253,8 +1253,8 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const QTime tm = field.value().toDateTime().time(); // msecs need to be right aligned otherwise psql interprets them wrong r = QLatin1Char('\'') + QString::number(dt.year()) + QLatin1Char('-') - + QString::number(dt.month()) + QLatin1Char('-') - + QString::number(dt.day()) + QLatin1Char(' ') + + QString::number(dt.month()).rightJustified(2, QLatin1Char('0')) + QLatin1Char('-') + + QString::number(dt.day()).rightJustified(2, QLatin1Char('0')) + QLatin1Char(' ') + tm.toString() + QLatin1Char('.') + QString::number(tm.msec()).rightJustified(3, QLatin1Char('0')) + QLatin1Char('\''); diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index ffeb7921b3..0a8b71aa8a 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -596,6 +596,8 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c } if (option == QLatin1String("QSQLITE_OPEN_READONLY")) openMode = SQLITE_OPEN_READONLY; + if (option == QLatin1String("QSQLITE_OPEN_URI")) + openMode |= SQLITE_OPEN_URI; if (option == QLatin1String("QSQLITE_ENABLE_SHARED_CACHE")) sharedCache = true; } diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index b87a1fe1c5..f8ecabee8f 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -1264,6 +1264,7 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const \list \li QSQLITE_BUSY_TIMEOUT \li QSQLITE_OPEN_READONLY + \li QSQLITE_OPEN_URI \li QSQLITE_ENABLE_SHARED_CACHE \endlist diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 6aeef89483..2214e73658 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -671,7 +671,7 @@ void QSqlRelationalTableModel::clear() \value InnerJoin - Inner join mode, return rows when there is at least one match in both tables. \value LeftJoin - Left join mode, returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2). - \sa QSqlRelationalTableModel::setJoinMode + \sa QSqlRelationalTableModel::setJoinMode() \since 4.8 */ diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index da9b96a625..7367f6e7f4 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -204,7 +204,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement, \inmodule QtSql QSqlTableModel is a high-level interface for reading and writing - database records from a single table. It is build on top of the + database records from a single table. It is built on top of the lower-level QSqlQuery and can be used to provide data to view classes such as QTableView. For example: |