Bug 222233 - qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession (string,string) does not work
Summary: qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession (string,str...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.3.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 15:45 UTC by Andreas Hartmann
Modified: 2011-10-08 15:56 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hartmann 2010-01-11 15:45:54 UTC
Version:           2.3.1 (using KDE 4.3.4)
Compiler:          Binaries derived from openSuSE build system 
OS:                Linux
Installed from:    openSUSE RPMs

I want to open a new session in a running konsole process with qdbus.

The listing of all methods implemented for konsole gives:

qdbus org.kde.konsole /Konsole
...
method int org.kde.konsole.Konsole.newSession()
method int org.kde.konsole.Konsole.newSession(QString profile, QString directory)
...

Method newSession() seems to work, but the second (overloaded?) method produces the following error:

qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession string:hurra string:/usr/test
Invalid number of parameters

or:

qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession hurra /usr/test
Invalid number of parameters

Did I use a wrong syntax or is it a bug?
Comment 1 Kurt Hindenburg 2010-01-11 18:46:52 UTC
Something is wrong.  If you use qdbusviewer, the folder parameter works but not the profile.
Comment 2 Nuno Sucena Almeida 2011-02-14 05:46:00 UTC
Running 4.4.5 here. Command line doesn't work (qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession profile directory
Invalid number of parameters )

but calling from qdbusviewer it does.
Comment 3 Jekyll Wu 2011-10-08 09:36:37 UTC
With konsole-2.7.2, the second method does not complain 'invalid number of parameters'. But the 'profile' paremter does not take effect and the default profile is always used. 

After doing some investigation, the problem is that current code doesn't guarantee all profiles are loaded when the newSession dbus method is called.
Comment 4 Jekyll Wu 2011-10-08 10:01:30 UTC
Git commit 593186603b839221c6f3d58ae44e1fd26ae1c7ad by Jekyll Wu.
Committed on 08/10/2011 at 11:55.
Pushed by jekyllwu into branch 'master'.

Make dbus method newSession(profile,directory) works as expected

BUG:222233
FIXED-IN: 4.8

M  +4    -0    src/ViewManager.cpp

http://commits.kde.org/konsole/593186603b839221c6f3d58ae44e1fd26ae1c7ad
Comment 5 Kurt Hindenburg 2011-10-08 15:56:49 UTC
Git commit 6e556eed5b94de6d9f06da0cee5aa828ed3e9e76 by Kurt Hindenburg, on behalf of Jekyll Wu.
Committed on 08/10/2011 at 11:55.
Pushed by hindenburg into branch 'KDE/4.7'.

Make dbus method newSession(profile,directory) works as expected

BUG:222233
FIXED-IN: 4.8
(cherry picked from commit 593186603b839221c6f3d58ae44e1fd26ae1c7ad)

M  +4    -0    src/ViewManager.cpp

http://commits.kde.org/konsole/6e556eed5b94de6d9f06da0cee5aa828ed3e9e76