diff options
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | src/mainwindow/widgets/completer.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build index c033cac..32984ea 100644 --- a/meson.build +++ b/meson.build @@ -37,6 +37,7 @@ add_project_arguments(cxx.get_supported_arguments([ '-Wconsumed', # (clang) use-after-move warnings '-Wdate-time', # Warn when using __TIME__ and __DATE__ macros '-Wimplicit-fallthrough', + '-Wold-style-cast' ]), language: 'cpp') mod_qt5 = import('qt5') 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: |