From d738bfe0f06448d9a6bc2ee1a32225c076c67334 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 6 Aug 2009 15:05:32 +0200 Subject: Make sure cursorPositionChanged is emitted when cursor position changes When selecting the text and setting the cursor position, we need to emit the cursorPositionChanged signal. This seems to be a copy-paste error from refactoring QLineEdit, as the function call is there in the original version of setSelection(). The effect was two test breakages in tst_QDateTimeEdit, because the section and cursor position of the QDateTimeEdit would be out of sync. Reviewed-by: Gunnar --- src/gui/widgets/qlinecontrol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index d90d53b..f4a2348 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -257,6 +257,7 @@ void QLineControl::setSelection(int start, int length) m_cursor = m_selstart; } emit selectionChanged(); + emitCursorPositionChanged(); } void QLineControl::_q_clipboardChanged() -- cgit v0.12