Qt: Fix deprecation warnings

This commit is contained in:
Vicki Pfau 2022-05-11 23:52:11 -07:00
parent a1ea2066f7
commit 8410ea8b5f
2 changed files with 3 additions and 3 deletions

View File

@ -194,11 +194,11 @@ CoreController::CoreController(mCore* core, QObject* parent)
}
va_list argc;
va_copy(argc, args);
message = QString().vsprintf(format, argc);
message = QString::vasprintf(format, argc);
va_end(argc);
QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message));
}
message = QString().vsprintf(format, args);
message = QString::vasprintf(format, args);
QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
if (level == mLOG_FATAL) {
mCoreThreadMarkCrashed(controller->thread());

View File

@ -69,7 +69,7 @@ void DebuggerConsoleController::printf(struct CLIDebuggerBackend* be, const char
DebuggerConsoleController* self = consoleBe->self;
va_list args;
va_start(args, fmt);
self->log(QString().vsprintf(fmt, args));
self->log(QString::vasprintf(fmt, args));
va_end(args);
}