From 0359a82e6ef538316e550e7fa7c6dee8db72a225 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Tue, 28 Jan 2020 12:41:16 +0100 Subject: Doc: make Qt Sql snippets compilable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-81496 Change-Id: Id6206e9179c2e8157c99e777a3de35bd83d49e34 Reviewed-by: Topi Reiniƶ Reviewed-by: Paul Wicking --- src/sql/doc/src/sql-driver.qdoc | 2 +- src/sql/doc/src/sql-programming.qdoc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sql/doc/src') diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc index 7736591ae9..9ec50c0622 100644 --- a/src/sql/doc/src/sql-driver.qdoc +++ b/src/sql/doc/src/sql-driver.qdoc @@ -459,7 +459,7 @@ SQL result must get a new handle after each call to any of QSqlResult fetch functions. Example: - \snippet code/doc_src_sql-driver.cpp 36 + \snippet code/doc_src_sql-driver_snippet.cpp 36 While reading the results of a forward-only query with PostgreSQL, the database connection cannot be used to execute other queries. diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc index f20b1292fc..56bb48b27b 100644 --- a/src/sql/doc/src/sql-programming.qdoc +++ b/src/sql/doc/src/sql-programming.qdoc @@ -480,15 +480,15 @@ The following example creates a view based on an SQL data model: - \snippet sqldatabase/sqldatabase.cpp 17 - \snippet sqldatabase/sqldatabase.cpp 18 - \snippet sqldatabase/sqldatabase.cpp 19 + \snippet sqldatabase/sqldatabase_snippet.cpp 17 + \snippet sqldatabase/sqldatabase_snippet.cpp 18 + \snippet sqldatabase/sqldatabase_snippet.cpp 19 If the model is a read-write model (e.g., QSqlTableModel), the view lets the user edit the fields. You can disable this by calling - \snippet sqldatabase/sqldatabase.cpp 20 + \snippet sqldatabase/sqldatabase_snippet.cpp 20 You can use the same model as a data source for multiple views. If the user edits the model through one of the views, the other -- cgit v1.2.3