D5777: Fix splitting of root installation command, add default value for the same in .kcfg

Geetam Chawla noreply at phabricator.kde.org
Tue May 16 14:10:50 UTC 2017

geetamc marked an inline comment as done.
geetamc added a comment.

  In https://phabricator.kde.org/D5777#109999, @apol wrote:
  > I don't really understand the patch, there's the bit there so that if (cmd.isEmpty) kdesu -t. What are you trying to fix?
  True, the problem is that if suCommand is empty and we define suCommandWithArg = suCommand.split(regEx), (where regExp = QRegExp(" ") )
  suCommandWithArg.isEmpty() //should// be true as suCommand itself was empty in the first place, unfortunately that is not the case and hence 
  the flow of control never reaches the body of "if(suCommandWithArg.isEmpty() )".
  So in my first diff I checked suCommand instead for emptiness, and assigned appropriate value to suCommandWithArg, however
  when you suggested KShell::splitArgs, I found that if the orignal QString is empty, the QStringList returned by KShell::splitArgs is empty, 
  hence a simple change from QString.split(regExp) to KShell::splitArgs(QString) does the job.
  > FWIW, probably the correct fix here would be to use the kdesu framework itself...
  I am sorry, but I am rather ignorant of what kdesu framework offers and how it would be a more proper fix, so I will read about it and if I feel
  that it can be used in this scenario, I will update my diff.

  R32 KDevelop


To: geetamc, apol
Cc: apol, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170516/0fc184ad/attachment.html>

More information about the KDevelop-devel mailing list