summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-06 20:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-07 18:41:27 (GMT)
commit82edd98300b9d050dd28fdfa1e6ea7b18ecca22c (patch)
treea0bd32bc16a5793f9729cfb82872e4df8f47ad78 /Source/QtDialog
parent062cfd991faac000d484c74e5af7d65726c655dc (diff)
downloadCMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.zip
CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.gz
CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.bz2
cmSystemTools: MessageCallback and Message() accept std::string argument
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/QCMake.cxx6
-rw-r--r--Source/QtDialog/QCMake.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index a073c30..6442d05 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -25,7 +25,7 @@ QCMake::QCMake(QObject* p)
cmSystemTools::SetRunCommandHideConsole(true);
cmSystemTools::SetMessageCallback(
- [this](const char* msg, const char* title) {
+ [this](std::string const& msg, const char* title) {
this->messageCallback(msg, title);
});
cmSystemTools::SetStdoutCallback(
@@ -359,9 +359,9 @@ void QCMake::progressCallback(const char* msg, float percent)
QCoreApplication::processEvents();
}
-void QCMake::messageCallback(const char* msg, const char* /*title*/)
+void QCMake::messageCallback(std::string const& msg, const char* /*title*/)
{
- emit this->errorMessage(QString::fromLocal8Bit(msg));
+ emit this->errorMessage(QString::fromStdString(msg));
QCoreApplication::processEvents();
}
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index ef4d2a1..8492606 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -169,7 +169,7 @@ protected:
bool interruptCallback();
void progressCallback(const char* msg, float percent);
- void messageCallback(const char* msg, const char* title);
+ void messageCallback(std::string const& msg, const char* title);
void stdoutCallback(std::string const& msg);
void stderrCallback(std::string const& msg);