diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-11 15:30:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-11 15:32:43 (GMT) |
commit | 950c099d83757acd57cec78a3579ea1f6aaddf96 (patch) | |
tree | 87862c59076f42dc9c4be9c8c002e1fccfdb90cd /Source/QtDialog | |
parent | 8a1d25afdf92cabab88598cc9b9e5a9fb2a9493b (diff) | |
download | CMake-950c099d83757acd57cec78a3579ea1f6aaddf96.zip CMake-950c099d83757acd57cec78a3579ea1f6aaddf96.tar.gz CMake-950c099d83757acd57cec78a3579ea1f6aaddf96.tar.bz2 |
cmake: Progress functions use `std::string` param
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 8 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index c90c142..f357f90 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -37,7 +37,7 @@ QCMake::QCMake(QObject* p) this->CMakeInstance->SetCMakeEditCommand( cmSystemTools::GetCMakeGUICommand()); this->CMakeInstance->SetProgressCallback( - [this](const char* msg, float percent) { + [this](const std::string& msg, float percent) { this->progressCallback(msg, percent); }); @@ -346,12 +346,12 @@ bool QCMake::interruptCallback() #endif } -void QCMake::progressCallback(const char* msg, float percent) +void QCMake::progressCallback(const std::string& msg, float percent) { if (percent >= 0) { - emit this->progressChanged(QString::fromLocal8Bit(msg), percent); + emit this->progressChanged(QString::fromStdString(msg), percent); } else { - emit this->outputMessage(QString::fromLocal8Bit(msg)); + emit this->outputMessage(QString::fromStdString(msg)); } QCoreApplication::processEvents(); } diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 8492606..f2fd6d9 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -168,7 +168,7 @@ protected: cmake* CMakeInstance; bool interruptCallback(); - void progressCallback(const char* msg, float percent); + void progressCallback(std::string const& msg, float percent); void messageCallback(std::string const& msg, const char* title); void stdoutCallback(std::string const& msg); void stderrCallback(std::string const& msg); |