From a9aa206b7b8ac4e69f8c46233b4080e00e845ff5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 27 May 2019 19:13:54 +0200 Subject: Move text-related code out of corelib/tools/ to corelib/text/ This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer --- util/locale_database/cldr2qlocalexml.py | 4 ++-- util/locale_database/qlocalexml2cpp.py | 18 +++++++++--------- util/unicode/README | 2 +- util/unicode/main.cpp | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'util') diff --git a/util/locale_database/cldr2qlocalexml.py b/util/locale_database/cldr2qlocalexml.py index 5560d8b43f..1982e3ba27 100755 --- a/util/locale_database/cldr2qlocalexml.py +++ b/util/locale_database/cldr2qlocalexml.py @@ -38,11 +38,11 @@ command-line argument. Save its standard output (but not error) to a file for later processing by ``./qlocalexml2cpp.py`` When you update the CLDR data, be sure to also update -src/corelib/tools/qt_attribution.json's entry for unicode-cldr. Check +src/corelib/text/qt_attribution.json's entry for unicode-cldr. Check this script's output for unknown language, country or script messages; if any can be resolved, use their entry in common/main/en.xml to append new entries to enumdata.py's lists and update documentation in -src/corelib/tools/qlocale.qdoc, adding the new entries in alphabetic +src/corelib/text/qlocale.qdoc, adding the new entries in alphabetic order. While updating the locale data, check also for updates to MS-Win's diff --git a/util/locale_database/qlocalexml2cpp.py b/util/locale_database/qlocalexml2cpp.py index 2dad2dd57a..ea89288b4f 100755 --- a/util/locale_database/qlocalexml2cpp.py +++ b/util/locale_database/qlocalexml2cpp.py @@ -339,7 +339,7 @@ def main(): (data_temp_file, data_temp_file_path) = tempfile.mkstemp("qlocale_data_p", dir=qtsrcdir) data_temp_file = os.fdopen(data_temp_file, "w") - qlocaledata_file = open(qtsrcdir + "/src/corelib/tools/qlocale_data_p.h", "r") + qlocaledata_file = open(qtsrcdir + "/src/corelib/text/qlocale_data_p.h", "r") s = qlocaledata_file.readline() while s and s != GENERATED_BLOCK_START: data_temp_file.write(s) @@ -735,14 +735,14 @@ def main(): data_temp_file.close() qlocaledata_file.close() - os.remove(qtsrcdir + "/src/corelib/tools/qlocale_data_p.h") - os.rename(data_temp_file_path, qtsrcdir + "/src/corelib/tools/qlocale_data_p.h") + os.remove(qtsrcdir + "/src/corelib/text/qlocale_data_p.h") + os.rename(data_temp_file_path, qtsrcdir + "/src/corelib/text/qlocale_data_p.h") # qlocale.h (qlocaleh_temp_file, qlocaleh_temp_file_path) = tempfile.mkstemp("qlocale.h", dir=qtsrcdir) qlocaleh_temp_file = os.fdopen(qlocaleh_temp_file, "w") - qlocaleh_file = open(qtsrcdir + "/src/corelib/tools/qlocale.h", "r") + qlocaleh_file = open(qtsrcdir + "/src/corelib/text/qlocale.h", "r") s = qlocaleh_file.readline() while s and s != GENERATED_BLOCK_START: qlocaleh_temp_file.write(s) @@ -808,14 +808,14 @@ def main(): qlocaleh_temp_file.close() qlocaleh_file.close() - os.remove(qtsrcdir + "/src/corelib/tools/qlocale.h") - os.rename(qlocaleh_temp_file_path, qtsrcdir + "/src/corelib/tools/qlocale.h") + os.remove(qtsrcdir + "/src/corelib/text/qlocale.h") + os.rename(qlocaleh_temp_file_path, qtsrcdir + "/src/corelib/text/qlocale.h") # qlocale.qdoc (qlocaleqdoc_temp_file, qlocaleqdoc_temp_file_path) = tempfile.mkstemp("qlocale.qdoc", dir=qtsrcdir) qlocaleqdoc_temp_file = os.fdopen(qlocaleqdoc_temp_file, "w") - qlocaleqdoc_file = open(qtsrcdir + "/src/corelib/tools/qlocale.qdoc", "r") + qlocaleqdoc_file = open(qtsrcdir + "/src/corelib/text/qlocale.qdoc", "r") s = qlocaleqdoc_file.readline() DOCSTRING = " QLocale's data is based on Common Locale Data Repository " while s: @@ -827,8 +827,8 @@ def main(): qlocaleqdoc_temp_file.close() qlocaleqdoc_file.close() - os.remove(qtsrcdir + "/src/corelib/tools/qlocale.qdoc") - os.rename(qlocaleqdoc_temp_file_path, qtsrcdir + "/src/corelib/tools/qlocale.qdoc") + os.remove(qtsrcdir + "/src/corelib/text/qlocale.qdoc") + os.rename(qlocaleqdoc_temp_file_path, qtsrcdir + "/src/corelib/text/qlocale.qdoc") if __name__ == "__main__": main() diff --git a/util/unicode/README b/util/unicode/README index e52f26175a..87f055d42d 100644 --- a/util/unicode/README +++ b/util/unicode/README @@ -19,7 +19,7 @@ To update: need to be expanded, for example. In some cases QChar may need additions to some of its enums. * Build with the modified code, fix any compilation issues. -* That may have updated qtbase/src/corelib/tools/qunicodetables.cpp; +* That may have updated qtbase/src/corelib/text/qunicodetables.cpp; if so the update matters; be sure to commit the changes to data/ at the same time and update tools/qt_attribution.json to match; use the UCD Revision number, rather than the Unicode standard number, as the diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index ec84667ee5..84231c6277 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -3096,7 +3096,7 @@ int main(int, char **) "// We mean it.\n" "//\n\n"; - QFile f("../../src/corelib/tools/qunicodetables.cpp"); + QFile f("../../src/corelib/text/qunicodetables.cpp"); f.open(QFile::WriteOnly|QFile::Truncate); f.write(header); f.write(note); @@ -3116,7 +3116,7 @@ int main(int, char **) f.write("QT_END_NAMESPACE\n"); f.close(); - f.setFileName("../../src/corelib/tools/qunicodetables_p.h"); + f.setFileName("../../src/corelib/text/qunicodetables_p.h"); f.open(QFile::WriteOnly | QFile::Truncate); f.write(header); f.write(note); -- cgit v1.2.3