Version: 1.1 (using 4.1.4 (KDE 4.1.4), Kubuntu packages) Compiler: cc OS: Linux (i686) release 2.6.27-11-generic view mode is Icons, grouped and sorted by date kde regional setting for first day of the week is Sunday. files are still grouped by weeks that start on Monday. thank you
This seems to be still "valid" here using: Qt: 4.6.0 (Qt git branch 4.6 commit 52aef13521af2137db15ee878893f5c5150471e5 Date: Mon Oct 12 14:18:51 2009 +1000) KDE: 4.3.72 (KDE 4.3.72 (KDE 4.4 >= 20091015)) kdelibs svn rev. 1038788 / kdebase svn rev. 1038788 on ArchLinux i686 - Kernel 2.6.30.6 If I set the week to start on "Tuesday" and I have some files edited this week on the Monday (so they should be considered from "Last Week"), in the group(icon) view they appear under "Monday" instead of under "Last Week" The current algorithm only counts the week difference but it doesn't consider the day the week starts: if (currentDate.year() == modifiedDate.year() && currentDate.month() == modifiedDate.month()) { switch (currentWeek - modifiedWeek) { case 0: case 1: case n: ...
Resetting assignee to default as per bug #305719
Steps to reproduce: 1. Change your system’s regional settings to Sunday is the first day of the week. 2. Open Dolphin. Reopen if it was open already, for the regional settings to take effect. 3. Adjust the following Dolphin view settings: 3.1. View Mode to “Icons”. 3.2 Sort By to “Date”. 3.3 Mark “Sort by Groups”. 4. Run the following Bash script (on a Tuesday-Saturday): #!/bin/bash for DAY in "Last Saturday" "Last Sunday" "Last Monday" "Today" do touch "$DAY" --date="$DAY" done Expected results: - “Last Saturday” under “Last Week”. - “Last Sunday” under “Sunday”. - “Last Monday” under “Monday” (or “Yesterday” if testing on Tuesday). - “Today” under “Today”. Actual results: - “Last Saturday” under “Last Week”. - “Last Sunday” under “Last Week”. - “Last Monday” under “Monday” (or “Yesterday” if testing on Tuesday). - “Today” under “Today”.
Hi, thanks for the howto reproduce steps. I've reproduced it myself and already found the code which causes this problem. I have a solution in mind but will at first need to find out what the code is actually doing before starting implementing the fix. I'm on it. Regards
Git commit d7845775624999742f793a16e04531d50f4b450c by Frank Reininghaus, on behalf of Daniel Kreuter. Committed on 03/03/2013 at 18:20. Pushed by freininghaus into branch 'master'. Use a consistent way to group files by "Date" Before this change, files were grouped by calendar weeks if they were modified in the current month and ignoring the "first week day setting", but by the actual distance measured in multiples of seven days if the were modified last month. This not only fixes the "ignores first week day" bug, but also the problem that the inconsistencies in the algorithm could lead to a broken grouping in the first days of a month (see screenshot in the review request). FIXED-IN: 4.11 REVIEW: 108667 M +3 -20 dolphin/src/kitemviews/kfileitemmodel.cpp http://commits.kde.org/kde-baseapps/d7845775624999742f793a16e04531d50f4b450c