By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1451 - konqueror: Duplicating activity after drag and drop in same window
Summary: konqueror: Duplicating activity after drag and drop in same window
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: 3.5.13 [Trinity]
Hardware: All All
: P5 critical
Assignee: Slávek Banko
URL:
Depends on:
Blocks:
 
Reported: 2013-04-13 08:14 CDT by Slávek Banko
Modified: 2013-05-04 18:41 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Fix konqueror drag and drop short circuit (798 bytes, patch)
2013-04-29 21:34 CDT, Slávek Banko
Details | Diff
Fix konqueror drag and drop short circuit (2) (1.14 KB, patch)
2013-05-04 12:39 CDT, Slávek Banko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Slávek Banko 2013-04-13 08:14:40 CDT
1) Open new konqueror window
2) Create a new folder 1 - open it
3) In this window, create a new (empty) file
4) In same window, create a new folder 2
5) Take the file, press Ctrl (to create a copy of the file) and drag it in the same window above the new folder 2 and wait a little time
6) Folder 2 automatically opens - drop file into it
7) Konqueror automatically switches back to the original folder
8) The file is copied properly, but then immediately attempt to do the same again => prompted to overwrite the file.

Same is the case even when you press Ctrl+Shift => to create a symlink.

When you drag-and-drop to another tab or another konqueror window, it works fine. When you drop file before folder 2 automatically opens, it also works fine.

When you drag-and-drop without holding Ctrl or Ctrl+Shift after step 6) is before step 7) opened a popup menu asking for the desired action, and with this it also works fine.
Comment 1 Slávek Banko 2013-04-13 08:51:47 CDT
I have downloaded kubuntu 8.04 livecd so I can verify the bug in KDE 3.5.9. Approved - this is a long-standing bug.
Comment 2 Darrell 2013-04-13 11:47:45 CDT
Should this be added to the R14.0.0 road map etherpad?
Comment 3 Slávek Banko 2013-04-13 12:26:38 CDT
(Odpověď na komentář #2)
> Should this be added to the R14.0.0 road map etherpad?

Good point. I think yes, because this behavior is for the users very confusing and when copying multiple files may - if user confirm to overwrite - lead to a doubling of the time.
Comment 4 Slávek Banko 2013-04-17 19:23:33 CDT
I found the core of problem: tdebase/libkonq/konq_iconviewwidget.cc - condition follow line 1247. When I disabled this condition to be always use code "emit dropped()", instead of short-circuit, the bug does not occur.

The question is: What to do with it?

For example, we could say that the cases where the source and destination for drag and drop are the same, they are rare, and that the short-circuit is therefore unnecessary.
Comment 5 Slávek Banko 2013-04-17 20:43:50 CDT
Note: The condition can not be simply discarded, since it would make it impossible to create a copy and symlink to the same folder - in the same window as the source file.
Comment 6 Slávek Banko 2013-04-24 21:40:54 CDT
Into the conditions for the use of short-circuit should be added in addition to "ev->source() == viewport()" next condition to test, if the source item is in the same folder (url) as the currently opened in this viewport.
Comment 7 Timothy Pearson 2013-04-25 12:01:09 CDT
(In reply to comment #6)
> Into the conditions for the use of short-circuit should be added in addition to
> "ev->source() == viewport()" next condition to test, if the source item is in
> the same folder (url) as the currently opened in this viewport.

If this will fix the problem and does not introduce regressions, it seems sane to me.  Go ahead and fix it. :-)
Comment 8 Slávek Banko 2013-04-29 21:34:22 CDT
Created attachment 1196 [details]
Fix konqueror drag and drop short circuit

It seems that I succeeded.
Please verify attached patch.
Comment 9 Slávek Banko 2013-04-30 20:32:33 CDT
Comment on attachment 1196 [details]
Fix konqueror drag and drop short circuit

I found that the patch works correctly on local folders, but not on the remote (tested on fish). I have to rework it.
Comment 10 Slávek Banko 2013-05-04 12:39:11 CDT
Created attachment 1205 [details]
Fix konqueror drag and drop short circuit (2)

Patch revamped. I tested both local and the remote folders - for me it works correctly.
Please approve the patch before I'll push it to GIT.
Comment 11 Timothy Pearson 2013-05-04 13:17:55 CDT
(In reply to comment #10)
> Created attachment 1205 [details]
> Fix konqueror drag and drop short circuit (2)
> 
> Patch revamped. I tested both local and the remote folders - for me it works
> correctly.
> Please approve the patch before I'll push it to GIT.

Patch looks OK as far as I can tell, however at this time I think you know quite a bit more about this specific section of code than I do!

If it works for you go ahead and push.  We have a number of people using R14.0.0, which should help catch any regressions fairly quickly.
Comment 12 Darrell 2013-05-04 13:22:55 CDT
Note: I can't replicate the original behavior (unpatched). More than likely I'm not following the instructions correctly, but one possible note, I use tree view.

I'd like to replicate the probblem before testing the patch. :-)
Comment 13 Slávek Banko 2013-05-04 13:29:53 CDT
(Odpověď na komentář #12)
> Note: I can't replicate the original behavior (unpatched). More than likely I'm
> not following the instructions correctly, but one possible note, I use tree
> view.
> 
> I'd like to replicate the probblem before testing the patch. :-)

Yes - switch the folder must be done in a view with icons, not through the tree. When using tree this does not switch path in icon view => described situation does not occur.
Comment 14 Darrell 2013-05-04 13:40:46 CDT
Ok. In icon view I can replicate the problem. :-)

Interestingly, if I don't wait and immediately Ctrl-drop "Text File 1" into "New Folder 2," everything happens quietly and without incident. The dialog to overwrite appears only when I wait for konqueror to change the view to "New Folder 2."

I'll test the patch and report later.
Comment 15 Darrell 2013-05-04 14:16:21 CDT
I'm not as familiar as you with all use cases, but with the patch I can't replicate the original behavior. Good job!
Comment 16 Slávek Banko 2013-05-04 18:41:23 CDT
Thank you for testing.
Fixed in GIT hash 8bdb0111.