forked from qt-creator/qt-creator
CPlusPlus: Avoid a few deprecation warnings
The alternatives have been around since 2012. Change-Id: I0aa15d59efe8a547e2ad622ffda689746960d48c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -83,11 +83,10 @@ class tst_c99: public QObject
|
||||
|
||||
static const char *const pretty[] = {"warning", "error", "fatal"};
|
||||
|
||||
QString str;
|
||||
str.sprintf("%s:%d:%d: %s: ", fileName->chars(), line, column, pretty[level]);
|
||||
QString str = QString::asprintf("%s:%d:%d: %s: ", fileName->chars(), line, column, pretty[level]);
|
||||
errors->append(str.toUtf8());
|
||||
|
||||
str.vsprintf(format, ap);
|
||||
str += QString::vasprintf(format, ap);
|
||||
errors->append(str.toUtf8());
|
||||
|
||||
errors->append('\n');
|
||||
|
||||
Reference in New Issue
Block a user