Print commands that are being run if KPMCORE_DEBUG is set

This commit is contained in:
Andrius Štikonas 2018-11-12 00:22:24 +00:00
parent 2007f2b8ea
commit 4f3a9db348
1 changed files with 4 additions and 2 deletions

View File

@ -125,9 +125,11 @@ bool ExternalCommand::start(int timeout)
if (command().isEmpty())
return false;
if (report()) {
if (report())
report()->setCommand(xi18nc("@info:status", "Command: %1 %2", command(), args().join(QStringLiteral(" "))));
}
if ( qEnvironmentVariableIsSet( "KPMCORE_DEBUG" ))
qDebug() << xi18nc("@info:status", "Command: %1 %2", command(), args().join(QStringLiteral(" ")));
QString cmd = QStandardPaths::findExecutable(command());
if (cmd.isEmpty())