qt5base-lts/tests/auto
Christian Heimlich e1cf5b2348 Fix redundant emission of editingFinished from QLineEdit with Return key
Current implementation of QLineEdit uses the "edited" bit-field flag to
prevent unnecessary emissions of editingFinished() when a line edit
loses focus but its contents have not changed since the last time the
signal was emitted; however, this flag is only cleared when the signal
is fired due to focus loss and not when the Return/Enter key is pressed.
This causes an unexpected double emission of the signal when focus is
lost following a press of the Return/Enter key if the line edit's text
was not further altered between the two actions.

This change includes the Return/Enter press as a trigger for clearing
the "edited" flag to make editingFinished()'s behavior more consistent
and expected. Prevents slots in user code from triggering twice in
situations where the line edit's current contents have already been
handled, but still allows the end-user to force an emission of the
signal via Return/Enter.

The effect of the "edited" flag on the signals behavior has also been
noted in the signal description as it was previously omitted.

[ChangeLog][QtWidgets][QLineEdit][Behavior Change] Pressing the
Return/Enter key in a QLineEdit will now also prevent editingFinished()
from firing due to focus loss if the contents of the line edit have not
changed since the last time the signal was emitted.

See - https://forum.qt.io/topic/116902/

Change-Id: I11aadd45341337b7852da8cf5802c7c9efdd614d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-23 20:33:33 -04:00
..
cmake CMake: Fix configuration of CMake tests in-build-tree 2020-07-20 18:12:23 +02:00
concurrent CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
corelib QDateTime change documentation to reflect usage of C locale 2020-09-23 17:33:39 +02:00
dbus Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
gui Give QPixmap a move constructor 2020-09-23 18:00:54 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
installed_cmake
network CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
opengl Remove tst_QGL 2020-08-28 11:43:11 +02:00
other CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
printsupport CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
shared Remove most compiler warnings about missing overrides 2020-09-11 00:20:47 +02:00
sql CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
testlib CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tools Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
widgets Fix redundant emission of editingFinished from QLineEdit with Return key 2020-09-23 20:33:33 -04:00
xml CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
.prev_CMakeLists.txt CMake: Regenerate projects 2020-09-22 19:08:53 +02:00
auto.pro CMake: Get tests/auto/cmake tests working 2020-07-17 09:43:04 +02:00
CMakeLists.txt CMake: Fix building with -DQT_FEATURE_gui=OFF 2020-09-15 20:05:32 +02:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00