diff options
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 5f9ebaf..b833648 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -35,7 +35,9 @@ QCMake::QCMake(QObject* p) cmSystemTools::DisableRunCommandOutput(); cmSystemTools::SetRunCommandHideConsole(true); - cmSystemTools::SetErrorCallback(QCMake::errorCallback, this); + cmSystemTools::SetMessageCallback(QCMake::messageCallback, this); + cmSystemTools::SetStdoutCallback(QCMake::stdoutCallback, this); + cmSystemTools::SetStderrCallback(QCMake::stderrCallback, this); this->CMakeInstance = new cmake; this->CMakeInstance->SetCMakeEditCommand( @@ -348,14 +350,28 @@ void QCMake::progressCallback(const char* msg, float percent, void* cd) QCoreApplication::processEvents(); } -void QCMake::errorCallback(const char* msg, const char* /*title*/, - bool& /*stop*/, void* cd) +void QCMake::messageCallback(const char* msg, const char* /*title*/, + bool& /*stop*/, void* cd) { QCMake* self = reinterpret_cast<QCMake*>(cd); emit self->errorMessage(QString::fromLocal8Bit(msg)); QCoreApplication::processEvents(); } +void QCMake::stdoutCallback(const char* msg, size_t len, void* cd) +{ + QCMake* self = reinterpret_cast<QCMake*>(cd); + emit self->outputMessage(QString::fromLocal8Bit(msg,int(len))); + QCoreApplication::processEvents(); +} + +void QCMake::stderrCallback(const char* msg, size_t len, void* cd) +{ + QCMake* self = reinterpret_cast<QCMake*>(cd); + emit self->outputMessage(QString::fromLocal8Bit(msg,int(len))); + QCoreApplication::processEvents(); +} + QString QCMake::binaryDirectory() const { return this->BinaryDirectory; |