mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-13 13:22:22 +08:00
swagLogMessageHandler: replace magic number with macro (#21944)
old-commit-hash: e573985c10bd88b64617babc676bafc35c23a249
This commit is contained in:
@@ -105,12 +105,12 @@ void ClickableWidget::paintEvent(QPaintEvent *) {
|
||||
|
||||
void swagLogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
|
||||
static std::map<QtMsgType, int> levels = {
|
||||
{QtMsgType::QtDebugMsg, 10},
|
||||
{QtMsgType::QtInfoMsg, 20},
|
||||
{QtMsgType::QtWarningMsg, 30},
|
||||
{QtMsgType::QtCriticalMsg, 40},
|
||||
{QtMsgType::QtSystemMsg, 40},
|
||||
{QtMsgType::QtFatalMsg, 50},
|
||||
{QtMsgType::QtDebugMsg, CLOUDLOG_DEBUG},
|
||||
{QtMsgType::QtInfoMsg, CLOUDLOG_INFO},
|
||||
{QtMsgType::QtWarningMsg, CLOUDLOG_WARNING},
|
||||
{QtMsgType::QtCriticalMsg, CLOUDLOG_ERROR},
|
||||
{QtMsgType::QtSystemMsg, CLOUDLOG_ERROR},
|
||||
{QtMsgType::QtFatalMsg, CLOUDLOG_CRITICAL},
|
||||
};
|
||||
|
||||
std::string file, function;
|
||||
|
||||
Reference in New Issue
Block a user