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>
This commit is contained in:
parent
a2b7b42ca4
commit
fb2d2c4f72
@ -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()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user