summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx4
-rw-r--r--Source/CursesDialog/ccmake.cxx5
-rw-r--r--Source/QtDialog/QCMake.cxx6
-rw-r--r--Source/QtDialog/QCMake.h4
-rw-r--r--Source/cmSystemTools.cxx17
-rw-r--r--Source/cmSystemTools.h8
-rw-r--r--Source/cmakemain.cxx6
7 files changed, 25 insertions, 25 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 9a6b40e..6756dbf 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -169,7 +169,7 @@ class cmCTestBuildAndTestCaptureRAII
public:
cmCTestBuildAndTestCaptureRAII(cmake& cm, std::string& s): CM(cm)
{
- cmSystemTools::SetErrorCallback(CMakeMessageCallback, &s);
+ cmSystemTools::SetMessageCallback(CMakeMessageCallback, &s);
cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &s);
this->CM.SetProgressCallback(CMakeProgressCallback, &s);
}
@@ -177,7 +177,7 @@ public:
{
this->CM.SetProgressCallback(0, 0);
cmSystemTools::SetStdoutCallback(0, 0);
- cmSystemTools::SetErrorCallback(0, 0);
+ cmSystemTools::SetMessageCallback(0, 0);
}
};
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 2d1ef5c..d70bedb 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -73,7 +73,8 @@ void onsig(int)
}
-void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData)
+void CMakeMessageHandler(const char* message, const char* title, bool&,
+ void* clientData)
{
cmCursesForm* self = static_cast<cmCursesForm*>( clientData );
self->AddError(message, title);
@@ -171,7 +172,7 @@ int main(int argc, char const* const* argv)
return 1;
}
- cmSystemTools::SetErrorCallback(CMakeErrorHandler, myform);
+ cmSystemTools::SetMessageCallback(CMakeMessageHandler, myform);
cmCursesForm::CurrentForm = myform;
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 5f9ebaf..f2a23bb 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -35,7 +35,7 @@ QCMake::QCMake(QObject* p)
cmSystemTools::DisableRunCommandOutput();
cmSystemTools::SetRunCommandHideConsole(true);
- cmSystemTools::SetErrorCallback(QCMake::errorCallback, this);
+ cmSystemTools::SetMessageCallback(QCMake::messageCallback, this);
this->CMakeInstance = new cmake;
this->CMakeInstance->SetCMakeEditCommand(
@@ -348,8 +348,8 @@ 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));
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index 93ac8ab..8e71ea5 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -136,8 +136,8 @@ protected:
static bool interruptCallback(void*);
static void progressCallback(const char* msg, float percent, void* cd);
- static void errorCallback(const char* msg, const char* title,
- bool&, void* cd);
+ static void messageCallback(const char* msg, const char* title,
+ bool&, void* cd);
bool SuppressDevWarnings;
bool WarnUninitializedMode;
bool WarnUnusedMode;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index c38a99c..f61d75d 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -121,10 +121,9 @@ bool cmSystemTools::s_FatalErrorOccured = false;
bool cmSystemTools::s_DisableMessages = false;
bool cmSystemTools::s_ForceUnixPaths = false;
-void (*cmSystemTools::s_ErrorCallback)(const char*, const char*,
- bool&, void*);
+cmSystemTools::MessageCallback cmSystemTools::s_MessageCallback;
void (*cmSystemTools::s_StdoutCallback)(const char*, int len, void*);
-void* cmSystemTools::s_ErrorCallbackClientData = 0;
+void* cmSystemTools::s_MessageCallbackClientData;
void* cmSystemTools::s_StdoutCallbackClientData = 0;
bool (*cmSystemTools::s_InterruptCallback)(void*);
void* cmSystemTools::s_InterruptCallbackClientData = 0;
@@ -254,10 +253,10 @@ bool cmSystemTools::GetInterruptFlag()
return false;
}
-void cmSystemTools::SetErrorCallback(ErrorCallback f, void* clientData)
+void cmSystemTools::SetMessageCallback(MessageCallback f, void* clientData)
{
- s_ErrorCallback = f;
- s_ErrorCallbackClientData = clientData;
+ s_MessageCallback = f;
+ s_MessageCallbackClientData = clientData;
}
void cmSystemTools::SetStdoutCallback(StdoutCallback f, void* clientData)
@@ -305,10 +304,10 @@ void cmSystemTools::Message(const char* m1, const char *title)
{
return;
}
- if(s_ErrorCallback)
+ if(s_MessageCallback)
{
- (*s_ErrorCallback)(m1, title, s_DisableMessages,
- s_ErrorCallbackClientData);
+ (*s_MessageCallback)(m1, title, s_DisableMessages,
+ s_MessageCallbackClientData);
return;
}
else
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 27b4bce..979551c 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -57,14 +57,14 @@ public:
*/
static std::string TrimWhitespace(const std::string& s);
- typedef void (*ErrorCallback)(const char*, const char*, bool&, void*);
+ typedef void (*MessageCallback)(const char*, const char*, bool&, void*);
/**
* 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 furthur messages (cancel).
*/
- static void SetErrorCallback(ErrorCallback f, void* clientData=0);
+ static void SetMessageCallback(MessageCallback f, void* clientData=0);
/**
* Display an error message.
@@ -470,10 +470,10 @@ private:
static bool s_FatalErrorOccured;
static bool s_DisableMessages;
static bool s_DisableRunCommandOutput;
- static ErrorCallback s_ErrorCallback;
+ static MessageCallback s_MessageCallback;
static StdoutCallback s_StdoutCallback;
static InterruptCallback s_InterruptCallback;
- static void* s_ErrorCallbackClientData;
+ static void* s_MessageCallbackClientData;
static void* s_StdoutCallbackClientData;
static void* s_InterruptCallbackClientData;
};
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index fcaa127..77f1e4e 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -129,8 +129,8 @@ static std::string cmakemainGetStack(void *clientdata)
return msg;
}
-static void cmakemainErrorCallback(const char* m, const char*, bool&,
- void *clientdata)
+static void cmakemainMessageCallback(const char* m, const char*, bool&,
+ void *clientdata)
{
std::cerr << m << cmakemainGetStack(clientdata) << std::endl << std::flush;
}
@@ -310,7 +310,7 @@ int do_cmake(int ac, char const* const* av)
return ret;
}
cmake cm;
- cmSystemTools::SetErrorCallback(cmakemainErrorCallback, (void *)&cm);
+ cmSystemTools::SetMessageCallback(cmakemainMessageCallback, (void *)&cm);
cm.SetProgressCallback(cmakemainProgressCallback, (void *)&cm);
cm.SetWorkingMode(workingMode);