From 6234dadf09af4fc7f58b7707a436a08f8ab0318c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 12 Oct 2012 14:06:53 +0200 Subject: doc: Fix a few doc errors for QtSQL The examples include path already contains 'sql', so we can't prefix the includes with 'sql' as well. Changing the include path to also include the parent examples directory is not an option, as qdoc will then try to generate output for example single example. Change-Id: Ifae07af86e60e6105a0625f29fbd6bc8f73b2550 Reviewed-by: Martin Smith Reviewed-by: Frederik Gladhorn --- src/sql/models/qsqlquerymodel.cpp | 2 +- src/sql/models/qsqlrelationaldelegate.cpp | 4 ++-- src/sql/models/qsqlrelationaltablemodel.cpp | 14 +++++++------- src/sql/models/qsqltablemodel.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/sql/models') diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index 926b78fe9f..c49a1f2fac 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -129,7 +129,7 @@ void QSqlQueryModelPrivate::initColOffsets(int size) option is to use QSqlTableModel, which provides a read-write model based on a single database table. - The \l{sql/querymodel} example illustrates how to use + The \l{querymodel} example illustrates how to use QSqlQueryModel to display the result of a query. It also shows how to subclass QSqlQueryModel to customize the contents of the data before showing it to the user, and how to create a diff --git a/src/sql/models/qsqlrelationaldelegate.cpp b/src/sql/models/qsqlrelationaldelegate.cpp index 31b3df3858..af50c03b2d 100644 --- a/src/sql/models/qsqlrelationaldelegate.cpp +++ b/src/sql/models/qsqlrelationaldelegate.cpp @@ -53,9 +53,9 @@ QT_BEGIN_NAMESPACE use the class, simply call QAbstractItemView::setItemDelegate() on the view with an instance of QSqlRelationalDelegate: - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 4 + \snippet relationaltablemodel/relationaltablemodel.cpp 4 - The \l{sql/relationaltablemodel}{Relational Table Model} example + The \l{relationaltablemodel}{Relational Table Model} example (shown below) illustrates how to use QSqlRelationalDelegate in conjunction with QSqlRelationalTableModel to provide tables with foreign key support. diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index e249277a86..c3637f0db7 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -340,10 +340,10 @@ void QSqlRelationalTableModelPrivate::clearCache() The following code snippet shows how the QSqlRelationalTableModel was set up: - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 0 + \snippet relationaltablemodel/relationaltablemodel.cpp 0 \codeline - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 1 - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 2 + \snippet relationaltablemodel/relationaltablemodel.cpp 1 + \snippet relationaltablemodel/relationaltablemodel.cpp 2 The setRelation() function calls establish a relationship between two tables. The first call specifies that column 2 in table \c @@ -359,9 +359,9 @@ void QSqlRelationalTableModelPrivate::clearCache() call QAbstractItemView::setItemDelegate() on the view with an instance of QSqlRelationalDelegate: - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 4 + \snippet relationaltablemodel/relationaltablemodel.cpp 4 - The \l{sql/relationaltablemodel} example illustrates how to use + The \l{relationaltablemodel} example illustrates how to use QSqlRelationalTableModel in conjunction with QSqlRelationalDelegate to provide tables with foreign key support. @@ -486,9 +486,9 @@ bool QSqlRelationalTableModel::setData(const QModelIndex &index, const QVariant Example: - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 0 + \snippet relationaltablemodel/relationaltablemodel.cpp 0 \codeline - \snippet sql/relationaltablemodel/relationaltablemodel.cpp 1 + \snippet relationaltablemodel/relationaltablemodel.cpp 1 The setRelation() call specifies that column 2 in table \c employee is a foreign key that maps with field \c id of table \c diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 5feb3087b8..d685c7e0be 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -251,7 +251,7 @@ QSqlRecord QSqlTableModelPrivate::primaryValues(int row) const sort order using setSort(). At the end, you must call select() to populate the model with data. - The \l{sql/tablemodel} example illustrates how to use + The \l{tablemodel} example illustrates how to use QSqlTableModel as the data source for a QTableView. QSqlTableModel provides no direct support for foreign keys. Use -- cgit v1.2.3