mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 07:11:52 +08:00
MessageCallback: Remove unused bool& argument
This commit is contained in:
@@ -118,7 +118,7 @@ public:
|
||||
: CM(cm)
|
||||
{
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[&s](const char* msg, const char* /*unused*/, bool& /*unused*/) {
|
||||
[&s](const char* msg, const char* /*unused*/) {
|
||||
s += msg;
|
||||
s += "\n";
|
||||
});
|
||||
|
@@ -150,7 +150,7 @@ int main(int argc, char const* const* argv)
|
||||
}
|
||||
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[myform](const char* message, const char* title, bool& /*unused*/) {
|
||||
[myform](const char* message, const char* title) {
|
||||
myform->AddError(message, title);
|
||||
});
|
||||
|
||||
|
@@ -25,8 +25,8 @@ QCMake::QCMake(QObject* p)
|
||||
cmSystemTools::SetRunCommandHideConsole(true);
|
||||
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[this](const char* msg, const char* title, bool& cancel) {
|
||||
this->messageCallback(msg, title, cancel);
|
||||
[this](const char* msg, const char* title) {
|
||||
this->messageCallback(msg, title);
|
||||
});
|
||||
cmSystemTools::SetStdoutCallback(
|
||||
[this](const char* msg, size_t len) { this->stdoutCallback(msg, len); });
|
||||
@@ -359,8 +359,7 @@ void QCMake::progressCallback(const char* msg, float percent)
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
void QCMake::messageCallback(const char* msg, const char* /*title*/,
|
||||
bool& /*stop*/)
|
||||
void QCMake::messageCallback(const char* msg, const char* /*title*/)
|
||||
{
|
||||
emit this->errorMessage(QString::fromLocal8Bit(msg));
|
||||
QCoreApplication::processEvents();
|
||||
|
@@ -169,7 +169,7 @@ protected:
|
||||
|
||||
bool interruptCallback();
|
||||
void progressCallback(const char* msg, float percent);
|
||||
void messageCallback(const char* msg, const char* title, bool&);
|
||||
void messageCallback(const char* msg, const char* title);
|
||||
void stdoutCallback(const char* msg, size_t len);
|
||||
void stderrCallback(const char* msg, size_t len);
|
||||
|
||||
|
@@ -97,8 +97,8 @@ void cmServer::ProcessRequest(cmConnection* connection,
|
||||
}
|
||||
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[&request](const char* msg, const char* title, bool& cancel) {
|
||||
reportMessage(msg, title, cancel, request);
|
||||
[&request](const char* msg, const char* title) {
|
||||
reportMessage(msg, title, request);
|
||||
});
|
||||
|
||||
if (this->Protocol) {
|
||||
@@ -166,7 +166,7 @@ void cmServer::reportProgress(const char* msg, float progress,
|
||||
}
|
||||
|
||||
void cmServer::reportMessage(const char* msg, const char* title,
|
||||
bool& /*cancel*/, const cmServerRequest& request)
|
||||
const cmServerRequest& request)
|
||||
{
|
||||
assert(msg);
|
||||
std::string titleString;
|
||||
|
@@ -120,7 +120,7 @@ public:
|
||||
private:
|
||||
static void reportProgress(const char* msg, float progress,
|
||||
const cmServerRequest& request);
|
||||
static void reportMessage(const char* msg, const char* title, bool& cancel,
|
||||
static void reportMessage(const char* msg, const char* title,
|
||||
const cmServerRequest& request);
|
||||
|
||||
// Handle requests:
|
||||
|
@@ -329,7 +329,7 @@ void cmSystemTools::Message(const char* m1, const char* title)
|
||||
return;
|
||||
}
|
||||
if (s_MessageCallback) {
|
||||
s_MessageCallback(m1, title, s_DisableMessages);
|
||||
s_MessageCallback(m1, title);
|
||||
return;
|
||||
}
|
||||
std::cerr << m1 << std::endl << std::flush;
|
||||
|
@@ -56,12 +56,11 @@ public:
|
||||
*/
|
||||
static std::string TrimWhitespace(const std::string& s);
|
||||
|
||||
using MessageCallback = std::function<void(const char*, const char*, bool&)>;
|
||||
using MessageCallback = std::function<void(const char*, const char*)>;
|
||||
/**
|
||||
* Set the function used by GUIs to display error messages
|
||||
* Function gets passed: message as a const char*,
|
||||
* title as a const char*, and a reference to bool that when
|
||||
* set to false, will disable further messages (cancel).
|
||||
* title as a const char*.
|
||||
*/
|
||||
static void SetMessageCallback(MessageCallback f);
|
||||
|
||||
|
@@ -143,7 +143,7 @@ static std::string cmakemainGetStack(cmake* cm)
|
||||
}
|
||||
|
||||
static void cmakemainMessageCallback(const char* m, const char* /*unused*/,
|
||||
bool& /*unused*/, cmake* cm)
|
||||
cmake* cm)
|
||||
{
|
||||
std::cerr << m << cmakemainGetStack(cm) << std::endl << std::flush;
|
||||
}
|
||||
@@ -319,10 +319,9 @@ int do_cmake(int ac, char const* const* av)
|
||||
cmake cm(role, mode);
|
||||
cm.SetHomeDirectory("");
|
||||
cm.SetHomeOutputDirectory("");
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[&cm](const char* msg, const char* title, bool& cancel) {
|
||||
cmakemainMessageCallback(msg, title, cancel, &cm);
|
||||
});
|
||||
cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) {
|
||||
cmakemainMessageCallback(msg, title, &cm);
|
||||
});
|
||||
cm.SetProgressCallback([&cm](const char* msg, float prog) {
|
||||
cmakemainProgressCallback(msg, prog, &cm);
|
||||
});
|
||||
@@ -500,10 +499,9 @@ static int do_build(int ac, char const* const* av)
|
||||
}
|
||||
|
||||
cmake cm(cmake::RoleInternal, cmState::Unknown);
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[&cm](const char* msg, const char* title, bool& cancel) {
|
||||
cmakemainMessageCallback(msg, title, cancel, &cm);
|
||||
});
|
||||
cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) {
|
||||
cmakemainMessageCallback(msg, title, &cm);
|
||||
});
|
||||
cm.SetProgressCallback([&cm](const char* msg, float prog) {
|
||||
cmakemainProgressCallback(msg, prog, &cm);
|
||||
});
|
||||
@@ -543,10 +541,9 @@ static int do_open(int ac, char const* const* av)
|
||||
}
|
||||
|
||||
cmake cm(cmake::RoleInternal, cmState::Unknown);
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[&cm](const char* msg, const char* title, bool& cancel) {
|
||||
cmakemainMessageCallback(msg, title, cancel, &cm);
|
||||
});
|
||||
cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) {
|
||||
cmakemainMessageCallback(msg, title, &cm);
|
||||
});
|
||||
cm.SetProgressCallback([&cm](const char* msg, float prog) {
|
||||
cmakemainProgressCallback(msg, prog, &cm);
|
||||
});
|
||||
|
Reference in New Issue
Block a user