When I rename an image with F2, a little dialog opens in which I can enter the new filename. Currently, the initial keyboard focus sits on one of the buttons, so I need to press Tab first. It would be more efficient if the focus were in the input field in which to enter the new filename. Bonus point: highlight only the basename part of the filename, i.e. without the file extension (if one exists) and its dot, like Dolphin does. Regards SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.3 Kernel Version: 6.8.2-arch2-1 (64-bit) Graphics Platform: X11
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/267
Can confirm the bug and the fix. I'm pretty sure it used to just work in past. Something must've changed in Qt. > Bonus point: highlight only the basename part of the filename, i.e. without the file extension (if one exists) and its dot, like Dolphin does. It does. However, only if the focus is initially on the field.
> Bonus point: highlight only the basename part of the filename, i.e. without the file extension (if one exists) and its dot, like Dolphin does. The implementation of QLineEdit is quite hardcoded when it comes to selection management. - It forcefully deselects text when it loses focus: Qt::FocusReason reason = e->reason(); if (reason != Qt::ActiveWindowFocusReason && reason != Qt::PopupFocusReason) deselect(); - and selects all text when it gains the focus back: else if (!d->control->hasSelectedText()) selectAll();
Git commit 34a8f9c15d3e02de6c876b2a345d4cc27dffb002 by ivan tkachenko, on behalf of Alistair Barrow. Committed on 29/04/2024 at 20:20. Pushed by ratijas into branch 'master'. Focus the QLineEdit when showing the rename dialog M +1 -0 app/renamedialog.cpp https://invent.kde.org/graphics/gwenview/-/commit/34a8f9c15d3e02de6c876b2a345d4cc27dffb002
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/270
Git commit 174fcb49893b76ce3799d631641377d22badd353 by Nate Graham, on behalf of Alistair Barrow. Committed on 05/05/2024 at 02:47. Pushed by ngraham into branch 'release/24.05'. Focus the QLineEdit when showing the rename dialog (cherry picked from commit 34a8f9c15d3e02de6c876b2a345d4cc27dffb002) M +1 -0 app/renamedialog.cpp https://invent.kde.org/graphics/gwenview/-/commit/174fcb49893b76ce3799d631641377d22badd353