aboutsummaryrefslogtreecommitdiff
path: root/src/eventfilters.cpp
diff options
context:
space:
mode:
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);