Fix missed handling of a irc:// url cmdl arg on app start

Application::handleActivate() handles the arguments passed from the signal
KDBusService::activateRequested. The API dox of the signal tells:
The arguments the executable was called with, starting with the
executable file name. See QCoreApplication::arguments().
This can also be empty.
267e3762 tried to handle the case of
no args passed, which though created bug 374690, which then got treated
by 2605c61f, which then created bug 391698.

Hopefully we end the chain here :)

BUG: 391698
parent 8c2ba76e
......@@ -136,8 +136,8 @@ void Application::implementRestart()
void Application::newInstance(QCommandLineParser *args)
QString url;
if (args->positionalArguments().count() > 1)
url = args->positionalArguments().at(1);
if (!args->positionalArguments().isEmpty())
url = args->positionalArguments().at(0);
if (!mainWindow)
......@@ -1348,7 +1348,7 @@ void Application::closeWallet()
void Application::handleActivate(const QStringList& arguments)
m_commandLineParser->parse(QStringList(applicationFilePath()) << arguments);
m_commandLineParser->parse(arguments.isEmpty()? QStringList(applicationFilePath()) : arguments);
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