From cbb7448434840d432ae80627d559ef4367daadfd Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Wed, 25 Jan 2017 22:25:48 +0100 Subject: [PATCH] Fix opening of new tabs with multiple processes Make sure we re-use the process if the user wants a new tab. BUG: 373440 REVIEW: 129886 --- src/Application.cpp | 1 - src/main.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 6e8e1ee15..49fd44561 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -371,7 +371,6 @@ MainWindow* Application::processWindowArgs(bool &createdNewMainWindow) { MainWindow* window = 0; if (m_parser->isSet(QStringLiteral("new-tab"))) { - // topLevelsWidgets() now always returns no windows BUG:373440 QListIterator iter(QApplication::topLevelWidgets()); iter.toBack(); while (iter.hasPrevious()) { diff --git a/src/main.cpp b/src/main.cpp index fb53560ed..db3b83bfd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -121,8 +121,8 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char* argv[]) parser->process(args); about.processCommandLine(parser.data()); - // Enable user to force multiple instances - if (!Konsole::KonsoleSettings::useSingleInstance()) { + // Enable user to force multiple instances, unless a new tab is requested + if (!Konsole::KonsoleSettings::useSingleInstance() && !parser->isSet(QStringLiteral("new-tab"))) { startupOption = KDBusService::Multiple; }