GeneralPane: Replace usages of obsolete QString member function sprintf

sprintf is listed as obsolete within the documentation for Qt 5. Instead,
it recommends using the asprintf member function, arg(), or QTextStream.
This commit is contained in:
Lioncash 2018-05-30 06:43:59 -04:00
commit bd585f7389

View file

@ -135,9 +135,9 @@ void GeneralPane::CreateBasic()
{
QString str;
if (i != 100)
str.sprintf("%i%%", i);
str = QStringLiteral("%1%").arg(i);
else
str.sprintf(tr("%i%% (Normal Speed)").toStdString().c_str(), i);
str = tr("%1% (Normal Speed)").arg(i);
m_combobox_speedlimit->addItem(str);
}