WinRT: Move some device detection output into a logging category

This hides the detection failing in the case when no winrtrunner.exe can
be found, which is given as soon as you do not have a UWP Qt installed.
So moving this output to logging category makes it still accessible, but
it doesn't confuse non UWP developer.

Change-Id: Ie1434f75086d435f8f033b58c010e35fe64658b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-12-18 07:40:05 +01:00
parent 6d4223c5d6
commit 546d4a3b1a

View File

@@ -137,10 +137,9 @@ WinRtDeviceFactory::WinRtDeviceFactory(Core::Id deviceType)
void WinRtDeviceFactory::autoDetect() void WinRtDeviceFactory::autoDetect()
{ {
qCDebug(winrtDeviceLog) << __FUNCTION__; qCDebug(winrtDeviceLog) << __FUNCTION__;
MessageManager::write(tr("Running Windows Runtime device detection."));
const QString runnerFilePath = findRunnerFilePath(); const QString runnerFilePath = findRunnerFilePath();
if (runnerFilePath.isEmpty()) { if (runnerFilePath.isEmpty()) {
MessageManager::write(tr("No winrtrunner.exe found.")); qCDebug(winrtDeviceLog) << "No winrtrunner.exe found.";
return; return;
} }
@@ -155,7 +154,6 @@ void WinRtDeviceFactory::autoDetect()
const CommandLine cmd{runnerFilePath, {"--list-devices"}}; const CommandLine cmd{runnerFilePath, {"--list-devices"}};
m_process->setCommand(cmd); m_process->setCommand(cmd);
qCDebug(winrtDeviceLog) << __FUNCTION__ << "Starting process" << cmd.toUserOutput(); qCDebug(winrtDeviceLog) << __FUNCTION__ << "Starting process" << cmd.toUserOutput();
MessageManager::write(cmd.toUserOutput());
m_process->start(); m_process->start();
qCDebug(winrtDeviceLog) << __FUNCTION__ << "Process started"; qCDebug(winrtDeviceLog) << __FUNCTION__ << "Process started";
} }
@@ -361,7 +359,7 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const
message += QLatin1Char(' '); message += QLatin1Char(' ');
message += tr("%n of them are new.", nullptr, numNew); message += tr("%n of them are new.", nullptr, numNew);
} }
MessageManager::write(message); qCDebug(winrtDeviceLog) << message;
} }
} // Internal } // Internal