SVN commit 792390 by dhaumann: * add better parent window * remove a fixme (better idea how to fix it?) M +13 -5 kateexternaltools.cpp [POSSIBLY UNSAFE: KRun::runCommand] --- trunk/KDE/kdesdk/kate/plugins/externaltools/kateexternaltools.cpp #792389:792390 @@ -299,7 +299,7 @@ Kate::MainWindow *mw = qobject_cast(parent()->parent()); if ( ! expandMacrosShellQuote( cmd ) ) { - KMessageBox::sorry( 0, + KMessageBox::sorry( mw->window(), i18n("Failed to expand the command '%1'.", cmd ), i18n( "Kate External Tools") ); return; @@ -309,11 +309,19 @@ // save documents if requested if ( tool->save == 1 ) mw->activeView()->document()->save(); -// FIXME -// else if ( tool->save == 2 ) -// mw->actionCollection()->action("file_save_all")->trigger(); + else if ( tool->save == 2 ) + { + foreach (KXMLGUIClient *client, mw->guiFactory()->clients()) + { + if (QAction *a = client->actionCollection()->action("file_save_all")) + { + a->trigger(); + break; + } + } + } - KRun::runCommand( cmd, tool->tryexec, tool->icon, 0 ); + KRun::runCommand( cmd, tool->tryexec, tool->icon, mw->window() ); } //END KateExternalToolAction