Version: 3.0.80 (using Devel) Installed from: Compiled sources OS: Linux Open a document in kate/kwrite, press Ctrl+F to go to the search bar. Enter some text. Press Ctrl+A. The "select all" action is applied to the document text, instead of the search query. If you right click the search bar and choose "Select all (Ctrl+A)" from the menu, the search query is selected. The bug only affects Ctrl+A, not other shortcuts that are shared between the document and the line edit like Ctrl+Z, Ctrl+C, Ctrl+V.
Confirmed using r816130
I suppose other people experiencing this as a feature not a bug. Can we have more opinions on this one?
This is quite easy: Its a bug. If a widget has focus, the user surely expects all input including shortcuts to act on that widget. Thus Ctrl+A should work on the input lineedit, as it can handle the shortcut. If you press something that doesn't make sense in the lineedit it would be ok to forward to the editor widget.
+1 If you need any more comments supporting this, or a use case, let me know.
I was about to report this too. Many times I tried do replace all the search string with ctrl+a and ended up erasing all my code... Undo to the rescue!!!
It is possible to set the widget context on the action, right?
*** Bug 175465 has been marked as a duplicate of this bug. ***
I've investigated a littlebit, the problem is that QLineEdit doesn't catch all CTRL+A key presses, since QtSoftware claims CTRL+A is often used by applications. Since we have CTRL+A in the menu it has priority over all other shortcuts. I'm attaching a hack to this bug report for testing, because I'm not sure if everybody can live with the behaviour I'm introducing. The basic idea is that the "select all" action, if invoked, checks if it has the QKeySequence::SelectAll keyboard shortcut assigned if yes, it checks if the currently focused widget is a QLineEdit. If this is the case it invokes the selectAll of member function of the lineedit, otherwise it selects all in the document. The missbehaviour of this implementation is that a focused line edit has priority over the kateview even if the action is invoked via the menu. I think my proposed solution is better than nothing and if everybody is fine with the "missbehaviour" I'm going to commit the hacky fix, till we have a better one.
Created attachment 28679 [details] hacky fix for CTRL+A not working in the search bar (or any line edit)
Created attachment 28680 [details] hacky fix for CTRL+A not working in the search bar (or any line edit)
This problem must be common to quite a few applications, so I wonder if it is worth suggesting to qt that the behavior is changed? And even if not, we should come up with a solution that can be applied to other apps too (I'm not suggesting that Jowenns suggested hack can not ;). Any application that has the very common select action combined with embedded dialogs will be affected, if I am not mistaken?
Anders is right: this also happens in dolphin, with the filter bar (Tools > Show filter bar). If you have the filter bar focused and press ctrl+a, it selects all files instead of the text in the filter bar. Although I would argue that in dolphin's case it's useful behavior, Qt should allow the apps to specify what to do with ctrl+A.
Since I didn't get a clear no-go, I've committed my hacky fix, till somebody comes up with a better solution. I'm not marking this bugas fixed, since a "real fix is pending" -> REMIND See also: http://websvn.kde.org/?view=rev&revision=887419
*** Bug 175412 has been marked as a duplicate of this bug. ***
Added an additional check for lineedits in comboboxes (url navigator in filesystem browser) r887764
I was scanning the 4.2.1 changelog and found bug #181180 that supposedly solves this for all klineedits and ktextedits, so maybe it's time to revert the hacky fix?
Indeed, I've just tried to remove the "hacky fix" and the bug is gone :-) If needed, I can commit the fix for the fix.
The related commits are: r887764 and part of r887419 And of course, if you tested it already, go ahead and commit/revert it!
@Dominik: yes, about r887419 I've reverted only the chages to kateview.cpp and kateview.h. I'll check again the code and I'll submit the changes.
SVN commit 935384 by finex: Reverted temporary fix to CTRL+A bug which has been fixed on a deeper level now. BUG: 163139 M +1 -25 kateview.cpp M +0 -2 kateview.h WebSVN link: http://websvn.kde.org/?view=rev&revision=935384