[Kde-pim] Review Request: Argument support for application/script reminders (korgac)
Sergio Martins
iamsergio at gmail.com
Sun Mar 1 00:22:36 GMT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/208/
-----------------------------------------------------------
Review request for KDE PIM.
Summary
-------
Currently arguments aren't being passed to the external application configured in the reminder, they are ignored.
We have 2 choices:
QProcess::startDetached( QString program, QStringList arguments ) or
QProcess::startDetached( QString programAndArgs )
Calling QProcess::startDetached( alarm->programFile(), alarm->programArguments().split(" ") ); would work for normal cases, but wont if you have arguments with spaces, e.g. ./myProgram "a b c" has only 1 argument not 3.
With the second variant, QProcess::startDetached( alarm->programFile() + alarm->programArguments() ) Qt will do the right thing and respect arguments with spaces, but on the other hand the program name can't have any spaces.
My patch uses the second variant and escapes the program name if it has spaces.
I think I have all angles covered.
This addresses bug 125546.
https://bugs.kde.org/show_bug.cgi?id=125546
Diffs
-----
trunk/KDE/kdepim/korganizer/korgac/alarmdialog.cpp 933368
Diff: http://reviewboard.kde.org/r/208/diff
Testing
-------
my program arg1 arg2 -> calls my program and passes 2 args
myProgram "arg1 arg2" -> calls myProgram and passes 1 arg with content "arg1 arg2"
myProgram a b c -> calls myProgram and passes 3 args, a, b and c
Thanks,
Sergio
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list