forked from qt-creator/qt-creator
Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used instead of the Q_OS_* macros in all contexts where the latter are not syntactically required. This lowers the likelihood of changes made on one platform breaking the build on another, e.g. due to the code model missing symbols in #ifdef'ed out code when refactoring. Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <valgrindprocess.h>
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sftpchannel.h>
|
||||
|
||||
@@ -135,11 +136,7 @@ void CallgrindController::run(Option option)
|
||||
#if CALLGRIND_CONTROL_DEBUG
|
||||
m_process->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
int pid = 0;
|
||||
#else
|
||||
const int pid = m_valgrindProc->pid();
|
||||
#endif
|
||||
const int pid = Utils::HostOsInfo::isWindowsHost() ? 0 : m_valgrindProc->pid();
|
||||
m_process->run(CALLGRIND_CONTROL_BINARY,
|
||||
QStringList() << optionString << QString::number(pid),
|
||||
QString(), QString());
|
||||
|
||||
Reference in New Issue
Block a user