aboutsummaryrefslogtreecommitdiff
path: root/src/eventfilters.cpp
diff options
context:
space:
mode:
authorTrickyLeifa <date.epoch@gmail.com>2024-05-17 23:54:41 +0200
committerTrickyLeifa <date.epoch@gmail.com>2024-05-18 00:48:55 +0200
commit657145035cd66c18ae777e1272fd5221dddca0ef (patch)
treef9b86a917a2e422c8f93b05f06ebd112f1c700cb /src/eventfilters.cpp
parent0500a5426013e97b80cae1de0b19a117cc1bbaa7 (diff)
Reimplemented unit tests, ...
* Reimplemented unit tests and simplified addition of new tests * Minimal support of Qt is now 5.15
Diffstat (limited to 'src/eventfilters.cpp')
-rw-r--r--src/eventfilters.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/eventfilters.cpp b/src/eventfilters.cpp
index 2e11b587..6f0b0f12 100644
--- a/src/eventfilters.cpp
+++ b/src/eventfilters.cpp
@@ -6,11 +6,8 @@ bool AOLineEditFilter::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::FocusOut && lineEdit != nullptr && preserve_selection)
{ // lost focus
int start = lineEdit->selectionStart();
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
int len = lineEdit->selectionLength();
-#else
- int len = lineEdit->selectedText().length();
-#endif
+
if (start != -1 && len != -1)
{
lineEdit->setSelection(start, len);