Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2361a30e
Commit
2361a30e
authored
Jul 08, 2014
by
Bryant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MessageHandler function prototype changed for Qt5.
parent
42a4ef8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.cc
src/main.cc
+3
-3
No files found.
src/main.cc
View file @
2361a30e
...
@@ -52,10 +52,10 @@ This file is part of the QGROUNDCONTROL project
...
@@ -52,10 +52,10 @@ This file is part of the QGROUNDCONTROL project
/// @brief Message handler which is installed using qInstallMsgHandler so you do not need
/// @brief Message handler which is installed using qInstallMsgHandler so you do not need
/// the MSFT debug tools installed to see qDebug(), qWarning(), qCritical and qAbort
/// the MSFT debug tools installed to see qDebug(), qWarning(), qCritical and qAbort
void
msgHandler
(
QtMsgType
type
,
const
char
*
msg
)
void
msgHandler
(
QtMsgType
type
,
const
QMessageLogContext
&
context
,
const
QString
&
msg
)
{
{
const
char
symbols
[]
=
{
'I'
,
'E'
,
'!'
,
'X'
};
const
char
symbols
[]
=
{
'I'
,
'E'
,
'!'
,
'X'
};
QString
output
=
QString
(
"[%1]
%2"
).
arg
(
symbols
[
type
]
).
arg
(
msg
);
QString
output
=
QString
(
"[%1]
in %2:%3 -
\"
%2
\"
"
).
arg
(
symbols
[
type
]).
arg
(
context
.
file
).
arg
(
context
.
line
).
arg
(
msg
);
std
::
cerr
<<
output
.
toStdString
()
<<
std
::
endl
;
std
::
cerr
<<
output
.
toStdString
()
<<
std
::
endl
;
if
(
type
==
QtFatalMsg
)
abort
();
if
(
type
==
QtFatalMsg
)
abort
();
}
}
...
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
...
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
// install the message handler
// install the message handler
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
qInstallMessageHandler
(
msgHandler
);
qInstallMessageHandler
(
msgHandler
);
#endif
#endif
// The following calls to qRegisterMetaType are done to silence debug output which warns
// The following calls to qRegisterMetaType are done to silence debug output which warns
...
...
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