Summary: | Rename file with F2: initial keyboard focus should be in the filename text field | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | Frank Steinmetzger <dev+kde> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | me, nate |
Priority: | NOR | ||
Version First Reported In: | 24.02.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=486593 | ||
Latest Commit: | Version Fixed In: | 24.05 | |
Sentry Crash Report: |
Description
Frank Steinmetzger
2024-04-12 11:38:23 UTC
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 |