diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/doc/snippets/code/doc_src_sql-driver.cpp | 2 | ||||
-rw-r--r-- | src/sql/doc/src/qsqldatatype-table.qdoc | 2 | ||||
-rw-r--r-- | src/sql/doc/src/sql-driver.qdoc | 4 | ||||
-rw-r--r-- | src/sql/doc/src/sql-programming.qdoc | 14 | ||||
-rw-r--r-- | src/sql/drivers/mysql/qsql_mysql.cpp | 10 | ||||
-rw-r--r-- | src/sql/drivers/oci/qsql_oci.cpp | 4 | ||||
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 2 | ||||
-rw-r--r-- | src/sql/drivers/sqlite2/qsql_sqlite2.cpp | 4 | ||||
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 14 | ||||
-rw-r--r-- | src/sql/models/qsqlquerymodel_p.h | 2 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 2 |
11 files changed, 30 insertions, 30 deletions
diff --git a/src/sql/doc/snippets/code/doc_src_sql-driver.cpp b/src/sql/doc/snippets/code/doc_src_sql-driver.cpp index 48eb324cb8..695e7cdce8 100644 --- a/src/sql/doc/snippets/code/doc_src_sql-driver.cpp +++ b/src/sql/doc/snippets/code/doc_src_sql-driver.cpp @@ -62,7 +62,7 @@ db.setDatabaseName("C:\\test.gdb"); //! [25] -// connect to database using the Latin-1 character set +// connect to database using the Latin-1 character set db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1"); db.open(); //! [25] diff --git a/src/sql/doc/src/qsqldatatype-table.qdoc b/src/sql/doc/src/qsqldatatype-table.qdoc index b278e045bb..8480b5d412 100644 --- a/src/sql/doc/src/qsqldatatype-table.qdoc +++ b/src/sql/doc/src/qsqldatatype-table.qdoc @@ -29,7 +29,7 @@ \page sql-types.html \title Data Types for Qt-supported Database Systems \brief Recommended data types for database systems - + \ingroup qt-sql \section1 Recommended Data Types for Qt-Supported Database Systems diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc index 28db62537f..3de898c344 100644 --- a/src/sql/doc/src/sql-driver.qdoc +++ b/src/sql/doc/src/sql-driver.qdoc @@ -212,7 +212,7 @@ \li Open the DOS prompt, go to \c{C:\MySQL\MySQL51\lib\opt}, and run the following commands: - \list + \list \li \c{reimp -d libmysql.lib} \li \c{dlltool -k -d libmysql.def -l libmysql.a} \endlist @@ -227,7 +227,7 @@ \li Open the DOS prompt, go to \c{C:\Qt\4.6.2\src\plugins\sqldrivers\mysql} and run the - following command: + following command: \list \li \c{qmake "INCLUDEPATH+=C:/MySQL/MySQL51/include" "LIBS+=-L. mysql" mysql.pro} \endlist diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc index d4089c8ab2..9b5e9318e0 100644 --- a/src/sql/doc/src/sql-programming.qdoc +++ b/src/sql/doc/src/sql-programming.qdoc @@ -64,7 +64,7 @@ \li \l{Using the SQL Model Classes} \li \l{Presenting Data in a Table View} \li \l{Creating Data-Aware Forms} - \endlist + \endlist \section1 Database Classes @@ -142,7 +142,7 @@ \l{QSqlDatabase::addDatabase()} {addDatabase()} specifies the type of database driver to use for the connection. The set of database drivers included with Qt are shown in the table of \l{SQL Database - Drivers#Supported Databases} {supported database drivers}. + Drivers#Supported Databases} {supported database drivers}. The connection in the snippet will be the \e{default} connection, because we don't pass the second argument to @@ -176,11 +176,11 @@ \page sql-sqlstatements.html \title Executing SQL Statements \ingroup qt-sql - + \previouspage Connecting to Databases \contentspage SQL Programming \nextpage Using the SQL Model Classes - + The QSqlQuery class provides an interface for executing SQL statements and navigating through the result set of a query. @@ -328,7 +328,7 @@ \page sql-model.html \title Using the SQL Model Classes \ingroup qt-sql - + \previouspage Executing SQL Statements \contentspage SQL Programming \nextpage Presenting Data in a Table View @@ -475,7 +475,7 @@ \page sql-presenting.html \title Presenting Data in a Table View \ingroup qt-sql - + \previouspage Using the SQL Model Classes \contentspage SQL Programming \nextpage Creating Data-Aware Forms @@ -580,7 +580,7 @@ \page sql-forms.html \title Creating Data-Aware Forms \ingroup qt-sql - + \previouspage Presenting Data in a Table View \contentspage SQL Programming diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index 04ba450d46..a529d8c32d 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -166,7 +166,7 @@ class QMYSQLResultPrivate : public QObject { Q_OBJECT public: - QMYSQLResultPrivate(const QMYSQLDriver* dp, const QMYSQLResult* d) : driver(dp), result(0), q(d), + QMYSQLResultPrivate(const QMYSQLDriver* dp, const QMYSQLResult* d) : driver(dp), result(0), q(d), rowsAffected(0), hasBlobs(false) #if MYSQL_VERSION_ID >= 40108 , stmt(0), meta(0), inBinds(0), outBinds(0) @@ -788,7 +788,7 @@ bool QMYSQLResult::nextResult() { if(!d->driver) return false; -#if MYSQL_VERSION_ID >= 40100 +#if MYSQL_VERSION_ID >= 40100 setAt(-1); setActive(false); @@ -796,7 +796,7 @@ bool QMYSQLResult::nextResult() mysql_free_result(d->result); d->result = 0; setSelect(false); - + for (int i = 0; i < d->fields.count(); ++i) delete[] d->fields[i].outField; d->fields.clear(); @@ -1374,14 +1374,14 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const if(type & QSql::Tables) { QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'BASE TABLE'"); q.exec(sql); - + while(q.next()) tl.append(q.value(0).toString()); } if(type & QSql::Views) { QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'VIEW'"); q.exec(sql); - + while(q.next()) tl.append(q.value(0).toString()); } diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 8a6161d816..b0950110e0 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -100,7 +100,7 @@ enum { QOCIEncoding = 2000 }; // AL16UTF16 // Always set the OCI_ATTR_CHARSET_FORM to SQLCS_NCHAR is safe // because Oracle server will deal with the implicit Conversion // Between CHAR and NCHAR. -// see: http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89857/oci05bnd.htm#422705 +// see: http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89857/oci05bnd.htm#422705 static const ub1 qOraCharsetForm = SQLCS_NCHAR; #endif @@ -2211,7 +2211,7 @@ bool QOCIDriver::open(const QString & db, // Connect without tnsnames.ora if a hostname is given QString connectionString = db; if (!hostname.isEmpty()) - connectionString = + connectionString = QString::fromLatin1("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))" "(CONNECT_DATA=(SID=%3)))").arg(hostname).arg((port > -1 ? port : 1521)).arg(db); diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 483c640b43..1af5d6274e 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -68,7 +68,7 @@ Q_DECLARE_METATYPE(sqlite3_stmt*) QT_BEGIN_NAMESPACE -static QString _q_escapeIdentifier(const QString &identifier) +static QString _q_escapeIdentifier(const QString &identifier) { QString res = identifier; if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index a85a120973..1a16b85470 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -195,7 +195,7 @@ void QSQLite2ResultPrivate::init(const char **cnames, int numCols) for (int i = 0; i < numCols; ++i) { const char* lastDot = strrchr(cnames[i], '.'); const char* fieldName = lastDot ? lastDot + 1 : cnames[i]; - + //remove quotations around the field name if any QString fieldStr = QString::fromLatin1(fieldName); QLatin1Char quote('\"'); @@ -244,7 +244,7 @@ bool QSQLite2ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int firstRow.clear(); firstRow.resize(colNum); } - + switch(res) { case SQLITE_ROW: // check to see if should fill out columns diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index cac2f1dad4..5b103f1bff 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -325,7 +325,7 @@ bool QSqlQuery::isNull(int field) const } /*! - + Executes the SQL in \a query. Returns true and sets the query state to \l{isActive()}{active} if the query was successful; otherwise returns false. The \a query string must use syntax appropriate for @@ -579,7 +579,7 @@ bool QSqlQuery::seek(int index, bool relative) } /*! - + Retrieves the next record in the result, if available, and positions the query on the retrieved record. Note that the result must be in the \l{isActive()}{active} state and isSelect() must return true @@ -783,7 +783,7 @@ bool QSqlQuery::isValid() const } /*! - + Returns true if the query is \e{active}. An active QSqlQuery is one that has been \l{QSqlQuery::exec()} {exec()'d} successfully but not yet finished with. When you are finished with an active query, you @@ -1143,7 +1143,7 @@ QString QSqlQuery::executedQuery() const behavior is undefined. For MySQL databases the row's auto-increment field will be returned. - + \note For this function to work in PSQL, the table table must contain OIDs, which may not have been created by default. Check the \c default_with_oids configuration variable to be sure. @@ -1199,7 +1199,7 @@ QSql::NumericalPrecisionPolicy QSqlQuery::numericalPrecisionPolicy() const call this function, but it may be helpful in order to free resources such as locks or cursors if you intend to re-use the query at a later time. - + Sets the query to inactive. Bound values retain their values. \sa prepare(), exec(), isActive() @@ -1216,7 +1216,7 @@ void QSqlQuery::finish() /*! \since 4.4 - + Discards the current result set and navigates to the next if available. Some databases are capable of returning multiple result sets for @@ -1224,7 +1224,7 @@ void QSqlQuery::finish() multiple statements). If multiple result sets are available after executing a query this function can be used to navigate to the next result set(s). - + If a new result set is available this function will return true. The query will be repositioned on an \e invalid record in the new result set and must be navigated to a valid record before data diff --git a/src/sql/models/qsqlquerymodel_p.h b/src/sql/models/qsqlquerymodel_p.h index a79b62cda1..9d7b71faec 100644 --- a/src/sql/models/qsqlquerymodel_p.h +++ b/src/sql/models/qsqlquerymodel_p.h @@ -69,7 +69,7 @@ class QSqlQueryModelPrivate: public QAbstractItemModelPrivate public: QSqlQueryModelPrivate() : atEnd(false), nestedResetLevel(0) {} ~QSqlQueryModelPrivate(); - + void prefetch(int); void initColOffsets(int size); int columnInQuery(int modelColumn) const; diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 7cc7de2347..fb45468d2e 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -241,7 +241,7 @@ bool QRelation::isValid() -QRelatedTableModel::QRelatedTableModel(QRelation *rel, QObject *parent, QSqlDatabase db) : +QRelatedTableModel::QRelatedTableModel(QRelation *rel, QObject *parent, QSqlDatabase db) : QSqlTableModel(parent, db), firstSelect(true), relation(rel) { } |