Bug 116639 - kurlcompletion doesn't complete executables in $PATH in kopenwith dialog
Summary: kurlcompletion doesn't complete executables in $PATH in kopenwith dialog
Status: RESOLVED FIXED
Alias: None
Product: kfile
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-18 18:16 UTC by Felix Berger
Modified: 2011-06-04 19:30 UTC (History)
2 users (show)

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


Attachments
simple patch (601 bytes, patch)
2005-11-18 18:17 UTC, Felix Berger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Berger 2005-11-18 18:16:58 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Compiled From Sources
OS:                Linux

In the current implementation the codepath in KURLCompletion::exeCompletion(...) that adds the directories in $PATH to the list of directories in which to look for possible completions, is not reached.

A simple fix would be removing the elses in front of the second and third if case, but this might break code in other places.

Calling KURLCompletion::setDir(QString::null) beforehand does not work. Then url.protocol() == "file" in line 805 is false.

What's the correct was to get $PATH completion to work?

It would make the kopenwith dialog much more useful if $PATH would be searched for completions.

Thanks,
Felix
Comment 1 Felix Berger 2005-11-18 18:17:27 UTC
Created attachment 13540 [details]
simple patch
Comment 2 Felix Berger 2006-02-15 14:58:46 UTC
Unless my setup is messed up, this looks like a regression bug. $PATH completion in the "open with" dialog works just fine on KDE 3.1.x.

Thanks,
Felix
Comment 3 Felix Berger 2007-06-27 05:30:04 UTC
Maybe this can be merged into a beta release or the like. The patch is straightforward and would fix a regression bug.
Comment 4 David Faure 2007-06-27 10:41:05 UTC
David Smith is the author of that code; cc'ed for comments.
Comment 5 Felix Berger 2007-08-03 07:01:01 UTC
Hi David S., did you have a chance to look at the attached patch?
Comment 6 Dawit Alemayehu 2011-06-04 19:30:07 UTC
Git commit d9997d711e493416a35a49cb84700c7b77441211 by Dawit Alemayehu.
Committed on 03/06/2011 at 22:51.
Pushed by adawit into branch 'master'.

- Make executable completion work in OpenWith dialog.

- Fixed the logic error that caused unnecessary creation of directory listing
  threads for each and every completion request (read: every key press).

BUG: 77169
BUG: 116639
BUG: 158124
FIXED-IN: 4.7.0
REVIEW: 101499

M  +9    -9    kio/kio/kurlcompletion.cpp     

http://commits.kde.org/kdelibs/d9997d711e493416a35a49cb84700c7b77441211