From f2e3fdc803b9842b6ba4aefe7becdd42eafc4d38 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 23 Jan 2015 11:29:55 +0100 Subject: examples: migrate to QString::asprintf Not that many, if any, uses of sprintf here were idiomatic Qt, but that's for another commit. Change-Id: Ic34470d9799942f786770ba9541b29c34d67c6f8 Reviewed-by: Thiago Macieira --- examples/embedded/flickable/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/embedded') diff --git a/examples/embedded/flickable/main.cpp b/examples/embedded/flickable/main.cpp index 6d8cc779dd..15b282aaa5 100644 --- a/examples/embedded/flickable/main.cpp +++ b/examples/embedded/flickable/main.cpp @@ -79,9 +79,8 @@ public: QStringList colors = colorPairs(999); for (int i = 0; i < colors.count(); ++i) { - QString c = colors[i]; - QString str; - str.sprintf("%4d", i + 1); + const QString c = colors[i]; + const QString str = QString::asprintf("%4d", i + 1); m_colorNames << (str + " " + c); QStringList duet = c.split(' '); -- cgit v1.2.3