From 789ae99928f96a7fc66ff9dacf6bbf5826d24cac Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 26 Oct 2010 12:39:47 +0200 Subject: Fix getting git info on Win --- tests/arthur/common/baselineprotocol.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index a7fb5be..6a35115 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -32,7 +32,16 @@ PlatformInfo::PlatformInfo(bool useLocal) #endif QProcess git; - git.start(QLS("git"), QStringList() << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H")); + QString cmd; + QStringList args; +#if defined(Q_OS_WIN) + cmd = QLS("cmd.exe"); + args << QLS("/c") << QLS("git"); +#else + cmd = QLS("git"); +#endif + args << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H"); + git.start(cmd, args); git.waitForFinished(3000); if (!git.exitCode()) gitCommit = QString::fromLocal8Bit(git.readAllStandardOutput().constData()).trimmed(); -- cgit v0.12