summaryrefslogtreecommitdiffstats
path: root/src/kmap2qmap
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-03-15 08:50:25 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-15 08:32:32 +0000
commit62e4e2021bc1e68ae9bd2e9b49556282cfe816b9 (patch)
treec375f200c8eb526fe79509e6c2caa84804c87ddb /src/kmap2qmap
parent14793483aab76f1ac559d83cd0846ffee54fddc5 (diff)
Replace deprecated QString::sprintf
QString::sprintf got deprecated in qtbase commit f8f592d5c22c378ac94. Use QString::asprintf instead. Fixes: QTBUG-74449 Change-Id: I1a635551be4f021e5da1145c03b4d0aaf4ebda8c Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/kmap2qmap')
-rw-r--r--src/kmap2qmap/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/kmap2qmap/main.cpp b/src/kmap2qmap/main.cpp
index 84125497e..b03df4aff 100644
--- a/src/kmap2qmap/main.cpp
+++ b/src/kmap2qmap/main.cpp
@@ -503,9 +503,7 @@ bool KeymapParser::generateHeader(QFile *f)
for (int i = 0; i < m_keymap.size(); ++i) {
const QEvdevKeyboardMap::Mapping &m = m_keymap.at(i);
- QString s;
- s.sprintf(" { %3d, 0x%04x, 0x%08x, 0x%02x, 0x%02x, 0x%04x },\n", m.keycode, m.unicode, m.qtcode, m.modifiers, m.flags, m.special);
- ts << s;
+ ts << QString::asprintf(" { %3d, 0x%04x, 0x%08x, 0x%02x, 0x%02x, 0x%04x },\n", m.keycode, m.unicode, m.qtcode, m.modifiers, m.flags, m.special);
}
ts << "};" << endl << endl;
@@ -514,9 +512,7 @@ bool KeymapParser::generateHeader(QFile *f)
for (int i = 0; i < m_keycompose.size(); ++i) {
const QEvdevKeyboardMap::Composing &c = m_keycompose.at(i);
- QString s;
- s.sprintf(" { 0x%04x, 0x%04x, 0x%04x },\n", c.first, c.second, c.result);
- ts << s;
+ ts << QString::asprintf(" { 0x%04x, 0x%04x, 0x%04x },\n", c.first, c.second, c.result);
}
ts << "};" << endl << endl;