From 3dfdc9b97ab68da273e7c515d2ac2ad90cf24da4 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 17 Mar 2020 13:53:43 +0100 Subject: [PATCH] Convert the qlocale2cpp's last few %-formats to modern format() style I've taken care of all the others in the course of other changes already ... Task-number: QTBUG-81344 Change-Id: I44e40a0d1c9f1e1a540a5f4cd252369fdc9b2698 Reviewed-by: Cristian Maureira-Fredes --- util/locale_database/qlocalexml2cpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/locale_database/qlocalexml2cpp.py b/util/locale_database/qlocalexml2cpp.py index 1938be19ea..7003619ba0 100755 --- a/util/locale_database/qlocalexml2cpp.py +++ b/util/locale_database/qlocalexml2cpp.py @@ -78,11 +78,11 @@ def compareLocaleKeys(key1, key2): class StringDataToken: def __init__(self, index, length): if index > 0xFFFF or length > 0xFFFF: - raise Error("Position exceeds ushort range: %d,%d " % (index, length)) + raise Error("Position exceeds ushort range: {},{}".format(index, length)) self.index = index self.length = length def __str__(self): - return " %d,%d " % (self.index, self.length) + return " {},{} ".format(self.index, self.length) class StringData: def __init__(self, name): @@ -112,7 +112,7 @@ class StringData: return token def write(self, fd): - fd.write("\nstatic const ushort %s[] = {\n" % self.name) + fd.write("\nstatic const ushort {}[] = {{\n".format(self.name)) fd.write(wrap_list(self.data)) fd.write("\n};\n")