[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    quanta/quanta/plugins [POSSIBLY UNSAFE]
From:       Andras Mantia <amantia () freemail ! hu>
Date:       2002-12-08 10:46:52
[Download RAW message or body]

CVS commit by amantia: 

Handle multiple arguments a little better.


  M +11 -2     quantacmdplugin.cpp   1.11 [POSSIBLY UNSAFE: system]


--- quanta/quanta/plugins/quantacmdplugin.cpp   1.11:
@@ -79,5 +79,14 @@ bool QuantaCmdPlugin::load()
   QString args = arguments();
   if (!args.isEmpty())
-     args = KProcess::quote(args);
+  {
+    //FIXME: This will not work if the arguments contain spaces, but will
+    //do it for now, until the plugin system is corrected
+    QStringList argsList = QStringList::split(" ", args);
+    args = "";
+    for (uint i = 0; i < argsList.count(); i++)
+    {
+      args += KProcess::quote(argsList[i])+" ";
+    }
+  }
 
   /* TODO

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic