Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
Qt Creator 7.0.1
-
None
-
Xubuntu 20.04.4 LTS
X11
xfce
-
-
61c09bcef (master)
Description
Navigating the Issue list in compiler errors with the Up/Down keys is completely broken in Qt Creator.
- It highlights the wrong line
- It jumps between errors (e.g. pressing Down 3 times goes to error A, C, B instead of A, B, C)
It is really, really broken. It makes developing C++ with QtCreator a nightmare, almost unsuable.
The following code can repro the errors:
#include <stddef.h> #include <stdint.h> void foo( int a ); void foo( int a, int b ); void foo( float c ); int main() { unsigned int a = -1.0f; foo( "hello" ); foo( "hello" ); unsigned int b = -1.0f; foo( "hello" ); unsigned int c = -1.0f; foo( "hello" ); return 0; }
See attached movie. I'm just pressing 7x Down 7x Up. It does whatever it wants.
Update
Looking at the changes, it is possible the bug is caused by a race condition.
- I'm using Ninja Generator (not GNU Make)
- I have a Ryzen 5900X, so I have 24 threads
- I use Clang++-12
Small update:
- QtCreator 7.0 is also affected
- QtCreator 6.0.2 is NOT affected
Small update 3:
I tracked the bug to src/plugins/projectexplorer/taskwindow.cpp:
const bool selected = view->selectionModel()->isSelected(index); const bool current = view->selectionModel()->currentIndex() == index;
When changed to:
//const bool selected = view->selectionModel()->isSelected(index); const bool current = view->selectionModel()->currentIndex() == index; const bool selected = current;
Everything backs to a working state.
Something I noticed is that according to the bug tickets QTCREATORBUG-25547 & QTCREATORBUG-26720 this new feature is supposed to allow multiple selections (i.e. via Shift + Click or Shift + Arrow). However on Linux, it doesn't seem such feature is working at all. I can only select one issue at a time.
BISECTED!
5207374d5d230d6307fa3a839212c24ae627c635 is the first bad commit commit 5207374d5d230d6307fa3a839212c24ae627c635 Author: Christian Kandeler <christian.kandeler@qt.io> Date: Mon Dec 13 12:06:11 2021 +0100 ProjectExplorer: Allow multi-selection in issues pane Users should be able to copy or remove several issues at once. Fixes: QTCREATORBUG-25547 Fixes: QTCREATORBUG-26720 Change-Id: I1ac75a3445c37200b6a01dd8c5d79d2b69c54a3c Reviewed-by: Christian Stenger <christian.stenger@qt.io> src/plugins/projectexplorer/copytaskhandler.cpp | 38 ++++++------ src/plugins/projectexplorer/copytaskhandler.h | 5 +- src/plugins/projectexplorer/itaskhandler.h | 14 +++-- src/plugins/projectexplorer/removetaskhandler.cpp | 5 +- src/plugins/projectexplorer/removetaskhandler.h | 5 +- src/plugins/projectexplorer/taskmodel.cpp | 14 +++++ src/plugins/projectexplorer/taskmodel.h | 2 + src/plugins/projectexplorer/taskwindow.cpp | 75 ++++++++++++++--------- src/plugins/projectexplorer/taskwindow.h | 1 - 9 files changed, 99 insertions(+), 60 deletions(-)
Attachments
Issue Links
- duplicates
-
QTBUG-100309 Cursor key navigation in item view causes wrong selection
-
- Reported
-