Bug 56211 - Scripting in Actions uses paramater when it shouldn't
Summary: Scripting in Actions uses paramater when it shouldn't
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.1.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-21 18:44 UTC by Roland Seuhs
Modified: 2003-03-25 20:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Seuhs 2003-03-21 18:44:27 UTC
Version:           3.1.1 (using KDE 3.1.1)
Installed from:    compiled sources
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19-4GB

When you select a script for an action and select "none" for imput, Quanta should run

/path/script.sh

(without parameter)
but instead it seems to run

/path/script.sh ""

(it inserts an empty parameter which screws up some scripts or programs)
Comment 1 András Manţia 2003-03-25 20:17:51 UTC
Subject: QUANTA_3_1_BRANCH: quanta

CVS commit by amantia: 

Fix starting of script actions which does not have parameters.

CCMAIL: 56211-done@bugs.kde.org


  M +1 -0      ChangeLog   1.90.2.47
  M +5 -2      quanta/toolbar/tagaction.cpp   1.20.2.7


--- quanta/ChangeLog  #1.90.2.46:1.90.2.47
@@ -5,4 +5,5 @@
     - fix ocassional crash when pressing Ctrl-H while viewing the documentation
     - fix user toolbar handling
+    - fix execution of script actions which does not have any argument [#56211]
     - fix shortcut for Color dialog [#56235]
     - store the upload options in the project file [#56237]

--- quanta/quanta/toolbar/tagaction.cpp  #1.20.2.6:1.20.2.7
@@ -170,5 +170,8 @@ void TagAction::insertTag()
       command = command.left(pos);
     }
-    *proc << command << args;
+    *proc << command.stripWhiteSpace();
+    args = args.stripWhiteSpace();
+    if (!args.isEmpty())
+      *proc << args;
     firstOutput = true;
     firstError  = true;