Commit dec99ea6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 306700 - Command line option --msg does not work

FIXED-IN: 4.9.2
BUG: 306700
parent 73cdc90d
......@@ -397,7 +397,8 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
if (args->isSet("msg"))
{
mailto = true;
messageFile.setPath( args->getOption("msg") );
const QString file = args->getOption("msg");
messageFile = makeAbsoluteUrl(file);
}
if (args->isSet("body"))
......@@ -1349,10 +1350,11 @@ void KMKernel::action( bool mailto, bool check, const QString &to,
const KUrl::List &attachURLs,
const QStringList &customHeaders )
{
if ( mailto )
if ( mailto ) {
openComposer( to, cc, bcc, subj, body, 0,
messageFile.pathOrUrl(), attachURLs.toStringList(),
customHeaders );
}
else
openReader( check );
......
......@@ -37,6 +37,8 @@
#include <windows.h>
#endif
#include <QDir>
//-----------------------------------------------------------------------------
class KMailApplication : public KontactInterface::PimUniqueApplication
......@@ -105,6 +107,7 @@ int main(int argc, char *argv[])
#endif
KMail::AboutData about;
KCmdLineArgs::setCwd(QDir::currentPath().toLocal8Bit());
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( kmail_options() ); // Add kmail options
if (!KMailApplication::start())
......
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