summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2012-03-31 21:14:20 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-03 19:12:27 +0200
commitab3837f86f84fc92b13ad0a79f6d41ba6252deb5 (patch)
treed8439a987beda5899cdab7253a8ecd739201fcc2 /util
parent33984e72abf6c3aa1fed37740d8731c96f68d6e2 (diff)
QLocale: Merge month name data storage to save 50KB memory
Month Names and Standalone Month Names are stored separately, but for majority of locales the names are the same and so storage is duplicated. By storing both sets of names in the same array 50KB is saved in libQtCore.so on Linux. Depends on change Ic84bbc82 in branch api_review for CLDR 1.9.1 Change-Id: I83224ebc2180ee6de69797fa50d38348acc94107 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index 89f79c984e..3cb2b982e5 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -504,7 +504,6 @@ def main():
date_format_data = StringData()
time_format_data = StringData()
months_data = StringData()
- standalone_months_data = StringData()
days_data = StringData()
am_data = StringData()
pm_data = StringData()
@@ -546,9 +545,9 @@ def main():
date_format_data.append(l.longDateFormat),
time_format_data.append(l.shortTimeFormat),
time_format_data.append(l.longTimeFormat),
- standalone_months_data.append(l.standaloneShortMonths),
- standalone_months_data.append(l.standaloneLongMonths),
- standalone_months_data.append(l.standaloneNarrowMonths),
+ months_data.append(l.standaloneShortMonths),
+ months_data.append(l.standaloneLongMonths),
+ months_data.append(l.standaloneNarrowMonths),
months_data.append(l.shortMonths),
months_data.append(l.longMonths),
months_data.append(l.narrowMonths),
@@ -612,14 +611,6 @@ def main():
data_temp_file.write("\n")
- # Standalone months data
- #check_static_char_array_length("standalone_months", standalone_months_data.data)
- data_temp_file.write("static const ushort standalone_months_data[] = {\n")
- data_temp_file.write(wrap_list(standalone_months_data.data))
- data_temp_file.write("\n};\n")
-
- data_temp_file.write("\n")
-
# Days data
#check_static_char_array_length("days", days_data.data)
data_temp_file.write("static const ushort days_data[] = {\n")