Commit d214d298 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement convert arguments

parent ef6f4c16
......@@ -128,8 +128,15 @@ void ViewerPluginExternalscriptInterface::slotScriptActivated(QAction *act)
QString ViewerPluginExternalscriptInterface::adaptArguments(const QString &scriptArguments)
{
QString newArguments = scriptArguments;
if (newArguments.contains(QStringLiteral("%s"))) {
const KMime::Headers::Subject *const subject = mMessage ? mMessage->subject(false) : 0;
newArguments.replace(QStringLiteral("%s"), QStringLiteral("\"%1\"").arg(subject ? subject->asUnicodeString() : QString()));
}
//TODO %s => subject
// %cc => cc
// etc. Look at parsing in kmkernel.
return {};
return newArguments;
}
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