diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2012-10-12 18:42:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-22 08:42:16 +0200 |
commit | fb2d2c4f72428db428898f2d2d55e32abea8d3b0 (patch) | |
tree | 18aad53b36eafa2ab8012baad7ac7f6bece2d66d /src | |
parent | a2b7b42ca4cf1ed682fa777b776673320b53e6ee (diff) |
Emit cursorPositionChanged in private slot.
Since the private slot is already there and used, it might as well
emit the signal and save us one connection.
Change-Id: I899df74c20f8c2b7875a0f9d0a04465c5dc48bde
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/widgets/qplaintextedit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index f27ca3921f..992e613482 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -442,11 +442,12 @@ QPlainTextEditControl::QPlainTextEditControl(QPlainTextEdit *parent) void QPlainTextEditPrivate::_q_cursorPositionChanged() { pageUpDownLastCursorYIsValid = false; -#ifndef QT_NO_ACCESSIBILITY Q_Q(QPlainTextEdit); +#ifndef QT_NO_ACCESSIBILITY QAccessibleTextCursorEvent ev(q, q->textCursor().position()); QAccessible::updateAccessibility(&ev); #endif + emit q->cursorPositionChanged(); } void QPlainTextEditPrivate::_q_verticalScrollbarActionTriggered(int action) { @@ -778,7 +779,6 @@ void QPlainTextEditPrivate::init(const QString &txt) QObject::connect(control, SIGNAL(copyAvailable(bool)), q, SIGNAL(copyAvailable(bool))); QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(_q_cursorPositionChanged())); - QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); QObject::connect(control, SIGNAL(textChanged()), q, SLOT(updateMicroFocus())); |