Introduce hook for text cursor changes in QTextEdit and QPlainTextEdit
authorhjk <qthjk@ovi.com>
Tue, 28 Aug 2012 07:33:09 +0000 (09:33 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sun, 2 Sep 2012 08:09:28 +0000 (10:09 +0200)
commit9d4814e18b9c243340f492f8b7ddd19b523b229f
tree219180a1d028ddc83861455dd31dbfefa33b64bc
parente0ce39ea675bd1395618207d14089a234c9dd3c8
Introduce hook for text cursor changes in QTextEdit and QPlainTextEdit

Currently it is hard for Q{Plain}TextEdit subclasses to keep track
of changes of the text cursor by direct calls to setTextCursor from
arbitrary code. By redirecting the setTextCursor to a virtual
function subclasses get the chance to intercept such calls.

Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/widgets/widgets/qplaintextedit.cpp
src/widgets/widgets/qplaintextedit.h
src/widgets/widgets/qtextedit.cpp
src/widgets/widgets/qtextedit.h