summaryrefslogtreecommitdiffstats
path: root/examples/embedded
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-23 11:29:55 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-02-12 19:40:09 +0000
commitf2e3fdc803b9842b6ba4aefe7becdd42eafc4d38 (patch)
tree02d3c5e43602c6c3c729614fe3655ec9a8b5b8c1 /examples/embedded
parent05c38a9111320da311e5993faf12ce8e1f1713e8 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'examples/embedded')
-rw-r--r--examples/embedded/flickable/main.cpp5
1 files changed, 2 insertions, 3 deletions
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(' ');