Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ruslan Baratov
CMake
Commits
8c92db82
Commit
8c92db82
authored
Jan 29, 2019
by
wahikihiki
Browse files
MessageCallback: Remove unused bool& argument
parent
bcee24ae
Changes
9
Hide whitespace changes
Inline
Side-by-side
Source/CTest/cmCTestBuildAndTestHandler.cxx
View file @
8c92db82
...
...
@@ -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
"
;
});
...
...
Source/CursesDialog/ccmake.cxx
View file @
8c92db82
...
...
@@ -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
);
});
...
...
Source/QtDialog/QCMake.cxx
View file @
8c92db82
...
...
@@ -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
();
...
...
Source/QtDialog/QCMake.h
View file @
8c92db82
...
...
@@ -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
);
...
...
Source/cmServer.cxx
View file @
8c92db82
...
...
@@ -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
;
...
...
Source/cmServer.h
View file @
8c92db82
...
...
@@ -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:
...
...
Source/cmSystemTools.cxx
View file @
8c92db82
...
...
@@ -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
;
...
...
Source/cmSystemTools.h
View file @
8c92db82
...
...
@@ -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
);
...
...
Source/cmakemain.cxx
View file @
8c92db82
...
...
@@ -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
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment