From b4491c46fd9754a1c799978529574037a55a55aa Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 11 Jul 2017 13:12:42 +0200 Subject: Doc: Minor fixes to Loader QML type documentation - Convert section titles to bookcase - Minimize line length for code snippets that are embedded in tables to prevent overflow. Change-Id: I316fc0fc4c3663397110d1ad1b8b83abce4af02e Reviewed-by: Leena Miettinen Reviewed-by: Mitch Curtis --- src/quick/doc/snippets/qml/loader/KeyReader.qml | 2 +- src/quick/doc/snippets/qml/loader/focus.qml | 7 +++++-- src/quick/items/qquickloader.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src/quick') diff --git a/src/quick/doc/snippets/qml/loader/KeyReader.qml b/src/quick/doc/snippets/qml/loader/KeyReader.qml index 41eb208dd0..56604319e0 100644 --- a/src/quick/doc/snippets/qml/loader/KeyReader.qml +++ b/src/quick/doc/snippets/qml/loader/KeyReader.qml @@ -43,7 +43,7 @@ Item { Item { focus: true Keys.onPressed: { - console.log("Loaded item captured:", + console.log("KeyReader captured:", event.text); event.accepted = true; } diff --git a/src/quick/doc/snippets/qml/loader/focus.qml b/src/quick/doc/snippets/qml/loader/focus.qml index 5634a48ad1..f3509021f1 100644 --- a/src/quick/doc/snippets/qml/loader/focus.qml +++ b/src/quick/doc/snippets/qml/loader/focus.qml @@ -49,11 +49,14 @@ Rectangle { MouseArea { anchors.fill: parent - onClicked: loader.source = "KeyReader.qml" + onClicked: { + loader.source = "KeyReader.qml" + } } Keys.onPressed: { - console.log("Captured:", event.text); + console.log("Captured:", + event.text); } } //![0] diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 2c8f854d4d..9f27beb298 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -185,7 +185,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \l sourceComponent to \c undefined destroys the currently loaded object, freeing resources and leaving the Loader empty. - \section2 Loader sizing behavior + \section2 Loader Sizing Behavior If the source component is not an Item type, Loader does not apply any special sizing rules. When used to load visual types, @@ -217,7 +217,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \endtable - \section2 Receiving signals from loaded objects + \section2 Receiving Signals from Loaded Objects Any signals emitted from the loaded object can be received using the \l Connections type. For example, the following \c application.qml @@ -238,7 +238,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const its parent \l Item. - \section2 Focus and key events + \section2 Focus and Key Events Loader is a focus scope. Its \l {Item::}{focus} property must be set to \c true for any of its children to get the \e {active focus}. (See @@ -266,7 +266,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const Since \c {QtQuick 2.0}, Loader can also load non-visual components. - \section2 Using a Loader within a view delegate + \section2 Using a Loader within a View Delegate In some cases you may wish to use a Loader within a view delegate to improve delegate loading performance. This works well in most cases, but there is one important issue to -- cgit v1.2.3