Bug 234703 - openURL(const KUrl& url) doesn't load url if the session is already started
Summary: openURL(const KUrl& url) doesn't load url if the session is already started
Status: RESOLVED DUPLICATE of bug 225857
Alias: None
Product: konsole
Classification: Applications
Component: kpart (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-18 14:15 UTC by Jan Gerrit Marker
Modified: 2011-08-16 02:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A small patch (759 bytes, patch)
2010-04-18 14:16 UTC, Jan Gerrit Marker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Gerrit Marker 2010-04-18 14:15:20 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

If you create a Konsole part and want to load a new url by calling part->openURL(url); then the url is not loaded because the part only loads an url this way if the session was not started by run();. I think this behavior is wrong because openURL(); should open the url not only once for a part object but anytime it is called.
Comment 1 Jan Gerrit Marker 2010-04-18 14:16:25 UTC
Created attachment 42873 [details]
A small patch
Comment 2 Anton Kreuzkamp 2010-04-18 16:13:13 UTC
Your patch has some issues:
-In most usecases you don't want the konsole to clear, but with your patch does this  (so you should delete the line "sendInput("clear\n");")
-I don't see the sense of the lines QString cancel; till sendInput(cancel);  I only see it writing ^C without any result, so I think these lines could also be deleted
Comment 3 Jan Gerrit Marker 2010-04-18 17:00:34 UTC
1) the first issue is ok, the maintainer(s) of Konsolepart should decide, I did this to prevent the user from seeing "^C"
2) in Dolphin this is done to prevent from an accidently execution, an example:
   $~>rm -rf * ;
now the change directory command is added:
   $~>rm -rf * ; cd / <ENTER>
and all files in the $HOME are removed, but maybe the user wanted to remove the command but the programm which owns the part was faster and changed the directory. I'd say that this is important.

This patch is only a representation of an idea to fix this based on the Dolphin way of doing this.
Comment 4 Kurt Hindenburg 2010-04-21 16:32:15 UTC
Actually I've been meaning to do this for the bookmarks.  There is another bko for clearing the command line before doing the bookmark.

I think the ^C is a good option to clear the command line.
Comment 5 Jekyll Wu 2011-08-16 02:59:11 UTC
So, the real problem is showShellInDir() is broken, which is called within openURL().

*** This bug has been marked as a duplicate of bug 225857 ***