Bug 134361 - Undesired files selected when filtering a folder
Summary: Undesired files selected when filtering a folder
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 134669 141297 142245 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-20 02:12 UTC by David de Cos
Modified: 2008-06-02 00:34 UTC (History)
6 users (show)

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


Attachments
A screenshot of the bug (221.57 KB, image/png)
2007-05-25 14:15 UTC, peppelorum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David de Cos 2006-09-20 02:12:02 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs
OS:                Linux

Konqueror as a file manager, detailed view. Filter a folder using the filter box in the address bar, and then select all the files (CTRL+A) or a group of files by clicking on two of them holding SHIFT.

Then, unfiltered files are also selected (but you won't see that, unless you erase the filtering key ). This may be very harmful if you delete the selected group of files, as the others will be deleted too.

Example: three files: a.txt, b.dat and c.txt. Filter with ".txt", and only the first and the third will be seen. Press (CTRL+A) and delete them. The file b.dat is deleted too!!
Comment 1 Tommi Tervo 2006-09-26 09:51:58 UTC
*** Bug 134669 has been marked as a duplicate of this bug. ***
Comment 2 Tommi Tervo 2006-09-26 10:06:47 UTC
Lifting severity because of data loss. I couldn't reproduce this bug.
I used detailed list view, then selected some filter from dirfilter plugin menu, pressed CTRL+A and del. Selected files were deleted but not all files.
Comment 3 David de Cos 2006-09-26 11:43:51 UTC
I have experienced this bug in kmail and ksysguard as well (it is not fixed in my OpenSuSE 10.1, despite what Bug 115800 says). There is no need to delete anything to reproduce it, just erase the filtering key after pressing CTRL+A and you will see that everything has been selected.
Comment 4 Philip Rodrigues 2006-09-26 12:35:27 UTC
I can't reproduce this either with r588250.

David, this is one of a fairly common class of bugs (see, eg bug 122158). At the moment, they have to be fixed on an app-by-app basis, so if you see the same problem in other apps, please file them as separate bugs (or comment on existing ones). Thanks!
Comment 5 David de Cos 2006-09-26 17:20:47 UTC
OK, Philip, thank you for the advice. In case it helps, you can find a screen capture displaying this bug here:

http://magnes.we.lc.ehu.es/~dce/bug_134361.avi
Comment 6 Philip Rodrigues 2006-09-26 20:54:51 UTC
Ah, now I can reproduce it - it needs the view filter in the toolbar, but doesn't happen with the view filter from the menu (since clicking on 'Reset' also resets the selection)
Comment 7 Philip Rodrigues 2006-09-27 00:45:24 UTC
FWIW, here's what I can tell about this bug. I think it stems from the fact that QListView::selectAll(true) selects all items, both visible and non-visible. Perhaps it would make sense to reimplement this (virtual) method in KListView to only select visible items, something like this:

void KListView::selectAll(bool select)
{
  if (select)
  {
    QListViewItemIterator it(this, QListViewItemIterator::Visible);
    while ( it.current() )
    {
      it.current()->setSelected(true);
      ++it;
    }
  }
  else
    QListView::selectAll(select);
}
Comment 8 John Tapsell 2006-12-04 03:30:58 UTC
This is fixed in ksysguard btw now.
Comment 9 Tommi Tervo 2007-02-07 09:58:54 UTC
*** Bug 141297 has been marked as a duplicate of this bug. ***
Comment 10 Tommi Tervo 2007-02-27 08:52:36 UTC
*** Bug 142245 has been marked as a duplicate of this bug. ***
Comment 11 peppelorum 2007-05-25 14:14:42 UTC
Morning!

Just wondering if this is possible to fix since this a big NO-NO from a user perspective. I almost deleted some .cpp and .h-files, not so nice.
Comment 12 peppelorum 2007-05-25 14:15:24 UTC
Created attachment 20695 [details]
A screenshot of the bug
Comment 13 peppelorum 2007-05-25 14:55:25 UTC
Additional info.

This bug seems just to appear for info list view, detailed list view and text view. But it don't appear for icon view and multi column view.

Someone that can confirm this?
Comment 14 Philip Rodrigues 2007-05-27 00:47:55 UTC
peppelorum, I think that's correct. At least, the fix I suggested in comment 7 only affects the views you mention (which derive from klistview).
Comment 15 Michał Sawicz 2007-09-18 13:20:33 UTC
Well I'm experiencing that in Icon View in Konq 3.5.7
Comment 16 Travis Evans 2007-09-26 08:37:00 UTC
How do you test for this bug with icon view? The Filter toolbar doesn't appear to be available in icon or multicolumn view.
Comment 17 peppelorum 2007-09-26 08:44:15 UTC
In konqueror, Settings->Configure extensions->Tools->Directory filter plugin. A filter bar should now appear to the right of the location field.
Seems to exist for Kubuntu by default (if I'm not mistaken)
Comment 18 Travis Evans 2007-09-26 08:49:33 UTC
Although the original bug reports mention that both Ctrl+A and Shift-Click cause this, my Konqueror (Debian 4, KDE 3.5.7) only exhibits the behavior with Ctrl+A. Shift-Click seems to work correctly (hidden files between the selected files are not selected, which is what is expected).
Comment 19 Travis Evans 2007-09-26 08:54:46 UTC
Re: Comment 17

Well, my Directory Filter plugin is checked, but the filter box only appears if I'm in one of the list views for some reason. It's not there when I switch to icon view.
Comment 20 peppelorum 2007-09-26 09:51:22 UTC
Re: Comment 19

I have to enable the plugin AND do some more stuff to make it appear.

Settings->Configure toolbars, dropdown->Filter toolbar, and then move the "clear filter field, filter field and view filter" from the left list to the right list.
I'm almost sure this works if you want to use the "extra toolbar" instead.

I have also noticed that the plugins are enabled per view, so if you enable the filter plugin when using "info list"-view you have to enable it again when switching to "icon"-view. You would also have to add "clear filter field, filter field and view filter" again. Someone that confirm this odd behavior?

This bug does not appear for me when using icon view under 3.5.6 btw.
Comment 21 David de Cos 2007-09-26 14:09:36 UTC
                                                                                                                                                                                                                        In my system (Opensuse 10.2, KDE 3.5.7) the Filter toolbar is enabled by default in every possible view, unlike in Ubuntu (if I'm not mistaken).

As for the Shift-Click way to reproduce the bug, I have checked again and it still happens in my system, although both my KDE and Opensuse have been upgraded since I reported the bug.
Comment 22 Jörg von Frantzius 2007-10-25 12:18:24 UTC
Still occurs in OpenSuse 10.3 (that's 3.5.7 "release 72"). I already inadvertently deleted some files due to this. Say *DATA LOSS*, and that's as bad as a bug can be. Very bad for an aspiring desktop operating system.
Comment 23 Travis Evans 2007-10-30 18:47:10 UTC
(Written several days ago but being posted now because the Bugzilla system was broken)

My results appear pretty consistent with everyone else's. On Debian 4, KDE 3.5.8:

Icon view and multicolumn view:
The bug doesn't occur.

Tree view, info list view, detailed list view, text view:
Ctrl+Click:  Does NOT occur.
Highlighting group of files by dragging the mouse:  Does NOT occur.
Shift+Click: DOES occur.
Ctrl+A: DOES occur.
Comment 24 FiNeX 2008-06-01 18:23:07 UTC
As Travis said, I confirm that the bug is no more reproducible using 3.5.9. I've tested KDE 4 too which works fine (dolphin_part)
Comment 25 Travis Evans 2008-06-01 23:46:32 UTC
I didn't say the bug was no longer reproducible, just that it only seems to occur with Shift+Click and Ctrl+A in tree view, info list view, detailed list view, and text view.  However, I still need to test it with KDE versions later than 3.5.8.
Comment 26 FiNeX 2008-06-02 00:34:34 UTC
yes, I've wrote too quickly... I've extended what you said :-)
Anyway the bug is not reproducible on all his variant using 3.5.9 and 4.