From cf3327cfbe861c0ee33008df20a53949034ac95e Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Thu, 14 Feb 2013 15:01:52 +0100 Subject: [PATCH] Doc: Removed reference to deprecated \badcode command. QDoc doesn't differentiate between \badcode and \code. They both look the same in the output. Change-Id: Ia0580f7d664ad5e33b48d6511dac7c61349cacce Reviewed-by: Martin Smith Reviewed-by: Jerome Pasion --- .../doc/src/cppintegration/interactqmlfromcpp.qdoc | 4 ++-- .../doc/src/concepts/positioning/anchors.qdoc | 9 ++++++--- src/quick/items/qquickrepeater.cpp | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc index 31a68d3..04b2781 100644 --- a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc +++ b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc @@ -147,8 +147,8 @@ custom element \c PushButton with a \c buttonText property that internally reflects the value of a \c m_buttonText member variable. Modifying the member variable directly like this is not a good idea: -\badcode -// BAD! +\code +//bad code QQmlComponent component(engine, "MyButton.qml"); PushButton *button = qobject_cast(component.create()); button->m_buttonText = "Click me"; diff --git a/src/quick/doc/src/concepts/positioning/anchors.qdoc b/src/quick/doc/src/concepts/positioning/anchors.qdoc index 871cd52..d0a14f7 100644 --- a/src/quick/doc/src/concepts/positioning/anchors.qdoc +++ b/src/quick/doc/src/concepts/positioning/anchors.qdoc @@ -140,7 +140,8 @@ carefully ordered, or they may produce unexpected outcomes. The following exampl \table \row \li - \badcode + \code + //bad code Rectangle { width: 50 anchors.left: parent.left @@ -185,7 +186,8 @@ conditional bindings, as this can lead to the ordering issue described above. In the Rectangle will eventually grow to the full width of its parent, because both left and right anchors will be simultaneously set during binding update. -\badcode +\code +//bad code Rectangle { width: 50; height: 50 anchors.left: state == "right" ? undefined : parent.left; @@ -201,7 +203,8 @@ ordering issues internally. For performance reasons, you can only anchor an item to its siblings and direct parent. For example, the following anchor is invalid and would produce a warning: -\badcode +\code +//bad code Item { id: group1 Rectangle { id: rect1; ... } diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index 68f70a5..4c43b4b 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -116,9 +116,10 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() Also, note that Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects. For example, it cannot be used to repeat QtObjects: - \badcode + \code + //bad code Item { - //XXX does not work! Can't repeat QtObject as it doesn't derive from Item. + Can't repeat QtObject as it doesn't derive from Item. Repeater { model: 10 QtObject {} -- 1.7.2.5