Commit ba204b10 authored by Jekyll Wu's avatar Jekyll Wu

Add dbus method runCommand(QString) for running command

Although the existing dbus method sendText(QString) can be used to do
the same job, it is not very friendly since users have to deal with the
problem of how to represent and send the final newline.

FEATURE: 283719
REVIEW: 104398
FIXED-IN: 4.9.0
parent 7b3340bc
......@@ -789,6 +789,11 @@ void Session::sendText(const QString& text) const
_emulation->sendText(text);
}
void Session::runCommand(const QString& command) const
{
_emulation->sendText( command + "\n");
}
void Session::sendMouseEvent(int buttons, int column, int line, int eventType)
{
_emulation->sendMouseEvent(buttons, column, line, eventType);
......
......@@ -458,6 +458,11 @@ public slots:
*/
Q_SCRIPTABLE void sendText(const QString& text) const;
/**
* Sends @p command to the current foreground terminal program.
*/
Q_SCRIPTABLE void runCommand(const QString& command) const;
/**
* Sends a mouse event of type @p eventType emitted by button
* @p buttons on @p column/@p line to the current foreground
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment