[dolphin] [Bug 495878] Customizing the default view settings doesn't work anymore

BananasGoMoo bugzilla_noreply at kde.org
Fri Feb 7 09:53:55 GMT 2025


https://bugs.kde.org/show_bug.cgi?id=495878

--- Comment #71 from BananasGoMoo <gdtcompwiz at aol.com> ---
(In reply to Méven from comment #70)
> (In reply to Iyán M. V. from comment #68)
> > Some thought after reading a bit the source code. I think the issue might
> > come from a bug in the logic of when to store settings, and when not. It
> > should check if settings in that folder differ from the global ones, not the
> > default ones from Dolphin.
> > 
> > These are my global settings, saved by configuring Dolphin to "use common
> > display style for all folders", modifying the settings to my like (i.e.,
> > details view, no previews) and then changing back to "remember display style
> > for each folder"
> > 
> > $ getfattr -d ~/.local/share/dolphin/view_properties/global
> > # file: home/iyan/.local/share/dolphin/view_properties/global
> > user.kde.fm.
> > viewproperties#1="[Dolphin]\012PreviewsShown=false\012Timestamp=2025,2,6,22,
> > 18,9.49\012Version=4\012ViewMode=1\012"
> > 
> > Since PreviewsShown=false there, I would expect that any directory with
> > PreviewsShown=true should store this in the filesystem attributes or in the
> > .directory file. Same goes for ViewMode. It should only be stored if it
> > differs from ViewMode=1.
> > 
> > What I noticed is that these global settings are ignored, and (I guess?)
> > default's Dolphin ones are used instead. For example, if I changed
> > ~/Pictures/Wallpapers to details view mode.
> > 
> > $ getfattr -d Pictures/Wallpapers
> > user.kde.fm.
> > viewproperties#1="[Dolphin]\012PreviewsShown=false\012Timestamp=2025,2,6,22,
> > 48,53.577\012Version=4\012ViewMode=1\012"
> > 
> > Notice that there are two things wrong here: PreviewsShown=false should not
> > be saved, and ViewMode=1 should not be saved.
> > 
> > If I enable previews, then
> > 
> > $ getfattr -d Pictures/Wallpapers
> > user.kde.fm.viewproperties#1="[Dolphin]\012Timestamp=2025,2,6,22,50,8.
> > 382\012Version=4\012ViewMode=1\012"
> > 
> > Again, wrong, because PreviewsShown=true should be saved!
> > 
> > And what happens when I changed both to Icons view and show previews? Bingo!
> > 
> > $ getfattr -d Pictures/Wallpapers
> > (Nothing!)
> > 
> > When it should, instead, have saved both PreviewsShown=true and the view
> > mode...
> > 
> > In the source code, the attributes are deleted because boolean allDefault
> > (line 534 in current master) gets set to true.
> > 
> > Hope this helps someone more familiar with Dolphin source code. If I'm not
> > wrong above (which maybe I am...), I don't understand why is so hard to
> > reproduce the issue...
> 
> Well spotted indeed, that's an issue.
> https://invent.kde.org/system/dolphin/-/blob/master/src/views/viewproperties.
> cpp#L535
> It uses item->isDefault() but this compares to the hardcoded default view
> settings, not the use defined ones as expected.
> Something I had overlooked.
> 
> That would mean dolphin with debug logs would exhibit `clearing extended
> attributes for` sometimes.
> But I didn't see it previously.
> Do you see it when using ?
> QT_LOGGING_RULES="org.kde.dolphin.debug=true" dolphin
> I don't want to waste your time though, with the getfattr logs you shared, I
> can already confirm the issue.
> Thank you verify much for this research work.

So I'm glad that this found the issue but I must point out this proves that the
test cases for dolphin for this case are insufficient. Is it only testing with
default values? It makes sense why my case and his case are different, since I
have nearly default settings, except my view mode is details and not icons by
default. I hope the test cases are updated after this. 

Btw in regards to the debug question you had, no case I've ever tried had the
message 'clearing extended attributes for' you mentioned, but also my test
cases are limited to the ones I mentioned previously. 

Thank you guys for working on this annoying bug, I hope it gets patched in
soon. I'm glad it's not a major bug at least.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list