Bug 327898 - KFileDialog locationEdit reset undo history when there are more than one characters
Summary: KFileDialog locationEdit reset undo history when there are more than one char...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Open/save dialogs (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 13:47 UTC by Yichao Yu
Modified: 2022-01-19 22:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Yu 2013-11-21 13:47:22 UTC
(I'm not sure if kdecore is the right component but I cannot find kfile...)

In KFileDialog, whenever (except when typing the first character) the location in the locationEdit combobox changes, the undo history is reset. For selecting one item from the dropdown menu in the combobox, this reset seems to be the (default) behavior of the combobox (which is ... fine). However, the reset also happens whenever one changes directory, edit the combobox, and selects a file in the view above.

The direct cause of the reset seems to be QLineEdit::setText.
For the reset when typing and selecting a file, the bug path seems to be the call of `locationEdit->setItemIcon` and `locationEdit->setItemText` in KFileWidgetPrivate::setDummyHistoryEntry. For changing directory, it looks a lot more complicated (resets 3 - 4 times).

From what I have seen, it seems that the bug is pretty deep in how KFileDialog handles url changes and I'm not sure how to fix it.
Comment 1 Nate Graham 2018-04-10 21:59:13 UTC
Can you still reproduce this with KDE Frameworks 5.45?
Comment 2 Yichao Yu 2018-04-10 22:14:13 UTC
I'm actually pretty confused by the version number scheme right now so I'm not really sure which version I have. The kdialog package version is 17.12.1 installed from Feburary and kdialog --version gives me 2.0. I can still reproduce exactly this problem with these version.
Comment 3 Yichao Yu 2018-04-10 22:17:58 UTC
Actually I can't reproduce this for the location but I can for the filename box.
Comment 4 Nate Graham 2018-04-16 04:02:54 UTC
Thanks for testing again!