From 3b1e87b4f11658dcc731fa4396a7bee7981f7af0 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 12 Jan 2020 20:48:06 +0200 Subject: Fix address bar completer deleting url when closing with no item selected --- src/mainwindow/widgets/completer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainwindow/widgets/completer.cpp') diff --git a/src/mainwindow/widgets/completer.cpp b/src/mainwindow/widgets/completer.cpp index 578f745..1295fa3 100644 --- a/src/mainwindow/widgets/completer.cpp +++ b/src/mainwindow/widgets/completer.cpp @@ -70,7 +70,8 @@ bool Completer::keyPressed(QKeyEvent *event) case Qt::Key_Enter: case Qt::Key_Return: hide(); - emit completionActivated(currentIndex.data().toString()); + if(currentIndex.row() >= 0) + emit completionActivated(currentIndex.data().toString()); break; default: -- cgit v1.2.1