diff options
author | Edward Welbourne <eddy@chaos.org.uk> | 2020-03-17 13:53:43 +0100 |
---|---|---|
committer | Edward Welbourne <eddy@chaos.org.uk> | 2020-04-02 19:43:50 +0100 |
commit | 3dfdc9b97ab68da273e7c515d2ac2ad90cf24da4 (patch) | |
tree | c9fecba7f03309adc8d2df839b564ceab716f1cc /util/locale_database/qlocalexml2cpp.py | |
parent | 963931550d42d08a4cb734b8c0a82becf7b0a91c (diff) |
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 <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'util/locale_database/qlocalexml2cpp.py')
-rwxr-xr-x | util/locale_database/qlocalexml2cpp.py | 6 |
1 files 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") |