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>
This commit is contained in:
parent
963931550d
commit
3dfdc9b97a
@ -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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user