mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 06:35:41 +08:00
Use signed integer format for line number in xbus logging handler
This commit is contained in:
@@ -40,20 +40,20 @@ class QXPlaneMessageHandler
|
|||||||
char *buffer = new char[64 + localMsg.size() + file.size()];
|
char *buffer = new char[64 + localMsg.size() + file.size()];
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QtDebugMsg:
|
case QtDebugMsg:
|
||||||
std::sprintf(buffer, "%s:%u: Debug: %s\n", file.constData(), line, localMsg.constData());
|
std::sprintf(buffer, "%s:%d: Debug: %s\n", file.constData(), line, localMsg.constData());
|
||||||
XPLMDebugString(buffer);
|
XPLMDebugString(buffer);
|
||||||
break;
|
break;
|
||||||
case QtWarningMsg:
|
case QtWarningMsg:
|
||||||
std::sprintf(buffer, "%s:%u: Warning: %s\n", file.constData(), line, localMsg.constData());
|
std::sprintf(buffer, "%s:%d: Warning: %s\n", file.constData(), line, localMsg.constData());
|
||||||
XPLMDebugString(buffer);
|
XPLMDebugString(buffer);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case QtCriticalMsg:
|
case QtCriticalMsg:
|
||||||
std::sprintf(buffer, "%s:%u: Error: %s\n", file.constData(), line, localMsg.constData());
|
std::sprintf(buffer, "%s:%d: Error: %s\n", file.constData(), line, localMsg.constData());
|
||||||
XPLMDebugString(buffer);
|
XPLMDebugString(buffer);
|
||||||
break;
|
break;
|
||||||
case QtFatalMsg:
|
case QtFatalMsg:
|
||||||
std::sprintf(buffer, "%s:%u: Fatal: %s\n", file.constData(), line, localMsg.constData());
|
std::sprintf(buffer, "%s:%d: Fatal: %s\n", file.constData(), line, localMsg.constData());
|
||||||
XPLMDebugString(buffer);
|
XPLMDebugString(buffer);
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user