Bug 495304 - natural sorting setting is not applied until after dolphin is restarted
Summary: natural sorting setting is not applied until after dolphin is restarted
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-24 14:17 UTC by microcai
Modified: 2024-10-26 08:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
provide the patch to fix this issue (822 bytes, patch)
2024-10-24 14:17 UTC, microcai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description microcai 2024-10-24 14:17:09 UTC
Created attachment 175189 [details]
provide the patch to fix this issue

SUMMARY

nartual sorting by meaning, sort numeric number nartually. but this setting have zero effect.


STEPS TO REPRODUCE
1.  enable nartual sorting in settings.
2.  open folder that have files with it's name contains  numeric number.
3.  and toggle header to sort by file name.

OBSERVED RESULT
the files are still sorted by ascii code.
e.g.

1.txt
10.txt
11.txt
...
2.txt
20.txt


EXPECTED RESULT
the files should be sorted by numeric number, if it has numeric number in its name.
e.g.
1.txt
2.txt
3.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
10.txt
11.txt


SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-Gentoo (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 3950X 16-Core Processor
Memory: 125.7 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT

ADDITIONAL INFORMATION
Comment 1 Méven 2024-10-26 06:09:30 UTC
The patch is incorrect. (m_collator.setNumericMode(true) is called already.
patch was apparently untested.

The issue is the apply button does not cause the view to reload the settings, but the setting is saved.
Restarting dolphin changes the sorting.

The bug origin seems to be due to having two GeneralSettings::self() value despite using a singleton.
It seems to be due to how code is organized and dolphinprivate/dolphinstatic build target somehow split the