From e1c47a1d3cd8c2a0f6b40fddc2f1fae1cc7e7307 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 6 Aug 2009 15:23:39 +0200 Subject: Fix test failure in tst_QDateTimeEdit::task118867 setCursorPosition() should be able to set the cursor at the end of the string. This is a copy-paste error made when refactoring QLineEdit. Reviewed-by: Gunnar --- src/gui/widgets/qlinecontrol_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index e047cb0..ad4e4e4 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -641,7 +641,7 @@ inline void QLineControl::setCursorPosition(int pos) { if (pos < 0) pos = 0; - if (pos < m_text.length()) + if (pos <= m_text.length()) moveCursor(pos); } -- cgit v0.12