diff options
author | Martin Smith <martin.smith@digia.com> | 2014-08-22 13:25:32 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-08-29 13:43:24 +0200 |
commit | 449c15357646a1cfa0e2cccaef931a3a9c49d62b (patch) | |
tree | 3e676e80948c61d656520c708967afb58acea85d /examples/enginio | |
parent | 19a551e09264513766c569770539d55b6cc00d35 (diff) | |
download | qtenginio-449c15357646a1cfa0e2cccaef931a3a9c49d62b.tar.gz |
qdoc: Correct some links in QtEnginio
Several links in the Enginio docs are either broken, or they got to
the wrong page. This update fixes several cases in the overview.
Change-Id: I814b2b2c6826fb1a54ac7a8fccc509281298ef77
Task-number: QTBUG-40919
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Diffstat (limited to 'examples/enginio')
-rw-r--r-- | examples/enginio/widgets/todos-cpp/doc/src/todos-cpp.qdoc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/enginio/widgets/todos-cpp/doc/src/todos-cpp.qdoc b/examples/enginio/widgets/todos-cpp/doc/src/todos-cpp.qdoc index ebbce73..69445d4 100644 --- a/examples/enginio/widgets/todos-cpp/doc/src/todos-cpp.qdoc +++ b/examples/enginio/widgets/todos-cpp/doc/src/todos-cpp.qdoc @@ -49,18 +49,18 @@ } \endcode - The first step is to create a TodosModel which inherits \l {EnginioModelCpp}{EnginioModel}, + The first step is to create a TodosModel which inherits \l [CPP] {EnginioModel}, and defines the main roles which will be used. As we are interested in the To Do \c title and the \c completed information we need to define these two roles. \snippet todos-cpp/todosmodel.h definition By default, views (for example \l QListView) use the \l{Qt::ItemDataRole} role to display or edit the content. - The newly created \l{EnginioModelCpp}{EnginioModel} is empty and defines basic roles. Most roles are created + The newly created \l [CPP] {EnginioModel} is empty and defines basic roles. Most roles are created dynamically, based on the JSON datastructure. They have no predefined value in the \l Qt::ItemDataRole enum. - \l{EnginioModelCpp}{EnginioModel} automatically populates itself as soon as the + \l [CPP] {EnginioModel} automatically populates itself as soon as the \l{EnginioModel::query}{query} and \l{EnginioModel::client}{client} properties have been set. When the data is downloaded, the model resets itself, and sets up the internal data cache and roles names. - \l{EnginioModelCpp}{EnginioModel} guesses the role names based on heuristics. It may be wrong if not all + \l [CPP] {EnginioModel} guesses the role names based on heuristics. It may be wrong if not all objects received from the backend have exactly the same structure. For example, a property can be missing in certain objects. To protect against such cases, we overload \l{EnginioModel::roleNames()}{roleNames()}. Overriding \l{EnginioModel::roleNames()}{roleNames()} can also be used to match default Qt roles to the named @@ -73,20 +73,20 @@ Remember to always call the base class implementation to avoid situations in which the internal cache is not in sync. - By default \l {EnginioModelCpp}{EnginioModel} operates on \l{QJsonValue}, and that is + By default \l [CPP] {EnginioModel} operates on \l{QJsonValue}, and that is what the \l{EnginioModel::data()}{data()} function returns inside the \l QVariant, but standard views, such as \l QListView, use predefined roles which do not map directly to our roles. That is why we need to write a mapping between them: \snippet todos-cpp/todosmodel.cpp data - As we have our model defined, we need to create an instance of \l EnginioClient: + As we have our model defined, we need to create an instance of \l {EnginioClient}: \snippet todos-cpp/mainwindow.cpp client It is used by the model to connect to the Enginio backend. Next we need to construct and configure our model too. The configuration is based on two steps, assigning - an \l EnginioClient instance and by creating a query. + an \l {EnginioClient} instance and by creating a query. \snippet todos-cpp/mainwindow.cpp model |