From 9e4a58cd4fc2e041ec311b471508abbb65179339 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 31 Aug 2010 16:42:50 +0200 Subject: Clarified iterator semantic in documentation and added a code snippet to a QML signal handler. Reviewed by: David Boddie Tasks:QTBUG-13243, QTBUG-11779 --- src/declarative/graphicsitems/qdeclarativetext.cpp | 10 ++++++++++ src/gui/text/qtextobject.cpp | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index f16af88..83098ae 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1208,6 +1208,16 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event) \qmlsignal Text::onLinkActivated(link) This handler is called when the user clicks on a link embedded in the text. + The link must be in rich text or HTML format and the + \a link string provides access to the particular link. + + \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0 + + The example code will display the text + "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}." + + Clicking on the highlighted link will output + \tt{http://qt.nokia.com link activated} to the console. */ /*! diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index d25fb05..ea2ef2d 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -616,6 +616,7 @@ void QTextFramePrivate::remove_me() /*! Returns an iterator pointing to the first document element inside the frame. + Please see the document \l{STL-style-Iterators} for more information. \sa end() */ @@ -628,8 +629,8 @@ QTextFrame::iterator QTextFrame::begin() const } /*! - Returns an iterator pointing to the last document element inside the frame. - + Returns an iterator pointing to the position past the last document element inside the frame. + Please see the document \l{STL-Style Iterators} for more information. \sa begin() */ QTextFrame::iterator QTextFrame::end() const -- cgit v0.12