From bd585f738938b7d5a4276e6fac7137377a37668c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 30 May 2018 06:43:59 -0400 Subject: [PATCH] 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. --- Source/Core/DolphinQt2/Settings/GeneralPane.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/Settings/GeneralPane.cpp b/Source/Core/DolphinQt2/Settings/GeneralPane.cpp index b3aafa9eea..44c8833e48 100644 --- a/Source/Core/DolphinQt2/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt2/Settings/GeneralPane.cpp @@ -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); }