Merge remote-tracking branch 'origin/5.14' into 5.15

Change-Id: I065e212f0dc115efa1ffcb14cf9f679259da6b79
This commit is contained in:
Qt Forward Merge Bot 2019-09-05 08:58:24 +02:00
commit f3a1048b61
306 changed files with 17028 additions and 10947 deletions

View File

@ -228,6 +228,7 @@ sub classNames {
$line .= ";" if($line =~ m/^Q_[A-Z_0-9]*\(.*\)[\r\n]*$/); #qt macro
$line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
$line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE(_[A-Z]+)*[\r\n]*$/); #qt macro
$line .= ";" if($line =~ m/^QT_DEPRECATED_X\(.*\)[\r\n]*$/); #qt macro
$line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
$line .= ";" if($line =~ m/^QT_WARNING_(PUSH|POP|DISABLE_\w+\(.*\))[\r\n]*$/); # qt macros
$$requires = $1 if ($line =~ m/^QT_REQUIRE_CONFIG\((.*)\);[\r\n]*$/);

View File

@ -203,9 +203,8 @@ Build environment:
-android-ndk-platform Set Android platform
-android-ndk-host .... Set Android NDK host (linux-x86, linux-x86_64, etc.)
[$ANDROID_NDK_HOST]
-android-arch ........ Set Android architecture (armeabi, armeabi-v7a,
arm64-v8a, x86, x86_64)
-android-toolchain-version ... Set Android toolchain version
-android-abis ....... Comma separated Android abis, default is:
armeabi-v7a,arm64-v8a,x86,x86_64
-android-style-assets Automatically extract style assets from the device at
run time. This option makes the Android style behave
correctly, but also makes the Android platform plugin
@ -282,6 +281,7 @@ Gui, printing, widget options:
es2 (default on Windows), desktop (default on Unix),
dynamic (Windows only)
-opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto]
-egl ................. Enable EGL support [auto]
-angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto]
(Windows only)
-combined-angle-lib .. Merge LibEGL and LibGLESv2 into LibANGLE (Windows only)

View File

@ -51,11 +51,11 @@
"translationdir": "string",
"android-arch": "string",
"android-abis": "string",
"android-ndk": "string",
"android-ndk-host": "string",
"android-ndk-platform": "string",
"android-sdk": "string",
"android-toolchain-version": "string",
"android-style-assets": "boolean",
"appstore-compliant": "boolean",

View File

@ -573,14 +573,7 @@ defineTest(qtConfOutput_prepareOptions) {
qtConfFatalError("Cannot find Android NDK." \
"Please use -android-ndk option to specify one.")
ndk_tc_ver = $$eval(config.input.android-toolchain-version)
isEmpty(ndk_tc_ver): \
ndk_tc_ver = 4.9
!exists($$ndk_root/toolchains/arm-linux-androideabi-$$ndk_tc_ver/prebuilt/*): \
qtConfFatalError("Cannot detect Android NDK toolchain." \
"Please use -android-toolchain-version to specify it.")
ndk_tc_pfx = $$ndk_root/toolchains/arm-linux-androideabi-$$ndk_tc_ver/prebuilt
ndk_tc_pfx = $$ndk_root/toolchains/llvm/prebuilt
ndk_host = $$eval(config.input.android-ndk-host)
isEmpty(ndk_host): \
ndk_host = $$getenv(ANDROID_NDK_HOST)
@ -618,10 +611,11 @@ defineTest(qtConfOutput_prepareOptions) {
qtConfFatalError("Specified Android NDK host is invalid.")
}
target_arch = $$eval(config.input.android-arch)
isEmpty(target_arch): \
target_arch = armeabi-v7a
android_abis = $$eval(config.input.android-abis)
isEmpty(android_abis): \
android_abis = $$eval(config.input.android-arch)
isEmpty(android_abis): \
android_abis = armeabi-v7a,arm64-v8a,x86,x86_64
platform = $$eval(config.input.android-ndk-platform)
isEmpty(platform): \
platform = android-21
@ -631,8 +625,7 @@ defineTest(qtConfOutput_prepareOptions) {
"DEFAULT_ANDROID_NDK_ROOT = $$val_escape(ndk_root)" \
"DEFAULT_ANDROID_PLATFORM = $$platform" \
"DEFAULT_ANDROID_NDK_HOST = $$ndk_host" \
"DEFAULT_ANDROID_TARGET_ARCH = $$target_arch" \
"DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = $$ndk_tc_ver"
"DEFAULT_ANDROID_ABIS = $$split(android_abis, ',')"
}
export($${currentConfig}.output.devicePro)
@ -850,9 +843,6 @@ defineTest(qtConfOutput_preparePaths) {
addConfStr($$[QMAKE_SPEC])
$${currentConfig}.output.qconfigSource = \
"/* Installation date */" \
"static const char qt_configure_installation [12+11] = \"qt_instdate=2012-12-20\";" \
"" \
"/* Installation Info */" \
"static const char qt_configure_prefix_path_str [12+256] = \"qt_prfxpath=$$config.input.prefix\";" \
"$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -128,10 +128,6 @@ void ColorEdit::mousePressEvent(QMouseEvent *event)
QColor color(m_color);
QColorDialog dialog(color, 0);
dialog.setOption(QColorDialog::ShowAlphaChannel, true);
// The ifdef block is a workaround for the beta, TODO: remove when bug 238525 is fixed
#if 0 // Used to be included in Qt4 for Q_WS_MAC
dialog.setOption(QColorDialog::DontUseNativeDialog, true);
#endif
dialog.move(280, 120);
if (dialog.exec() == QDialog::Rejected)
return;

View File

@ -79,7 +79,7 @@ int main(int argc, char *argv[])
if (parser.isSet(dontUseCustomDirectoryIconsOption))
model.setOption(QFileSystemModel::DontUseCustomDirectoryIcons);
if (parser.isSet(dontWatchOption))
model.setOption(QFileSystemModel::DontWatch);
model.setOption(QFileSystemModel::DontWatchForChanges);
QTreeView tree;
tree.setModel(&model);
if (!rootPath.isEmpty()) {

View File

@ -53,12 +53,6 @@
#include "languagechooser.h"
#include "mainwindow.h"
#if 0 // Used to be included in Qt4 for Q_WS_MAC
QT_BEGIN_NAMESPACE
extern void qt_mac_set_menubar_merge(bool merge);
QT_END_NAMESPACE
#endif
LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent)
: QDialog(parent, Qt::WindowStaysOnTopHint)
{
@ -95,10 +89,6 @@ LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent)
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
#if 0 // Used to be included in Qt4 for Q_WS_MAC
qt_mac_set_menubar_merge(false);
#endif
setWindowTitle("I18N");
}

View File

@ -37,7 +37,9 @@ isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) {
}
}
ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86
ALL_ANDROID_ABIS = $$(ALL_ANDROID_ABIS)
isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = $$DEFAULT_ANDROID_ABIS
isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86
CONFIG += $$ANDROID_PLATFORM
@ -48,10 +50,14 @@ QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
QMAKE_LINK = $$QMAKE_CXX
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
QMAKE_AR = $$NDK_LLVM_PATH/bin/llvm-ar cqs
QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
QMAKE_NM = $$NDK_LLVM_PATH/bin/llvm-nm -P
QMAKE_CFLAGS_OPTIMIZE = -Oz
QMAKE_CFLAGS_OPTIMIZE_FULL = -Oz

View File

@ -4,17 +4,22 @@ APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk)
apk_install_target.depends = first
apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$OUT_PWD/android-build install
apk.target = apk
apk.depends = apk_install_target
qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
contains(QMAKE_HOST.os, Windows): extension = .exe
apk.target = apk
apk.depends = apk_install_target
apk.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --apk $$APK_PATH
aab.target = aab
aab.depends = apk_install_target
aab.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --aab --apk $$APK_PATH
} else {
prepareRecursiveTarget(aab)
prepareRecursiveTarget(apk)
prepareRecursiveTarget(apk_install_target)
}
QMAKE_EXTRA_TARGETS *= apk apk_install_target
build_pass {
contains(TEMPLATE, ".*app") {
@ -34,4 +39,11 @@ build_pass {
target.path = /libs/$$ANDROID_TARGET_ARCH/
INSTALLS *= target
}
} else {
QMAKE_EXTRA_TARGETS *= aab apk apk_install_target
android-build-distclean.commands = \
$$QMAKE_DEL_TREE $$shell_quote($$shell_path($$OUT_PWD/android-build))
QMAKE_EXTRA_TARGETS *= android-build-distclean
CLEAN_DEPS += android-build-distclean
}

View File

@ -71,4 +71,3 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT)|error()
}

View File

@ -61,14 +61,15 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
# modifications to linux.conf
QMAKE_AR = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP =
#$${CROSS_COMPILE}strip
equals(QT_ARCH, x86): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/i686-linux-android-
else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-android-
else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-
QMAKE_RANLIB = $${CROSS_COMPILE}ranlib
QMAKE_LINK_SHLIB = $$QMAKE_LINK
QMAKE_LFLAGS =

View File

@ -1,6 +1,6 @@
load(resolve_config)
!host_build:!single_arch:!java:android {
!equals(TEMPLATE, aux):!host_build:!single_arch:!java:android {
isEmpty(ANDROID_ABIS): ANDROID_ABIS = $$ALL_ANDROID_ABIS
ALL_ABIS = $$join(ANDROID_ABIS, _and_)

View File

@ -138,8 +138,8 @@ CMAKE_RELEASE_TYPE =
# the debug libraries at build time.
equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
debug_and_release|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug
debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release
if(debug_and_release:build_all)|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug
if(debug_and_release:build_all)|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release
# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
# functions whether a Configuration specific generator expression needs to be added to the values
@ -153,7 +153,14 @@ debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release
# <CONFIG> equivalent to the value specified by CMAKE_BUILD_TYPE.
# This means that when Qt was built in a Release configuration, and the application in a Debug
# configuration, IMPORTED_LOCATION_RELEASE will be used for the Qt libraries.
debug_and_release {
#
# Note that we need to check for the "debug_and_release" feature, and not the CONFIG value, because
# the CONFIG value is always set to true on Windows in msvc-desktop.conf disregarding whether the
# configure line specified just -debug or just -release.
# This also means that if a user configures and builds Qt with -release, and then calls nmake debug
# to build debug libraries of Qt, the generated CMake file won't know about debug libraries,
# and will always link against the release libraries.
qtConfig(debug_and_release) {
CMAKE_DEBUG_AND_RELEASE = TRUE
} else {
CMAKE_DEBUG_AND_RELEASE = FALSE

View File

@ -397,7 +397,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})

View File

@ -270,7 +270,7 @@ xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identif
QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
!macx-xcode {
generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_) $$QMAKE_ARGS
generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
generate_xcode_project.target = xcodeproj
QMAKE_EXTRA_VARIABLES += _PRO_FILE_
QMAKE_EXTRA_TARGETS += generate_xcode_project

View File

@ -52,15 +52,26 @@ builtin_resources {
qmldir.base = $$qmldir_path
qmldir.files = $$qmldir_file
qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += qmldir
qmlfiles.base = $$_PRO_FILE_PWD_
qmlfiles.files = $$fq_aux_qml_files
install_qml_files: qmlfiles.files += $$fq_qml_files
qmlfiles.path = $${qmldir.path}
INSTALLS += qmlfiles
!debug_and_release|!build_all|CONFIG(release, debug|release) {
INSTALL_QML_FILES = false
android {
build_pass {
isEmpty(ANDROID_ABIS): ANDROID_ABIS = $$ALL_ANDROID_ABIS
ABI = $$first(ANDROID_ABIS)
equals(ABI, $$QT_ARCH): INSTALL_QML_FILES = true
}
} else: !debug_and_release|!build_all|CONFIG(release, debug|release): INSTALL_QML_FILES = true
equals(INSTALL_QML_FILES, true) {
INSTALLS += qmldir
INSTALLS += qmlfiles
!prefix_build {
COPIES += qmldir qmlfiles
} else {

View File

@ -1,2 +1,6 @@
# bitcode (release mode) is incompatible with splitting sections.
!bitcode|!release: load(gc_binaries)
# We have to explicitly exclude Xcode, as that supports both debug
# and release builds in the same project. Xcode already has a settting
# for dead code stripping which is enabled by default, so we'll still
# strip any libraries build with split sections.
!bitcode|if(!macx-xcode:!release): load(gc_binaries)

View File

@ -6,16 +6,6 @@ exists($$QMAKE_QT_CONFIG) {
qtConfig(thread) {
EMCC_THREAD_LFLAGS += -s USE_PTHREADS=1
# Hardcode wasm memory size. Emscripten does not currently support memory growth
# (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
# at build time. Further, browsers limit the maximum initial memory size to 1GB.
TOTAL_MEMORY = 1GB
!isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
}
message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY
# Create worker threads at startup. This is supposed to be an optimization,
# however exceeding the pool size has been obesverved to hang the application.
@ -29,6 +19,20 @@ exists($$QMAKE_QT_CONFIG) {
} else {
EMCC_THREAD_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
}
qtConfig(thread) | !isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
# Hardcode wasm memory size. Emscripten does not currently support memory growth
# (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
# at build time. Further, browsers limit the maximum initial memory size to 1GB.
# QMAKE_WASM_TOTAL_MEMORY must be a multiple of 64KB
TOTAL_MEMORY = 1GB
!isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
}
message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY
}
QMAKE_LFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_LFLAGS_DEBUG += $$EMCC_THREAD_LFLAGS
QMAKE_CFLAGS += $$EMCC_THREAD_LFLAGS

View File

@ -28,6 +28,7 @@ QOBJS = \
qmetatype.o qsystemerror.o qvariant.o \
quuid.o \
qarraydata.o qbitarray.o qbytearray.o qbytearraymatcher.o \
qcalendar.o qgregoriancalendar.o qromancalendar.o \
qcryptographichash.o qdatetime.o qhash.o qlist.o \
qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o \
qstringbuilder.o qstring.o qstringlist.o qversionnumber.o \
@ -114,7 +115,10 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/text/qstring.cpp \
$(SOURCE_PATH)/src/corelib/text/qstringlist.cpp \
$(SOURCE_PATH)/src/corelib/text/qvsnprintf.cpp \
$(SOURCE_PATH)/src/corelib/time/qcalendar.cpp \
$(SOURCE_PATH)/src/corelib/time/qdatetime.cpp \
$(SOURCE_PATH)/src/corelib/time/qgregoriancalendar.cpp \
$(SOURCE_PATH)/src/corelib/time/qromancalendar.cpp \
$(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp \
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
$(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp \
@ -428,6 +432,15 @@ qfileinfo.o: $(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp
qdatetime.o: $(SOURCE_PATH)/src/corelib/time/qdatetime.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<
qcalendar.o: $(SOURCE_PATH)/src/corelib/time/qcalendar.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<
qgregoriancalendar.o: $(SOURCE_PATH)/src/corelib/time/qgregoriancalendar.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<
qromancalendar.o: $(SOURCE_PATH)/src/corelib/time/qromancalendar.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<
qstringlist.o: $(SOURCE_PATH)/src/corelib/text/qstringlist.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

View File

@ -71,6 +71,7 @@ QTOBJS= \
qbytearray.obj \
qvsnprintf.obj \
qbytearraymatcher.obj \
qcalendar.obj \
qdatetime.obj \
qdir.obj \
qdiriterator.obj \
@ -83,6 +84,7 @@ QTOBJS= \
qfileinfo.obj \
qendian.obj \
qglobal.obj \
qgregoriancalendar.obj \
qhash.obj \
qiodevice.obj \
qringbuffer.obj \
@ -97,6 +99,7 @@ QTOBJS= \
qoperatingsystemversion.obj \
qoperatingsystemversion_win.obj \
qregexp.obj \
qromancalendar.obj \
qutfcodec.obj \
qstring.obj \
qstringlist.obj \

View File

@ -36,7 +36,7 @@
QT_BEGIN_NAMESPACE
QString project_builtin_regx() //calculate the builtin regular expression..
static QString project_builtin_regx() //calculate the builtin regular expression..
{
QString ret;
QStringList builtin_exts;

View File

@ -1568,21 +1568,12 @@ bool VCLinkerTool::parseOption(const char* option)
const char* str = option+6;
if (*str == 'S')
ShowProgress = linkProgressAll;
#ifndef Q_OS_WIN
else if (strncasecmp(str, "pginstrument", 12))
else if (qstricmp(str, "pginstrument") == 0)
LinkTimeCodeGeneration = optLTCGInstrument;
else if (strncasecmp(str, "pgoptimize", 10))
else if (qstricmp(str, "pgoptimize") == 0)
LinkTimeCodeGeneration = optLTCGOptimize;
else if (strncasecmp(str, "pgupdate", 8 ))
else if (qstricmp(str, "pgupdate") == 0)
LinkTimeCodeGeneration = optLTCGUpdate;
#else
else if (_stricmp(str, "pginstrument"))
LinkTimeCodeGeneration = optLTCGInstrument;
else if (_stricmp(str, "pgoptimize"))
LinkTimeCodeGeneration = optLTCGOptimize;
else if (_stricmp(str, "pgupdate"))
LinkTimeCodeGeneration = optLTCGUpdate;
#endif
}
} else {
AdditionalOptions.append(option);

View File

@ -242,6 +242,39 @@ static int doLink(int argc, char **argv)
#endif
static bool setFilePermissions(QFile &file, QFileDevice::Permissions permissions)
{
if (file.setPermissions(permissions))
return true;
fprintf(stderr, "Error setting permissions on %s: %s\n",
qPrintable(file.fileName()), qPrintable(file.errorString()));
return false;
}
static bool copyFileTimes(QFile &targetFile, const QString &sourceFilePath,
bool mustEnsureWritability, QString *errorString)
{
#ifdef Q_OS_WIN
bool mustRestorePermissions = false;
QFileDevice::Permissions targetPermissions;
if (mustEnsureWritability) {
targetPermissions = targetFile.permissions();
if (!targetPermissions.testFlag(QFileDevice::WriteUser)) {
mustRestorePermissions = true;
if (!setFilePermissions(targetFile, targetPermissions | QFileDevice::WriteUser))
return false;
}
}
#endif
if (!IoUtils::touchFile(targetFile.fileName(), sourceFilePath, errorString))
return false;
#ifdef Q_OS_WIN
if (mustRestorePermissions && !setFilePermissions(targetFile, targetPermissions))
return false;
#endif
return true;
}
static int installFile(const QString &source, const QString &target, bool exe = false,
bool preservePermissions = false)
{
@ -270,18 +303,15 @@ static int installFile(const QString &source, const QString &target, bool exe =
targetPermissions |= QFileDevice::ExeOwner | QFileDevice::ExeUser |
QFileDevice::ExeGroup | QFileDevice::ExeOther;
}
if (!targetFile.setPermissions(targetPermissions)) {
fprintf(stderr, "Error setting permissions on %s: %s\n",
qPrintable(target), qPrintable(targetFile.errorString()));
if (!setFilePermissions(targetFile, targetPermissions))
return 3;
}
// Copy file times
QString error;
if (!IoUtils::touchFile(target, sourceFile.fileName(), &error)) {
if (!copyFileTimes(targetFile, sourceFile.fileName(), preservePermissions, &error)) {
fprintf(stderr, "%s", qPrintable(error));
return 3;
}
return 0;
}

View File

@ -121,7 +121,6 @@ static QString detectProjectFile(const QString &path)
return ret;
}
QString project_builtin_regx();
bool usage(const char *a0)
{
fprintf(stdout, "Usage: %s [mode] [options] [files]\n"
@ -133,9 +132,9 @@ bool usage(const char *a0)
"\n"
"Mode:\n"
" -project Put qmake into project file generation mode%s\n"
" In this mode qmake interprets files as files to\n"
" be built,\n"
" defaults to %s\n"
" In this mode qmake interprets [files] as files to\n"
" be added to the .pro file. By default, all files with\n"
" known source extensions are added.\n"
" Note: The created .pro file probably will \n"
" need to be edited. For example add the QT variable to \n"
" specify what modules are required.\n"
@ -183,7 +182,7 @@ bool usage(const char *a0)
" -nomoc Don't generate moc targets [makefile mode only]\n"
" -nopwd Don't look for files in pwd [project mode only]\n"
,a0,
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "", project_builtin_regx().toLatin1().constData(),
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "",
default_mode(a0) == Option::QMAKE_GENERATE_MAKEFILE ? " (default)" : ""
);
return false;

View File

@ -115,6 +115,7 @@ SOURCES += \
qbuffer.cpp \
qbytearray.cpp \
qbytearraymatcher.cpp \
qcalendar.cpp \
qcryptographichash.cpp \
qdatetime.cpp \
qdir.cpp \
@ -127,6 +128,7 @@ SOURCES += \
qfsfileengine.cpp \
qfsfileengine_iterator.cpp \
qglobal.cpp \
qgregoriancalendar.cpp \
qhash.cpp \
qiodevice.cpp \
qjson.cpp \
@ -145,6 +147,7 @@ SOURCES += \
qmetatype.cpp \
qnumeric.cpp \
qregexp.cpp \
qromancalendar.cpp \
qsettings.cpp \
qstring.cpp \
qstringlist.cpp \
@ -168,6 +171,9 @@ HEADERS += \
qbuffer.h \
qbytearray.h \
qbytearraymatcher.h \
qcalendar.h \
qcalendarbackend_p.h \
qcalendarmath_p.h \
qchar.h \
qcryptographichash.h \
qdatetime.h \
@ -178,6 +184,7 @@ HEADERS += \
qfile.h \
qfileinfo.h \
qglobal.h \
qgregoriancalendar_p.h \
qhash.h \
qiodevice.h \
qjson_p.h \
@ -194,6 +201,7 @@ HEADERS += \
qmetatype.h \
qnumeric.h \
qregexp.h \
qromancalendar_p.h \
qstring.h \
qstringlist.h \
qstringmatcher.h \

View File

@ -52,6 +52,8 @@
#include <QtCore/qthreadpool.h>
#include <QtCore/qvector.h>
#include <mutex>
QT_BEGIN_NAMESPACE
@ -147,7 +149,7 @@ public:
ReduceResultType &r,
const IntermediateResults<T> &result)
{
QMutexLocker locker(&mutex);
std::unique_lock<QMutex> locker(mutex);
if (!canReduce(result.begin)) {
++resultsMapSize;
resultsMap.insert(result.begin, result);
@ -161,7 +163,7 @@ public:
// reduce this result
locker.unlock();
reduceResult(reduce, r, result);
locker.relock();
locker.lock();
// reduce all stored results as well
while (!resultsMap.isEmpty()) {
@ -170,7 +172,7 @@ public:
locker.unlock();
reduceResults(reduce, r, resultsMapCopy);
locker.relock();
locker.lock();
resultsMapSize -= resultsMapCopy.size();
}
@ -180,7 +182,7 @@ public:
// reduce this result
locker.unlock();
reduceResult(reduce, r, result);
locker.relock();
locker.lock();
// OrderedReduce
progress += result.end - result.begin;
@ -193,7 +195,7 @@ public:
locker.unlock();
reduceResult(reduce, r, it.value());
locker.relock();
locker.lock();
--resultsMapSize;
progress += it.value().end - it.value().begin;

View File

@ -85,6 +85,7 @@
#include "qpropertyanimation_p.h"
#include <QtCore/QMutex>
#include <QtCore/private/qlocking_p.h>
QT_BEGIN_NAMESPACE
@ -261,7 +262,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
QPropertyAnimation *animToStop = 0;
{
static QBasicMutex mutex;
QMutexLocker locker(&mutex);
auto locker = qt_unique_lock(mutex);
typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
static QPropertyAnimationHash hash;

View File

@ -43,6 +43,7 @@
#include <QtCore/qrect.h>
#include <QtCore/qline.h>
#include <QtCore/qmutex.h>
#include <QtCore/private/qlocking_p.h>
#include <algorithm>
@ -426,7 +427,7 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun
// in such an order that we get here with interpolators == NULL,
// to continue causes the app to crash on exit with a SEGV
if (interpolators) {
QMutexLocker locker(&registeredInterpolatorsMutex);
const auto locker = qt_scoped_lock(registeredInterpolatorsMutex);
if (int(interpolationType) >= interpolators->count())
interpolators->resize(int(interpolationType) + 1);
interpolators->replace(interpolationType, func);
@ -443,7 +444,7 @@ QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int in
{
{
QInterpolatorVector *interpolators = registeredInterpolators();
QMutexLocker locker(&registeredInterpolatorsMutex);
const auto locker = qt_scoped_lock(registeredInterpolatorsMutex);
QVariantAnimation::Interpolator ret = 0;
if (interpolationType < interpolators->count()) {
ret = interpolators->at(interpolationType);

View File

@ -42,16 +42,17 @@
#include "qtextcodec_p.h"
#include "qutfcodec_p.h"
#include "qlatincodec_p.h"
#if QT_CONFIG(codecs)
#include "qtsciicodec_p.h"
#include "qisciicodec_p.h"
#endif
#include "qsimplecodec_p.h"
#include "private/qcoreglobaldata_p.h"
#include "qdebug.h"
#include "unicode/ucnv.h"
#if QT_CONFIG(codecs)
#include "qtsciicodec_p.h"
#include "qisciicodec_p.h"
#endif
QT_BEGIN_NAMESPACE
typedef QList<QTextCodec*>::ConstIterator TextCodecListConstIt;

View File

@ -884,7 +884,7 @@
},
"datestring": {
"label": "QDate/QTime/QDateTime",
"purpose": "Provides convertion between dates and strings.",
"purpose": "Provides conversion between dates and strings.",
"section": "Data structures",
"condition": "features.textdate",
"output": [ "publicFeature", "feature" ]
@ -1041,6 +1041,25 @@
"section": "Utilities",
"output": [ "privateFeature" ]
},
"jalalicalendar": {
"label": "QJalaliCalendar",
"purpose": "Support the Jalali (Persian) calendar",
"section": "Utilities",
"output": [ "publicFeature" ]
},
"hijricalendar": {
"label": "QHijriCalendar",
"purpose": "Generic basis for Islamic calendars, providing shared locale data",
"section": "Utilities",
"output": [ "privateFeature" ]
},
"islamiccivilcalendar": {
"label": "QIslamicCivilCalendar",
"purpose": "Support the Islamic Civil calendar",
"section": "Utilities",
"condition": "features.hijricalendar",
"output": [ "publicFeature" ]
},
"timezone": {
"label": "QTimeZone",
"purpose": "Provides support for time-zone handling.",

View File

@ -84,8 +84,11 @@
#define QT_FEATURE_getauxval (QT_HAS_INCLUDE(<sys/auxv.h>) ? 1 : -1)
#define QT_FEATURE_getentropy -1
#define QT_NO_GEOM_VARIANT
#define QT_FEATURE_hijricalendar -1
#define QT_FEATURE_iconv -1
#define QT_FEATURE_icu -1
#define QT_FEATURE_islamiccivilcalendar -1
#define QT_FEATURE_jalalicalendar -1
#define QT_FEATURE_journald -1
#define QT_FEATURE_futimens -1
#define QT_FEATURE_futimes -1

View File

@ -52,6 +52,7 @@
#include <private/qlocale_tools_p.h>
#include <qmutex.h>
#include <QtCore/private/qlocking_p.h>
#include <stdlib.h>
#include <limits.h>
@ -3351,7 +3352,7 @@ static QBasicMutex environmentMutex;
*/
void qTzSet()
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#if defined(Q_OS_WIN)
_tzset();
#else
@ -3365,7 +3366,7 @@ void qTzSet()
*/
time_t qMkTime(struct tm *when)
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
return mktime(when);
}
@ -3397,7 +3398,7 @@ time_t qMkTime(struct tm *when)
*/
QByteArray qgetenv(const char *varName)
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#ifdef Q_CC_MSVC
size_t requiredSize = 0;
QByteArray buffer;
@ -3465,7 +3466,7 @@ QByteArray qgetenv(const char *varName)
QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
{
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
QVarLengthArray<wchar_t, 32> wname(int(strlen(varName)) + 1);
for (int i = 0; i < wname.size(); ++i) // wname.size() is correct: will copy terminating null
wname[i] = uchar(varName[i]);
@ -3513,7 +3514,7 @@ QString qEnvironmentVariable(const char *varName)
*/
bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#ifdef Q_CC_MSVC
// we provide a buffer that can only hold the empty string, so
// when the env.var isn't empty, we'll get an ERANGE error (buffer
@ -3552,7 +3553,7 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) noexcept
static const int MaxDigitsForOctalInt =
(std::numeric_limits<uint>::digits + NumBinaryDigitsPerOctalDigit - 1) / NumBinaryDigitsPerOctalDigit;
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#ifdef Q_CC_MSVC
// we provide a buffer that can hold any int value:
char buffer[MaxDigitsForOctalInt + 2]; // +1 for NUL +1 for optional '-'
@ -3617,7 +3618,7 @@ int qEnvironmentVariableIntValue(const char *varName, bool *ok) noexcept
*/
bool qEnvironmentVariableIsSet(const char *varName) noexcept
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#ifdef Q_CC_MSVC
size_t requiredSize = 0;
(void)getenv_s(&requiredSize, 0, 0, varName);
@ -3647,7 +3648,7 @@ bool qEnvironmentVariableIsSet(const char *varName) noexcept
*/
bool qputenv(const char *varName, const QByteArray& value)
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#if defined(Q_CC_MSVC)
return _putenv_s(varName, value.constData()) == 0;
#elif (defined(_POSIX_VERSION) && (_POSIX_VERSION-0) >= 200112L) || defined(Q_OS_HAIKU)
@ -3678,7 +3679,7 @@ bool qputenv(const char *varName, const QByteArray& value)
*/
bool qunsetenv(const char *varName)
{
QMutexLocker locker(&environmentMutex);
const auto locker = qt_scoped_lock(environmentMutex);
#if defined(Q_CC_MSVC)
return _putenv_s(varName, "") == 0;
#elif (defined(_POSIX_VERSION) && (_POSIX_VERSION-0) >= 200112L) || defined(Q_OS_BSD4) || defined(Q_OS_HAIKU)

View File

@ -850,10 +850,6 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line)
# endif
#endif
#if defined(QT_NO_DEBUG) && !defined(QT_PAINT_DEBUG)
#define QT_NO_PAINT_DEBUG
#endif
#ifndef Q_CC_MSVC
Q_NORETURN
#endif

View File

@ -98,6 +98,7 @@ enum GuardValues {
QT_END_NAMESPACE
#include <QtCore/qmutex.h>
#include <mutex>
QT_BEGIN_NAMESPACE
#define Q_GLOBAL_STATIC_INTERNAL(ARGS) \
@ -107,7 +108,7 @@ QT_BEGIN_NAMESPACE
static QBasicMutex mutex; \
int x = guard.loadAcquire(); \
if (Q_UNLIKELY(x >= QtGlobalStatic::Uninitialized)) { \
QMutexLocker locker(&mutex); \
const std::lock_guard<QBasicMutex> locker(mutex); \
if (guard.loadRelaxed() == QtGlobalStatic::Uninitialized) { \
d = new Type ARGS; \
static struct Cleanup { \

View File

@ -274,7 +274,7 @@ QLibraryInfo::licensedProducts()
QDate
QLibraryInfo::buildDate()
{
return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate);
return QDate::fromString(QString::fromLatin1("2012-12-20"), Qt::ISODate);
}
#endif
#endif // datestring

View File

@ -49,6 +49,7 @@
#include "qvarlengtharray.h"
#include "qdebug.h"
#include "qmutex.h"
#include <QtCore/private/qlocking_p.h>
#include "qloggingcategory.h"
#ifndef QT_BOOTSTRAPPED
#include "qelapsedtimer.h"
@ -1375,7 +1376,7 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con
{
QString message;
QMutexLocker lock(&QMessagePattern::mutex);
const auto locker = qt_scoped_lock(QMessagePattern::mutex);
QMessagePattern *pattern = qMessagePattern();
if (!pattern) {
@ -1909,12 +1910,14 @@ void qErrnoWarning(const char *msg, ...)
{
// qt_error_string() will allocate anyway, so we don't have
// to be careful here (like we do in plain qWarning())
QString error_string = qt_error_string(-1); // before vasprintf changes errno/GetLastError()
va_list ap;
va_start(ap, msg);
QString buf = QString::vasprintf(msg, ap);
va_end(ap);
buf += QLatin1String(" (") + qt_error_string(-1) + QLatin1Char(')');
buf += QLatin1String(" (") + error_string + QLatin1Char(')');
QMessageLogContext context;
qt_message_output(QtCriticalMsg, context, buf);
}
@ -2091,7 +2094,7 @@ QtMsgHandler qInstallMsgHandler(QtMsgHandler h)
void qSetMessagePattern(const QString &pattern)
{
QMutexLocker lock(&QMessagePattern::mutex);
const auto locker = qt_scoped_lock(QMessagePattern::mutex);
if (!qMessagePattern()->fromEnvironment)
qMessagePattern()->setPattern(pattern);

View File

@ -1754,6 +1754,15 @@ public:
ChecksumItuV41
};
enum class HighDpiScaleFactorRoundingPolicy {
Unset,
Round,
Ceil,
Floor,
RoundPreferFloor,
PassThrough
};
#ifndef Q_QDOC
// NOTE: Generally, do not add QT_Q_ENUM if a corresponding Q_Q_FLAG exists.
QT_Q_ENUM(ScrollBarPolicy)
@ -1840,6 +1849,7 @@ public:
QT_Q_ENUM(MouseEventSource)
QT_Q_FLAG(MouseEventFlag)
QT_Q_ENUM(ChecksumType)
QT_Q_ENUM(HighDpiScaleFactorRoundingPolicy)
QT_Q_ENUM(TabFocusBehavior)
#endif // Q_DOC

View File

@ -3275,3 +3275,25 @@
\value ChecksumItuV41 Checksum calculation based on ITU-V.41.
*/
/*!
\enum Qt::HighDpiScaleFactorRoundingPolicy
\since 5.14
This enum describes the possible High-DPI scale factor rounding policies, which
decide how non-integer scale factors (such as Windows 150%) are handled.
The active policy is set by calling QGuiApplication::setHighDdpiScaleFactorRoundingPolicy() before
the application object is created, or by setting the QT_SCALE_FACTOR_ROUNDING_POLICY
environment variable.
\sa QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()
\sa AA_EnableHighDpiScaling.
\omitvalue Unset
\value Round Round up for .5 and above.
\value Ceil Always round up.
\value Floor Always round down.
\value RoundPreferFloor Round up for .75 and above.
\value PassThrough Don't round.
*/

View File

@ -310,19 +310,6 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
\sa QDir, QFile
*/
/*!
\enum QFileInfo::FileType
This enum is returned by type() to describe the type of the file system
entity described by the QFileInfo object.
\value Unknown The object refers to an unknown item.
\value Regular The object refers to a regular file.
\value Directory The object refers to a directory.
\value SymbolicLink The object refers to a symbolic link.
\value Shortcut The object refers to a shortcut.
*/
/*!
\fn QFileInfo &QFileInfo::operator=(QFileInfo &&other)
@ -1008,7 +995,11 @@ bool QFileInfo::isNativePath() const
*/
bool QFileInfo::isFile() const
{
return (type() & FileTypeMask) == Regular;
Q_D(const QFileInfo);
return d->checkAttribute<bool>(
QFileSystemMetaData::FileType,
[d]() { return d->metaData.isFile(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::FileType); });
}
/*!
@ -1019,7 +1010,11 @@ bool QFileInfo::isFile() const
*/
bool QFileInfo::isDir() const
{
return (type() & FileTypeMask) == Directory;
Q_D(const QFileInfo);
return d->checkAttribute<bool>(
QFileSystemMetaData::DirectoryType,
[d]() { return d->metaData.isDirectory(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::DirectoryType); });
}
@ -1070,8 +1065,6 @@ bool QFileInfo::isSymLink() const
}
/*!
\fn bool QFileInfo::isSymbolicLink() const
Returns \c true if this object points to a symbolic link;
otherwise returns \c false.
@ -1091,9 +1084,16 @@ bool QFileInfo::isSymLink() const
\sa isFile(), isDir(), isShortcut(), symLinkTarget()
*/
/*!
\fn bool QFileInfo::isShortcut() const
bool QFileInfo::isSymbolicLink() const
{
Q_D(const QFileInfo);
return d->checkAttribute<bool>(
QFileSystemMetaData::LegacyLinkType,
[d]() { return d->metaData.isLink(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); });
}
/*!
Returns \c true if this object points to a shortcut;
otherwise returns \c false.
@ -1110,6 +1110,14 @@ bool QFileInfo::isSymLink() const
\sa isFile(), isDir(), isSymbolicLink(), symLinkTarget()
*/
bool QFileInfo::isShortcut() const
{
Q_D(const QFileInfo);
return d->checkAttribute<bool>(
QFileSystemMetaData::LegacyLinkType,
[d]() { return d->metaData.isLnkFile(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); });
}
/*!
Returns \c true if the object points to a directory or to a symbolic
@ -1314,53 +1322,6 @@ qint64 QFileInfo::size() const
});
}
/*!
Returns the QFileInfo::FileTypes.
QFileInfo::FileTypes combines with an indirection flag (link type) and a
base type it refers to.
For example, \c SymbolicLink combines with \c Regular meaning a symlink to
a regular file.
In addition, FileTypeMask and LinkTypeMask are used to extract the base
type and link type respectively.
\sa isFile(), isDir(), isShortcut(), isSymbolicLink()
*/
QFileInfo::FileTypes QFileInfo::type() const
{
Q_D(const QFileInfo);
QFileInfo::FileTypes type = QFileInfo::Unknown;
if (d->checkAttribute<bool>(
QFileSystemMetaData::LegacyLinkType,
[d]() { return d->metaData.isLnkFile(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); })) {
type = QFileInfo::Shortcut;
} else if (d->checkAttribute<bool>(
QFileSystemMetaData::LegacyLinkType,
[d]() { return d->metaData.isLink(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); })) {
type = QFileInfo::SymbolicLink;
}
if (d->checkAttribute<bool>(
QFileSystemMetaData::DirectoryType,
[d]() { return d->metaData.isDirectory(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::DirectoryType); })) {
return type | QFileInfo::Directory;
}
if (d->checkAttribute<bool>(
QFileSystemMetaData::FileType,
[d]() { return d->metaData.isFile(); },
[d]() { return d->getFileFlags(QAbstractFileEngine::FileType); })) {
return type | QFileInfo::Regular;
}
return type;
}
#if QT_DEPRECATED_SINCE(5, 10)
/*!
\deprecated

View File

@ -66,20 +66,6 @@ public:
QFileInfo(const QFileInfo &fileinfo);
~QFileInfo();
enum FileType {
Unknown,
// base type
Regular,
Directory,
// indirection flag
SymbolicLink = 0x10,
Shortcut = 0x20,
// mask
FileTypeMask = 0x0f,
LinkTypeMask = 0xf0
};
Q_DECLARE_FLAGS(FileTypes, FileType)
QFileInfo &operator=(const QFileInfo &fileinfo);
QFileInfo &operator=(QFileInfo &&other) noexcept { swap(other); return *this; }
@ -125,8 +111,8 @@ public:
bool isFile() const;
bool isDir() const;
bool isSymLink() const;
inline bool isSymbolicLink() const { return type() & SymbolicLink; }
inline bool isShortcut() const { return type() & Shortcut; }
bool isSymbolicLink() const;
bool isShortcut() const;
bool isRoot() const;
bool isBundle() const;
@ -145,7 +131,6 @@ public:
QFile::Permissions permissions() const;
qint64 size() const;
FileTypes type() const;
// ### Qt6: inline these functions
#if QT_DEPRECATED_SINCE(5, 10)

View File

@ -44,7 +44,7 @@
#include <QtCore/QFile>
#include <QtCore/QDir>
#include <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#include <QtCore/private/qlocking_p.h>
#include <QtCore/QUrl>
#include <QtCore/QFileInfo>
#include <QtCore/QLocale>
@ -312,7 +312,7 @@ void QFileSelector::setExtraSelectors(const QStringList &list)
QStringList QFileSelector::allSelectors() const
{
Q_D(const QFileSelector);
QMutexLocker locker(&sharedDataMutex);
const auto locker = qt_scoped_lock(sharedDataMutex);
QFileSelectorPrivate::updateSelectors();
return d->extras + sharedData->staticSelectors;
}
@ -371,7 +371,7 @@ QStringList QFileSelectorPrivate::platformSelectors()
void QFileSelectorPrivate::addStatics(const QStringList &statics)
{
QMutexLocker locker(&sharedDataMutex);
const auto locker = qt_scoped_lock(sharedDataMutex);
sharedData->preloadedStatics << statics;
sharedData->staticSelectors.clear();
}

View File

@ -48,6 +48,7 @@
#include <qdatetime.h>
#include <qdir.h>
#include <qtextstream.h>
#include <private/qlocking_p.h>
#include <qt_windows.h>
@ -423,7 +424,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
end = threads.constEnd();
for(jt = threads.constBegin(); jt != end; ++jt) {
thread = *jt;
QMutexLocker locker(&(thread->mutex));
const auto locker = qt_scoped_lock(thread->mutex);
const auto hit = thread->handleForDir.find(QFileSystemWatcherPathKey(absolutePath));
if (hit != thread->handleForDir.end() && hit.value().flags < flags) {
@ -478,7 +479,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
// now look for a thread to insert
bool found = false;
for (QWindowsFileSystemWatcherEngineThread *thread : qAsConst(threads)) {
QMutexLocker locker(&(thread->mutex));
const auto locker = qt_scoped_lock(thread->mutex);
if (thread->handles.count() < MAXIMUM_WAIT_OBJECTS) {
DEBUG() << "Added handle" << handle.handle << "for" << absolutePath << "to watch" << fileInfo.absoluteFilePath()
<< "to existing thread " << thread;
@ -554,7 +555,7 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
if (*jt == 0)
continue;
QMutexLocker locker(&(thread->mutex));
auto locker = qt_unique_lock(thread->mutex);
QWindowsFileSystemWatcherEngine::Handle handle = thread->handleForDir.value(QFileSystemWatcherPathKey(absolutePath));
if (handle.handle == INVALID_HANDLE_VALUE) {
@ -587,7 +588,7 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
locker.unlock();
thread->stop();
thread->wait();
locker.relock();
locker.lock();
// We can't delete the thread until the mutex locker is
// out of scope
}
@ -652,13 +653,13 @@ static QString msgFindNextFailed(const QWindowsFileSystemWatcherEngineThread::Pa
void QWindowsFileSystemWatcherEngineThread::run()
{
QMutexLocker locker(&mutex);
auto locker = qt_unique_lock(mutex);
forever {
QVector<HANDLE> handlesCopy = handles;
locker.unlock();
DEBUG() << "QWindowsFileSystemWatcherThread" << this << "waiting on" << handlesCopy.count() << "handles";
DWORD r = WaitForMultipleObjects(handlesCopy.count(), handlesCopy.constData(), false, INFINITE);
locker.relock();
locker.lock();
do {
if (r == WAIT_OBJECT_0) {
int m = msg;

View File

@ -70,14 +70,16 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
QLoggingCategory represents a certain logging category - identified by a
string - at runtime. A category can be configured to enable or disable
logging of messages per message type. Whether a message type is enabled or
not can be checked with the \l isDebugEnabled(), \l isInfoEnabled(),
\l isWarningEnabled(), and \l isCriticalEnabled() methods.
logging of messages per message type.
All objects are meant to be configured by a common registry (see also
\l{Configuring Categories}). Different objects can also represent the same
category. It is therefore not recommended to export objects across module
boundaries, nor to manipulate the objects directly, nor to inherit from
To check whether a message type is enabled or not, use one of these methods:
\l isDebugEnabled(), \l isInfoEnabled(), \l isWarningEnabled(), and
\l isCriticalEnabled().
All objects are meant to be configured by a common registry, as described in
\l{Configuring Categories}. Different objects can also represent the same
category. Therefore, it's \b{not} recommended to export objects across
module boundaries, to manipulate the objects directly, or to inherit from
QLoggingCategory.
\section1 Creating Category Objects
@ -87,17 +89,17 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\snippet qloggingcategory/main.cpp 1
\note Category names are free text. However, to allow easy configuration
of the categories using \l{Logging Rules} the names should follow some rules:
Category names are free text; to configure categories using \l{Logging Rules}, their
names should follow this convention:
\list
\li Use letters and numbers only.
\li Further structure categories into common areas by using dots.
\li Avoid the category names \c{debug}, \c{info}, \c{warning}, and \c{critical}.
\li Category names starting with \c{qt} are reserved for Qt modules.
\li Use dots to further structure categories into common areas.
\li Avoid the category names: \c{debug}, \c{info}, \c{warning}, and \c{critical}.
\li Category names with the \c{qt} prefix are solely reserved for Qt modules.
\endlist
QLoggingCategory objects implicitly defined by Q_LOGGING_CATEGORY()
are created on first use in a thread-safe manner.
QLoggingCategory objects that are implicitly defined by Q_LOGGING_CATEGORY()
are created on first use, in a thread-safe manner.
\section1 Checking Category Configuration
@ -105,8 +107,8 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\l isWarningEnabled(), \l isCriticalEnabled(), as well as \l isEnabled()
to check whether messages for the given message type should be logged.
\note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments
from being evaluated if the respective message types are not enabled for the
The qCDebug(), qCWarning(), and qCCritical() macros prevent arguments from
being evaluated if the respective message types are not enabled for the
category, so explicit checking is not needed:
\snippet qloggingcategory/main.cpp 4
@ -119,28 +121,27 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\snippet qloggingcategory/main.cpp 5
will log messages of type \c QtWarningMsg, \c QtCriticalMsg, \c QtFatalMsg, but will
ignore messages of type \c QtDebugMsg and \c QtInfoMsg.
logs messages of type \c QtWarningMsg, \c QtCriticalMsg, \c QtFatalMsg, but
ignores messages of type \c QtDebugMsg and \c QtInfoMsg.
If no argument is passed, all messages will be logged.
If no argument is passed, all messages are logged.
\section1 Configuring Categories
The default configuration of categories can be overridden either by setting logging
rules, or by installing a custom filter.
You can override the default configuration for categories either by setting
logging rules, or by installing a custom filter.
\section2 Logging Rules
Logging rules allow logging for categories to be enabled or disabled in a
flexible way. Rules are specified in text, where every line must have the
format
Logging rules let you enable or disable logging for categories in a flexible
way. Rules are specified in text, where every line must have the format:
\snippet code/src_corelib_io_qloggingcategory.cpp 0
\c <category> is the name of the category, potentially with \c{*} as a
wildcard symbol as the first or last character (or at both positions).
The optional \c <type> must be either \c debug, \c info, \c warning, or \c critical.
Lines that do not fit this scheme are ignored.
wildcard symbol for the first or last character; or at both positions.
The optional \c <type> must be \c debug, \c info, \c warning, or \c critical.
Lines that don't fit this scheme are ignored.
Rules are evaluated in text order, from first to last. That is, if two rules
apply to a category/type, the rule that comes later is applied.
@ -149,47 +150,37 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\snippet code/src_corelib_io_qloggingcategory.cpp 1
Since Qt 5.3, logging rules are also
automatically loaded from the \c [Rules] section of a logging
configuration file. Such configuration files are looked up in the QtProject
configuration directory, or explicitly set in a \c QT_LOGGING_CONF
environment variable:
Logging rules are automatically loaded from the \c [Rules] section in a logging
configuration file. These configuration files are looked up in the QtProject
configuration directory, or explicitly set in a \c QT_LOGGING_CONF environment
variable:
\snippet code/src_corelib_io_qloggingcategory.cpp 2
Since Qt 5.3, logging rules can also be specified in a \c QT_LOGGING_RULES
environment variable. And since Qt 5.6, multiple rules can also be
separated by semicolons:
Logging rules can also be specified in a \c QT_LOGGING_RULES environment variable;
multiple rules can also be separated by semicolons:
\snippet code/src_corelib_io_qloggingcategory.cpp 3
Rules set by \l setFilterRules() take precedence over rules specified
in the QtProject configuration directory, and can, in turn, be
overwritten by rules from the configuration file specified by
\c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES.
Rules set by \l setFilterRules() take precedence over rules specified in the
QtProject configuration directory. In turn, these rules can be overwritten by those
from the configuration file specified by \c QT_LOGGING_CONF, and those set by
\c QT_LOGGING_RULES.
Order of evaluation:
\list
\li [QLibraryInfo::DataPath]/qtlogging.ini
\li QtProject/qtlogging.ini
\li \l setFilterRules()
\li \c QT_LOGGING_CONF
\li \c QT_LOGGING_RULES
The order of evaluation is as follows:
\list 1
\li [QLibraryInfo::DataPath]/qtlogging.ini
\li QtProject/qtlogging.ini
\li \l setFilterRules()
\li \c QT_LOGGING_CONF
\li \c QT_LOGGING_RULES
\endlist
The \c QtProject/qtlogging.ini file is looked up in all directories returned
by QStandardPaths::GenericConfigLocation, e.g.
by QStandardPaths::GenericConfigLocation.
\list
\li on \macos and iOS: \c ~/Library/Preferences
\li on Unix: \c ~/.config, \c /etc/xdg
\li on Windows: \c %LOCALAPPDATA%, \c %ProgramData%,
\l QCoreApplication::applicationDirPath(),
QCoreApplication::applicationDirPath() + \c "/data"
\endlist
Set the \c QT_LOGGING_DEBUG environment variable to see from where
logging rules are loaded.
Set the \c QT_LOGGING_DEBUG environment variable to find out where you logging
rules are loaded from.
\section2 Installing a Custom Filter
@ -211,7 +202,7 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
If \a category is \c{0}, the category name is changed to \c "default".
Note that \a category must be kept valid during the lifetime of this object.
\note \a category must be kept valid during the lifetime of this object.
*/
QLoggingCategory::QLoggingCategory(const char *category)
: d(nullptr),
@ -226,7 +217,7 @@ QLoggingCategory::QLoggingCategory(const char *category)
If \a category is \c{0}, the category name is changed to \c "default".
Note that \a category must be kept valid during the lifetime of this object.
\note \a category must be kept valid during the lifetime of this object.
\since 5.4
*/
@ -251,7 +242,7 @@ void QLoggingCategory::init(const char *category, QtMsgType severityLevel)
}
/*!
Destructs a QLoggingCategory object.
Destroys a QLoggingCategory object.
*/
QLoggingCategory::~QLoggingCategory()
{
@ -268,24 +259,24 @@ QLoggingCategory::~QLoggingCategory()
/*!
\fn bool QLoggingCategory::isDebugEnabled() const
Returns \c true if debug messages should be shown for this category.
Returns \c false otherwise.
Returns \c true if debug messages should be shown for this category;
\c false otherwise.
\note The \l qCDebug() macro already does this check before executing any
code. However, calling this method may be useful to avoid
expensive generation of data that is only used for debug output.
\note The \l qCDebug() macro already does this check before running any
code. However, calling this method may be useful to avoid the
expensive generation of data for debug output only.
*/
/*!
\fn bool QLoggingCategory::isInfoEnabled() const
Returns \c true if informational messages should be shown for this category.
Returns \c false otherwise.
Returns \c true if informational messages should be shown for this category;
\c false otherwise.
\note The \l qCInfo() macro already does this check before executing any
code. However, calling this method may be useful to avoid
expensive generation of data that is only used for debug output.
code. However, calling this method may be useful to avoid the
expensive generation of data for debug output only.
\since 5.5
*/
@ -294,28 +285,28 @@ QLoggingCategory::~QLoggingCategory()
/*!
\fn bool QLoggingCategory::isWarningEnabled() const
Returns \c true if warning messages should be shown for this category.
Returns \c false otherwise.
Returns \c true if warning messages should be shown for this category;
\c false otherwise.
\note The \l qCWarning() macro already does this check before executing any
code. However, calling this method may be useful to avoid
expensive generation of data that is only used for debug output.
code. However, calling this method may be useful to avoid the
expensive generation of data for debug output only.
*/
/*!
\fn bool QLoggingCategory::isCriticalEnabled() const
Returns \c true if critical messages should be shown for this category.
Returns \c false otherwise.
Returns \c true if critical messages should be shown for this category;
\c false otherwise.
\note The \l qCCritical() macro already does this check before executing any
code. However, calling this method may be useful to avoid
expensive generation of data that is only used for debug output.
code. However, calling this method may be useful to avoid the
expensive generation of data for debug output only.
*/
/*!
Returns \c true if a message of type \a msgtype for the category should be
shown. Returns \c false otherwise.
shown; \c false otherwise.
*/
bool QLoggingCategory::isEnabled(QtMsgType msgtype) const
{
@ -332,11 +323,11 @@ bool QLoggingCategory::isEnabled(QtMsgType msgtype) const
/*!
Changes the message type \a type for the category to \a enable.
This method is meant to be used only from inside a filter
installed by \l installFilter(). See \l {Configuring Categories} for
an overview on how to configure categories globally.
This method is meant for use only from inside a filter installed with
\l installFilter(). For an overview on how to configure categories globally,
see \l {Configuring Categories}.
\note \c QtFatalMsg cannot be changed. It will always remain \c true.
\note \c QtFatalMsg cannot be changed; it will always remain \c true.
*/
void QLoggingCategory::setEnabled(QtMsgType type, bool enable)
{
@ -359,28 +350,25 @@ void QLoggingCategory::setEnabled(QtMsgType type, bool enable)
/*!
\fn QLoggingCategory &QLoggingCategory::operator()()
Returns the object itself. This allows both a QLoggingCategory variable, and
a factory method returning a QLoggingCategory, to be used in \l qCDebug(),
\l qCWarning(), \l qCCritical() macros.
Returns the object itself. This allows for both: a QLoggingCategory variable, and
a factory method that returns a QLoggingCategory, to be used in \l qCDebug(),
\l qCWarning(), or \l qCCritical() macros.
*/
/*!
\fn const QLoggingCategory &QLoggingCategory::operator()() const
Returns the object itself. This allows both a QLoggingCategory variable, and
a factory method returning a QLoggingCategory, to be used in \l qCDebug(),
\l qCWarning(), \l qCCritical() macros.
Returns the object itself. This allows for both: a QLoggingCategory variable, and
a factory method that returns a QLoggingCategory, to be used in \l qCDebug(),
\l qCWarning(), or \l qCCritical() macros.
*/
/*!
Returns a pointer to the global category \c "default" that
is used e.g. by qDebug(), qInfo(), qWarning(), qCritical(), qFatal().
Returns a pointer to the global category \c "default" that is used, for
example, by qDebug(), qInfo(), qWarning(), qCritical(), or qFatal().
\note The returned pointer may be null during destruction of
static objects.
\note Ownership of the category is not transferred, do not
\c delete the returned pointer.
\note The pointer returned may be null during destruction of static objects.
Also, don't \c delete this pointer, as ownership of the category isn't transferred.
*/
QLoggingCategory *QLoggingCategory::defaultCategory()
@ -391,8 +379,7 @@ QLoggingCategory *QLoggingCategory::defaultCategory()
/*!
\typedef QLoggingCategory::CategoryFilter
This is a typedef for a pointer to a function with the following
signature:
This is a typedef for a pointer to a function with the following signature:
\snippet qloggingcategory/main.cpp 20
@ -408,14 +395,13 @@ QLoggingCategory *QLoggingCategory::defaultCategory()
filter is free to change the respective category configuration with
\l setEnabled().
The filter might be called from different threads, but never concurrently.
The filter shall not call any static functions of QLoggingCategory.
When you define your filter, note that it can be called from different threads; but never
concurrently. This filter cannot call any static functions from QLoggingCategory.
Example:
\snippet qloggingcategory/main.cpp 21
An alternative way of configuring the default filter is via
\l setFilterRules().
Alternatively, you can configure the default filter via \l setFilterRules().
*/
QLoggingCategory::CategoryFilter
QLoggingCategory::installFilter(QLoggingCategory::CategoryFilter filter)
@ -425,15 +411,15 @@ QLoggingCategory::installFilter(QLoggingCategory::CategoryFilter filter)
/*!
Configures which categories and message types should be enabled through a
a set of \a rules.
set of \a rules.
Example:
\snippet qloggingcategory/main.cpp 2
\note The rules might be ignored if a custom category filter is installed
with \l installFilter(), or if the user defined \c QT_LOGGING_CONF or \c QT_LOGGING_RULES
environment variable.
with \l installFilter(), or if the user has defined the \c QT_LOGGING_CONF
or the \c QT_LOGGING_RULES environment variable.
*/
void QLoggingCategory::setFilterRules(const QString &rules)
{
@ -446,7 +432,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.2
Returns an output stream for debug messages in the logging category
Returns an output stream for debug messages in the logging category,
\a category.
The macro expands to code that checks whether
@ -457,8 +443,8 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\snippet qloggingcategory/main.cpp 10
\note Arguments are not processed if debug output for the category is not
enabled, so do not rely on any side effects.
\note Arguments aren't processed if the debug output for that \a category is not
enabled, so don't rely on any side effects.
\sa qDebug()
*/
@ -469,16 +455,16 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.3
Logs a debug message \a message in the logging category \a category.
\a message might contain place holders that are replaced by additional
arguments, similar to the C printf() function.
Logs a debug message, \a message, in the logging category, \a category.
\a message may contain place holders to be replaced by additional arguments,
similar to the C printf() function.
Example:
\snippet qloggingcategory/main.cpp 13
\note Arguments might not be processed if debug output for the category is
not enabled, so do not rely on any side effects.
\note Arguments aren't processed if the debug output for that \a category is not
enabled, so don't rely on any side effects.
\sa qDebug()
*/
@ -489,7 +475,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.5
Returns an output stream for informational messages in the logging category
Returns an output stream for informational messages in the logging category,
\a category.
The macro expands to code that checks whether
@ -500,8 +486,8 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\snippet qloggingcategory/main.cpp qcinfo_stream
\note Arguments are not processed if debug output for the category is not
enabled, so do not rely on any side effects.
\note If the debug output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qInfo()
*/
@ -512,16 +498,16 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.5
Logs an informational message \a message in the logging category \a category.
\a message might contain place holders that are replaced by additional
arguments, similar to the C printf() function.
Logs an informational message, \a message, in the logging category, \a category.
\a message may contain place holders to be replaced by additional arguments,
similar to the C printf() function.
Example:
\snippet qloggingcategory/main.cpp qcinfo_printf
\note Arguments might not be processed if debug output for the category is
not enabled, so do not rely on any side effects.
\note If the debug output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qInfo()
*/
@ -532,7 +518,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.2
Returns an output stream for warning messages in the logging category
Returns an output stream for warning messages in the logging category,
\a category.
The macro expands to code that checks whether
@ -543,8 +529,8 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\snippet qloggingcategory/main.cpp 11
\note Arguments are not processed if warning output for the category is not
enabled, so do not rely on any side effects.
\note If the warning output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qWarning()
*/
@ -555,16 +541,16 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.3
Logs a warning message \a message in the logging category \a category.
\a message might contain place holders that are replaced by additional
arguments, similar to the C printf() function.
Logs a warning message, \a message, in the logging category, \a category.
\a message may contain place holders to be replaced by additional arguments,
similar to the C printf() function.
Example:
\snippet qloggingcategory/main.cpp 14
\note Arguments might not be processed if warning output for the category is
not enabled, so do not rely on any side effects.
\note If the warning output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qWarning()
*/
@ -575,7 +561,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.2
Returns an output stream for critical messages in the logging category
Returns an output stream for critical messages in the logging category,
\a category.
The macro expands to code that checks whether
@ -586,8 +572,9 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\snippet qloggingcategory/main.cpp 12
\note Arguments are not processed if critical output for the category is not
enabled, so do not rely on any side effects.
\note If the critical output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qCritical()
*/
@ -598,16 +585,16 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\threadsafe
\since 5.3
Logs a critical message \a message in the logging category \a category.
\a message might contain place holders that are replaced by additional
arguments, similar to the C printf() function.
Logs a critical message, \a message, in the logging category, \a category.
\a message may contain place holders to be replaced by additional arguments,
similar to the C printf() function.
Example:
\snippet qloggingcategory/main.cpp 15
\note Arguments might not be processed if critical output for the category
is not enabled, so do not rely on any side effects.
\note If the critical output for a particular category isn't enabled, arguments
won't be processed, so don't rely on any side effects.
\sa qCritical()
*/
@ -633,7 +620,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
\a string identifier. By default, all message types are enabled.
Only one translation unit in a library or executable can define a category
with a specific name. The implicitly defined QLoggingCategory object is
with a specific name. The implicitly-defined QLoggingCategory object is
created on first use, in a thread-safe manner.
This macro must be used outside of a class or method.
@ -650,7 +637,7 @@ void QLoggingCategory::setFilterRules(const QString &rules)
and more severe are enabled, types with a lower severity are disabled.
Only one translation unit in a library or executable can define a category
with a specific name. The implicitly defined QLoggingCategory object is
with a specific name. The implicitly-defined QLoggingCategory object is
created on first use, in a thread-safe manner.
This macro must be used outside of a class or method. It is only defined

View File

@ -41,6 +41,7 @@
#include <QtCore/qfile.h>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/private/qlocking_p.h>
#include <QtCore/qstandardpaths.h>
#include <QtCore/qtextstream.h>
#include <QtCore/qdir.h>
@ -356,7 +357,7 @@ void QLoggingRegistry::initializeRules()
*/
void QLoggingRegistry::registerCategory(QLoggingCategory *cat, QtMsgType enableForLevel)
{
QMutexLocker locker(&registryMutex);
const auto locker = qt_scoped_lock(registryMutex);
if (!categories.contains(cat)) {
categories.insert(cat, enableForLevel);
@ -370,7 +371,7 @@ void QLoggingRegistry::registerCategory(QLoggingCategory *cat, QtMsgType enableF
*/
void QLoggingRegistry::unregisterCategory(QLoggingCategory *cat)
{
QMutexLocker locker(&registryMutex);
const auto locker = qt_scoped_lock(registryMutex);
categories.remove(cat);
}
@ -413,7 +414,7 @@ void QLoggingRegistry::updateRules()
QLoggingCategory::CategoryFilter
QLoggingRegistry::installFilter(QLoggingCategory::CategoryFilter filter)
{
QMutexLocker locker(&registryMutex);
const auto locker = qt_scoped_lock(registryMutex);
if (!filter)
filter = defaultCategoryFilter;

View File

@ -89,6 +89,7 @@ QT_END_NAMESPACE
#include "qprocess_p.h"
#include "qstandardpaths.h"
#include "private/qcore_unix_p.h"
#include "private/qlocking_p.h"
#ifdef Q_OS_MAC
#include <private/qcore_mac_p.h>
@ -404,7 +405,7 @@ void QProcessPrivate::startProcess()
// CFBundle is not reentrant, since CFBundleCreate might return a reference
// to a cached bundle object. Protect the bundle calls with a mutex lock.
static QBasicMutex cfbundleMutex;
QMutexLocker lock(&cfbundleMutex);
const auto locker = qt_scoped_lock(cfbundleMutex);
QCFType<CFBundleRef> bundle = CFBundleCreate(0, url);
// 'executableURL' can be either relative or absolute ...
QCFType<CFURLRef> executableURL = CFBundleCopyExecutableURL(bundle);

View File

@ -243,9 +243,15 @@ bool QSaveFile::open(OpenMode mode)
return false;
};
bool requiresDirectWrite = false;
#ifdef Q_OS_WIN
// check if it is an Alternate Data Stream
if (d->finalFileName == d->fileName && d->fileName.indexOf(QLatin1Char(':'), 2) > 1) {
requiresDirectWrite = d->finalFileName == d->fileName && d->fileName.indexOf(QLatin1Char(':'), 2) > 1;
#elif defined(Q_OS_ANDROID)
// check if it is a content:// URL
requiresDirectWrite = d->fileName.startsWith(QLatin1String("content://"));
#endif
if (requiresDirectWrite) {
// yes, we can't rename onto it...
if (d->directWriteFallback) {
if (openDirectly())
@ -254,14 +260,12 @@ bool QSaveFile::open(OpenMode mode)
d->fileEngine.reset();
} else {
QString msg =
QSaveFile::tr("QSaveFile cannot open '%1' without direct write fallback "
"enabled: path contains an Alternate Data Stream specifier")
.arg(QDir::toNativeSeparators(d->fileName));
QSaveFile::tr("QSaveFile cannot open '%1' without direct write fallback enabled.")
.arg(QDir::toNativeSeparators(d->fileName));
d->setError(QFileDevice::OpenError, msg);
}
return false;
}
#endif
d->fileEngine.reset(new QTemporaryFileEngine(&d->finalFileName, QTemporaryFileEngine::Win32NonShared));
// if the target file exists, we'll copy its permissions below,

View File

@ -47,6 +47,7 @@
#include "qdir.h"
#include "qfileinfo.h"
#include "qmutex.h"
#include "private/qlocking_p.h"
#include "qlibraryinfo.h"
#include "qtemporaryfile.h"
#include "qstandardpaths.h"
@ -210,7 +211,7 @@ QConfFile *QConfFile::fromName(const QString &fileName, bool _userPerms)
ConfFileCache *unusedCache = unusedCacheFunc();
QConfFile *confFile = 0;
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
if (!(confFile = usedHash->value(absPath))) {
if ((confFile = unusedCache->take(absPath)))
@ -225,7 +226,7 @@ QConfFile *QConfFile::fromName(const QString &fileName, bool _userPerms)
void QConfFile::clearCache()
{
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
unusedCacheFunc()->clear();
}
@ -937,7 +938,7 @@ void QConfFileSettingsPrivate::initFormat()
#endif
if (format > QSettings::IniFormat) {
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
const CustomFormatVector *customFormatVector = customFormatVectorFunc();
int i = (int)format - (int)QSettings::CustomFormat1;
@ -1052,11 +1053,11 @@ static QString make_user_path()
}
#endif // !Q_OS_WIN
static void initDefaultPaths(QMutexLocker *locker)
static std::unique_lock<QBasicMutex> initDefaultPaths(std::unique_lock<QBasicMutex> locker)
{
PathHash *pathHash = pathHashFunc();
locker->unlock();
locker.unlock();
/*
QLibraryInfo::location() uses QSettings, so in order to
@ -1065,7 +1066,7 @@ static void initDefaultPaths(QMutexLocker *locker)
*/
QString systemPath = QLibraryInfo::location(QLibraryInfo::SettingsPath) + QLatin1Char('/');
locker->relock();
locker.lock();
if (pathHash->isEmpty()) {
/*
Lazy initialization of pathHash. We initialize the
@ -1096,6 +1097,8 @@ static void initDefaultPaths(QMutexLocker *locker)
#endif
#endif // Q_OS_WIN
}
return locker;
}
static Path getPath(QSettings::Format format, QSettings::Scope scope)
@ -1103,10 +1106,10 @@ static Path getPath(QSettings::Format format, QSettings::Scope scope)
Q_ASSERT((int)QSettings::NativeFormat == 0);
Q_ASSERT((int)QSettings::IniFormat == 1);
QMutexLocker locker(&settingsGlobalMutex);
auto locker = qt_unique_lock(settingsGlobalMutex);
PathHash *pathHash = pathHashFunc();
if (pathHash->isEmpty())
initDefaultPaths(&locker);
locker = initDefaultPaths(std::move(locker));
Path result = pathHash->value(pathHashKey(format, scope));
if (!result.path.isEmpty())
@ -1120,7 +1123,7 @@ static Path getPath(QSettings::Format format, QSettings::Scope scope)
// Note: Suitable only for autotests.
void Q_AUTOTEST_EXPORT clearDefaultPaths()
{
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
pathHashFunc()->clear();
}
#endif // QT_BUILD_INTERNAL && Q_XDG_PLATFORM && !QT_NO_STANDARDPATHS
@ -1200,7 +1203,7 @@ QConfFileSettingsPrivate::QConfFileSettingsPrivate(const QString &fileName,
QConfFileSettingsPrivate::~QConfFileSettingsPrivate()
{
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
ConfFileHash *usedHash = usedHashFunc();
ConfFileCache *unusedCache = unusedCacheFunc();
@ -1239,7 +1242,7 @@ void QConfFileSettingsPrivate::remove(const QString &key)
QSettingsKey theKey(key, caseSensitivity);
QSettingsKey prefix(key + QLatin1Char('/'), caseSensitivity);
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
ensureSectionParsed(confFile, theKey);
ensureSectionParsed(confFile, prefix);
@ -1267,7 +1270,7 @@ void QConfFileSettingsPrivate::set(const QString &key, const QVariant &value)
QConfFile *confFile = confFiles.at(0);
QSettingsKey theKey(key, caseSensitivity, nextPosition++);
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
confFile->removedKeys.remove(theKey);
confFile->addedKeys.insert(theKey, value);
}
@ -1279,7 +1282,7 @@ bool QConfFileSettingsPrivate::get(const QString &key, QVariant *value) const
bool found = false;
for (auto confFile : qAsConst(confFiles)) {
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
if (!confFile->addedKeys.isEmpty()) {
j = confFile->addedKeys.constFind(theKey);
@ -1312,7 +1315,7 @@ QStringList QConfFileSettingsPrivate::children(const QString &prefix, ChildSpec
int startPos = prefix.size();
for (auto confFile : qAsConst(confFiles)) {
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
if (thePrefix.isEmpty())
ensureAllSectionsParsed(confFile);
@ -1351,7 +1354,7 @@ void QConfFileSettingsPrivate::clear()
// Note: First config file is always the most specific.
QConfFile *confFile = confFiles.at(0);
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
ensureAllSectionsParsed(confFile);
confFile->addedKeys.clear();
confFile->removedKeys = confFile->originalKeys;
@ -1363,7 +1366,7 @@ void QConfFileSettingsPrivate::sync()
// error we just try to go on and make the best of it
for (auto confFile : qAsConst(confFiles)) {
QMutexLocker locker(&confFile->mutex);
const auto locker = qt_scoped_lock(confFile->mutex);
syncConfFile(confFile);
}
}
@ -3521,10 +3524,10 @@ void QSettings::setUserIniPath(const QString &dir)
*/
void QSettings::setPath(Format format, Scope scope, const QString &path)
{
QMutexLocker locker(&settingsGlobalMutex);
auto locker = qt_unique_lock(settingsGlobalMutex);
PathHash *pathHash = pathHashFunc();
if (pathHash->isEmpty())
initDefaultPaths(&locker);
locker = initDefaultPaths(std::move(locker));
pathHash->insert(pathHashKey(format, scope), Path(path + QDir::separator(), true));
}
@ -3604,7 +3607,7 @@ QSettings::Format QSettings::registerFormat(const QString &extension, ReadFunc r
Q_ASSERT(caseSensitivity == Qt::CaseSensitive);
#endif
QMutexLocker locker(&settingsGlobalMutex);
const auto locker = qt_scoped_lock(settingsGlobalMutex);
CustomFormatVector *customFormatVector = customFormatVectorFunc();
int index = customFormatVector->size();
if (index == 16) // the QSettings::Format enum has room for 16 custom formats

View File

@ -44,6 +44,7 @@
#include "qpair.h"
#include "qmutex.h"
#include "qvarlengtharray.h"
#include "private/qlocking_p.h"
QT_BEGIN_NAMESPACE
@ -135,7 +136,7 @@ os_log_type_t AppleUnifiedLogger::logTypeForMessageType(QtMsgType msgType)
os_log_t AppleUnifiedLogger::cachedLog(const QString &subsystem, const QString &category)
{
static QBasicMutex mutex;
QMutexLocker locker(&mutex);
const auto locker = qt_scoped_lock(mutex);
static QHash<QPair<QString, QString>, os_log_t> logs;
const auto cacheKey = qMakePair(subsystem, category);

View File

@ -55,6 +55,7 @@
#include <qfileinfo.h>
#include <qmutex.h>
#include <private/qloggingregistry_p.h>
#include <qscopeguard.h>
#include <qstandardpaths.h>
#ifndef QT_NO_QOBJECT
#include <qthread.h>
@ -70,6 +71,7 @@
#include <private/qfactoryloader_p.h>
#include <private/qfunctions_p.h>
#include <private/qlocale_p.h>
#include <private/qlocking_p.h>
#include <private/qhooks_p.h>
#ifndef QT_NO_QOBJECT
@ -294,7 +296,7 @@ void qAddPreRoutine(QtStartUpFunction p)
// Due to C++11 parallel dynamic initialization, this can be called
// from multiple threads.
QMutexLocker locker(&globalRoutinesMutex);
const auto locker = qt_scoped_lock(globalRoutinesMutex);
list->prepend(p); // in case QCoreApplication is re-created, see qt_call_pre_routines
}
@ -303,7 +305,7 @@ void qAddPostRoutine(QtCleanUpFunction p)
QVFuncList *list = postRList();
if (!list)
return;
QMutexLocker locker(&globalRoutinesMutex);
const auto locker = qt_scoped_lock(globalRoutinesMutex);
list->prepend(p);
}
@ -312,7 +314,7 @@ void qRemovePostRoutine(QtCleanUpFunction p)
QVFuncList *list = postRList();
if (!list)
return;
QMutexLocker locker(&globalRoutinesMutex);
const auto locker = qt_scoped_lock(globalRoutinesMutex);
list->removeAll(p);
}
@ -323,7 +325,7 @@ static void qt_call_pre_routines()
QVFuncList list;
{
QMutexLocker locker(&globalRoutinesMutex);
const auto locker = qt_scoped_lock(globalRoutinesMutex);
// Unlike qt_call_post_routines, we don't empty the list, because
// Q_COREAPP_STARTUP_FUNCTION is a macro, so the user expects
// the function to be executed every time QCoreApplication is created.
@ -342,7 +344,7 @@ void Q_CORE_EXPORT qt_call_post_routines()
QVFuncList list;
{
// extract the current list and make the stored list empty
QMutexLocker locker(&globalRoutinesMutex);
const auto locker = qt_scoped_lock(globalRoutinesMutex);
qSwap(*postRList, list);
}
@ -522,7 +524,7 @@ void QCoreApplicationPrivate::cleanupThreadData()
#endif
// need to clear the state of the mainData, just in case a new QCoreApplication comes along.
QMutexLocker locker(&threadData->postEventList.mutex);
const auto locker = qt_scoped_lock(threadData->postEventList.mutex);
for (int i = 0; i < threadData->postEventList.size(); ++i) {
const QPostEvent &pe = threadData->postEventList.at(i);
if (pe.event) {
@ -1705,7 +1707,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
++data->postEventList.recursion;
QMutexLocker locker(&data->postEventList.mutex);
auto locker = qt_unique_lock(data->postEventList.mutex);
// by default, we assume that the event dispatcher can go to sleep after
// processing all events. if any new events are posted while we send
@ -1821,13 +1823,8 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
// for the next event.
const_cast<QPostEvent &>(pe).event = 0;
struct MutexUnlocker
{
QMutexLocker &m;
MutexUnlocker(QMutexLocker &m) : m(m) { m.unlock(); }
~MutexUnlocker() { m.relock(); }
};
MutexUnlocker unlocker(locker);
locker.unlock();
const auto relocker = qScopeGuard([&locker] { locker.lock(); });
QScopedPointer<QEvent> event_deleter(e); // will delete the event (with the mutex unlocked)
@ -1864,7 +1861,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
{
QThreadData *data = receiver ? receiver->d_func()->threadData : QThreadData::current();
QMutexLocker locker(&data->postEventList.mutex);
auto locker = qt_unique_lock(data->postEventList.mutex);
// the QObject destructor calls this function directly. this can
// happen while the event loop is in the middle of posting events,
@ -1927,7 +1924,7 @@ void QCoreApplicationPrivate::removePostedEvent(QEvent * event)
QThreadData *data = QThreadData::current();
QMutexLocker locker(&data->postEventList.mutex);
const auto locker = qt_scoped_lock(data->postEventList.mutex);
if (data->postEventList.size() == 0) {
#if defined(QT_DEBUG)

View File

@ -47,6 +47,7 @@
#ifndef QT_NO_QOBJECT
#include "qmutex.h"
#include <private/qthread_p.h>
#include <private/qlocking_p.h>
#endif
#include "qtextstream.h"
#include <ctype.h>
@ -919,7 +920,7 @@ void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerI
{
QThreadData *data = object->d_func()->threadData;
QMutexLocker locker(&data->postEventList.mutex);
const auto locker = qt_scoped_lock(data->postEventList.mutex);
if (data->postEventList.size() == 0)
return;
for (int i = 0; i < data->postEventList.size(); ++i) {

View File

@ -100,7 +100,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
QEventDispatcherWin32Private::QEventDispatcherWin32Private()
: threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0),
wakeUps(0), activateNotifiersPosted(false),
getMessageHook(0), wakeUps(0), activateNotifiersPosted(false),
winEventNotifierActivatedEvent(NULL)
{
}
@ -245,9 +245,6 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
case WM_QT_SENDPOSTEDEVENTS:
Q_ASSERT(d != 0);
// Allow posting WM_QT_SENDPOSTEDEVENTS message.
d->wakeUps.storeRelaxed(0);
// We send posted events manually, if the window procedure was invoked
// by the foreign event loop (e.g. from the native modal dialog).
q->sendPostedEvents();
@ -257,9 +254,9 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
return DefWindowProc(hwnd, message, wp, lp);
}
static inline UINT inputTimerMask()
static inline UINT inputQueueMask()
{
UINT result = QS_TIMER | QS_INPUT | QS_RAWINPUT;
UINT result = QS_ALLEVENTS;
// QTBUG 28513, QTBUG-29097, QTBUG-29435: QS_TOUCH, QS_POINTER became part of
// QS_INPUT in Windows Kit 8. They should not be used when running on pre-Windows 8.
#if WINVER > 0x0601
@ -269,6 +266,25 @@ static inline UINT inputTimerMask()
return result;
}
LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
{
QEventDispatcherWin32 *q = qobject_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
Q_ASSERT(q != 0);
QEventDispatcherWin32Private *d = q->d_func();
MSG *msg = reinterpret_cast<MSG *>(lp);
static const UINT mask = inputQueueMask();
if (HIWORD(GetQueueStatus(mask)) == 0 && wp == PM_REMOVE) {
// Allow posting WM_QT_SENDPOSTEDEVENTS message.
d->wakeUps.storeRelaxed(0);
if (!(msg->hwnd == d->internalHwnd && msg->message == WM_QT_SENDPOSTEDEVENTS)) {
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS,
WMWP_QT_TOFOREIGNLOOP, 0);
}
}
return d->getMessageHook ? CallNextHookEx(0, code, wp, lp) : 0;
}
// Provide class name and atom for the message window used by
// QEventDispatcherWin32Private via Q_GLOBAL_STATIC shared between threads.
struct QWindowsMessageWindowClassContext
@ -447,6 +463,14 @@ void QEventDispatcherWin32::createInternalHwnd()
return;
d->internalHwnd = qt_create_internal_window(this);
// setup GetMessage hook needed to drive our posted events
d->getMessageHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) qt_GetMessageHook, NULL, GetCurrentThreadId());
if (Q_UNLIKELY(!d->getMessageHook)) {
int errorCode = GetLastError();
qFatal("Qt: INTERNAL ERROR: failed to install GetMessage hook: %d, %ls",
errorCode, qUtf16Printable(qt_error_string(errorCode)));
}
// start all normal timers
for (int i = 0; i < d->timerVec.count(); ++i)
d->registerTimer(d->timerVec.at(i));
@ -499,7 +523,6 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
bool canWait;
bool retVal = false;
bool needWM_QT_SENDPOSTEDEVENTS = false;
do {
DWORD waitRet = 0;
DWORD nCount = 0;
@ -549,11 +572,8 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
if (haveMessage) {
if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) {
// Set result to 'true', if the message was sent by wakeUp().
if (msg.wParam == WMWP_QT_FROMWAKEUP) {
d->wakeUps.storeRelaxed(0);
if (msg.wParam == WMWP_QT_FROMWAKEUP)
retVal = true;
}
needWM_QT_SENDPOSTEDEVENTS = true;
continue;
}
if (msg.message == WM_TIMER) {
@ -573,22 +593,10 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
}
if (!filterNativeEvent(QByteArrayLiteral("windows_generic_MSG"), &msg, 0)) {
// Post WM_QT_SENDPOSTEDEVENTS before calling external code,
// as it can start a foreign event loop.
if (needWM_QT_SENDPOSTEDEVENTS) {
needWM_QT_SENDPOSTEDEVENTS = false;
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS,
WMWP_QT_TOFOREIGNLOOP, 0);
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} else if (waitRet - WAIT_OBJECT_0 < nCount) {
if (needWM_QT_SENDPOSTEDEVENTS) {
needWM_QT_SENDPOSTEDEVENTS = false;
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS,
WMWP_QT_TOFOREIGNLOOP, 0);
}
activateEventNotifiers();
} else {
// nothing todo so break
@ -606,21 +614,12 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
emit awake();
if (waitRet - WAIT_OBJECT_0 < nCount) {
if (needWM_QT_SENDPOSTEDEVENTS) {
needWM_QT_SENDPOSTEDEVENTS = false;
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS,
WMWP_QT_TOFOREIGNLOOP, 0);
}
activateEventNotifiers();
retVal = true;
}
}
} while (canWait);
if (needWM_QT_SENDPOSTEDEVENTS)
PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS,
WMWP_QT_TOFOREIGNLOOP, 0);
return retVal;
}
@ -1004,6 +1003,10 @@ void QEventDispatcherWin32::closingDown()
d->timerDict.clear();
d->closingDown = true;
if (d->getMessageHook)
UnhookWindowsHookEx(d->getMessageHook);
d->getMessageHook = 0;
}
bool QEventDispatcherWin32::event(QEvent *e)

View File

@ -113,6 +113,7 @@ protected:
private:
friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
friend LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int, WPARAM, LPARAM);
};
struct QSockNot {
@ -166,6 +167,7 @@ public:
// internal window handle used for socketnotifiers/timers/etc
HWND internalHwnd;
HHOOK getMessageHook;
// for controlling when to send posted events
QAtomicInt wakeUps;

View File

@ -112,6 +112,13 @@ QT_BEGIN_NAMESPACE
are returned by classInfo(), and you can search for pairs with
indexOfClassInfo().
\note Operations that use the meta object system are generally thread-
safe, as QMetaObjects are typically static read-only instances
generated at compile time. However, if meta objects are dynamically
modified by the application (for instance, when using QQmlPropertyMap),
then the application has to explicitly synchronize access to the
respective meta object.
\sa QMetaClassInfo, QMetaEnum, QMetaMethod, QMetaProperty, QMetaType,
{Meta-Object System}
*/

View File

@ -4616,7 +4616,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
It works exactly like the Q_NAMESPACE macro. However, the external
\c{staticMetaObject} variable that gets defined in the namespace
is declared with the supplied \c{EXPORT_MACRO} qualifier. This is
useful f.i. if the object needs to be exported from a dynamic library.
useful if the object needs to be exported from a dynamic library.
\sa Q_NAMESPACE, {Creating Shared Libraries}
*/

View File

@ -604,8 +604,8 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiv
\since 5.12
\overload
Creates a connection from the timeout() signal to \a slot, and returns a
handle to the connection.
Creates a connection of type \a connectionType from the timeout() signal
to \a slot, and returns a handle to the connection.
This method is provided for convenience.
It's equivalent to calling \c {QObject::connect(timer, &QTimer::timeout, timer, slot, connectionType)}.

View File

@ -332,7 +332,7 @@ QVariant QJsonDocument::toVariant() const
}
/*!
Converts the QJsonDocument to a UTF-8 encoded JSON document.
Converts the QJsonDocument to an indented, UTF-8 encoded JSON document.
\sa fromJson()
*/

View File

@ -2056,7 +2056,7 @@ bool QTextStreamPrivate::getReal(double *f)
// nan/+inf/-inf, so here we also check for uppercase and mixed
// case versions.
if (!qstricmp(buf, "nan") || !qstricmp(buf, "+nan") || !qstricmp(buf, "-nan")) {
*f = qSNaN();
*f = qQNaN();
return true;
} else if (!qstricmp(buf, "+inf") || !qstricmp(buf, "inf")) {
*f = qInf();

View File

@ -2538,6 +2538,10 @@ QStateMachine::~QStateMachine()
state machine. Commonly, this could mean that one of the states has not been given
any parent or added to any machine. The context of this error is the source state of
the transition.
\value StateMachineChildModeSetToParallelError The machine's \l childMode
property was set to \l{QState::ParallelStates}. This is illegal.
Only states may be declared as parallel, not the state machine
itself. This enum value was added in Qt 5.14.
\sa setErrorState()
*/

View File

@ -1465,18 +1465,18 @@ QChar::UnicodeVersion QChar::currentUnicodeVersion() noexcept
}
template <typename Traits, typename T>
Q_DECL_CONST_FUNCTION static inline T convertCase_helper(T uc) noexcept
template <typename T>
Q_DECL_CONST_FUNCTION static inline T convertCase_helper(T uc, QUnicodeTables::Case which) noexcept
{
const QUnicodeTables::Properties *prop = qGetProp(uc);
const auto fold = qGetProp(uc)->cases[which];
if (Q_UNLIKELY(Traits::caseSpecial(prop))) {
const ushort *specialCase = specialCaseMap + Traits::caseDiff(prop);
if (Q_UNLIKELY(fold.special)) {
const ushort *specialCase = specialCaseMap + fold.diff;
// so far, there are no special cases beyond BMP (guaranteed by the qunicodetables generator)
return *specialCase == 1 ? specialCase[1] : uc;
}
return uc + Traits::caseDiff(prop);
return uc + fold.diff;
}
/*!
@ -1496,7 +1496,7 @@ uint QChar::toLower(uint ucs4) noexcept
{
if (ucs4 > LastValidCodePoint)
return ucs4;
return convertCase_helper<QUnicodeTables::LowercaseTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::LowerCase);
}
/*!
@ -1516,7 +1516,7 @@ uint QChar::toUpper(uint ucs4) noexcept
{
if (ucs4 > LastValidCodePoint)
return ucs4;
return convertCase_helper<QUnicodeTables::UppercaseTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::UpperCase);
}
/*!
@ -1536,7 +1536,7 @@ uint QChar::toTitleCase(uint ucs4) noexcept
{
if (ucs4 > LastValidCodePoint)
return ucs4;
return convertCase_helper<QUnicodeTables::TitlecaseTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::TitleCase);
}
static inline uint foldCase(const ushort *ch, const ushort *start)
@ -1544,7 +1544,7 @@ static inline uint foldCase(const ushort *ch, const ushort *start)
uint ucs4 = *ch;
if (QChar::isLowSurrogate(ucs4) && ch > start && QChar::isHighSurrogate(*(ch - 1)))
ucs4 = QChar::surrogateToUcs4(*(ch - 1), ucs4);
return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::CaseFold);
}
static inline uint foldCase(uint ch, uint &last) noexcept
@ -1553,12 +1553,12 @@ static inline uint foldCase(uint ch, uint &last) noexcept
if (QChar::isLowSurrogate(ucs4) && QChar::isHighSurrogate(last))
ucs4 = QChar::surrogateToUcs4(last, ucs4);
last = ch;
return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::CaseFold);
}
static inline ushort foldCase(ushort ch) noexcept
{
return convertCase_helper<QUnicodeTables::CasefoldTraits>(ch);
return convertCase_helper(ch, QUnicodeTables::CaseFold);
}
static inline QChar foldCase(QChar ch) noexcept
@ -1582,7 +1582,7 @@ uint QChar::toCaseFolded(uint ucs4) noexcept
{
if (ucs4 > LastValidCodePoint)
return ucs4;
return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
return convertCase_helper(ucs4, QUnicodeTables::CaseFold);
}
/*!

View File

@ -72,6 +72,10 @@
# include <time.h>
#endif
#include "private/qcalendarbackend_p.h"
#include "private/qgregoriancalendar_p.h"
#include "qcalendar.h"
QT_BEGIN_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
@ -341,8 +345,10 @@ QByteArray QLocalePrivate::bcp47Name(char separator) const
return localeId.withLikelySubtagsRemoved().name(separator);
}
static const QLocaleData *findLocaleDataById(const QLocaleId &localeId)
static const QLocaleData *findLocaleDataById(const QLocaleId &lid)
{
QLocaleId localeId = lid.withLikelySubtagsAdded();
const uint idx = locale_index[localeId.language_id];
const QLocaleData *data = locale_data + idx;
@ -443,6 +449,12 @@ const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLoca
return locale_data + idx;
}
uint QLocaleData::findLocaleOffset(QLocale::Language language, QLocale::Script script,
QLocale::Country country)
{
return findLocaleData(language, script, country) - locale_data;
}
static bool parse_locale_tag(const QString &input, int &i, QString *result,
const QString &separators)
{
@ -550,6 +562,16 @@ static const QLocaleData *findLocaleData(const QString &name)
return QLocaleData::findLocaleData(lang, script, cntry);
}
static uint findLocaleOffset(const QString &name)
{
QLocale::Language lang;
QLocale::Script script;
QLocale::Country cntry;
QLocalePrivate::getLangAndCountry(name, lang, script, cntry);
return QLocaleData::findLocaleOffset(lang, script, cntry);
}
QString qt_readEscapedFormatString(QStringView format, int *idx)
{
int &i = *idx;
@ -617,8 +639,8 @@ static QLocale::NumberOptions default_number_options = QLocale::DefaultNumberOpt
static const QLocaleData *const c_data = locale_data;
static QLocalePrivate *c_private()
{
static QLocalePrivate c_locale =
{ c_data, Q_BASIC_ATOMIC_INITIALIZER(1), QLocale::OmitGroupSeparator };
static QLocalePrivate c_locale{
c_data, Q_BASIC_ATOMIC_INITIALIZER(1), 0, QLocale::OmitGroupSeparator };
return &c_locale;
}
@ -803,9 +825,11 @@ static QLocalePrivate *localePrivateByName(const QString &name)
{
if (name == QLatin1String("C"))
return c_private();
// TODO: Remove this version, and use offset everywhere
const QLocaleData *data = findLocaleData(name);
return QLocalePrivate::create(data, data->m_language_id == QLocale::C ?
QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
return QLocalePrivate::create(data, findLocaleOffset(name),
data->m_language_id == QLocale::C
? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
}
static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Script script,
@ -814,7 +838,9 @@ static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Sc
if (language == QLocale::C)
return c_private();
// TODO: Remove pointer, use index instead
const QLocaleData *data = QLocaleData::findLocaleData(language, script, country);
const uint offset = QLocaleData::findLocaleOffset(language, script, country);
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions;
@ -823,7 +849,7 @@ static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Sc
numberOptions = default_number_options;
data = defaultData();
}
return QLocalePrivate::create(data, numberOptions);
return QLocalePrivate::create(data, offset, numberOptions);
}
@ -1957,7 +1983,7 @@ QString QLocale::toString(qulonglong i) const
QString QLocale::toString(const QDate &date, const QString &format) const
{
return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
return QCalendar().dateTimeToString(format, QDateTime(), date, QTime(), *this);
}
#endif
@ -1972,7 +1998,7 @@ QString QLocale::toString(const QDate &date, const QString &format) const
*/
QString QLocale::toString(const QDate &date, QStringView format) const
{
return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
return QCalendar().dateTimeToString(format, QDateTime(), date, QTime(), *this);
}
/*!
@ -2027,7 +2053,7 @@ static bool timeFormatContainsAP(QStringView format)
*/
QString QLocale::toString(const QTime &time, const QString &format) const
{
return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
return QCalendar().dateTimeToString(format, QDateTime(), QDate(), time, *this);
}
#endif
@ -2042,7 +2068,7 @@ QString QLocale::toString(const QTime &time, const QString &format) const
*/
QString QLocale::toString(const QTime &time, QStringView format) const
{
return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
return QCalendar().dateTimeToString(format, QDateTime(), QDate(), time, *this);
}
#if QT_STRINGVIEW_LEVEL < 2
@ -2058,7 +2084,7 @@ QString QLocale::toString(const QTime &time, QStringView format) const
QString QLocale::toString(const QDateTime &dateTime, const QString &format) const
{
return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
return QCalendar().dateTimeToString(format, dateTime, QDate(), QTime(), *this);
}
#endif
@ -2073,7 +2099,58 @@ QString QLocale::toString(const QDateTime &dateTime, const QString &format) cons
*/
QString QLocale::toString(const QDateTime &dateTime, QStringView format) const
{
return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
return QCalendar().dateTimeToString(format, dateTime, QDate(), QTime(), *this);
}
QString QLocale::toString(const QDate &date, QStringView format, QCalendar cal) const
{
return cal.dateTimeToString(format, QDateTime(), date, QTime(), *this);
}
QString QLocale::toString(const QDate &date, QLocale::FormatType format, QCalendar cal) const
{
if (!date.isValid())
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (cal.isGregorian() && d->m_data == systemData()) {
QVariant res = systemLocale()->query(format == LongFormat
? QSystemLocale::DateToStringLong
: QSystemLocale::DateToStringShort,
date);
if (!res.isNull())
return res.toString();
}
#endif
QString format_str = dateFormat(format);
return toString(date, format_str, cal);
}
QString QLocale::toString(const QDateTime &dateTime, QLocale::FormatType format,
QCalendar cal) const
{
if (!dateTime.isValid())
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (cal.isGregorian() && d->m_data == systemData()) {
QVariant res = systemLocale()->query(format == LongFormat
? QSystemLocale::DateTimeToStringLong
: QSystemLocale::DateTimeToStringShort,
dateTime);
if (!res.isNull())
return res.toString();
}
#endif
const QString format_str = dateTimeFormat(format);
return toString(dateTime, format_str, cal);
}
QString QLocale::toString(const QDateTime &dateTime, QStringView format, QCalendar cal) const
{
return cal.dateTimeToString(format, dateTime, QDate(), QTime(), *this);
}
/*!
@ -2232,6 +2309,7 @@ QString QLocale::dateTimeFormat(FormatType format) const
return dateFormat(format) + QLatin1Char(' ') + timeFormat(format);
}
#if QT_CONFIG(datestring)
/*!
\since 4.4
@ -2243,12 +2321,19 @@ QString QLocale::dateTimeFormat(FormatType format) const
\sa timeFormat(), toDate(), toDateTime(), QTime::fromString()
*/
#if QT_CONFIG(datestring)
QTime QLocale::toTime(const QString &string, FormatType format) const
{
return toTime(string, timeFormat(format));
}
#endif
/*!
\since 5.14
\overload
*/
QTime QLocale::toTime(const QString &string, FormatType format, QCalendar cal) const
{
return toTime(string, timeFormat(format), cal);
}
/*!
\since 4.4
@ -2261,12 +2346,19 @@ QTime QLocale::toTime(const QString &string, FormatType format) const
\sa dateFormat(), toTime(), toDateTime(), QDate::fromString()
*/
#if QT_CONFIG(datestring)
QDate QLocale::toDate(const QString &string, FormatType format) const
{
return toDate(string, dateFormat(format));
}
#endif
/*!
\since 5.14
\overload
*/
QDate QLocale::toDate(const QString &string, FormatType format, QCalendar cal) const
{
return toDate(string, dateFormat(format), cal);
}
/*!
\since 4.4
@ -2279,13 +2371,19 @@ QDate QLocale::toDate(const QString &string, FormatType format) const
\sa dateTimeFormat(), toTime(), toDate(), QDateTime::fromString()
*/
#if QT_CONFIG(datestring)
QDateTime QLocale::toDateTime(const QString &string, FormatType format) const
{
return toDateTime(string, dateTimeFormat(format));
}
#endif
/*!
\since 5.14
\overload
*/
QDateTime QLocale::toDateTime(const QString &string, FormatType format, QCalendar cal) const
{
return toDateTime(string, dateTimeFormat(format), cal);
}
/*!
\since 4.4
@ -2298,22 +2396,30 @@ QDateTime QLocale::toDateTime(const QString &string, FormatType format) const
\sa timeFormat(), toDate(), toDateTime(), QTime::fromString()
*/
#if QT_CONFIG(datestring)
QTime QLocale::toTime(const QString &string, const QString &format) const
{
return toTime(string, format, QCalendar());
}
/*!
\since 5.14
\overload
*/
QTime QLocale::toTime(const QString &string, const QString &format, QCalendar cal) const
{
QTime time;
#if QT_CONFIG(datetimeparser)
QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString);
QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
dt.fromString(string, 0, &time);
#else
Q_UNUSED(cal);
Q_UNUSED(string);
Q_UNUSED(format);
#endif
return time;
}
#endif
/*!
\since 4.4
@ -2329,22 +2435,30 @@ QTime QLocale::toTime(const QString &string, const QString &format) const
\sa dateFormat(), toTime(), toDateTime(), QDate::fromString()
*/
#if QT_CONFIG(datestring)
QDate QLocale::toDate(const QString &string, const QString &format) const
{
return toDate(string, format, QCalendar());
}
/*!
\since 5.14
\overload
*/
QDate QLocale::toDate(const QString &string, const QString &format, QCalendar cal) const
{
QDate date;
#if QT_CONFIG(datetimeparser)
QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString);
QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
dt.fromString(string, &date, 0);
#else
Q_UNUSED(string);
Q_UNUSED(format);
Q_UNUSED(cal);
#endif
return date;
}
#endif
/*!
\since 4.4
@ -2360,25 +2474,33 @@ QDate QLocale::toDate(const QString &string, const QString &format) const
\sa dateTimeFormat(), toTime(), toDate(), QDateTime::fromString()
*/
#if QT_CONFIG(datestring)
QDateTime QLocale::toDateTime(const QString &string, const QString &format) const
{
return toDateTime(string, format, QCalendar());
}
/*!
\since 5.14
\overload
*/
QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCalendar cal) const
{
#if QT_CONFIG(datetimeparser)
QTime time;
QDate date;
QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString);
QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format) && dt.fromString(string, &date, &time))
return QDateTime(date, time);
#else
Q_UNUSED(string);
Q_UNUSED(format);
Q_UNUSED(cal);
#endif
return QDateTime(QDate(), QTime(-1, -1, -1));
}
#endif
#endif // datestring
/*!
\since 4.1
@ -2623,38 +2745,7 @@ QList<QLocale::Country> QLocale::countriesForLanguage(Language language)
*/
QString QLocale::monthName(int month, FormatType type) const
{
if (month < 1 || month > 12)
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (d->m_data == systemData()) {
QVariant res = systemLocale()->query(type == LongFormat
? QSystemLocale::MonthNameLong
: QSystemLocale::MonthNameShort,
month);
if (!res.isNull())
return res.toString();
}
#endif
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = d->m_data->m_long_month_names_idx;
size = d->m_data->m_long_month_names_size;
break;
case QLocale::ShortFormat:
idx = d->m_data->m_short_month_names_idx;
size = d->m_data->m_short_month_names_size;
break;
case QLocale::NarrowFormat:
idx = d->m_data->m_narrow_month_names_idx;
size = d->m_data->m_narrow_month_names_size;
break;
default:
return QString();
}
return getLocaleListData(months_data + idx, size, month - 1);
return QCalendar().monthName(*this, month, QCalendar::Unspecified, type);
}
/*!
@ -2670,41 +2761,7 @@ QString QLocale::monthName(int month, FormatType type) const
*/
QString QLocale::standaloneMonthName(int month, FormatType type) const
{
if (month < 1 || month > 12)
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (d->m_data == systemData()) {
QVariant res = systemLocale()->query(type == LongFormat
? QSystemLocale::StandaloneMonthNameLong
: QSystemLocale::StandaloneMonthNameShort,
month);
if (!res.isNull())
return res.toString();
}
#endif
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = d->m_data->m_standalone_long_month_names_idx;
size = d->m_data->m_standalone_long_month_names_size;
break;
case QLocale::ShortFormat:
idx = d->m_data->m_standalone_short_month_names_idx;
size = d->m_data->m_standalone_short_month_names_size;
break;
case QLocale::NarrowFormat:
idx = d->m_data->m_standalone_narrow_month_names_idx;
size = d->m_data->m_standalone_narrow_month_names_size;
break;
default:
return QString();
}
QString name = getLocaleListData(months_data + idx, size, month - 1);
if (name.isEmpty())
return monthName(month, type);
return name;
return QCalendar().standaloneMonthName(*this, month, QCalendar::Unspecified, type);
}
/*!
@ -2718,40 +2775,7 @@ QString QLocale::standaloneMonthName(int month, FormatType type) const
*/
QString QLocale::dayName(int day, FormatType type) const
{
if (day < 1 || day > 7)
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (d->m_data == systemData()) {
QVariant res = systemLocale()->query(type == LongFormat
? QSystemLocale::DayNameLong
: QSystemLocale::DayNameShort,
day);
if (!res.isNull())
return res.toString();
}
#endif
if (day == 7)
day = 0;
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = d->m_data->m_long_day_names_idx;
size = d->m_data->m_long_day_names_size;
break;
case QLocale::ShortFormat:
idx = d->m_data->m_short_day_names_idx;
size = d->m_data->m_short_day_names_size;
break;
case QLocale::NarrowFormat:
idx = d->m_data->m_narrow_day_names_idx;
size = d->m_data->m_narrow_day_names_size;
break;
default:
return QString();
}
return getLocaleListData(days_data + idx, size, day);
return QCalendar().weekDayName(*this, day, type);
}
/*!
@ -2767,13 +2791,191 @@ QString QLocale::dayName(int day, FormatType type) const
\sa dayName(), standaloneMonthName()
*/
QString QLocale::standaloneDayName(int day, FormatType type) const
{
return QCalendar().standaloneWeekDayName(*this, day, type);
}
// Calendar look-up of month and day names:
/*!
\internal
*/
static QString rawMonthName(const QCalendarLocale &localeData,
const ushort *monthsData, int month,
QLocale::FormatType type)
{
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = localeData.m_long.index;
size = localeData.m_long.size;
break;
case QLocale::ShortFormat:
idx = localeData.m_short.index;
size = localeData.m_short.size;
break;
case QLocale::NarrowFormat:
idx = localeData.m_narrow.index;
size = localeData.m_narrow.size;
break;
default:
return QString();
}
return getLocaleListData(monthsData + idx, size, month - 1);
}
/*!
\internal
*/
static QString rawStandaloneMonthName(const QCalendarLocale &localeData,
const ushort *monthsData, int month,
QLocale::FormatType type)
{
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = localeData.m_standalone_long.index;
size = localeData.m_standalone_long.size;
break;
case QLocale::ShortFormat:
idx = localeData.m_standalone_short.index;
size = localeData.m_standalone_short.size;
break;
case QLocale::NarrowFormat:
idx = localeData.m_standalone_narrow.index;
size = localeData.m_standalone_narrow.size;
break;
default:
return QString();
}
QString name = getLocaleListData(monthsData + idx, size, month - 1);
return name.isEmpty() ? rawMonthName(localeData, monthsData, month, type) : name;
}
/*!
\internal
*/
static QString rawWeekDayName(const QLocaleData *data, const int day,
QLocale::FormatType type)
{
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = data->m_long_day_names_idx;
size = data->m_long_day_names_size;
break;
case QLocale::ShortFormat:
idx = data->m_short_day_names_idx;
size = data->m_short_day_names_size;
break;
case QLocale::NarrowFormat:
idx = data->m_narrow_day_names_idx;
size = data->m_narrow_day_names_size;
break;
default:
return QString();
}
return getLocaleListData(days_data + idx, size, day == 7 ? 0 : day);
}
/*!
\internal
*/
static QString rawStandaloneWeekDayName(const QLocaleData *data, const int day,
QLocale::FormatType type)
{
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = data->m_standalone_long_day_names_idx;
size = data->m_standalone_long_day_names_size;
break;
case QLocale::ShortFormat:
idx = data->m_standalone_short_day_names_idx;
size = data->m_standalone_short_day_names_size;
break;
case QLocale::NarrowFormat:
idx = data->m_standalone_narrow_day_names_idx;
size = data->m_standalone_narrow_day_names_size;
break;
default:
return QString();
}
QString name = getLocaleListData(days_data + idx, size, day == 7 ? 0 : day);
if (name.isEmpty())
return rawWeekDayName(data, day, type);
return name;
}
// Refugees from qcalendar.cpp that need functions above:
QString QCalendarBackend::monthName(const QLocale &locale, int month, int,
QLocale::FormatType format) const
{
Q_ASSERT(month >= 1 && month <= maximumMonthsInYear());
return rawMonthName(localeMonthIndexData()[locale.d->m_data_offset],
localeMonthData(), month, format);
}
QString QGregorianCalendar::monthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const
{
#ifndef QT_NO_SYSTEMLOCALE
if (locale.d->m_data == systemData()) {
Q_ASSERT(month >= 1 && month <= 12);
QVariant res = systemLocale()->query(format == QLocale::LongFormat
? QSystemLocale::MonthNameLong
: QSystemLocale::MonthNameShort,
month);
if (!res.isNull())
return res.toString();
}
#endif
return QCalendarBackend::monthName(locale, month, year, format);
}
QString QCalendarBackend::standaloneMonthName(const QLocale &locale, int month, int,
QLocale::FormatType format) const
{
Q_ASSERT(month >= 1 && month <= maximumMonthsInYear());
return rawStandaloneMonthName(localeMonthIndexData()[locale.d->m_data_offset],
localeMonthData(), month, format);
}
QString QGregorianCalendar::standaloneMonthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const
{
#ifndef QT_NO_SYSTEMLOCALE
if (locale.d->m_data == systemData()) {
Q_ASSERT(month >= 1 && month <= 12);
QVariant res = systemLocale()->query(format == QLocale::LongFormat
? QSystemLocale::StandaloneMonthNameLong
: QSystemLocale::StandaloneMonthNameShort,
month);
if (!res.isNull())
return res.toString();
}
#endif
return QCalendarBackend::standaloneMonthName(locale, month, year, format);
}
// Most calendars share the common week-day naming, modulo locale.
// Calendars that don't must override these methods.
QString QCalendarBackend::weekDayName(const QLocale &locale, int day,
QLocale::FormatType format) const
{
if (day < 1 || day > 7)
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (d->m_data == systemData()) {
QVariant res = systemLocale()->query(type == LongFormat
if (locale.d->m_data == systemData()) {
QVariant res = systemLocale()->query(format == QLocale::LongFormat
? QSystemLocale::DayNameLong
: QSystemLocale::DayNameShort,
day);
@ -2781,32 +2983,32 @@ QString QLocale::standaloneDayName(int day, FormatType type) const
return res.toString();
}
#endif
if (day == 7)
day = 0;
quint32 idx, size;
switch (type) {
case QLocale::LongFormat:
idx = d->m_data->m_standalone_long_day_names_idx;
size = d->m_data->m_standalone_long_day_names_size;
break;
case QLocale::ShortFormat:
idx = d->m_data->m_standalone_short_day_names_idx;
size = d->m_data->m_standalone_short_day_names_size;
break;
case QLocale::NarrowFormat:
idx = d->m_data->m_standalone_narrow_day_names_idx;
size = d->m_data->m_standalone_narrow_day_names_size;
break;
default:
return QString();
}
QString name = getLocaleListData(days_data + idx, size, day);
if (name.isEmpty())
return dayName(day == 0 ? 7 : day, type);
return name;
return rawWeekDayName(locale.d->m_data, day, format);
}
QString QCalendarBackend::standaloneWeekDayName(const QLocale &locale, int day,
QLocale::FormatType format) const
{
if (day < 1 || day > 7)
return QString();
#ifndef QT_NO_SYSTEMLOCALE
if (locale.d->m_data == systemData()) {
QVariant res = systemLocale()->query(format == QLocale::LongFormat
? QSystemLocale::DayNameLong
: QSystemLocale::DayNameShort,
day);
if (!res.isNull())
return res.toString();
}
#endif
return rawStandaloneWeekDayName(locale.d->m_data, day, format);
}
// End of this block of qcalendar.cpp refugees. (One more follows.)
/*!
\since 4.8
@ -3010,10 +3212,11 @@ QString QLocale::pmText() const
return getLocaleData(pm_data + d->m_data->m_pm_idx, d->m_data->m_pm_size);
}
// Another intrusion from QCalendar, using some of the tools above:
QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale *q) const
QString QCalendarBackend::dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale &locale) const
{
QDate date;
QTime time;
@ -3035,6 +3238,15 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
}
QString result;
int year = 0, month = 0, day = 0;
if (formatDate) {
const auto parts = julianDayToDate(date.toJulianDay());
if (!parts.isValid())
return QString();
year = parts.year;
month = parts.month;
day = parts.day;
}
int i = 0;
while (i < format.size()) {
@ -3057,15 +3269,14 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
switch (repeat) {
case 4: {
const int yr = date.year();
const int len = (yr < 0) ? 5 : 4;
result.append(m_data->longLongToString(yr, -1, 10, len,
QLocaleData::ZeroPadded));
const int len = (year < 0) ? 5 : 4;
result.append(locale.d->m_data->longLongToString(year, -1, 10, len,
QLocaleData::ZeroPadded));
break;
}
case 2:
result.append(m_data->longLongToString(date.year() % 100, -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(year % 100, -1, 10, 2,
QLocaleData::ZeroPadded));
break;
default:
repeat = 1;
@ -3079,17 +3290,17 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
repeat = qMin(repeat, 4);
switch (repeat) {
case 1:
result.append(m_data->longLongToString(date.month()));
result.append(locale.d->m_data->longLongToString(month));
break;
case 2:
result.append(m_data->longLongToString(date.month(), -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(month, -1, 10, 2,
QLocaleData::ZeroPadded));
break;
case 3:
result.append(q->monthName(date.month(), QLocale::ShortFormat));
result.append(monthName(locale, month, year, QLocale::ShortFormat));
break;
case 4:
result.append(q->monthName(date.month(), QLocale::LongFormat));
result.append(monthName(locale, month, year, QLocale::LongFormat));
break;
}
break;
@ -3099,17 +3310,19 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
repeat = qMin(repeat, 4);
switch (repeat) {
case 1:
result.append(m_data->longLongToString(date.day()));
result.append(locale.d->m_data->longLongToString(day));
break;
case 2:
result.append(m_data->longLongToString(date.day(), -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(day, -1, 10, 2,
QLocaleData::ZeroPadded));
break;
case 3:
result.append(q->dayName(date.dayOfWeek(), QLocale::ShortFormat));
result.append(locale.dayName(
dayOfWeek(date.toJulianDay()), QLocale::ShortFormat));
break;
case 4:
result.append(q->dayName(date.dayOfWeek(), QLocale::LongFormat));
result.append(locale.dayName(
dayOfWeek(date.toJulianDay()), QLocale::LongFormat));
break;
}
break;
@ -3133,11 +3346,11 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
switch (repeat) {
case 1:
result.append(m_data->longLongToString(hour));
result.append(locale.d->m_data->longLongToString(hour));
break;
case 2:
result.append(m_data->longLongToString(hour, -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(hour, -1, 10, 2,
QLocaleData::ZeroPadded));
break;
}
break;
@ -3147,11 +3360,11 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
repeat = qMin(repeat, 2);
switch (repeat) {
case 1:
result.append(m_data->longLongToString(time.hour()));
result.append(locale.d->m_data->longLongToString(time.hour()));
break;
case 2:
result.append(m_data->longLongToString(time.hour(), -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(time.hour(), -1, 10, 2,
QLocaleData::ZeroPadded));
break;
}
break;
@ -3161,11 +3374,11 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
repeat = qMin(repeat, 2);
switch (repeat) {
case 1:
result.append(m_data->longLongToString(time.minute()));
result.append(locale.d->m_data->longLongToString(time.minute()));
break;
case 2:
result.append(m_data->longLongToString(time.minute(), -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(time.minute(), -1, 10, 2,
QLocaleData::ZeroPadded));
break;
}
break;
@ -3175,11 +3388,11 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
repeat = qMin(repeat, 2);
switch (repeat) {
case 1:
result.append(m_data->longLongToString(time.second()));
result.append(locale.d->m_data->longLongToString(time.second()));
break;
case 2:
result.append(m_data->longLongToString(time.second(), -1, 10, 2,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(time.second(), -1, 10, 2,
QLocaleData::ZeroPadded));
break;
}
break;
@ -3187,13 +3400,15 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
case 'a':
used = true;
repeat = format.mid(i + 1).startsWith(QLatin1Char('p')) ? 2 : 1;
result.append(time.hour() < 12 ? q->amText().toLower() : q->pmText().toLower());
result.append(time.hour() < 12 ? locale.amText().toLower()
: locale.pmText().toLower());
break;
case 'A':
used = true;
repeat = format.mid(i + 1).startsWith(QLatin1Char('P')) ? 2 : 1;
result.append(time.hour() < 12 ? q->amText().toUpper() : q->pmText().toUpper());
result.append(time.hour() < 12 ? locale.amText().toUpper()
: locale.pmText().toUpper());
break;
case 'z':
@ -3202,15 +3417,14 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
// note: the millisecond component is treated like the decimal part of the seconds
// so ms == 2 is always printed as "002", but ms == 200 can be either "2" or "200"
result.append(m_data->longLongToString(time.msec(), -1, 10, 3,
QLocaleData::ZeroPadded));
result.append(locale.d->m_data->longLongToString(time.msec(), -1, 10, 3,
QLocaleData::ZeroPadded));
if (repeat == 1) {
if (result.endsWith(zero()))
if (result.endsWith(locale.d->zero()))
result.chop(1);
if (result.endsWith(zero()))
if (result.endsWith(locale.d->zero()))
result.chop(1);
}
break;
case 't':
@ -3233,6 +3447,8 @@ QString QLocalePrivate::dateTimeToString(QStringView format, const QDateTime &da
return result;
}
// End of QCalendar intrustions
QString QLocaleData::doubleToString(double d, int precision, DoubleForm form,
int width, unsigned flags) const
{

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -47,7 +47,7 @@
QT_BEGIN_NAMESPACE
class QCalendar;
class QDataStream;
class QDate;
class QDateTime;
@ -1013,6 +1013,14 @@ public:
QString toString(const QDate &date, FormatType format = LongFormat) const;
QString toString(const QTime &time, FormatType format = LongFormat) const;
QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const;
/* Removing default value for `format' is done intentionally,
* after all tests we will remove non-calendar-aware version of these functions,
* and add a default value for both calendar instance, and format
*/
QString toString(const QDate &date, QStringView formatStr, QCalendar cal) const;
QString toString(const QDate &date, FormatType format, QCalendar cal) const;
QString toString(const QDateTime &dateTime, FormatType format, QCalendar cal) const;
QString toString(const QDateTime &dateTime, QStringView formatStr, QCalendar cal) const;
QString dateFormat(FormatType format = LongFormat) const;
QString timeFormat(FormatType format = LongFormat) const;
@ -1024,6 +1032,13 @@ public:
QDate toDate(const QString &string, const QString &format) const;
QTime toTime(const QString &string, const QString &format) const;
QDateTime toDateTime(const QString &string, const QString &format) const;
// Calendar-aware API
QDate toDate(const QString &string, FormatType format, QCalendar cal) const;
QTime toTime(const QString &string, FormatType format, QCalendar cal) const;
QDateTime toDateTime(const QString &string, FormatType format, QCalendar cal) const;
QDate toDate(const QString &string, const QString &format, QCalendar cal) const;
QTime toTime(const QString &string, const QString &format, QCalendar cal) const;
QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const;
#endif
// ### Qt 5: We need to return QString from these function since
@ -1108,6 +1123,8 @@ private:
QLocale(QLocalePrivate &dd);
friend class QLocalePrivate;
friend class QSystemLocale;
friend class QCalendarBackend;
friend class QGregorianCalendar;
friend Q_CORE_EXPORT uint qHash(const QLocale &key, uint seed) noexcept;
QSharedDataPointer<QLocalePrivate> d;

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@ -57,6 +57,7 @@
#include "QtCore/qvarlengtharray.h"
#include "QtCore/qvariant.h"
#include "QtCore/qnumeric.h"
#include <QtCore/qcalendar.h>
#include "qlocale.h"
@ -171,9 +172,14 @@ Q_DECLARE_TYPEINFO(QLocaleId, Q_PRIMITIVE_TYPE);
struct QLocaleData
{
public:
// TODO: Remove this?
static const QLocaleData *findLocaleData(QLocale::Language language,
QLocale::Script script,
QLocale::Country country);
// Having an offset of current locale, enables us to have multiple sources of data, i.e. user-provided calendar locales
static uint findLocaleOffset(QLocale::Language language,
QLocale::Script script,
QLocale::Country country);
static const QLocaleData *c();
// Maximum number of significant digits needed to represent a double.
@ -297,12 +303,6 @@ public:
quint16 m_long_date_format_idx, m_long_date_format_size;
quint16 m_short_time_format_idx, m_short_time_format_size;
quint16 m_long_time_format_idx, m_long_time_format_size;
quint16 m_standalone_short_month_names_idx, m_standalone_short_month_names_size;
quint16 m_standalone_long_month_names_idx, m_standalone_long_month_names_size;
quint16 m_standalone_narrow_month_names_idx, m_standalone_narrow_month_names_size;
quint16 m_short_month_names_idx, m_short_month_names_size;
quint16 m_long_month_names_idx, m_long_month_names_size;
quint16 m_narrow_month_names_idx, m_narrow_month_names_size;
quint16 m_standalone_short_day_names_idx, m_standalone_short_day_names_size;
quint16 m_standalone_long_day_names_idx, m_standalone_long_day_names_size;
quint16 m_standalone_narrow_day_names_idx, m_standalone_narrow_day_names_size;
@ -328,22 +328,23 @@ public:
quint16 m_weekend_end : 3;
};
class Q_CORE_EXPORT QLocalePrivate
class Q_CORE_EXPORT QLocalePrivate // A POD type
{
public:
static QLocalePrivate *create(
const QLocaleData *data,
const QLocaleData *data, const uint data_offset = 0,
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions)
{
QLocalePrivate *retval = new QLocalePrivate;
auto *retval = new QLocalePrivate;
retval->m_data = data;
retval->ref.storeRelaxed(0);
retval->m_data_offset = data_offset;
retval->m_numberOptions = numberOptions;
return retval;
}
static QLocalePrivate *get(QLocale &l) { return l.d; }
static const QLocalePrivate *get(const QLocale &l) { return l.d; }
static const QLocalePrivate *get(const QLocale &l) { return l.d; }
QChar decimal() const { return QChar(m_data->m_decimal); }
QChar group() const { return QChar(m_data->m_group); }
@ -374,12 +375,9 @@ public:
QLocale::MeasurementSystem measurementSystem() const;
QString dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale *q) const;
const QLocaleData *m_data;
QBasicAtomicInt ref;
uint m_data_offset;
QLocale::NumberOptions m_numberOptions;
};
@ -392,7 +390,7 @@ inline QLocalePrivate *QSharedDataPointer<QLocalePrivate>::clone()
{
// cannot use QLocalePrivate's copy constructor
// since it is deleted in C++11
return QLocalePrivate::create(d->m_data, d->m_numberOptions);
return QLocalePrivate::create(d->m_data, d->m_data_offset, d->m_numberOptions);
}
inline char QLocaleData::digitToCLocale(QChar in) const

View File

@ -293,7 +293,7 @@ double qt_asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
// "-nan" or "+nan"
if (qstrcmp(num, "nan") == 0) {
processed = 3;
return qt_snan();
return qt_qnan();
} else if ((num[0] == '-' || num[0] == '+') && qstrcmp(num + 1, "nan") == 0) {
processed = 0;
ok = false;
@ -322,7 +322,7 @@ double qt_asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
conv_flags = double_conversion::StringToDoubleConverter::ALLOW_LEADING_SPACES
| double_conversion::StringToDoubleConverter::ALLOW_TRAILING_SPACES;
}
double_conversion::StringToDoubleConverter conv(conv_flags, 0.0, qt_snan(), 0, 0);
double_conversion::StringToDoubleConverter conv(conv_flags, 0.0, qt_qnan(), 0, 0);
d = conv.StringToDouble(num, numLen, &processed);
if (!qIsFinite(d)) {

View File

@ -116,8 +116,8 @@ struct QSystemLocalePrivate
QVariant dateTimeFormat(QLocale::FormatType);
QVariant dayName(int, QLocale::FormatType);
QVariant monthName(int, QLocale::FormatType);
QVariant toString(const QDate &, QLocale::FormatType);
QVariant toString(const QTime &, QLocale::FormatType);
QVariant toString(QDate, QLocale::FormatType);
QVariant toString(QTime, QLocale::FormatType);
QVariant toString(const QDateTime &, QLocale::FormatType);
QVariant measurementSystem();
QVariant collation();
@ -394,7 +394,7 @@ QVariant QSystemLocalePrivate::monthName(int month, QLocale::FormatType type)
return getLocaleInfo(lctype);
}
QVariant QSystemLocalePrivate::toString(const QDate &date, QLocale::FormatType type)
QVariant QSystemLocalePrivate::toString(QDate date, QLocale::FormatType type)
{
SYSTEMTIME st;
memset(&st, 0, sizeof(SYSTEMTIME));
@ -413,7 +413,7 @@ QVariant QSystemLocalePrivate::toString(const QDate &date, QLocale::FormatType t
return QString();
}
QVariant QSystemLocalePrivate::toString(const QTime &time, QLocale::FormatType type)
QVariant QSystemLocalePrivate::toString(QTime time, QLocale::FormatType type)
{
SYSTEMTIME st;
memset(&st, 0, sizeof(SYSTEMTIME));

View File

@ -52,6 +52,7 @@
#include "qstringlist.h"
#include "qstringmatcher.h"
#include "qvector.h"
#include "private/qlocking_p.h"
#include <limits.h>
#include <algorithm>
@ -3007,12 +3008,10 @@ int QRegExpEngine::getEscape()
yyCharClass->addSingleton(0x005f); // '_'
return Tok_CharClass;
case 'I':
if (xmlSchemaExtensions) {
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
if (!xmlSchemaExtensions)
break;
}
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'i':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@ -3047,12 +3046,10 @@ int QRegExpEngine::getEscape()
break;
}
case 'C':
if (xmlSchemaExtensions) {
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
if (!xmlSchemaExtensions)
break;
}
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'c':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@ -3093,12 +3090,10 @@ int QRegExpEngine::getEscape()
break;
}
case 'P':
if (xmlSchemaExtensions) {
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
} else {
if (!xmlSchemaExtensions)
break;
}
yyCharClass->setNegative(!yyCharClass->negative());
Q_FALLTHROUGH();
case 'p':
if (xmlSchemaExtensions) {
if (yyCh != '{') {
@ -3825,7 +3820,7 @@ static QBasicMutex engineCacheMutex;
static void derefEngine(QRegExpEngine *eng, const QRegExpEngineKey &key)
{
#if !defined(QT_NO_REGEXP_OPTIM)
QMutexLocker locker(&engineCacheMutex);
const auto locker = qt_scoped_lock(engineCacheMutex);
if (!eng->ref.deref()) {
if (QRECache *c = engineCache()) {
c->unusedEngines.insert(key, eng, 4 + key.pattern.length() / 4);
@ -3846,7 +3841,7 @@ static void prepareEngine_helper(QRegExpPrivate *priv)
Q_ASSERT(!priv->eng);
#if !defined(QT_NO_REGEXP_OPTIM)
QMutexLocker locker(&engineCacheMutex);
const auto locker = qt_scoped_lock(engineCacheMutex);
if (QRECache *c = engineCache()) {
priv->eng = c->unusedEngines.take(priv->engineKey);
if (!priv->eng)

View File

@ -531,7 +531,7 @@ QT_BEGIN_NAMESPACE
optimize the execution of the matching algorithm. The JIT makes extensive
usage of self-modifying code, which can lead debugging tools such as
Valgrind to crash. You must enable all checks for self-modifying code if
you want to debug programs using QRegularExpression (f.i., see Valgrind's
you want to debug programs using QRegularExpression (for instance, Valgrind's
\c{--smc-check} command line option). The downside of enabling such checks
is that your program will run considerably slower.

View File

@ -1193,10 +1193,10 @@ static int qt_compare_strings(QLatin1String lhs, QStringView rhs, Qt::CaseSensit
static int qt_compare_strings(QLatin1String lhs, QLatin1String rhs, Qt::CaseSensitivity cs) noexcept
{
if (cs == Qt::CaseInsensitive)
return qstrnicmp(lhs.data(), lhs.size(), rhs.data(), rhs.size());
if (lhs.isEmpty())
return lencmp(0, rhs.size());
if (cs == Qt::CaseInsensitive)
return qstrnicmp(lhs.data(), lhs.size(), rhs.data(), rhs.size());
const auto l = std::min(lhs.size(), rhs.size());
int r = qstrncmp(lhs.data(), rhs.data(), l);
return r ? r : lencmp(lhs.size(), rhs.size());
@ -6629,9 +6629,9 @@ namespace QUnicodeTables {
reallocate memory to grow the buffer. In that case, we need to adjust the \a
it pointer.
*/
template <typename Traits, typename T>
template <typename T>
Q_NEVER_INLINE
static QString detachAndConvertCase(T &str, QStringIterator it)
static QString detachAndConvertCase(T &str, QStringIterator it, QUnicodeTables::Case which)
{
Q_ASSERT(!str.isEmpty());
QString s = std::move(str); // will copy if T is const QString
@ -6640,10 +6640,10 @@ static QString detachAndConvertCase(T &str, QStringIterator it)
do {
uint uc = it.nextUnchecked();
const QUnicodeTables::Properties *prop = qGetProp(uc);
signed short caseDiff = Traits::caseDiff(prop);
const auto fold = qGetProp(uc)->cases[which];
signed short caseDiff = fold.diff;
if (Q_UNLIKELY(Traits::caseSpecial(prop))) {
if (Q_UNLIKELY(fold.special)) {
const ushort *specialCase = specialCaseMap + caseDiff;
ushort length = *specialCase++;
@ -6674,8 +6674,8 @@ static QString detachAndConvertCase(T &str, QStringIterator it)
return s;
}
template <typename Traits, typename T>
static QString convertCase(T &str)
template <typename T>
static QString convertCase(T &str, QUnicodeTables::Case which)
{
const QChar *p = str.constBegin();
const QChar *e = p + str.size();
@ -6687,9 +6687,9 @@ static QString convertCase(T &str)
QStringIterator it(p, e);
while (it.hasNext()) {
uint uc = it.nextUnchecked();
if (Traits::caseDiff(qGetProp(uc))) {
if (qGetProp(uc)->cases[which].diff) {
it.recedeUnchecked();
return detachAndConvertCase<Traits>(str, it);
return detachAndConvertCase(str, it, which);
}
}
return std::move(str);
@ -6698,12 +6698,12 @@ static QString convertCase(T &str)
QString QString::toLower_helper(const QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::LowercaseTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::LowerCase);
}
QString QString::toLower_helper(QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::LowercaseTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::LowerCase);
}
/*!
@ -6715,12 +6715,12 @@ QString QString::toLower_helper(QString &str)
QString QString::toCaseFolded_helper(const QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::CasefoldTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::CaseFold);
}
QString QString::toCaseFolded_helper(QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::CasefoldTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::CaseFold);
}
/*!
@ -6738,12 +6738,12 @@ QString QString::toCaseFolded_helper(QString &str)
QString QString::toUpper_helper(const QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::UppercaseTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::UpperCase);
}
QString QString::toUpper_helper(QString &str)
{
return QUnicodeTables::convertCase<QUnicodeTables::UppercaseTraits>(str);
return QUnicodeTables::convertCase(str, QUnicodeTables::UpperCase);
}
#if QT_DEPRECATED_SINCE(5, 14)

View File

@ -220,7 +220,8 @@ Q_DECLARE_TYPEINFO(QLatin1String, Q_MOVABLE_TYPE);
// Qt 4.x compatibility
#if QT_DEPRECATED_SINCE(5, 14)
QT_DEPRECATED_X("Use QLatin1String") typedef QLatin1String QLatin1Literal;
QT_DEPRECATED_X("Use QLatin1String")
typedef QLatin1String QLatin1Literal;
#endif
//

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,15 @@ QT_BEGIN_NAMESPACE
namespace QUnicodeTables {
enum Case {
LowerCase,
UpperCase,
TitleCase,
CaseFold,
NumCases
};
struct Properties {
ushort category : 8; /* 5 used */
ushort direction : 8; /* 5 used */
@ -70,63 +79,29 @@ struct Properties {
ushort joining : 3;
signed short digitValue : 5;
signed short mirrorDiff : 16;
ushort lowerCaseSpecial : 1;
signed short lowerCaseDiff : 15;
#ifdef Q_OS_WASM
unsigned char : 0; //wasm 64 packing trick
#endif
ushort upperCaseSpecial : 1;
signed short upperCaseDiff : 15;
ushort titleCaseSpecial : 1;
signed short titleCaseDiff : 15;
ushort caseFoldSpecial : 1;
signed short caseFoldDiff : 15;
ushort unicodeVersion : 8; /* 5 used */
ushort nfQuickCheck : 8;
#ifdef Q_OS_WASM
unsigned char : 0; //wasm 64 packing trick
#endif
struct {
ushort special : 1;
signed short diff : 15;
} cases[NumCases];
#ifdef Q_OS_WASM
unsigned char : 0; //wasm 64 packing trick
#endif
ushort graphemeBreakClass : 5; /* 5 used */
ushort wordBreakClass : 5; /* 5 used */
ushort sentenceBreakClass : 8; /* 4 used */
ushort lineBreakClass : 6; /* 6 used */
ushort sentenceBreakClass : 8; /* 4 used */
ushort script : 8;
};
Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) noexcept;
Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) noexcept;
struct LowercaseTraits
{
static inline signed short caseDiff(const Properties *prop)
{ return prop->lowerCaseDiff; }
static inline bool caseSpecial(const Properties *prop)
{ return prop->lowerCaseSpecial; }
};
struct UppercaseTraits
{
static inline signed short caseDiff(const Properties *prop)
{ return prop->upperCaseDiff; }
static inline bool caseSpecial(const Properties *prop)
{ return prop->upperCaseSpecial; }
};
struct TitlecaseTraits
{
static inline signed short caseDiff(const Properties *prop)
{ return prop->titleCaseDiff; }
static inline bool caseSpecial(const Properties *prop)
{ return prop->titleCaseSpecial; }
};
struct CasefoldTraits
{
static inline signed short caseDiff(const Properties *prop)
{ return prop->caseFoldDiff; }
static inline bool caseSpecial(const Properties *prop)
{ return prop->caseFoldSpecial; }
};
Q_STATIC_ASSERT(sizeof(Properties) == 20);
enum GraphemeBreakClass {
GraphemeBreak_Any,

View File

@ -429,6 +429,11 @@ QMutex *QFutureInterfaceBase::mutex() const
return &d->m_mutex;
}
QMutex &QFutureInterfaceBase::mutex(int) const
{
return d->m_mutex;
}
QtPrivate::ExceptionStore &QFutureInterfaceBase::exceptionStore()
{
return d->m_exceptionStore;

View File

@ -45,6 +45,8 @@
#include <QtCore/qexception.h>
#include <QtCore/qresultstore.h>
#include <mutex>
QT_REQUIRE_CONFIG(future);
QT_BEGIN_NAMESPACE
@ -118,6 +120,7 @@ public:
void waitForResume();
QMutex *mutex() const;
QMutex &mutex(int) const;
QtPrivate::ExceptionStore &exceptionStore();
QtPrivate::ResultStoreBase &resultStoreBase();
const QtPrivate::ResultStoreBase &resultStoreBase() const;
@ -188,7 +191,7 @@ public:
template <typename T>
inline void QFutureInterface<T>::reportResult(const T *result, int index)
{
QMutexLocker locker(mutex());
std::lock_guard<QMutex> locker(mutex(0));
if (this->queryState(Canceled) || this->queryState(Finished)) {
return;
}
@ -214,7 +217,7 @@ inline void QFutureInterface<T>::reportResult(const T &result, int index)
template <typename T>
inline void QFutureInterface<T>::reportResults(const QVector<T> &_results, int beginIndex, int count)
{
QMutexLocker locker(mutex());
std::lock_guard<QMutex> locker(mutex(0));
if (this->queryState(Canceled) || this->queryState(Finished)) {
return;
}
@ -242,14 +245,14 @@ inline void QFutureInterface<T>::reportFinished(const T *result)
template <typename T>
inline const T &QFutureInterface<T>::resultReference(int index) const
{
QMutexLocker lock(mutex());
std::lock_guard<QMutex> locker(mutex(0));
return resultStoreBase().resultAt(index).template value<T>();
}
template <typename T>
inline const T *QFutureInterface<T>::resultPointer(int index) const
{
QMutexLocker lock(mutex());
std::lock_guard<QMutex> locker(mutex(0));
return resultStoreBase().resultAt(index).template pointer<T>();
}
@ -263,7 +266,7 @@ inline QList<T> QFutureInterface<T>::results()
QFutureInterfaceBase::waitForResult(-1);
QList<T> res;
QMutexLocker lock(mutex());
std::lock_guard<QMutex> locker(mutex(0));
QtPrivate::ResultIteratorBase it = resultStoreBase().begin();
while (it != resultStoreBase().end()) {

View File

@ -183,15 +183,15 @@ public:
inline explicit QReadWriteLock(RecursionMode = NonRecursive) noexcept { }
inline ~QReadWriteLock() { }
static inline void lockForRead() noexcept { }
static inline bool tryLockForRead() noexcept { return true; }
static inline bool tryLockForRead(int timeout) noexcept { Q_UNUSED(timeout); return true; }
void lockForRead() noexcept { }
bool tryLockForRead() noexcept { return true; }
bool tryLockForRead(int timeout) noexcept { Q_UNUSED(timeout); return true; }
static inline void lockForWrite() noexcept { }
static inline bool tryLockForWrite() noexcept { return true; }
static inline bool tryLockForWrite(int timeout) noexcept { Q_UNUSED(timeout); return true; }
void lockForWrite() noexcept { }
bool tryLockForWrite() noexcept { return true; }
bool tryLockForWrite(int timeout) noexcept { Q_UNUSED(timeout); return true; }
static inline void unlock() noexcept { }
void unlock() noexcept { }
private:
Q_DISABLE_COPY(QReadWriteLock)
@ -200,12 +200,12 @@ private:
class Q_CORE_EXPORT QReadLocker
{
public:
inline QReadLocker(QReadWriteLock *) noexcept { }
inline explicit QReadLocker(QReadWriteLock *) noexcept { }
inline ~QReadLocker() noexcept { }
static inline void unlock() noexcept { }
static inline void relock() noexcept { }
static inline QReadWriteLock *readWriteLock() noexcept { return nullptr; }
void unlock() noexcept { }
void relock() noexcept { }
QReadWriteLock *readWriteLock() noexcept { return nullptr; }
private:
Q_DISABLE_COPY(QReadLocker)
@ -217,9 +217,9 @@ public:
inline explicit QWriteLocker(QReadWriteLock *) noexcept { }
inline ~QWriteLocker() noexcept { }
static inline void unlock() noexcept { }
static inline void relock() noexcept { }
static inline QReadWriteLock *readWriteLock() noexcept { return nullptr; }
void unlock() noexcept { }
void relock() noexcept { }
QReadWriteLock *readWriteLock() noexcept { return nullptr; }
private:
Q_DISABLE_COPY(QWriteLocker)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,193 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCALENDAR_H
#define QCALENDAR_H
#include <limits>
#include <QtCore/qglobal.h>
#include <QtCore/qlocale.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringview.h>
/* Suggested enum names for other calendars known to CLDR (v33.1)
Not yet implemented - see QCalendar::System - contributions welcome:
* Buddhist -- Thai Buddhist, to be specific
* Chinese
* Coptic
* Dangi -- Korean
* Ethiopic (Amete Mihret - epoch approx. 8 C.E.)
* EthiopicAmeteAlem (Amete Alem - epoch approx. 5493 B.C.E; data from
type="ethiopic-amete-alem", an alias for type="ethioaa")
* Hebrew
* Indian -- National
* Islamic -- Based on astronomical observations, not predictions, so hard to
implement. CLDR's data for type="islamic" apply, unless overridden, to the
other Islamic calendar variants, i.e. IslamicCivil, above, and the three
following. See QHijriCalendar, a common base to provide that data.
* IslamicTabular -- tabular, astronomical epoch (same as IslamicCivil, except
for epoch), CLDR type="islamic-tbla"
* Saudi -- Saudi Arabia, sighting; CLDR type="islamic-rgsa"
* UmmAlQura -- Umm al-Qura, Saudi Arabia, calculated; CLDR type="islamic-umalqura"
* Iso8601 -- as Gregorian, but treating ISO 8601 weeks as "months"
* Japanese -- Imperial calendar
* Minguo -- Republic of China, Taiwan; CLDR type="roc"
See:
http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml
These can potentially be supported, as features, using CLDR's data; any
others shall need hand-crafted localization data; it would probably be best
to do that by contributing data for them to CLDR.
*/
QT_BEGIN_NAMESPACE
class QCalendarBackend;
class QDate;
class Q_CORE_EXPORT QCalendar
{
Q_GADGET
public:
// (Extra parentheses to suppress bogus reading of min() as a macro.)
enum : int { Unspecified = (std::numeric_limits<int>::min)() };
struct YearMonthDay
{
YearMonthDay() = default;
YearMonthDay(int y, int m = 1, int d = 1) : year(y), month(m), day(d) {}
bool isValid() const
{ return month != Unspecified && day != Unspecified; }
// (The first year supported by QDate has year == Unspecified.)
int year = Unspecified;
int month = Unspecified;
int day = Unspecified;
};
// Feature (\w+)calendar uses CLDR type="\1" data, except as noted in type="..." comments below
enum class System
{
Gregorian, // CLDR: type = "gregory", alias = "gregorian"
#ifndef QT_BOOTSTRAPPED
Julian = 8,
Milankovic = 9,
#endif // These are Roman-based, so share Gregorian's CLDR data
// Feature-controlled calendars:
#if QT_CONFIG(jalalicalendar) // type="persian"
Jalali = 10,
#endif
#if QT_CONFIG(islamiccivilcalendar) // type="islamic-civil", uses data from type="islamic"
IslamicCivil = 11,
// tabular, civil epoch
// 30 year cycle, leap on 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29
// (Other variants: 2, 5, 8, (10|11), 13, 16, 19, 21, 24, 27 and 29.)
#endif
Last = 11, // Highest number of any above
User = -1
};
// New entries must be added to the \enum doc in qcalendar.cpp and
// handled in QCalendarBackend::fromEnum()
Q_ENUM(System)
explicit QCalendar(); // Gregorian, optimised
explicit QCalendar(System system);
explicit QCalendar(QLatin1String name);
explicit QCalendar(QStringView name);
// QCalendar is a trivially copyable value type.
bool isValid() { return d != nullptr; }
// Date queries:
int daysInMonth(int month, int year = Unspecified) const;
int daysInYear(int year) const;
int monthsInYear(int year) const;
bool isDateValid(int year, int month, int day) const;
// Leap years:
bool isLeapYear(int year) const;
// Properties of the calendar:
bool isGregorian() const;
bool isLunar() const;
bool isLuniSolar() const;
bool isSolar() const;
bool isProleptic() const;
bool hasYearZero() const;
int maximumDaysInMonth() const;
int minimumDaysInMonth() const;
int maximumMonthsInYear() const;
QString name() const;
// QDate conversions:
QDate dateFromParts(int year, int month, int day) const;
QDate dateFromParts(const YearMonthDay &parts) const;
YearMonthDay partsFromDate(QDate date) const;
int dayOfWeek(QDate date) const;
// Month and week-day names (as in QLocale):
QString monthName(const QLocale &locale, int month, int year = Unspecified,
QLocale::FormatType format=QLocale::LongFormat) const;
QString standaloneMonthName(const QLocale &locale, int month, int year = Unspecified,
QLocale::FormatType format = QLocale::LongFormat) const;
QString weekDayName(const QLocale &locale, int day,
QLocale::FormatType format = QLocale::LongFormat) const;
QString standaloneWeekDayName(const QLocale &locale, int day,
QLocale::FormatType format=QLocale::LongFormat) const;
// Formatting of date-times:
QString dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale &locale) const;
// What's available ?
static QStringList availableCalendars();
private:
// Always supplied by QCalendarBackend and expected to be a singleton
const QCalendarBackend *d;
};
QT_END_NAMESPACE
#endif // QCALENDAR_H

View File

@ -0,0 +1,144 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCALENDAR_BACKEND_P_H
#define QCALENDAR_BACKEND_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qobjectdefs.h>
#include <QtCore/qcalendar.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qstring.h>
#include <QtCore/qmap.h>
QT_BEGIN_NAMESPACE
// Locale-related parts, mostly handled in ../text/qlocale.cpp
struct QLocaleDataEntry {
quint16 index, size;
};
struct QCalendarLocale {
quint16 m_language_id, m_script_id, m_country_id;
// Month name indexes:
QLocaleDataEntry m_standalone_short;
QLocaleDataEntry m_standalone_long;
QLocaleDataEntry m_standalone_narrow;
QLocaleDataEntry m_short;
QLocaleDataEntry m_long;
QLocaleDataEntry m_narrow;
};
// Partial implementation, of methods with common forms, in qcalendar.cpp
class Q_CORE_EXPORT QCalendarBackend
{
friend class QCalendar;
public:
virtual ~QCalendarBackend();
virtual QString name() const = 0;
virtual QCalendar::System calendarSystem() const;
// Date queries:
virtual int daysInMonth(int month, int year = QCalendar::Unspecified) const = 0;
virtual int daysInYear(int year) const;
virtual int monthsInYear(int year) const;
virtual bool isDateValid(int year, int month, int day) const;
// Properties of the calendar:
virtual bool isLeapYear(int year) const = 0;
virtual bool isLunar() const = 0;
virtual bool isLuniSolar() const = 0;
virtual bool isSolar() const = 0;
virtual bool isProleptic() const;
virtual bool hasYearZero() const;
virtual int maximumDaysInMonth() const;
virtual int minimumDaysInMonth() const;
virtual int maximumMonthsInYear() const;
// Julian Day conversions:
virtual bool dateToJulianDay(int year, int month, int day, qint64 *jd) const = 0;
virtual QCalendar::YearMonthDay julianDayToDate(qint64 jd) const = 0;
// Day of week and week numbering:
virtual int dayOfWeek(qint64 jd) const;
// Names of months and week-days (implemented in qlocale.cpp):
virtual QString monthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const;
virtual QString standaloneMonthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const;
virtual QString weekDayName(const QLocale &locale, int day,
QLocale::FormatType format) const;
virtual QString standaloneWeekDayName(const QLocale &locale, int day,
QLocale::FormatType format) const;
// Formatting of date-times (implemented in qlocale.cpp):
virtual QString dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale &locale) const;
// Calendar enumeration by name:
static QStringList availableCalendars();
protected:
QCalendarBackend(const QString &name, QCalendar::System id = QCalendar::System::User);
// Locale support:
virtual const QCalendarLocale *localeMonthIndexData() const = 0;
virtual const ushort *localeMonthData() const = 0;
bool registerAlias(const QString &name);
private:
// QCalendar's access to its registry:
static const QCalendarBackend *fromName(QStringView name);
static const QCalendarBackend *fromName(QLatin1String name);
// QCalendar's access to singletons:
static const QCalendarBackend *fromEnum(QCalendar::System system);
};
QT_END_NAMESPACE
#endif // QCALENDAR_BACKEND_P_H

View File

@ -0,0 +1,77 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCALENDARMATH_P_H
#define QCALENDARMATH_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of q*calendar.cpp. This header file may change from version to version
// without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/private/qglobal_p.h>
QT_BEGIN_NAMESPACE
namespace QRoundingDown {
/*
Division, rounding down (rather than towards zero).
From C++11 onwards, integer division is defined to round towards zero, so we
can rely on that when implementing this. This is only used with denominator b
> 0, so we only have to treat negative numerator, a, specially.
*/
template<typename Int> constexpr Int qDiv(Int a, unsigned b)
{ return (a - (a < 0 ? int(b - 1) : 0)) / int(b); }
template<typename Int> constexpr Int qMod(Int a, unsigned b)
{ return a - qDiv(a, b) * b; }
} // QRoundingDown
QT_END_NAMESPACE
#endif // QCALENDARMATH_P_H

File diff suppressed because it is too large Load Diff

View File

@ -54,10 +54,11 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSDate);
QT_BEGIN_NAMESPACE
class QCalendar;
class QTimeZone;
class QDateTime;
class Q_CORE_EXPORT QDate
class Q_CORE_EXPORT QDate // ### Qt 6: change to be used by value, not const &
{
public:
enum MonthNameType { // ### Qt 6: remove, along with methods using it
@ -69,6 +70,7 @@ private:
public:
Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {}
QDate(int y, int m, int d);
QDate(int y, int m, int d, QCalendar cal);
Q_DECL_CONSTEXPR bool isNull() const { return !isValid(); }
Q_DECL_CONSTEXPR bool isValid() const { return jd >= minJd() && jd <= maxJd(); }
@ -82,6 +84,14 @@ public:
int daysInYear() const;
int weekNumber(int *yearNum = nullptr) const;
int year(QCalendar cal) const;
int month(QCalendar cal) const;
int day(QCalendar cal) const;
int dayOfWeek(QCalendar cal) const;
int dayOfYear(QCalendar cal) const;
int daysInMonth(QCalendar cal) const;
int daysInYear(QCalendar cal) const;
QDateTime startOfDay(Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0) const;
QDateTime endOfDay(Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0) const;
#if QT_CONFIG(timezone)
@ -103,8 +113,12 @@ public:
QString toString(Qt::DateFormat f = Qt::TextDate) const;
#if QT_STRINGVIEW_LEVEL < 2
QString toString(const QString &format) const;
QString toString(const QString &format, QCalendar cal) const;
#endif
QString toString(QStringView format) const;
QString toString(Qt::DateFormat f, QCalendar cal) const;
QString toString(QStringView format, QCalendar cal) const;
#endif
#if QT_DEPRECATED_SINCE(5,0)
QT_DEPRECATED_X("Use setDate() instead") inline bool setYMD(int y, int m, int d)
@ -112,6 +126,7 @@ public:
#endif
bool setDate(int year, int month, int day);
bool setDate(int year, int month, int day, QCalendar cal);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void getDate(int *year, int *month, int *day); // ### Qt 6: remove
@ -121,7 +136,9 @@ public:
Q_REQUIRED_RESULT QDate addDays(qint64 days) const;
Q_REQUIRED_RESULT QDate addMonths(int months) const;
Q_REQUIRED_RESULT QDate addYears(int years) const;
qint64 daysTo(const QDate &) const;
Q_REQUIRED_RESULT QDate addMonths(int months, QCalendar cal) const;
Q_REQUIRED_RESULT QDate addYears(int years, QCalendar cal) const;
qint64 daysTo(const QDate &) const; // ### Qt 6: QDate
Q_DECL_CONSTEXPR bool operator==(const QDate &other) const { return jd == other.jd; }
Q_DECL_CONSTEXPR bool operator!=(const QDate &other) const { return jd != other.jd; }
@ -134,6 +151,7 @@ public:
#if QT_CONFIG(datestring)
static QDate fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
static QDate fromString(const QString &s, const QString &format);
static QDate fromString(const QString &s, const QString &format, QCalendar cal);
#endif
static bool isValid(int y, int m, int d);
static bool isLeapYear(int year);
@ -159,7 +177,7 @@ private:
};
Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE);
class Q_CORE_EXPORT QTime
class Q_CORE_EXPORT QTime // ### Qt 6: change to be used by value, not const &
{
explicit Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
{}
@ -185,9 +203,9 @@ public:
bool setHMS(int h, int m, int s, int ms = 0);
Q_REQUIRED_RESULT QTime addSecs(int secs) const;
int secsTo(const QTime &) const;
int secsTo(const QTime &) const; // ### Qt 6: plain QTime
Q_REQUIRED_RESULT QTime addMSecs(int ms) const;
int msecsTo(const QTime &) const;
int msecsTo(const QTime &) const; // ### Qt 6: plain QTime
Q_DECL_CONSTEXPR bool operator==(const QTime &other) const { return mds == other.mds; }
Q_DECL_CONSTEXPR bool operator!=(const QTime &other) const { return mds != other.mds; }
@ -218,7 +236,7 @@ private:
friend class QDateTime;
friend class QDateTimePrivate;
#ifndef QT_NO_DATASTREAM
#ifndef QT_NO_DATASTREAM // ### Qt 6: plain QTime
friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QTime &);
friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QTime &);
#endif
@ -269,7 +287,7 @@ class Q_CORE_EXPORT QDateTime
public:
QDateTime() noexcept(Data::CanBeSmall);
explicit QDateTime(const QDate &);
explicit QDateTime(const QDate &); // ### Qt 6: plain QDate, QTime
QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime);
// ### Qt 6: Merge with above with default offsetSeconds = 0
QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds);
@ -301,7 +319,7 @@ public:
qint64 toMSecsSinceEpoch() const;
qint64 toSecsSinceEpoch() const;
void setDate(const QDate &date);
void setDate(const QDate &date); // ### Qt 6: plain QDate
void setTime(const QTime &time);
void setTimeSpec(Qt::TimeSpec spec);
void setOffsetFromUtc(int offsetSeconds);
@ -353,6 +371,7 @@ public:
#if QT_CONFIG(datestring)
static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
static QDateTime fromString(const QString &s, const QString &format);
static QDateTime fromString(const QString &s, const QString &format, QCalendar cal);
#endif
#if QT_DEPRECATED_SINCE(5, 8)

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -60,6 +60,9 @@
QT_BEGIN_NAMESPACE
template <typename T>
using ShortVector = QVarLengthArray<T, 13>; // enough for month (incl. leap) and day-of-week names
QDateTimeParser::~QDateTimeParser()
{
}
@ -92,11 +95,11 @@ int QDateTimeParser::getDigit(const QDateTime &t, int index) const
case SecondSection: return t.time().second();
case MSecSection: return t.time().msec();
case YearSection2Digits:
case YearSection: return t.date().year();
case MonthSection: return t.date().month();
case DaySection: return t.date().day();
case YearSection: return t.date().year(calendar);
case MonthSection: return t.date().month(calendar);
case DaySection: return t.date().day(calendar);
case DayOfWeekSectionShort:
case DayOfWeekSectionLong: return t.date().day();
case DayOfWeekSectionLong: return t.date().day(calendar);
case AmPmSection: return t.time().hour() > 11 ? 1 : 0;
default: break;
@ -138,9 +141,9 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
const QDate date = v.date();
const QTime time = v.time();
int year = date.year();
int month = date.month();
int day = date.day();
int year = date.year(calendar);
int month = date.month(calendar);
int day = date.day(calendar);
int hour = time.hour();
int minute = time.minute();
int second = time.second();
@ -184,13 +187,13 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
if (!(node.type & DaySectionMask)) {
if (day < cachedDay)
day = cachedDay;
const int max = QDate(year, month, 1).daysInMonth();
const int max = calendar.daysInMonth(month, year);
if (day > max) {
day = max;
}
}
const QDate newDate(year, month, day);
const QDate newDate(year, month, day, calendar);
const QTime newTime(hour, minute, second, msec);
if (!newDate.isValid() || !newTime.isValid())
return false;
@ -220,21 +223,23 @@ int QDateTimeParser::absoluteMax(int s, const QDateTime &cur) const
case TimeZoneSection: return QTimeZone::MaxUtcOffsetSecs;
#endif
case Hour24Section:
case Hour12Section: return 23; // this is special-cased in
// parseSection. We want it to be
// 23 for the stepBy case.
case Hour12Section:
// This is special-cased in parseSection.
// We want it to be 23 for the stepBy case.
return 23;
case MinuteSection:
case SecondSection: return 59;
case MSecSection: return 999;
case YearSection2Digits:
case YearSection: return 9999; // sectionMaxSize will prevent
// people from typing in a larger
// number in count == 2 sections.
// stepBy() will work on real years anyway
case MonthSection: return 12;
case YearSection:
// sectionMaxSize will prevent people from typing in a larger number in
// count == 2 sections; stepBy() will work on real years anyway.
return 9999;
case MonthSection: return calendar.maximumMonthsInYear();
case DaySection:
case DayOfWeekSectionShort:
case DayOfWeekSectionLong: return cur.isValid() ? cur.date().daysInMonth() : 31;
case DayOfWeekSectionLong:
return cur.isValid() ? cur.date().daysInMonth(calendar) : calendar.maximumDaysInMonth();
case AmPmSection: return 1;
default: break;
}
@ -612,7 +617,7 @@ int QDateTimeParser::sectionSize(int sectionIndex) const
int QDateTimeParser::sectionMaxSize(Section s, int count) const
{
#if QT_CONFIG(textdate)
int mcount = 12;
int mcount = calendar.maximumMonthsInYear();
#endif
switch (s) {
@ -654,7 +659,7 @@ int QDateTimeParser::sectionMaxSize(Section s, int count) const
const QLocale::FormatType format = count == 4 ? QLocale::LongFormat : QLocale::ShortFormat;
for (int i=1; i<=mcount; ++i) {
const QString str = (s == MonthSection
? l.monthName(i, format)
? calendar.monthName(l, i, QCalendar::Unspecified, format)
: l.dayName(i, format));
ret = qMax(str.size(), ret);
}
@ -787,9 +792,9 @@ QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
int num = 0, used = 0;
if (sn.type == MonthSection) {
const QDate minDate = getMinimum().date();
const int min = (currentValue.date().year() == minDate.year())
? minDate.month() : 1;
num = findMonth(sectiontext.toLower(), min, sectionIndex, &sectiontext, &used);
const int year = currentValue.date().year(calendar);
const int min = (year == minDate.year(calendar)) ? minDate.month(calendar) : 1;
num = findMonth(sectiontext.toLower(), min, sectionIndex, year, &sectiontext, &used);
} else {
num = findDay(sectiontext.toLower(), 1, sectionIndex, &sectiontext, &used);
}
@ -893,6 +898,26 @@ QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
return result;
}
/*!
\internal
Returns a day-number, in the same month as \a rough and as close to \a rough's
day number as is valid, that \a calendar puts on the day of the week indicated
by \a weekDay.
*/
static int weekDayWithinMonth(const QCalendar &calendar, const QDate &rough, int weekDay)
{
// TODO: can we adapt this to cope gracefully with intercallary days (day of
// week > 7) without making it slower for more widely-used calendars ?
int day = rough.day(calendar) + weekDay - calendar.dayOfWeek(rough);
if (day <= 0)
return day + 7;
if (day > rough.daysInMonth(calendar))
return day - 7;
return day;
}
/*!
\internal
@ -901,11 +926,11 @@ QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
when on valid date is consistent with the data.
*/
static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digits,
int month, int day, int dayofweek)
static QDate actualDate(QDateTimeParser::Sections known, const QCalendar &calendar,
int year, int year2digits, int month, int day, int dayofweek)
{
QDate actual(year, month, day);
if (actual.isValid() && year % 100 == year2digits && actual.dayOfWeek() == dayofweek)
QDate actual(year, month, day, calendar);
if (actual.isValid() && year % 100 == year2digits && calendar.dayOfWeek(actual) == dayofweek)
return actual; // The obvious candidate is fine :-)
if (dayofweek < 1 || dayofweek > 7) // Invalid: ignore
@ -931,18 +956,18 @@ static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digi
known &= ~QDateTimeParser::MonthSection;
}
QDate first(year, month, 1);
QDate first(year, month, 1, calendar);
int last = known & QDateTimeParser::YearSection && known & QDateTimeParser::MonthSection
? first.daysInMonth() : 0;
? first.daysInMonth(calendar) : 0;
// If we also know day-of-week, tweak last to the last in the month that matches it:
if (last && known & QDateTimeParser::DayOfWeekSectionMask) {
int diff = (dayofweek - first.dayOfWeek() - last) % 7;
int diff = (dayofweek - calendar.dayOfWeek(first) - last) % 7;
Q_ASSERT(diff <= 0); // C++11 specifies (-ve) % (+ve) to be <= 0.
last += diff;
}
if (day < 1) {
if (known & QDateTimeParser::DayOfWeekSectionMask && last) {
day = 1 + dayofweek - first.dayOfWeek();
day = 1 + dayofweek - calendar.dayOfWeek(first);
if (day < 1)
day += 7;
} else {
@ -956,12 +981,12 @@ static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digi
day = last;
}
actual = QDate(year, month, day);
actual = QDate(year, month, day, calendar);
if (!actual.isValid() // We can't do better than we have, in this case
|| (known & QDateTimeParser::DaySection
&& known & QDateTimeParser::MonthSection
&& known & QDateTimeParser::YearSection) // ditto
|| actual.dayOfWeek() == dayofweek // Good enough, use it.
|| calendar.dayOfWeek(actual) == dayofweek // Good enough, use it.
|| (known & QDateTimeParser::DayOfWeekSectionMask) == 0) { // No contradiction, use it.
return actual;
}
@ -976,12 +1001,8 @@ static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digi
if ((known & QDateTimeParser::DaySection) == 0) {
// Relatively easy to fix.
day += dayofweek - actual.dayOfWeek();
if (day < 1)
day += 7;
else if (day > actual.daysInMonth())
day -= 7;
actual = QDate(year, month, day);
day = weekDayWithinMonth(calendar, actual, dayofweek);
actual = QDate(year, month, day, calendar);
return actual;
}
@ -993,18 +1014,18 @@ static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digi
*/
for (int m = 1; m < 12; m++) {
if (m < month) {
actual = QDate(year, month - m, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year, month - m, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
}
if (m + month <= 12) {
actual = QDate(year, month + m, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year, month + m, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
}
}
// Should only get here in corner cases; e.g. day == 31
actual = QDate(year, month, day); // Restore from trial values.
actual = QDate(year, month, day, calendar); // Restore from trial values.
}
if ((known & QDateTimeParser::YearSection) == 0) {
@ -1017,24 +1038,24 @@ static QDate actualDate(QDateTimeParser::Sections known, int year, int year2digi
is '97, it makes sense to consider 1997. If either adjacent
century does work, the other won't.
*/
actual = QDate(year + 100, month, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year + 100, month, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
actual = QDate(year - 100, month, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year - 100, month, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
} else {
// Offset by 7 is usually enough, but rare cases may need more:
for (int y = 1; y < 12; y++) {
actual = QDate(year - y, month, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year - y, month, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
actual = QDate(year + y, month, day);
if (actual.dayOfWeek() == dayofweek)
actual = QDate(year + y, month, day, calendar);
if (calendar.dayOfWeek(actual) == dayofweek)
return actual;
}
}
actual = QDate(year, month, day); // Restore from trial values.
actual = QDate(year, month, day, calendar); // Restore from trial values.
}
return actual; // It'll just have to do :-(
@ -1097,7 +1118,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
int minute = defaultTime.minute();
int second = defaultTime.second();
int msec = defaultTime.msec();
int dayofweek = defaultDate.dayOfWeek();
int dayofweek = calendar.dayOfWeek(defaultDate);
Qt::TimeSpec tspec = defaultValue.timeSpec();
int zoneOffset = 0; // In seconds; local - UTC
#if QT_CONFIG(timezone)
@ -1138,7 +1159,8 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
ParsedSection sect;
{
const QDate date = actualDate(isSet, year, year2digits, month, day, dayofweek);
const QDate date = actualDate(isSet, calendar, year, year2digits,
month, day, dayofweek);
const QTime time = actualTime(isSet, hour, hour12, ampm, minute, second, msec);
sect = parseSection(
#if QT_CONFIG(timezone)
@ -1248,22 +1270,17 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
}
}
const QDate date(year, month, day);
const int diff = dayofweek - date.dayOfWeek();
if (diff != 0 && state == Acceptable && isSet & DayOfWeekSectionMask) {
const QDate date(year, month, day, calendar);
if (dayofweek != calendar.dayOfWeek(date)
&& state == Acceptable && isSet & DayOfWeekSectionMask) {
if (isSet & DaySection)
conflicts = true;
const SectionNode &sn = sectionNode(currentSectionIndex);
if (sn.type & DayOfWeekSectionMask || currentSectionIndex == -1) {
// dayofweek should be preferred
day += diff;
if (day <= 0) {
day += 7;
} else if (day > date.daysInMonth()) {
day -= 7;
}
day = weekDayWithinMonth(calendar, date, dayofweek);
QDTPDEBUG << year << month << day << dayofweek
<< diff << QDate(year, month, day).dayOfWeek();
<< calendar.dayOfWeek(QDate(year, month, day, calendar));
}
}
@ -1275,20 +1292,18 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
needfixday = true;
}
if (!QDate::isValid(year, month, day)) {
if (day < 32) {
if (!calendar.isDateValid(year, month, day)) {
if (day <= calendar.maximumDaysInMonth())
cachedDay = day;
}
if (day > 28 && QDate::isValid(year, month, 1)) {
if (day > calendar.minimumDaysInMonth() && calendar.isDateValid(year, month, 1))
needfixday = true;
}
}
if (needfixday) {
if (context == FromString) {
return StateNode();
}
if (state == Acceptable && fixday) {
day = qMin<int>(day, QDate(year, month, 1).daysInMonth());
day = qMin<int>(day, calendar.daysInMonth(month, year));
const QLocale loc = locale();
for (int i=0; i<sectionNodesCount; ++i) {
@ -1296,7 +1311,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
if (sn.type & DaySection) {
input->replace(sectionPos(sn), sectionSize(i), loc.toString(day));
} else if (sn.type & DayOfWeekSectionMask) {
const int dayOfWeek = QDate(year, month, day).dayOfWeek();
const int dayOfWeek = calendar.dayOfWeek(QDate(year, month, day, calendar));
const QLocale::FormatType dayFormat =
(sn.type == DayOfWeekSectionShort
? QLocale::ShortFormat : QLocale::LongFormat);
@ -1333,13 +1348,12 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
conflicts = true;
}
}
}
QDTPDEBUG << year << month << day << hour << minute << second << msec;
Q_ASSERT(state != Invalid);
const QDate date(year, month, day);
const QDate date(year, month, day, calendar);
const QTime time(hour, minute, second, msec);
const QDateTime when =
#if QT_CONFIG(timezone)
@ -1427,10 +1441,11 @@ QDateTimeParser::parse(QString input, int position, const QDateTime &defaultValu
Q_FALLTHROUGH();
case MonthSection:
if (sn.count >= 3) {
const int finalMonth = scan.value.date().month();
const QDate when = scan.value.date();
const int finalMonth = when.month(calendar);
int tmp = finalMonth;
// I know the first possible month makes the date too early
while ((tmp = findMonth(t, tmp + 1, i)) != -1) {
while ((tmp = findMonth(t, tmp + 1, i, when.year(calendar))) != -1) {
const QDateTime copy(scan.value.addMonths(tmp - finalMonth));
if (copy >= minimum && copy <= maximum)
break; // break out of while
@ -1528,7 +1543,7 @@ QDateTimeParser::parse(QString input, int position, const QDateTime &defaultValu
length of overlap in *used (if \a used is non-NULL) and the first entry that
overlapped this much in *usedText (if \a usedText is non-NULL).
*/
static int findTextEntry(const QString &text, const QVector<QString> &entries, QString *usedText, int *used)
static int findTextEntry(const QString &text, const ShortVector<QString> &entries, QString *usedText, int *used)
{
if (text.isEmpty())
return -1;
@ -1566,7 +1581,7 @@ static int findTextEntry(const QString &text, const QVector<QString> &entries, Q
*/
int QDateTimeParser::findMonth(const QString &str1, int startMonth, int sectionIndex,
QString *usedMonth, int *used) const
int year, QString *usedMonth, int *used) const
{
const SectionNode &sn = sectionNode(sectionIndex);
if (sn.type != MonthSection) {
@ -1576,10 +1591,10 @@ int QDateTimeParser::findMonth(const QString &str1, int startMonth, int sectionI
QLocale::FormatType type = sn.count == 3 ? QLocale::ShortFormat : QLocale::LongFormat;
QLocale l = locale();
QVector<QString> monthNames;
ShortVector<QString> monthNames;
monthNames.reserve(13 - startMonth);
for (int month = startMonth; month <= 12; ++month)
monthNames.append(l.monthName(month, type));
monthNames.append(calendar.monthName(l, month, year, type));
const int index = findTextEntry(str1, monthNames, usedMonth, used);
return index < 0 ? index : index + startMonth;
@ -1595,7 +1610,7 @@ int QDateTimeParser::findDay(const QString &str1, int startDay, int sectionIndex
QLocale::FormatType type = sn.count == 4 ? QLocale::LongFormat : QLocale::ShortFormat;
QLocale l = locale();
QVector<QString> daysOfWeek;
ShortVector<QString> daysOfWeek;
daysOfWeek.reserve(8 - startDay);
for (int day = startDay; day <= 7; ++day)
daysOfWeek.append(l.dayName(day, type));
@ -1877,7 +1892,7 @@ bool QDateTimeParser::potentialValue(const QStringRef &str, int min, int max, in
int val = (int)locale().toUInt(str);
const SectionNode &sn = sectionNode(index);
if (sn.type == YearSection2Digits) {
const int year = currentValue.date().year();
const int year = currentValue.date().year(calendar);
val += year - (year % 100);
}
if (val >= min && val <= max && str.size() == size) {
@ -2047,4 +2062,13 @@ bool operator==(const QDateTimeParser::SectionNode &s1, const QDateTimeParser::S
return (s1.type == s2.type) && (s1.pos == s2.pos) && (s1.count == s2.count);
}
/*!
Sets \a cal as the calendar to use. The default is Gregorian.
*/
void QDateTimeParser::setCalendar(const QCalendar &cal)
{
calendar = cal;
}
QT_END_NAMESPACE

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -57,6 +57,7 @@
#include "QtCore/qdatetime.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qlocale.h"
#include "QtCore/qcalendar.h"
#ifndef QT_BOOTSTRAPPED
# include "QtCore/qvariant.h"
#endif
@ -82,9 +83,9 @@ public:
FromString,
DateTimeEdit
};
QDateTimeParser(QVariant::Type t, Context ctx)
QDateTimeParser(QVariant::Type t, Context ctx, const QCalendar &cal = QCalendar())
: currentSectionIndex(-1), display(nullptr), cachedDay(-1), parserType(t),
fixday(false), spec(Qt::LocalTime), context(ctx)
fixday(false), spec(Qt::LocalTime), context(ctx), calendar(cal)
{
defaultLocale = QLocale::system();
first.type = FirstSection;
@ -195,6 +196,7 @@ public:
void setDefaultLocale(const QLocale &loc) { defaultLocale = loc; }
virtual QString displayText() const { return text; }
void setCalendar(const QCalendar &calendar);
private:
int sectionMaxSize(Section s, int count) const;
@ -215,7 +217,7 @@ private:
ParsedSection parseSection(const QDateTime &currentValue, int sectionIndex,
int offset, QString *text) const;
int findMonth(const QString &str1, int monthstart, int sectionIndex,
QString *monthName = nullptr, int *used = nullptr) const;
int year, QString *monthName = nullptr, int *used = nullptr) const;
int findDay(const QString &str1, int intDaystart, int sectionIndex,
QString *dayName = nullptr, int *used = nullptr) const;
ParsedSection findTimeZone(QStringRef str, const QDateTime &when,
@ -297,6 +299,7 @@ protected: // for the benefit of QDateTimeEditPrivate
bool fixday;
Qt::TimeSpec spec; // spec if used by QDateTimeEdit
Context context;
QCalendar calendar;
};
Q_DECLARE_TYPEINFO(QDateTimeParser::SectionNode, Q_PRIMITIVE_TYPE);

View File

@ -0,0 +1,175 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qgregoriancalendar_p.h"
#include "qcalendarmath_p.h"
#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
using namespace QRoundingDown;
/*!
\since 5.14
\class QGregorianCalendar
\inmodule QtCore
\brief The QGregorianCalendar class implements the Gregorian calendar.
\section1 The Gregorian Calendar
The Gregorian calendar is a refinement of the earlier Julian calendar,
itself a late form of the Roman calendar. It is widely used.
\sa QRomanCalendar, QJulianCalendar, QCalendar
*/
QGregorianCalendar::QGregorianCalendar()
: QRomanCalendar(QStringLiteral("Gregorian"), QCalendar::System::Gregorian)
{
registerAlias(QStringLiteral("gregory"));
}
QString QGregorianCalendar::name() const
{
return QStringLiteral("Gregorian");
}
QCalendar::System QGregorianCalendar::calendarSystem() const
{
return QCalendar::System::Gregorian;
}
bool QGregorianCalendar::isLeapYear(int year) const
{
return leapTest(year);
}
bool QGregorianCalendar::leapTest(int year)
{
if (year == QCalendar::Unspecified)
return false;
// No year 0 in Gregorian calendar, so -1, -5, -9 etc are leap years
if (year < 1)
++year;
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
}
// Duplicating code from QRomanCalendar, but inlining isLeapYear() as leapTest():
int QGregorianCalendar::monthLength(int month, int year)
{
if (month < 1 || month > 12)
return 0;
if (month == 2)
return leapTest(year) ? 29 : 28;
return 30 | ((month & 1) ^ (month >> 3));
}
bool QGregorianCalendar::validParts(int year, int month, int day)
{
return year && 0 < day && day <= monthLength(month, year);
}
int QGregorianCalendar::weekDayOfJulian(qint64 jd)
{
return qMod(jd, 7) + 1;
}
bool QGregorianCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const
{
return julianFromParts(year, month, day, jd);
}
bool QGregorianCalendar::julianFromParts(int year, int month, int day, qint64 *jd)
{
Q_ASSERT(jd);
if (!validParts(year, month, day))
return false;
if (year < 0)
++year;
/*
* Math from The Calendar FAQ at http://www.tondering.dk/claus/cal/julperiod.php
* This formula is correct for all julian days, when using mathematical integer
* division (round to negative infinity), not c++11 integer division (round to zero)
*/
int a = month < 3 ? 1 : 0;
qint64 y = qint64(year) + 4800 - a;
int m = month + 12 * a - 3;
*jd = day + qDiv(153 * m + 2, 5) - 32045
+ 365 * y + qDiv(y, 4) - qDiv(y, 100) + qDiv(y, 400);
return true;
}
QCalendar::YearMonthDay QGregorianCalendar::julianDayToDate(qint64 jd) const
{
return partsFromJulian(jd);
}
QCalendar::YearMonthDay QGregorianCalendar::partsFromJulian(qint64 jd)
{
/*
* Math from The Calendar FAQ at http://www.tondering.dk/claus/cal/julperiod.php
* This formula is correct for all julian days, when using mathematical integer
* division (round to negative infinity), not c++11 integer division (round to zero)
*/
qint64 a = jd + 32044;
qint64 b = qDiv(4 * a + 3, 146097);
int c = a - qDiv(146097 * b, 4);
int d = qDiv(4 * c + 3, 1461);
int e = c - qDiv(1461 * d, 4);
int m = qDiv(5 * e + 2, 153);
int y = 100 * b + d - 4800 + qDiv(m, 10);
// Adjust for no year 0
int year = y > 0 ? y : y - 1;
int month = m + 3 - 12 * qDiv(m, 10);
int day = e - qDiv(153 * m + 2, 5) + 1;
return QCalendar::YearMonthDay(year, month, day);
}
QT_END_NAMESPACE

View File

@ -0,0 +1,90 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QGREGORIAN_CALENDAR_P_H
#define QGREGORIAN_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qromancalendar_p.h"
QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QGregorianCalendar : public QRomanCalendar
{
// TODO: provide static methods, called by the overrides, that can be called
// directly by QDate to optimize various parts.
public:
QGregorianCalendar();
// CAlendar properties:
QString name() const override;
QCalendar::System calendarSystem() const override;
// Date queries:
bool isLeapYear(int year) const override;
// Julian Day conversions:
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
// Names of months (implemented in qlocale.cpp):
QString monthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const override;
QString standaloneMonthName(const QLocale &locale, int month, int year,
QLocale::FormatType format) const override;
// Static optimized versions for the benefit of QDate:
static int weekDayOfJulian(qint64 jd);
static bool leapTest(int year);
static int monthLength(int month, int year);
static bool validParts(int year, int month, int day);
static QCalendar::YearMonthDay partsFromJulian(qint64 jd);
static bool julianFromParts(int year, int month, int day, qint64 *jd);
};
QT_END_NAMESPACE
#endif // QGREGORIAN_CALENDAR_P_H

View File

@ -0,0 +1,125 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qhijricalendar_p.h"
#include "qhijricalendar_data_p.h"
QT_BEGIN_NAMESPACE
/*!
\since 5.14
\class QHijriCalendar
\inmodule QtCore
\brief The QHijriCalendar class supports Islamic (Hijri) calendar implementations.
\section1 Islamic Calendar System
The Islamic, Muslim, or Hijri calendar is a lunar calendar consisting of 12
months in a year of 354 or 355 days. It is used (often alongside the
Gregorian calendar) to date events in many Muslim countries. It is also used
by Muslims to determine the proper days of Islamic holidays and rituals,
such as the annual period of fasting and the proper time for the pilgrimage
to Mecca.
Source: \l {https://en.wikipedia.org/wiki/Islamic_calendar}{Wikipedia page on
Hijri Calendar}
\section1 Support for variants
This base class provides the common details shared by all variants on the
Islamic calendar. Each year comprises 12 months of 29 or 30 days each; most
years have as many of 29 as of 30, but leap years extend one 29-day month to
30 days. In tabular versions of the calendar (where mathematical rules are
used to determine the details), odd-numbered months have 30 days, as does the
last (twelfth) month of a leap year; all other months have 29 days. Other
versions are based on actual astronomical observations of the moon's phase at
sunset, which vary from place to place.
\sa QIslamicCivilCalendar, QCalendar
*/
bool QHijriCalendar::isLunar() const
{
return true;
}
bool QHijriCalendar::isLuniSolar() const
{
return false;
}
bool QHijriCalendar::isSolar() const
{
return false;
}
int QHijriCalendar::daysInMonth(int month, int year) const
{
if (year == 0 || month < 1 || month > 12)
return 0;
if (month == 12 && isLeapYear(year))
return 30;
return month % 2 == 0 ? 29 : 30;
}
int QHijriCalendar::maximumDaysInMonth() const
{
return 30;
}
int QHijriCalendar::daysInYear(int year) const
{
return monthsInYear(year) ? isLeapYear(year) ? 355 : 354 : 0;
}
const QCalendarLocale *QHijriCalendar::localeMonthIndexData() const
{
return locale_data;
}
const ushort *QHijriCalendar::localeMonthData() const
{
return months_data;
}
QT_END_NAMESPACE

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,83 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QHIJRI_CALENDAR_P_H
#define QHIJRI_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/private/qglobal_p.h>
#include "qcalendarbackend_p.h"
QT_REQUIRE_CONFIG(hijricalendar);
QT_BEGIN_NAMESPACE
// Base for sharing with other variants on the Islamic calendar, as needed:
class Q_CORE_EXPORT QHijriCalendar : public QCalendarBackend
{
public:
int daysInMonth(int month, int year = QCalendar::Unspecified) const override;
int maximumDaysInMonth() const override;
int daysInYear(int year) const override;
bool isLunar() const override;
bool isLuniSolar() const override;
bool isSolar() const override;
protected:
const QCalendarLocale *localeMonthIndexData() const override;
const ushort *localeMonthData() const override;
// (The INTEGRITY compiler got upset at: using QCalendarBackend:QCalendarBackend;)
QHijriCalendar(const QString &name, QCalendar::System id = QCalendar::System::User)
: QCalendarBackend(name, id) {}
};
QT_END_NAMESPACE
#endif // QHIJRI_CALENDAR_P_H

View File

@ -0,0 +1,125 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qislamiccivilcalendar_p.h"
#include "qcalendarmath_p.h"
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
using namespace QRoundingDown;
/*!
\since 5.14
\class QIslamicCivilCalendar
\inmodule QtCore
\brief Implements a commonly-used computed version of the Islamic calendar.
\section1 Civil Islamic Calendar
QIslamicCivilCalendar implements a tabular version of the Hijri calendar which
is known as the Islamic Civil Calendar. It has the same numbering of years and
months, but the months are determined by arithmetical rules rather than by
observation or astronomical calculations.
\section2 Calendar Organization
The civil calendar follows the usual tabular scheme of odd-numbered months and
the last month of each leap year being 30 days long, the rest being 29 days
long. Its determination of leap years follows a 30-year cycle, in each of
which the years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 are leap years.
\sa QJijriCalendar, QCalendar
*/
QIslamicCivilCalendar::QIslamicCivilCalendar()
: QHijriCalendar(QStringLiteral("Islamic Civil"), QCalendar::System::IslamicCivil)
{
registerAlias(QStringLiteral("islamic-civil")); // CLDR name
registerAlias(QStringLiteral("islamicc")); // old CLDR name, still (2018) used by Mozilla
// Until we have a oncrete implementation that knows all the needed ephemerides:
registerAlias(QStringLiteral("Islamic"));
}
QString QIslamicCivilCalendar::name() const
{
return QStringLiteral("Islamic Civil");
}
QCalendar::System QIslamicCivilCalendar::calendarSystem() const
{
return QCalendar::System::IslamicCivil;
}
bool QIslamicCivilCalendar::isLeapYear(int year) const
{
if (year == QCalendar::Unspecified)
return false;
if (year < 0)
++year;
return qMod(year * 11 + 14, 30) < 11;
}
bool QIslamicCivilCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const
{
Q_ASSERT(jd);
if (!isDateValid(year, month, day))
return false;
if (year <= 0)
++year;
*jd = qDiv(10631 * year - 10617, 30)
+ qDiv(325 * month - 320, 11)
+ day + 1948439;
return true;
}
QCalendar::YearMonthDay QIslamicCivilCalendar::julianDayToDate(qint64 jd) const
{
const qint64 epoch = 1948440;
const int32_t k2 = 30 * (jd - epoch) + 15;
const int32_t k1 = 11 * qDiv(qMod(k2, 10631), 30) + 5;
int y = qDiv(k2, 10631) + 1;
const int month = qDiv(k1, 325) + 1;
const int day = qDiv(qMod(k1, 325), 11) + 1;
return QCalendar::YearMonthDay(y > 0 ? y : y - 1, month, day);
}
QT_END_NAMESPACE

View File

@ -0,0 +1,76 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QISLAMIC_CIVIL_CALENDAR_P_H
#define QISLAMIC_CIVIL_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qhijricalendar_p.h"
QT_REQUIRE_CONFIG(islamiccivilcalendar);
QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QIslamicCivilCalendar : public QHijriCalendar
{
public:
QIslamicCivilCalendar();
// Calendar properties:
QString name() const override;
QCalendar::System calendarSystem() const override;
// Date queries:
bool isLeapYear(int year) const override;
// Julian Day conversions:
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
};
QT_END_NAMESPACE
#endif // QISLAMIC_CIVIL_CALENDAR_P_H

View File

@ -0,0 +1,212 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qjalalicalendar_p.h"
#include "qjalalicalendar_data_p.h"
#include "qcalendarmath_p.h"
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
using namespace QRoundingDown;
// Constants
static const qint64 cycleDays = 1029983;
static const int cycleYears = 2820;
static const double yearLength = 365.24219858156028368; // 365 + leapRatio;
static const qint64 jalaliEpoch = 2121446; // 475/01/01 AP, start of 2820 cycle
// Calendar implementation
static inline int cycle(qint64 jdn)
{
return qDiv(jdn - jalaliEpoch, cycleDays);
}
qint64 cycleStart(int cycleNo)
{
return jalaliEpoch + cycleNo * cycleDays;
}
qint64 firstDayOfYear(int year, int cycleNo)
{
qint64 firstDOYinEra = static_cast<qint64>(qFloor(year * yearLength));
return jalaliEpoch + cycleNo * cycleDays + firstDOYinEra;
}
/*!
\since 5.14
\class QJalaliCalendar
\inmodule QtCore
\brief The QJalaliCalendar class provides Jalali (Hijri Shamsi) calendar
system implementation.
\section1 Solar Hijri Calendar System
The Solar Hijri calendar, also called the Solar Hejri calendar, Shamsi
Hijri calendar or Jalali calendar, is the official calendar of Iran and
Afghanistan. It begins on the vernal equinox (Nowruz) as determined by
astronomical calculation for the Iran Standard Time meridian
(52.5°E or GMT+3.5h). This determination of starting moment is more accurate
than the Gregorian calendar for predicting the date of the vernal equinox,
because it uses astronomical observations rather than mathematical rules.
\section2 Calendar Organization
Each of the twelve months corresponds with a zodiac sign. The first six
months have 31 days, the next five have 30 days, and the last month has 29
days in usual years but 30 days in leap years. The New Year's Day always
falls on the March equinox.
\section2 Leap Year Rules
The Solar Hijri calendar produces a five-year leap year interval after about
every seven four-year leap year intervals. It usually follows a 33-year
cycle with occasional interruptions by single 29-year or 37-year subcycles.
The reason for this behavior is that it tracks the observed vernal equinox.
By contrast, some less accurate predictive algorithms are in use based
on confusion between the average tropical year (365.2422 days, approximated
with near 128-year cycles or 2820-year great cycles) and the mean interval
between spring equinoxes (365.2424 days, approximated with a near 33-year
cycle).
Source: \l {https://en.wikipedia.org/wiki/Solar_Hijri_calendar}{Wikipedia
page on Solar Hijri Calendar}
*/
QJalaliCalendar::QJalaliCalendar()
: QCalendarBackend(QStringLiteral("Jalali"), QCalendar::System::Jalali)
{
registerAlias(QStringLiteral("Persian"));
}
QString QJalaliCalendar::name() const
{
return QStringLiteral("Jalali");
}
QCalendar::System QJalaliCalendar::calendarSystem() const
{
return QCalendar::System::Jalali;
}
bool QJalaliCalendar::isLeapYear(int year) const
{
if (year == QCalendar::Unspecified)
return false;
if (year < 0)
year++;
return qMod((year + 2346) * 683, 2820) < 683;
}
bool QJalaliCalendar::isLunar() const
{
return false;
}
bool QJalaliCalendar::isLuniSolar() const
{
return false;
}
bool QJalaliCalendar::isSolar() const
{
return true;
}
bool QJalaliCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const
{
Q_ASSERT(jd);
if (!isDateValid(year, month, day))
return false;
const int y = year - (year < 0 ? 474 : 475);
const int c = qDiv(y, cycleYears);
const int yearInCycle = y - c * cycleYears;
int dayInYear = day;
for (int i = 1; i < month; ++i)
dayInYear += daysInMonth(i, year);
*jd = firstDayOfYear(yearInCycle, c) + dayInYear - 1;
return true;
}
QCalendar::YearMonthDay QJalaliCalendar::julianDayToDate(qint64 jd) const
{
const int c = cycle(jd);
int yearInCycle = qFloor((jd - cycleStart(c)) / yearLength);
int year = yearInCycle + 475 + c * cycleYears;
int day = jd - firstDayOfYear(yearInCycle, c) + 1;
if (day > daysInYear(year <= 0 ? year - 1 : year)) {
year++;
day = 1;
}
if (year <= 0)
year--;
int month;
for (month = 1; month < 12; ++month) {
const int last = daysInMonth(month, year);
if (day <= last)
break;
day -= last;
}
return QCalendar::YearMonthDay(year, month, day);
}
int QJalaliCalendar::daysInMonth(int month, int year) const
{
if (year && month > 0 && month <= 12)
return month < 7 ? 31 : month < 12 || isLeapYear(year) ? 30 : 29;
return 0;
}
const QCalendarLocale *QJalaliCalendar::localeMonthIndexData() const
{
return locale_data;
}
const ushort *QJalaliCalendar::localeMonthData() const
{
return months_data;
}
QT_END_NAMESPACE

View File

@ -0,0 +1,893 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPERSIANCALENDAR_DATA_P_H
#define QPERSIANCALENDAR_DATA_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
// file may change from version to version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/private/qglobal_p.h>
#include <QtCore/private/qcalendarbackend_p.h>
QT_BEGIN_NAMESPACE
// GENERATED PART STARTS HERE
/*
This part of the file was generated on 2019-05-27 from the
Common Locale Data Repository v35.1
http://www.unicode.org/cldr/
Do not edit this section: instead regenerate it using
cldr2qlocalexml.py and qlocalexml2cpp.py on updated (or
edited) CLDR data; see qtbase/util/locale_database/.
*/
static const QCalendarLocale locale_data[] = {
// lang script terr sShort sLong sNarrow short long narrow
{ 1, 0, 0,{ 0,48 },{ 48,84 },{ 132,24 },{ 0,48 },{ 48,84 },{ 156,29 }}, // C/AnyScript/AnyCountry
{ 3, 7, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Oromo/Latin/Ethiopia
{ 3, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Oromo/Latin/Kenya
{ 4, 7, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Afar/Latin/Ethiopia
{ 5, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Afrikaans/Latin/South Africa
{ 5, 7, 148,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Afrikaans/Latin/Namibia
{ 6, 7, 2,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Albanian/Latin/Albania
{ 6, 7, 127,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Albanian/Latin/Macedonia
{ 6, 7, 257,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Albanian/Latin/Kosovo
{ 7, 14, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Amharic/Ethiopic/Ethiopia
{ 8, 1, 64,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Egypt
{ 8, 1, 3,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Algeria
{ 8, 1, 17,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Bahrain
{ 8, 1, 42,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Chad
{ 8, 1, 48,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Comoros
{ 8, 1, 59,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Djibouti
{ 8, 1, 67,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Eritrea
{ 8, 1, 103,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Iraq
{ 8, 1, 105,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Israel
{ 8, 1, 109,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Jordan
{ 8, 1, 115,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Kuwait
{ 8, 1, 119,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Lebanon
{ 8, 1, 122,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Libya
{ 8, 1, 136,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Mauritania
{ 8, 1, 145,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Morocco
{ 8, 1, 162,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Oman
{ 8, 1, 165,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Palestinian Territories
{ 8, 1, 175,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Qatar
{ 8, 1, 186,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Saudi Arabia
{ 8, 1, 194,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Somalia
{ 8, 1, 201,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Sudan
{ 8, 1, 207,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Syria
{ 8, 1, 216,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Tunisia
{ 8, 1, 223,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/United Arab Emirates
{ 8, 1, 236,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Western Sahara
{ 8, 1, 237,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/Yemen
{ 8, 1, 254,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/South Sudan
{ 8, 1, 260,{ 212,68 },{ 212,68 },{ 185,27 },{ 212,68 },{ 212,68 },{ 185,27 }}, // Arabic/Arabic/World
{ 9, 10, 11,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Armenian/Armenian/Armenia
{ 10, 11, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Assamese/Bengali/India
{ 12, 7, 15,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Azerbaijani/Latin/Azerbaijan
{ 12, 1, 102,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Azerbaijani/Arabic/Iran
{ 12, 2, 15,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Azerbaijani/Cyrillic/Azerbaijan
{ 13, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bashkir/Cyrillic/Russia
{ 14, 7, 197,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Basque/Latin/Spain
{ 15, 11, 18,{ 280,88 },{ 368,89 },{ 457,27 },{ 280,88 },{ 368,89 },{ 457,27 }}, // Bengali/Bengali/Bangladesh
{ 15, 11, 100,{ 280,88 },{ 368,89 },{ 457,27 },{ 280,88 },{ 368,89 },{ 457,27 }}, // Bengali/Bengali/India
{ 16, 31, 25,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dzongkha/Tibetan/Bhutan
{ 19, 7, 74,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Breton/Latin/France
{ 20, 2, 33,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bulgarian/Cyrillic/Bulgaria
{ 21, 25, 147,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Burmese/Myanmar/Myanmar
{ 22, 2, 20,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Belarusian/Cyrillic/Belarus
{ 23, 20, 36,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Khmer/Khmer/Cambodia
{ 24, 7, 197,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Catalan/Latin/Spain
{ 24, 7, 5,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Catalan/Latin/Andorra
{ 24, 7, 74,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Catalan/Latin/France
{ 24, 7, 106,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Catalan/Latin/Italy
{ 25, 5, 44,{ 484,39 },{ 523,38 },{ 185,27 },{ 484,39 },{ 523,38 },{ 185,27 }}, // Chinese/Simplified Han/China
{ 25, 5, 97,{ 484,39 },{ 523,38 },{ 185,27 },{ 484,39 },{ 523,38 },{ 185,27 }}, // Chinese/Simplified Han/Hong Kong
{ 25, 5, 126,{ 484,39 },{ 523,38 },{ 185,27 },{ 484,39 },{ 523,38 },{ 185,27 }}, // Chinese/Simplified Han/Macau
{ 25, 5, 190,{ 484,39 },{ 523,38 },{ 185,27 },{ 484,39 },{ 523,38 },{ 185,27 }}, // Chinese/Simplified Han/Singapore
{ 25, 6, 97,{ 484,39 },{ 484,39 },{ 185,27 },{ 484,39 },{ 484,39 },{ 185,27 }}, // Chinese/Traditional Han/Hong Kong
{ 25, 6, 126,{ 484,39 },{ 484,39 },{ 185,27 },{ 484,39 },{ 484,39 },{ 185,27 }}, // Chinese/Traditional Han/Macau
{ 25, 6, 208,{ 484,39 },{ 484,39 },{ 185,27 },{ 484,39 },{ 484,39 },{ 185,27 }}, // Chinese/Traditional Han/Taiwan
{ 26, 7, 74,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Corsican/Latin/France
{ 27, 7, 54,{ 48,84 },{ 48,84 },{ 561,39 },{ 48,84 },{ 48,84 },{ 561,39 }}, // Croatian/Latin/Croatia
{ 27, 7, 27,{ 48,84 },{ 48,84 },{ 561,39 },{ 48,84 },{ 48,84 },{ 561,39 }}, // Croatian/Latin/Bosnia And Herzegowina
{ 28, 7, 57,{ 600,82 },{ 600,82 },{ 185,27 },{ 600,82 },{ 600,82 },{ 185,27 }}, // Czech/Latin/Czech Republic
{ 29, 7, 58,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Danish/Latin/Denmark
{ 29, 7, 86,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Danish/Latin/Greenland
{ 30, 7, 151,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Netherlands
{ 30, 7, 12,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Aruba
{ 30, 7, 21,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Belgium
{ 30, 7, 152,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Cura Sao
{ 30, 7, 202,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Suriname
{ 30, 7, 255,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Bonaire
{ 30, 7, 256,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Dutch/Latin/Sint Maarten
{ 31, 7, 225,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/United States
{ 31, 3, 225,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Deseret/United States
{ 31, 7, 4,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/American Samoa
{ 31, 7, 7,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Anguilla
{ 31, 7, 9,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Antigua And Barbuda
{ 31, 7, 13,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Australia
{ 31, 7, 14,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Austria
{ 31, 7, 16,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Bahamas
{ 31, 7, 19,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Barbados
{ 31, 7, 21,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Belgium
{ 31, 7, 22,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Belize
{ 31, 7, 24,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Bermuda
{ 31, 7, 28,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Botswana
{ 31, 7, 31,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/British Indian Ocean Territory
{ 31, 7, 35,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Burundi
{ 31, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Cameroon
{ 31, 7, 38,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Canada
{ 31, 7, 40,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Cayman Islands
{ 31, 7, 45,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Christmas Island
{ 31, 7, 46,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Cocos Islands
{ 31, 7, 51,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Cook Islands
{ 31, 7, 56,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Cyprus
{ 31, 7, 58,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Denmark
{ 31, 7, 60,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Dominica
{ 31, 7, 67,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Eritrea
{ 31, 7, 70,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Falkland Islands
{ 31, 7, 72,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Fiji
{ 31, 7, 73,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Finland
{ 31, 7, 75,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Guernsey
{ 31, 7, 80,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Gambia
{ 31, 7, 82,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Germany
{ 31, 7, 83,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Ghana
{ 31, 7, 84,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Gibraltar
{ 31, 7, 87,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Grenada
{ 31, 7, 89,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Guam
{ 31, 7, 93,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Guyana
{ 31, 7, 97,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Hong Kong
{ 31, 7, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/India
{ 31, 7, 104,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Ireland
{ 31, 7, 105,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Israel
{ 31, 7, 107,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Jamaica
{ 31, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Kenya
{ 31, 7, 112,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Kiribati
{ 31, 7, 120,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Lesotho
{ 31, 7, 121,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Liberia
{ 31, 7, 126,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Macau
{ 31, 7, 128,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Madagascar
{ 31, 7, 129,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Malawi
{ 31, 7, 130,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Malaysia
{ 31, 7, 133,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Malta
{ 31, 7, 134,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Marshall Islands
{ 31, 7, 137,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Mauritius
{ 31, 7, 140,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Micronesia
{ 31, 7, 144,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Montserrat
{ 31, 7, 148,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Namibia
{ 31, 7, 149,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Nauru
{ 31, 7, 151,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Netherlands
{ 31, 7, 154,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/New Zealand
{ 31, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Nigeria
{ 31, 7, 158,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Niue
{ 31, 7, 159,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Norfolk Island
{ 31, 7, 160,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Northern Mariana Islands
{ 31, 7, 163,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Pakistan
{ 31, 7, 164,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Palau
{ 31, 7, 167,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Papua New Guinea
{ 31, 7, 170,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Philippines
{ 31, 7, 171,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Pitcairn
{ 31, 7, 174,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Puerto Rico
{ 31, 7, 179,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Rwanda
{ 31, 7, 180,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Saint Kitts And Nevis
{ 31, 7, 181,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Saint Lucia
{ 31, 7, 182,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Saint Vincent And The Grenadines
{ 31, 7, 183,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Samoa
{ 31, 7, 188,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Seychelles
{ 31, 7, 189,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Sierra Leone
{ 31, 7, 190,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Singapore
{ 31, 7, 192,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Slovenia
{ 31, 7, 193,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Solomon Islands
{ 31, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/South Africa
{ 31, 7, 199,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Saint Helena
{ 31, 7, 201,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Sudan
{ 31, 7, 204,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Swaziland
{ 31, 7, 205,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Sweden
{ 31, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Switzerland
{ 31, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Tanzania
{ 31, 7, 213,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Tokelau
{ 31, 7, 214,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Tonga
{ 31, 7, 215,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Trinidad And Tobago
{ 31, 7, 219,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Turks And Caicos Islands
{ 31, 7, 220,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Tuvalu
{ 31, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Uganda
{ 31, 7, 223,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/United Arab Emirates
{ 31, 7, 224,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/United Kingdom
{ 31, 7, 226,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/United States Minor Outlying Islands
{ 31, 7, 229,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Vanuatu
{ 31, 7, 233,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/British Virgin Islands
{ 31, 7, 234,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/United States Virgin Islands
{ 31, 7, 239,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Zambia
{ 31, 7, 240,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Zimbabwe
{ 31, 7, 249,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Diego Garcia
{ 31, 7, 251,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Isle Of Man
{ 31, 7, 252,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Jersey
{ 31, 7, 254,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/South Sudan
{ 31, 7, 256,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Sint Maarten
{ 31, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/World
{ 31, 7, 261,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // English/Latin/Europe
{ 32, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Esperanto/Latin/World
{ 33, 7, 68,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Estonian/Latin/Estonia
{ 34, 7, 71,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Faroese/Latin/Faroe Islands
{ 34, 7, 58,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Faroese/Latin/Denmark
{ 36, 7, 73,{ 766,82 },{ 848,118 },{ 185,27 },{ 966,142 },{ 966,142 },{ 185,27 }}, // Finnish/Latin/Finland
{ 37, 7, 74,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/France
{ 37, 7, 3,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Algeria
{ 37, 7, 21,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Belgium
{ 37, 7, 23,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Benin
{ 37, 7, 34,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Burkina Faso
{ 37, 7, 35,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Burundi
{ 37, 7, 37,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Cameroon
{ 37, 7, 38,{ 1248,58 },{ 1306,82 },{ 185,27 },{ 1248,58 },{ 1306,82 },{ 185,27 }}, // French/Latin/Canada
{ 37, 7, 41,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Central African Republic
{ 37, 7, 42,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Chad
{ 37, 7, 48,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Comoros
{ 37, 7, 49,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Congo Kinshasa
{ 37, 7, 50,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Congo Brazzaville
{ 37, 7, 53,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Ivory Coast
{ 37, 7, 59,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Djibouti
{ 37, 7, 66,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Equatorial Guinea
{ 37, 7, 76,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/French Guiana
{ 37, 7, 77,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/French Polynesia
{ 37, 7, 79,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Gabon
{ 37, 7, 88,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Guadeloupe
{ 37, 7, 91,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Guinea
{ 37, 7, 94,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Haiti
{ 37, 7, 125,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Luxembourg
{ 37, 7, 128,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Madagascar
{ 37, 7, 132,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Mali
{ 37, 7, 135,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Martinique
{ 37, 7, 136,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Mauritania
{ 37, 7, 137,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Mauritius
{ 37, 7, 138,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Mayotte
{ 37, 7, 142,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Monaco
{ 37, 7, 145,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Morocco
{ 37, 7, 153,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/New Caledonia
{ 37, 7, 156,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Niger
{ 37, 7, 176,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Reunion
{ 37, 7, 179,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Rwanda
{ 37, 7, 187,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Senegal
{ 37, 7, 188,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Seychelles
{ 37, 7, 200,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Saint Pierre And Miquelon
{ 37, 7, 206,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Switzerland
{ 37, 7, 207,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Syria
{ 37, 7, 212,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Togo
{ 37, 7, 216,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Tunisia
{ 37, 7, 229,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Vanuatu
{ 37, 7, 235,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Wallis And Futuna Islands
{ 37, 7, 244,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Saint Barthelemy
{ 37, 7, 245,{ 1108,58 },{ 1166,82 },{ 185,27 },{ 1108,58 },{ 1166,82 },{ 185,27 }}, // French/Latin/Saint Martin
{ 38, 7, 151,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Western Frisian/Latin/Netherlands
{ 39, 7, 224,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Gaelic/Latin/United Kingdom
{ 40, 7, 197,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Galician/Latin/Spain
{ 41, 15, 81,{ 1388,92 },{ 1388,92 },{ 185,27 },{ 1388,92 },{ 1388,92 },{ 185,27 }}, // Georgian/Georgian/Georgia
{ 42, 7, 82,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Germany
{ 42, 7, 14,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Austria
{ 42, 7, 21,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Belgium
{ 42, 7, 106,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Italy
{ 42, 7, 123,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Liechtenstein
{ 42, 7, 125,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Luxembourg
{ 42, 7, 206,{ 1480,87 },{ 1480,87 },{ 185,27 },{ 1480,87 },{ 1480,87 },{ 185,27 }}, // German/Latin/Switzerland
{ 43, 16, 85,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Greek/Greek/Greece
{ 43, 16, 56,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Greek/Greek/Cyprus
{ 44, 7, 86,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Greenlandic/Latin/Greenland
{ 45, 7, 168,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Guarani/Latin/Paraguay
{ 46, 17, 100,{ 1567,86 },{ 1567,86 },{ 185,27 },{ 1567,86 },{ 1567,86 },{ 185,27 }}, // Gujarati/Gujarati/India
{ 47, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Hausa/Latin/Nigeria
{ 47, 1, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Hausa/Arabic/Nigeria
{ 47, 7, 83,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Hausa/Latin/Ghana
{ 47, 7, 156,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Hausa/Latin/Niger
{ 48, 18, 105,{ 1653,69 },{ 1653,69 },{ 185,27 },{ 1653,69 },{ 1653,69 },{ 185,27 }}, // Hebrew/Hebrew/Israel
{ 49, 13, 100,{ 1722,82 },{ 1722,82 },{ 185,27 },{ 1722,82 },{ 1722,82 },{ 185,27 }}, // Hindi/Devanagari/India
{ 50, 7, 98,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Hungarian/Latin/Hungary
{ 51, 7, 99,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Icelandic/Latin/Iceland
{ 52, 7, 101,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Indonesian/Latin/Indonesia
{ 53, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Interlingua/Latin/World
{ 55, 44, 38,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Inuktitut/Canadian Aboriginal/Canada
{ 55, 7, 38,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Inuktitut/Latin/Canada
{ 57, 7, 104,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Irish/Latin/Ireland
{ 58, 7, 106,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Italian/Latin/Italy
{ 58, 7, 184,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Italian/Latin/San Marino
{ 58, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Italian/Latin/Switzerland
{ 58, 7, 230,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Italian/Latin/Vatican City State
{ 59, 19, 108,{ 1804,78 },{ 1804,78 },{ 185,27 },{ 1804,78 },{ 1804,78 },{ 185,27 }}, // Japanese/Japanese/Japan
{ 60, 7, 101,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Javanese/Latin/Indonesia
{ 61, 21, 100,{ 1882,93 },{ 1882,93 },{ 185,27 },{ 1882,93 },{ 1882,93 },{ 185,27 }}, // Kannada/Kannada/India
{ 62, 1, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kashmiri/Arabic/India
{ 63, 2, 110,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kazakh/Cyrillic/Kazakhstan
{ 64, 7, 179,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kinyarwanda/Latin/Rwanda
{ 65, 2, 116,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kirghiz/Cyrillic/Kyrgyzstan
{ 66, 22, 114,{ 1975,55 },{ 1975,55 },{ 185,27 },{ 1975,55 },{ 1975,55 },{ 185,27 }}, // Korean/Korean/South Korea
{ 66, 22, 113,{ 1975,55 },{ 1975,55 },{ 185,27 },{ 1975,55 },{ 1975,55 },{ 185,27 }}, // Korean/Korean/North Korea
{ 67, 7, 217,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kurdish/Latin/Turkey
{ 68, 7, 35,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Rundi/Latin/Burundi
{ 69, 23, 117,{ 2030,80 },{ 2110,81 },{ 185,27 },{ 2191,80 },{ 2110,81 },{ 185,27 }}, // Lao/Lao/Laos
{ 71, 7, 118,{ 2271,93 },{ 2271,93 },{ 185,27 },{ 2271,93 },{ 2271,93 },{ 185,27 }}, // Latvian/Latin/Latvia
{ 72, 7, 49,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lingala/Latin/Congo Kinshasa
{ 72, 7, 6,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lingala/Latin/Angola
{ 72, 7, 41,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lingala/Latin/Central African Republic
{ 72, 7, 50,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lingala/Latin/Congo Brazzaville
{ 73, 7, 124,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lithuanian/Latin/Lithuania
{ 74, 2, 127,{ 2364,80 },{ 2364,80 },{ 185,27 },{ 2364,80 },{ 2364,80 },{ 185,27 }}, // Macedonian/Cyrillic/Macedonia
{ 75, 7, 128,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Malagasy/Latin/Madagascar
{ 76, 7, 130,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Malay/Latin/Malaysia
{ 76, 1, 130,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Malay/Arabic/Malaysia
{ 76, 7, 32,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Malay/Latin/Brunei
{ 76, 7, 190,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Malay/Latin/Singapore
{ 77, 24, 100,{ 2444,92 },{ 2444,92 },{ 2536,40 },{ 2444,92 },{ 2444,92 },{ 2536,40 }}, // Malayalam/Malayalam/India
{ 78, 7, 133,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Maltese/Latin/Malta
{ 79, 7, 154,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Maori/Latin/New Zealand
{ 80, 13, 100,{ 2576,81 },{ 2576,81 },{ 2657,27 },{ 2576,81 },{ 2576,81 },{ 2657,27 }}, // Marathi/Devanagari/India
{ 82, 2, 143,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mongolian/Cyrillic/Mongolia
{ 82, 8, 44,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mongolian/Mongolian/China
{ 84, 13, 150,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nepali/Devanagari/Nepal
{ 84, 13, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nepali/Devanagari/India
{ 85, 7, 161,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Norwegian Bokmal/Latin/Norway
{ 85, 7, 203,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Norwegian Bokmal/Latin/Svalbard And Jan Mayen Islands
{ 86, 7, 74,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Occitan/Latin/France
{ 87, 26, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Oriya/Oriya/India
{ 88, 1, 1,{ 2684,63 },{ 2684,63 },{ 185,27 },{ 2684,63 },{ 2684,63 },{ 185,27 }}, // Pashto/Arabic/Afghanistan
{ 88, 1, 163,{ 2684,63 },{ 2684,63 },{ 185,27 },{ 2684,63 },{ 2684,63 },{ 185,27 }}, // Pashto/Arabic/Pakistan
{ 89, 1, 102,{ 2747,67 },{ 2747,67 },{ 2814,24 },{ 2747,67 },{ 2747,67 },{ 2814,24 }}, // Persian/Arabic/Iran
{ 89, 1, 1,{ 2747,67 },{ 2747,67 },{ 2838,24 },{ 2747,67 },{ 2862,57 },{ 2814,24 }}, // Persian/Arabic/Afghanistan
{ 90, 7, 172,{ 2919,84 },{ 2919,84 },{ 185,27 },{ 2919,84 },{ 2919,84 },{ 185,27 }}, // Polish/Latin/Poland
{ 91, 7, 30,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Brazil
{ 91, 7, 6,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Angola
{ 91, 7, 39,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Cape Verde
{ 91, 7, 62,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/East Timor
{ 91, 7, 66,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Equatorial Guinea
{ 91, 7, 92,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Guinea Bissau
{ 91, 7, 125,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Luxembourg
{ 91, 7, 126,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Macau
{ 91, 7, 146,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Mozambique
{ 91, 7, 173,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Portugal
{ 91, 7, 185,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Sao Tome And Principe
{ 91, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Portuguese/Latin/Switzerland
{ 92, 4, 100,{ 3003,78 },{ 3003,78 },{ 185,27 },{ 3003,78 },{ 3003,78 },{ 185,27 }}, // Punjabi/Gurmukhi/India
{ 92, 1, 163,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Punjabi/Arabic/Pakistan
{ 93, 7, 169,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Quechua/Latin/Peru
{ 93, 7, 26,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Quechua/Latin/Bolivia
{ 93, 7, 63,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Quechua/Latin/Ecuador
{ 94, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Romansh/Latin/Switzerland
{ 95, 7, 177,{ 3081,86 },{ 3081,86 },{ 185,27 },{ 3081,86 },{ 3081,86 },{ 185,27 }}, // Romanian/Latin/Romania
{ 95, 7, 141,{ 3081,86 },{ 3081,86 },{ 185,27 },{ 3081,86 },{ 3081,86 },{ 185,27 }}, // Romanian/Latin/Moldova
{ 96, 2, 178,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Russia
{ 96, 2, 20,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Belarus
{ 96, 2, 110,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Kazakhstan
{ 96, 2, 116,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Kyrgyzstan
{ 96, 2, 141,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Moldova
{ 96, 2, 222,{ 3167,81 },{ 3167,81 },{ 185,27 },{ 3167,81 },{ 3167,81 },{ 185,27 }}, // Russian/Cyrillic/Ukraine
{ 98, 7, 41,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sango/Latin/Central African Republic
{ 99, 13, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sanskrit/Devanagari/India
{ 100, 2, 243,{ 3248,81 },{ 3248,81 },{ 185,27 },{ 3248,81 },{ 3248,81 },{ 185,27 }}, // Serbian/Cyrillic/Serbia
{ 100, 7, 27,{ 3329,81 },{ 3329,81 },{ 185,27 },{ 3329,81 },{ 3329,81 },{ 185,27 }}, // Serbian/Latin/Bosnia And Herzegowina
{ 100, 7, 242,{ 3329,81 },{ 3329,81 },{ 185,27 },{ 3329,81 },{ 3329,81 },{ 185,27 }}, // Serbian/Latin/Montenegro
{ 100, 7, 243,{ 3329,81 },{ 3329,81 },{ 185,27 },{ 3329,81 },{ 3329,81 },{ 185,27 }}, // Serbian/Latin/Serbia
{ 100, 2, 27,{ 3248,81 },{ 3248,81 },{ 185,27 },{ 3248,81 },{ 3248,81 },{ 185,27 }}, // Serbian/Cyrillic/Bosnia And Herzegowina
{ 100, 2, 242,{ 3248,81 },{ 3248,81 },{ 185,27 },{ 3248,81 },{ 3248,81 },{ 185,27 }}, // Serbian/Cyrillic/Montenegro
{ 100, 2, 257,{ 3248,81 },{ 3248,81 },{ 185,27 },{ 3248,81 },{ 3248,81 },{ 185,27 }}, // Serbian/Cyrillic/Kosovo
{ 100, 7, 257,{ 3329,81 },{ 3329,81 },{ 185,27 },{ 3329,81 },{ 3329,81 },{ 185,27 }}, // Serbian/Latin/Kosovo
{ 101, 2, 81,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ossetic/Cyrillic/Georgia
{ 101, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ossetic/Cyrillic/Russia
{ 102, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Southern Sotho/Latin/South Africa
{ 103, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tswana/Latin/South Africa
{ 104, 7, 240,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Shona/Latin/Zimbabwe
{ 105, 1, 163,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sindhi/Arabic/Pakistan
{ 106, 32, 198,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sinhala/Sinhala/Sri Lanka
{ 107, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swati/Latin/South Africa
{ 108, 7, 191,{ 600,82 },{ 600,82 },{ 185,27 },{ 600,82 },{ 600,82 },{ 185,27 }}, // Slovak/Latin/Slovakia
{ 109, 7, 192,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Slovenian/Latin/Slovenia
{ 110, 7, 194,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Somali/Latin/Somalia
{ 110, 7, 59,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Somali/Latin/Djibouti
{ 110, 7, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Somali/Latin/Ethiopia
{ 110, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Somali/Latin/Kenya
{ 111, 7, 197,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Spain
{ 111, 7, 10,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Argentina
{ 111, 7, 22,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Belize
{ 111, 7, 26,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Bolivia
{ 111, 7, 30,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Brazil
{ 111, 7, 43,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Chile
{ 111, 7, 47,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Colombia
{ 111, 7, 52,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Costa Rica
{ 111, 7, 55,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Cuba
{ 111, 7, 61,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Dominican Republic
{ 111, 7, 63,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Ecuador
{ 111, 7, 65,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/El Salvador
{ 111, 7, 66,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Equatorial Guinea
{ 111, 7, 90,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Guatemala
{ 111, 7, 96,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Honduras
{ 111, 7, 139,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Mexico
{ 111, 7, 155,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Nicaragua
{ 111, 7, 166,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Panama
{ 111, 7, 168,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Paraguay
{ 111, 7, 169,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Peru
{ 111, 7, 170,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Philippines
{ 111, 7, 174,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Puerto Rico
{ 111, 7, 225,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/United States
{ 111, 7, 227,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Uruguay
{ 111, 7, 231,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Venezuela
{ 111, 7, 238,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Canary Islands
{ 111, 7, 246,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Latin America
{ 111, 7, 250,{ 682,84 },{ 682,84 },{ 185,27 },{ 682,84 },{ 682,84 },{ 185,27 }}, // Spanish/Latin/Ceuta And Melilla
{ 113, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swahili/Latin/Tanzania
{ 113, 7, 49,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swahili/Latin/Congo Kinshasa
{ 113, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swahili/Latin/Kenya
{ 113, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swahili/Latin/Uganda
{ 114, 7, 205,{ 3410,84 },{ 3410,84 },{ 185,27 },{ 3494,84 },{ 3494,84 },{ 185,27 }}, // Swedish/Latin/Sweden
{ 114, 7, 73,{ 3410,84 },{ 3410,84 },{ 185,27 },{ 3494,84 },{ 3494,84 },{ 185,27 }}, // Swedish/Latin/Finland
{ 114, 7, 248,{ 3410,84 },{ 3410,84 },{ 185,27 },{ 3494,84 },{ 3494,84 },{ 185,27 }}, // Swedish/Latin/Aland Islands
{ 115, 7, 106,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sardinian/Latin/Italy
{ 116, 2, 209,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tajik/Cyrillic/Tajikistan
{ 117, 27, 100,{ 3578,64 },{ 3642,94 },{ 185,27 },{ 3578,64 },{ 3642,94 },{ 185,27 }}, // Tamil/Tamil/India
{ 117, 27, 130,{ 3578,64 },{ 3642,94 },{ 185,27 },{ 3578,64 },{ 3642,94 },{ 185,27 }}, // Tamil/Tamil/Malaysia
{ 117, 27, 190,{ 3578,64 },{ 3642,94 },{ 185,27 },{ 3578,64 },{ 3642,94 },{ 185,27 }}, // Tamil/Tamil/Singapore
{ 117, 27, 198,{ 3578,64 },{ 3642,94 },{ 185,27 },{ 3578,64 },{ 3642,94 },{ 185,27 }}, // Tamil/Tamil/Sri Lanka
{ 118, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tatar/Cyrillic/Russia
{ 119, 28, 100,{ 3736,89 },{ 3736,89 },{ 185,27 },{ 3736,89 },{ 3736,89 },{ 185,27 }}, // Telugu/Telugu/India
{ 120, 30, 211,{ 3825,99 },{ 3825,99 },{ 185,27 },{ 3825,99 },{ 3825,99 },{ 185,27 }}, // Thai/Thai/Thailand
{ 121, 31, 44,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tibetan/Tibetan/China
{ 121, 31, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tibetan/Tibetan/India
{ 122, 14, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tigrinya/Ethiopic/Ethiopia
{ 122, 14, 67,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tigrinya/Ethiopic/Eritrea
{ 123, 7, 214,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tongan/Latin/Tonga
{ 124, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tsonga/Latin/South Africa
{ 125, 7, 217,{ 3924,81 },{ 3924,81 },{ 185,27 },{ 3924,81 },{ 3924,81 },{ 185,27 }}, // Turkish/Latin/Turkey
{ 125, 7, 56,{ 3924,81 },{ 3924,81 },{ 185,27 },{ 3924,81 },{ 3924,81 },{ 185,27 }}, // Turkish/Latin/Cyprus
{ 126, 7, 218,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Turkmen/Latin/Turkmenistan
{ 128, 1, 44,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Uighur/Arabic/China
{ 129, 2, 222,{ 4005,50 },{ 4055,81 },{ 185,27 },{ 4136,58 },{ 4055,81 },{ 185,27 }}, // Ukrainian/Cyrillic/Ukraine
{ 130, 1, 163,{ 4194,67 },{ 4194,67 },{ 185,27 },{ 4194,67 },{ 4194,67 },{ 185,27 }}, // Urdu/Arabic/Pakistan
{ 130, 1, 100,{ 4194,67 },{ 4194,67 },{ 185,27 },{ 4194,67 },{ 4194,67 },{ 185,27 }}, // Urdu/Arabic/India
{ 131, 7, 228,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Uzbek/Latin/Uzbekistan
{ 131, 1, 1,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Uzbek/Arabic/Afghanistan
{ 131, 2, 228,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Uzbek/Cyrillic/Uzbekistan
{ 132, 7, 232,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Vietnamese/Latin/Vietnam
{ 133, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Volapuk/Latin/World
{ 134, 7, 224,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Welsh/Latin/United Kingdom
{ 135, 7, 187,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Wolof/Latin/Senegal
{ 136, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Xhosa/Latin/South Africa
{ 137, 18, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Yiddish/Hebrew/World
{ 138, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Yoruba/Latin/Nigeria
{ 138, 7, 23,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Yoruba/Latin/Benin
{ 140, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Zulu/Latin/South Africa
{ 141, 7, 161,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Norwegian Nynorsk/Latin/Norway
{ 142, 7, 27,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bosnian/Latin/Bosnia And Herzegowina
{ 142, 2, 27,{ 3248,81 },{ 3248,81 },{ 185,27 },{ 3248,81 },{ 3248,81 },{ 185,27 }}, // Bosnian/Cyrillic/Bosnia And Herzegowina
{ 143, 29, 131,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Divehi/Thaana/Maldives
{ 144, 7, 251,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Manx/Latin/Isle Of Man
{ 145, 7, 224,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Cornish/Latin/United Kingdom
{ 146, 7, 83,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Akan/Latin/Ghana
{ 147, 13, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Konkani/Devanagari/India
{ 148, 7, 83,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ga/Latin/Ghana
{ 149, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Igbo/Latin/Nigeria
{ 150, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kamba/Latin/Kenya
{ 151, 33, 103,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Syriac/Syriac/Iraq
{ 152, 14, 67,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Blin/Ethiopic/Eritrea
{ 153, 14, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Geez/Ethiopic/Ethiopia
{ 155, 7, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sidamo/Latin/Ethiopia
{ 156, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Atsam/Latin/Nigeria
{ 157, 14, 67,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tigre/Ethiopic/Eritrea
{ 158, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Jju/Latin/Nigeria
{ 159, 7, 106,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Friulian/Latin/Italy
{ 160, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Venda/Latin/South Africa
{ 161, 7, 83,{ 4261,48 },{ 4309,87 },{ 185,27 },{ 4261,48 },{ 4309,87 },{ 185,27 }}, // Ewe/Latin/Ghana
{ 161, 7, 212,{ 4261,48 },{ 4309,87 },{ 185,27 },{ 4261,48 },{ 4309,87 },{ 185,27 }}, // Ewe/Latin/Togo
{ 162, 14, 69,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Walamo/Ethiopic/Ethiopia
{ 163, 7, 225,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Hawaiian/Latin/United States
{ 164, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tyap/Latin/Nigeria
{ 165, 7, 129,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nyanja/Latin/Malawi
{ 166, 7, 170,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Filipino/Latin/Philippines
{ 167, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swiss German/Latin/Switzerland
{ 167, 7, 74,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swiss German/Latin/France
{ 167, 7, 123,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Swiss German/Latin/Liechtenstein
{ 168, 34, 44,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sichuan Yi/Yi/China
{ 169, 7, 121,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kpelle/Latin/Liberia
{ 170, 7, 82,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Low German/Latin/Germany
{ 170, 7, 151,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Low German/Latin/Netherlands
{ 171, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // South Ndebele/Latin/South Africa
{ 172, 7, 195,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Sotho/Latin/South Africa
{ 173, 7, 161,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Sami/Latin/Norway
{ 173, 7, 73,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Sami/Latin/Finland
{ 173, 7, 205,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Sami/Latin/Sweden
{ 174, 7, 208,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Taroko/Latin/Taiwan
{ 175, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Gusii/Latin/Kenya
{ 176, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Taita/Latin/Kenya
{ 177, 7, 187,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Senegal
{ 177, 7, 34,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Burkina Faso
{ 177, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Cameroon
{ 177, 7, 80,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Gambia
{ 177, 7, 83,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Ghana
{ 177, 7, 91,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Guinea
{ 177, 7, 92,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Guinea Bissau
{ 177, 7, 121,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Liberia
{ 177, 7, 136,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Mauritania
{ 177, 7, 156,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Niger
{ 177, 7, 157,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Nigeria
{ 177, 7, 189,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Latin/Sierra Leone
{ 177, 134, 91,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Fulah/Adlam/Guinea
{ 178, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kikuyu/Latin/Kenya
{ 179, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Samburu/Latin/Kenya
{ 180, 7, 146,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sena/Latin/Mozambique
{ 181, 7, 240,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // North Ndebele/Latin/Zimbabwe
{ 182, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Rombo/Latin/Tanzania
{ 183, 9, 145,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tachelhit/Tifinagh/Morocco
{ 183, 7, 145,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tachelhit/Latin/Morocco
{ 184, 7, 3,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kabyle/Latin/Algeria
{ 185, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nyankole/Latin/Uganda
{ 186, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bena/Latin/Tanzania
{ 187, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Vunjo/Latin/Tanzania
{ 188, 7, 132,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bambara/Latin/Mali
{ 188, 75, 132,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bambara/Nko/Mali
{ 189, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Embu/Latin/Kenya
{ 190, 12, 225,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Cherokee/Cherokee/United States
{ 191, 7, 137,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Morisyen/Latin/Mauritius
{ 192, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Makonde/Latin/Tanzania
{ 193, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Langi/Latin/Tanzania
{ 194, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ganda/Latin/Uganda
{ 195, 7, 239,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bemba/Latin/Zambia
{ 196, 7, 39,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kabuverdianu/Latin/Cape Verde
{ 197, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Meru/Latin/Kenya
{ 198, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kalenjin/Latin/Kenya
{ 199, 7, 148,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nama/Latin/Namibia
{ 200, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Machame/Latin/Tanzania
{ 201, 7, 82,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Colognian/Latin/Germany
{ 202, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Masai/Latin/Kenya
{ 202, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Masai/Latin/Tanzania
{ 203, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Soga/Latin/Uganda
{ 204, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Luyia/Latin/Kenya
{ 205, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Asu/Latin/Tanzania
{ 206, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Teso/Latin/Uganda
{ 206, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Teso/Latin/Kenya
{ 207, 7, 67,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Saho/Latin/Eritrea
{ 208, 7, 132,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Koyra Chiini/Latin/Mali
{ 209, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Rwa/Latin/Tanzania
{ 210, 7, 111,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Luo/Latin/Kenya
{ 211, 7, 221,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Chiga/Latin/Uganda
{ 212, 7, 145,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Central Morocco Tamazight/Latin/Morocco
{ 213, 7, 132,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Koyraboro Senni/Latin/Mali
{ 214, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Shambala/Latin/Tanzania
{ 215, 13, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bodo/Devanagari/India
{ 218, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Chechen/Cyrillic/Russia
{ 219, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Church/Cyrillic/Russia
{ 220, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Chuvash/Cyrillic/Russia
{ 230, 7, 49,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Luba Katanga/Latin/Congo Kinshasa
{ 231, 7, 125,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Luxembourgish/Latin/Luxembourg
{ 236, 7, 21,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Walloon/Latin/Belgium
{ 237, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Aghem/Latin/Cameroon
{ 238, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Basaa/Latin/Cameroon
{ 239, 7, 156,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Zarma/Latin/Niger
{ 240, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Duala/Latin/Cameroon
{ 241, 7, 187,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Jola Fonyi/Latin/Senegal
{ 242, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ewondo/Latin/Cameroon
{ 243, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Bafia/Latin/Cameroon
{ 244, 7, 146,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Makhuwa Meetto/Latin/Mozambique
{ 245, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mundang/Latin/Cameroon
{ 246, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kwasio/Latin/Cameroon
{ 247, 7, 254,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nuer/Latin/South Sudan
{ 248, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sakha/Cyrillic/Russia
{ 249, 7, 210,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sangu/Latin/Tanzania
{ 251, 7, 156,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tasawaq/Latin/Niger
{ 252, 35, 121,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Vai/Vai/Liberia
{ 252, 7, 121,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Vai/Latin/Liberia
{ 253, 7, 206,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Walser/Latin/Switzerland
{ 254, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Yangben/Latin/Cameroon
{ 256, 7, 197,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Asturian/Latin/Spain
{ 257, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ngomba/Latin/Cameroon
{ 258, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kako/Latin/Cameroon
{ 259, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Meta/Latin/Cameroon
{ 260, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ngiemboon/Latin/Cameroon
{ 290, 11, 100,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Manipuri/Bengali/India
{ 309, 100, 232,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Tai Dam/Tai Viet/Vietnam
{ 312, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Akoose/Latin/Cameroon
{ 313, 7, 225,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lakota/Latin/United States
{ 314, 9, 145,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Standard Moroccan Tamazight/Tifinagh/Morocco
{ 315, 7, 43,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mapuche/Latin/Chile
{ 316, 1, 103,{ 4396,102 },{ 4396,102 },{ 185,27 },{ 4396,102 },{ 4396,102 },{ 185,27 }}, // Central Kurdish/Arabic/Iraq
{ 316, 1, 102,{ 4396,102 },{ 4396,102 },{ 185,27 },{ 4396,102 },{ 4396,102 },{ 185,27 }}, // Central Kurdish/Arabic/Iran
{ 317, 7, 82,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lower Sorbian/Latin/Germany
{ 318, 7, 82,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Upper Sorbian/Latin/Germany
{ 319, 7, 37,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kenyang/Latin/Cameroon
{ 320, 7, 38,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mohawk/Latin/Canada
{ 321, 75, 91,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Nko/Nko/Guinea
{ 322, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Prussian/Latin/World
{ 323, 7, 90,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Kiche/Latin/Guatemala
{ 324, 7, 205,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Southern Sami/Latin/Sweden
{ 325, 7, 205,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lule Sami/Latin/Sweden
{ 326, 7, 73,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Inari Sami/Latin/Finland
{ 327, 7, 73,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Skolt Sami/Latin/Finland
{ 328, 7, 13,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Warlpiri/Latin/Australia
{ 346, 1, 102,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Mazanderani/Arabic/Iran
{ 349, 1, 102,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Luri/Arabic/Iran
{ 349, 1, 103,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Northern Luri/Arabic/Iraq
{ 357, 6, 97,{ 484,39 },{ 484,39 },{ 185,27 },{ 484,39 },{ 484,39 },{ 185,27 }}, // Cantonese/Traditional Han/Hong Kong
{ 357, 5, 44,{ 484,39 },{ 484,39 },{ 185,27 },{ 484,39 },{ 484,39 },{ 185,27 }}, // Cantonese/Simplified Han/China
{ 360, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Ido/Latin/World
{ 361, 7, 260,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Lojban/Latin/World
{ 362, 7, 106,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Sicilian/Latin/Italy
{ 363, 1, 102,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Southern Kurdish/Arabic/Iran
{ 364, 1, 163,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Western Balochi/Arabic/Pakistan
{ 365, 7, 170,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Cebuano/Latin/Philippines
{ 366, 2, 178,{ 48,84 },{ 48,84 },{ 185,27 },{ 48,84 },{ 48,84 },{ 185,27 }}, // Erzya/Cyrillic/Russia
{ 0, 0, 0,{ 0,0},{ 0,0},{ 0,0},{ 0,0},{ 0,0},{ 0,0}}, // trailing zeros
};
static const ushort months_data[] = {
0x46, 0x61, 0x72, 0x3b, 0x4f, 0x72, 0x64, 0x3b, 0x4b, 0x68, 0x6f, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x3b,
0x53, 0x68, 0x61, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x41, 0x62, 0x61, 0x3b, 0x41, 0x7a, 0x61, 0x3b, 0x44, 0x65, 0x79, 0x3b,
0x42, 0x61, 0x68, 0x3b, 0x45, 0x73, 0x66, 0x3b, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72,
0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69,
0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d,
0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x61,
0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x46, 0x3b, 0x4f, 0x3b, 0x4b, 0x3b, 0x54, 0x3b,
0x4d, 0x3b, 0x53, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x31, 0x3b, 0x32, 0x3b,
0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x38, 0x3b, 0x39, 0x3b, 0x31, 0x30, 0x3b, 0x31, 0x31, 0x3b,
0x31, 0x32, 0x3b, 0x31, 0x33, 0x31, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34, 0x3b, 0x35, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x38,
0x3b, 0x39, 0x3b, 0x31, 0x30, 0x3b, 0x31, 0x31, 0x3b, 0x31, 0x32, 0x3b, 0x641, 0x631, 0x641, 0x631, 0x62f, 0x646, 0x3b, 0x623,
0x630, 0x631, 0x628, 0x64a, 0x647, 0x634, 0x62a, 0x3b, 0x62e, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x62a, 0x627, 0x631, 0x3b, 0x645, 0x631,
0x62f, 0x627, 0x62f, 0x3b, 0x634, 0x647, 0x631, 0x641, 0x627, 0x631, 0x3b, 0x645, 0x647, 0x631, 0x3b, 0x622, 0x64a, 0x627, 0x646, 0x3b,
0x622, 0x630, 0x631, 0x3b, 0x62f, 0x64a, 0x3b, 0x628, 0x647, 0x645, 0x646, 0x3b, 0x627, 0x633, 0x641, 0x646, 0x62f, 0x627, 0x631, 0x3b,
0x9ab, 0x9cd, 0x9af, 0x9be, 0x9ad, 0x9be, 0x9b0, 0x9cd, 0x9a1, 0x9bf, 0x9a8, 0x3b, 0x985, 0x9b0, 0x9a1, 0x9bf, 0x9ac, 0x9c7, 0x9b9, 0x9c7,
0x9b6, 0x9cd, 0x9a4, 0x3b, 0x996, 0x9cb, 0x9b0, 0x9cd, 0x9a6, 0x9cd, 0x9a6, 0x3b, 0x9a4, 0x9c0, 0x9b0, 0x3b, 0x9ae, 0x9b0, 0x9cd, 0x9af,
0x9be, 0x9a6, 0x3b, 0x9b6, 0x9be, 0x9b9, 0x9b0, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x9c7, 0x9b9, 0x9c7, 0x9b0, 0x3b, 0x986, 0x9ac,
0x9be, 0x9a8, 0x3b, 0x986, 0x99c, 0x9be, 0x9b0, 0x3b, 0x9a6, 0x9c7, 0x3b, 0x9ac, 0x9be, 0x9b9, 0x9ae, 0x9be, 0x9a8, 0x3b, 0x98f, 0x9b8,
0x9ab, 0x9cd, 0x9af, 0x9be, 0x9a8, 0x9cd, 0x9a1, 0x3b, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9ad, 0x9be, 0x9b0, 0x9cd, 0x9a1, 0x9bf, 0x9a8, 0x3b,
0x985, 0x9b0, 0x9a1, 0x9bf, 0x9ac, 0x9c7, 0x9b9, 0x9c7, 0x9b6, 0x9cd, 0x9a4, 0x3b, 0x996, 0x9cb, 0x9b0, 0x9cd, 0x9a6, 0x9cd, 0x9a6, 0x3b,
0x9a4, 0x9c0, 0x9b0, 0x3b, 0x9ae, 0x9b0, 0x9cd, 0x9af, 0x9be, 0x9a6, 0x3b, 0x9b6, 0x9be, 0x9b9, 0x9b0, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b,
0x9ae, 0x9c7, 0x9b9, 0x9c7, 0x9b0, 0x3b, 0x986, 0x9ac, 0x9be, 0x9a8, 0x3b, 0x9ac, 0x9be, 0x99c, 0x9be, 0x9b0, 0x3b, 0x9a6, 0x9c7, 0x3b,
0x9ac, 0x9be, 0x9b9, 0x9ae, 0x9be, 0x9a8, 0x3b, 0x98f, 0x9b8, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9a8, 0x9cd, 0x9a1, 0x3b, 0x9e7, 0x3b, 0x9e8,
0x3b, 0x9e9, 0x3b, 0x9ea, 0x3b, 0x9eb, 0x3b, 0x9ec, 0x3b, 0x9ed, 0x3b, 0x9ee, 0x3b, 0x9ef, 0x3b, 0x9e7, 0x9e6, 0x3b, 0x9e7, 0x9e7,
0x3b, 0x9e7, 0x9e8, 0x3b, 0x31, 0x6708, 0x3b, 0x32, 0x6708, 0x3b, 0x33, 0x6708, 0x3b, 0x34, 0x6708, 0x3b, 0x35, 0x6708, 0x3b, 0x36,
0x6708, 0x3b, 0x37, 0x6708, 0x3b, 0x38, 0x6708, 0x3b, 0x39, 0x6708, 0x3b, 0x31, 0x30, 0x6708, 0x3b, 0x31, 0x31, 0x6708, 0x3b, 0x31,
0x32, 0x6708, 0x3b, 0x4e00, 0x6708, 0x3b, 0x4e8c, 0x6708, 0x3b, 0x4e09, 0x6708, 0x3b, 0x56db, 0x6708, 0x3b, 0x4e94, 0x6708, 0x3b, 0x516d, 0x6708,
0x3b, 0x4e03, 0x6708, 0x3b, 0x516b, 0x6708, 0x3b, 0x4e5d, 0x6708, 0x3b, 0x5341, 0x6708, 0x3b, 0x5341, 0x4e00, 0x6708, 0x3b, 0x5341, 0x4e8c, 0x6708,
0x3b, 0x31, 0x2e, 0x3b, 0x32, 0x2e, 0x3b, 0x33, 0x2e, 0x3b, 0x34, 0x2e, 0x3b, 0x35, 0x2e, 0x3b, 0x36, 0x2e, 0x3b, 0x37,
0x2e, 0x3b, 0x38, 0x2e, 0x3b, 0x39, 0x2e, 0x3b, 0x31, 0x30, 0x2e, 0x3b, 0x31, 0x31, 0x2e, 0x3b, 0x31, 0x32, 0x2e, 0x3b,
0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74,
0x3b, 0x63, 0x68, 0x6f, 0x72, 0x64, 0xe1, 0x64, 0x3b, 0x74, 0xed, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0xe1, 0x64, 0x3b,
0x161, 0x61, 0x68, 0x72, 0xed, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0xe1, 0x62, 0xe1, 0x6e, 0x3b, 0xe1,
0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x69, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e,
0x64, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65,
0x73, 0x68, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64,
0x61, 0x64, 0x3b, 0x73, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x61, 0x62,
0x61, 0x6e, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65,
0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69,
0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d,
0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b,
0x61, 0x62, 0x61, 0x6e, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e,
0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x6b, 0x75, 0x75,
0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x6b, 0x75, 0x75, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64,
0x61, 0x64, 0x6b, 0x75, 0x75, 0x3b, 0x74, 0x69, 0x72, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b,
0x75, 0x75, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x6b,
0x75, 0x75, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x6b, 0x75, 0x75, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6b, 0x75, 0x75, 0x3b, 0x64,
0x65, 0x79, 0x6b, 0x75, 0x75, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x6b, 0x75, 0x75, 0x3b, 0x65, 0x73, 0x66, 0x61,
0x6e, 0x64, 0x6b, 0x75, 0x75, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x6b, 0x75, 0x75, 0x74, 0x61,
0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6b, 0x68, 0x6f,
0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x74, 0x69, 0x72, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d,
0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x6b,
0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x6b,
0x75, 0x75, 0x74, 0x61, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x64, 0x65, 0x79, 0x6b, 0x75,
0x75, 0x74, 0x61, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x65, 0x73, 0x66, 0x61,
0x6e, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x66, 0x61, 0x72, 0x2e, 0x3b, 0x6f, 0x72, 0x64, 0x2e, 0x3b, 0x6b, 0x68,
0x6f, 0x2e, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x2e, 0x3b, 0x161, 0x61, 0x68, 0x2e, 0x3b, 0x6d, 0x65, 0x68,
0x72, 0x3b, 0xe2, 0x62, 0xe2, 0x6e, 0x3b, 0xe2, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x2e,
0x3b, 0x65, 0x73, 0x66, 0x2e, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69,
0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d,
0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b,
0xe2, 0x62, 0xe2, 0x6e, 0x3b, 0xe2, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e,
0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x46, 0x61, 0x72, 0x2e, 0x3b, 0x4f, 0x72, 0x64, 0x2e, 0x3b, 0x4b, 0x68,
0x6f, 0x2e, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x2e, 0x3b, 0x160, 0x61, 0x68, 0x2e, 0x3b, 0x4d, 0x65, 0x68,
0x72, 0x3b, 0xc2, 0x62, 0xe2, 0x2e, 0x3b, 0xc2, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x2e,
0x3b, 0x45, 0x73, 0x66, 0x2e, 0x3b, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69,
0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d,
0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x160, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b,
0xc2, 0x62, 0xe2, 0x6e, 0x3b, 0xc2, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e,
0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x10e4, 0x10d0, 0x10e0, 0x10d5, 0x10d0, 0x10e0, 0x10d3, 0x10d8, 0x10dc, 0x10d8, 0x3b, 0x10dd,
0x10e0, 0x10d3, 0x10d8, 0x10d1, 0x10d4, 0x10f0, 0x10d4, 0x10e8, 0x10d7, 0x10d8, 0x3b, 0x10ee, 0x10dd, 0x10e0, 0x10d3, 0x10d0, 0x10d3, 0x10d8, 0x3b, 0x10d7,
0x10d8, 0x10e0, 0x10d8, 0x3b, 0x10db, 0x10dd, 0x10e0, 0x10d3, 0x10d0, 0x10d3, 0x10d8, 0x3b, 0x10e8, 0x10d0, 0x10f0, 0x10e0, 0x10d8, 0x10d5, 0x10d0, 0x10e0,
0x10d8, 0x3b, 0x10db, 0x10d4, 0x10f0, 0x10e0, 0x10d8, 0x3b, 0x10d0, 0x10d1, 0x10d0, 0x10dc, 0x10d8, 0x3b, 0x10d0, 0x10d6, 0x10d0, 0x10e0, 0x10d8, 0x3b,
0x10d3, 0x10d4, 0x10d8, 0x3b, 0x10d1, 0x10d0, 0x10f0, 0x10db, 0x10d0, 0x10dc, 0x10d8, 0x3b, 0x10d4, 0x10e1, 0x10e4, 0x10d0, 0x10dc, 0x10d3, 0x10d8, 0x3b,
0x46, 0x61, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x63,
0x68, 0x74, 0x3b, 0x43, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x101,
0x64, 0x3b, 0x53, 0x63, 0x68, 0x61, 0x68, 0x72, 0x69, 0x77, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x100, 0x62,
0x101, 0x6e, 0x3b, 0x100, 0x73, 0x61, 0x72, 0x3b, 0x44, 0xe9, 0x69, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45,
0x73, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0xaab, 0xabe, 0xab0, 0xacd, 0xab5, 0xabe, 0xab0, 0xacd, 0xaa6, 0xabf, 0xaa8, 0x3b, 0xa93,
0xab0, 0xaa1, 0xac0, 0xaac, 0xac7, 0xab9, 0xac7, 0xab6, 0xacd, 0xa9f, 0x3b, 0xa96, 0xacb, 0xab0, 0xaa6, 0xabe, 0xaa6, 0x3b, 0xaa4, 0xabf,
0xab0, 0x3b, 0xaae, 0xacb, 0xab0, 0xacd, 0xaa6, 0xabe, 0xaa6, 0x3b, 0xab6, 0xabe, 0xab9, 0xab0, 0xabf, 0xab5, 0xab0, 0x3b, 0xaae, 0xac7,
0xab9, 0xab0, 0x3b, 0xa85, 0xaac, 0xabe, 0xaa8, 0x3b, 0xa85, 0xa9d, 0xabe, 0xab0, 0x3b, 0xaa1, 0xac7, 0xaaf, 0x3b, 0xaac, 0xabe, 0xab9,
0xaae, 0xac7, 0xaa8, 0x3b, 0xa8f, 0xab8, 0xacd, 0xaab, 0xabe, 0xaa8, 0xacd, 0xaa1, 0x3b, 0x5e4, 0x5e8, 0x5d5, 0x5e8, 0x5d3, 0x5d9, 0x5df,
0x3b, 0x5d0, 0x5e8, 0x5d3, 0x5d9, 0x5d1, 0x5d4, 0x5e9, 0x5ea, 0x3b, 0x5d7, 0x5f3, 0x5e8, 0x5d3, 0x5d0, 0x5d3, 0x3b, 0x5ea, 0x5d9, 0x5e8,
0x3b, 0x5de, 0x5e8, 0x5d3, 0x5d0, 0x5d3, 0x3b, 0x5e9, 0x5d4, 0x5e8, 0x5d9, 0x5d5, 0x5e8, 0x3b, 0x5de, 0x5d4, 0x5e8, 0x3b, 0x5d0, 0x5d1,
0x5d0, 0x5df, 0x3b, 0x5d0, 0x5d3, 0x5f3, 0x5e8, 0x3b, 0x5d3, 0x5d9, 0x3b, 0x5d1, 0x5d4, 0x5de, 0x5df, 0x3b, 0x5d0, 0x5e1, 0x5e4, 0x5e0,
0x5d3, 0x3b, 0x92b, 0x930, 0x94d, 0x935, 0x93e, 0x926, 0x93f, 0x928, 0x3b, 0x913, 0x930, 0x94d, 0x926, 0x93f, 0x935, 0x947, 0x939, 0x947,
0x938, 0x94d, 0x91f, 0x3b, 0x916, 0x94b, 0x930, 0x930, 0x94d, 0x926, 0x93e, 0x926, 0x3b, 0x91f, 0x93f, 0x930, 0x3b, 0x92e, 0x94b, 0x930,
0x926, 0x93e, 0x926, 0x3b, 0x936, 0x93e, 0x939, 0x930, 0x940, 0x935, 0x930, 0x94d, 0x3b, 0x92e, 0x947, 0x939, 0x930, 0x3b, 0x905, 0x935,
0x928, 0x3b, 0x905, 0x91c, 0x93c, 0x930, 0x3b, 0x921, 0x947, 0x3b, 0x92c, 0x939, 0x92e, 0x928, 0x3b, 0x908, 0x938, 0x94d, 0x92b, 0x928,
0x94d, 0x926, 0x94d, 0x3b, 0x30d5, 0x30a1, 0x30eb, 0x30f4, 0x30a1, 0x30eb, 0x30c7, 0x30a3, 0x30fc, 0x30f3, 0x3b, 0x30aa, 0x30eb, 0x30c7, 0x30a3, 0x30fc,
0x30d9, 0x30d8, 0x30b7, 0x30e5, 0x30c8, 0x3b, 0x30db, 0x30eb, 0x30c0, 0x30fc, 0x30c9, 0x3b, 0x30c6, 0x30a3, 0x30fc, 0x30eb, 0x3b, 0x30e2, 0x30eb, 0x30c0,
0x30fc, 0x30c9, 0x3b, 0x30b7, 0x30e3, 0x30cf, 0x30ea, 0x30fc, 0x30f4, 0x30a1, 0x30eb, 0x3b, 0x30e1, 0x30d5, 0x30eb, 0x3b, 0x30a2, 0x30fc, 0x30d0, 0x30fc,
0x30f3, 0x3b, 0x30a2, 0x30fc, 0x30b6, 0x30eb, 0x3b, 0x30c7, 0x30a4, 0x3b, 0x30d0, 0x30d5, 0x30de, 0x30f3, 0x3b, 0x30a8, 0x30b9, 0x30d5, 0x30a1, 0x30f3,
0x30c9, 0x3b, 0xcab, 0xcb0, 0xccd, 0xcb5, 0xcb0, 0xccd, 0xca6, 0xcbf, 0xca8, 0xccd, 0x3b, 0xc93, 0xcb0, 0xccd, 0xca6, 0xcbf, 0xcac, 0xcc6,
0xcb9, 0xcc6, 0xcb6, 0xccd, 0xc9f, 0xccd, 0x3b, 0xc96, 0xccb, 0xcb0, 0xccd, 0xca1, 0xcbe, 0xca6, 0xccd, 0x3b, 0xc9f, 0xcbf, 0xcb0, 0xccd,
0x3b, 0xcae, 0xcca, 0xcb0, 0xccd, 0xca6, 0xcbe, 0xca6, 0xccd, 0x3b, 0xcb6, 0xcb9, 0xcb0, 0xcbf, 0xcb5, 0xcbe, 0xcb0, 0xccd, 0x3b, 0xcae,
0xcc6, 0xcb9, 0xccd, 0xcb0, 0xccd, 0x3b, 0xc85, 0xcac, 0xca8, 0xccd, 0x3b, 0xc85, 0xc9d, 0xcb0, 0xccd, 0x3b, 0xca1, 0xcc7, 0x3b, 0xcac,
0xcb9, 0xccd, 0xcae, 0xca8, 0xccd, 0x3b, 0xc8e, 0xcb8, 0xccd, 0xcab, 0xcbe, 0xc82, 0xca1, 0xccd, 0x3b, 0xd654, 0xb974, 0xbc14, 0xb518, 0x3b,
0xc624, 0xb974, 0xb514, 0xbca0, 0xd5e4, 0xc26c, 0xd2b8, 0x3b, 0xd638, 0xb974, 0xb2e4, 0xb4dc, 0x3b, 0xd2f0, 0xb974, 0x3b, 0xbaa8, 0xb974, 0xb2e4, 0xb4dc,
0x3b, 0xc0e4, 0xd750, 0xb9ac, 0xbc14, 0xb974, 0x3b, 0xba54, 0xd750, 0xb974, 0x3b, 0xc544, 0xbc18, 0x3b, 0xc544, 0xc790, 0xb974, 0x3b, 0xb2e4, 0xc774,
0x3b, 0xbc14, 0xd750, 0xb9cc, 0x3b, 0xc5d0, 0xc2a4, 0xd310, 0xb4dc, 0x3b, 0xe9f, 0xea3, 0xeb2, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b, 0xead,
0xecd, 0xea3, 0xe94, 0xeb5, 0xe9a, 0xeb5, 0xec0, 0xeab, 0xeae, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1, 0xe95,
0xea3, 0x3b, 0xea1, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xea5, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeb5,
0x3b, 0xead, 0xeb2, 0xe9a, 0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2, 0xea1,
0xeb2, 0xe99, 0x3b, 0xec0, 0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0x3b, 0xe9f, 0xea3, 0xeb2, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b, 0xead,
0xecd, 0xea3, 0xe94, 0xeb5, 0xe9a, 0xeb5, 0xec0, 0xeab, 0xea3, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1, 0xe95,
0xea3, 0x3b, 0xea1, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xeab, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeb5,
0x3b, 0xead, 0xeb2, 0xe9a, 0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0xea3, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2,
0xec1, 0xea1, 0xe99, 0x3b, 0xec0, 0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0x3b, 0xe9f, 0xeb2, 0xea3, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b,
0xead, 0xecd, 0xea3, 0xe94, 0xeb5, 0xe9a, 0xeb5, 0xec0, 0xeab, 0xea3, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1,
0xe95, 0xea3, 0x3b, 0xea1, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xeab, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1,
0xeb5, 0x3b, 0xead, 0xeb2, 0xe9a, 0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2,
0xea1, 0xeb2, 0xe99, 0x3b, 0xec0, 0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x12b, 0x6e,
0x73, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64,
0x73, 0x3b, 0x74, 0x12b, 0x72, 0x73, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x73, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69,
0x76, 0x113, 0x72, 0x73, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x73, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x73, 0x3b, 0x61, 0x7a, 0x65,
0x72, 0x73, 0x3b, 0x64, 0x65, 0x6a, 0x73, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x73, 0x3b, 0x65, 0x73, 0x66, 0x61,
0x6e, 0x64, 0x73, 0x3b, 0x444, 0x430, 0x440, 0x432, 0x430, 0x440, 0x434, 0x438, 0x43d, 0x3b, 0x43e, 0x440, 0x434, 0x438, 0x431, 0x435,
0x445, 0x435, 0x448, 0x442, 0x3b, 0x43a, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x442, 0x438, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x434,
0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440, 0x438, 0x432, 0x430, 0x440, 0x3b, 0x43c, 0x435, 0x440, 0x3b, 0x430, 0x431, 0x430, 0x43d,
0x3b, 0x430, 0x437, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x458, 0x3b, 0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d, 0x3b, 0x435, 0x441, 0x444,
0x430, 0x43d, 0x434, 0x3b, 0xd2b, 0xd7c, 0xd35, 0xd3e, 0xd7c, 0xd26, 0xd3f, 0xd7b, 0x3b, 0xd13, 0xd7c, 0xd21, 0xd3f, 0xd2c, 0xd46, 0xd39,
0xd46, 0xd37, 0xd4d, 0x200c, 0xd31, 0xd4d, 0xd31, 0xd4d, 0x3b, 0xd16, 0xd4b, 0xd7c, 0xd26, 0xd3e, 0xd26, 0xd4d, 0x3b, 0xd1f, 0xd3f, 0xd7c,
0x3b, 0xd2e, 0xd4b, 0xd7c, 0xd26, 0xd3e, 0xd26, 0xd4d, 0x3b, 0xd37, 0xd39, 0xd4d, 0x200c, 0xd30, 0xd3f, 0xd35, 0xd3e, 0xd7c, 0x3b, 0xd2e,
0xd46, 0xd39, 0xd7c, 0x3b, 0xd05, 0xd2c, 0xd3e, 0xd7b, 0x3b, 0xd05, 0xd38, 0xd7c, 0x3b, 0xd21, 0xd46, 0xd2f, 0xd4d, 0x3b, 0xd2c, 0xd39,
0xd4d, 0x200c, 0xd2e, 0xd3e, 0xd7b, 0x3b, 0xd0e, 0xd38, 0xd4d, 0x200c, 0xd2b, 0xd3e, 0xd7b, 0xd21, 0xd4d, 0x3b, 0xd2b, 0x2e, 0x3b, 0xd13,
0x2e, 0x3b, 0xd16, 0xd4b, 0x3b, 0xd1f, 0xd3f, 0x2e, 0x3b, 0xd2e, 0xd4b, 0x2e, 0x3b, 0xd37, 0x2e, 0x3b, 0xd2e, 0xd46, 0x2e, 0x3b,
0xd05, 0x2e, 0x3b, 0xd05, 0x2e, 0x3b, 0xd21, 0xd46, 0x2e, 0x3b, 0xd2c, 0x2e, 0x3b, 0xd0e, 0x2e, 0x3b, 0x92b, 0x930, 0x935, 0x930,
0x926, 0x93f, 0x928, 0x3b, 0x913, 0x930, 0x94d, 0x926, 0x93f, 0x92c, 0x947, 0x939, 0x947, 0x936, 0x94d, 0x924, 0x3b, 0x916, 0x94b, 0x930,
0x926, 0x93e, 0x926, 0x3b, 0x924, 0x93f, 0x930, 0x3b, 0x92e, 0x94b, 0x930, 0x926, 0x93e, 0x926, 0x3b, 0x936, 0x93e, 0x939, 0x930, 0x940,
0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x947, 0x939, 0x947, 0x930, 0x3b, 0x905, 0x92c, 0x93e, 0x928, 0x3b, 0x905, 0x91d, 0x93e, 0x930, 0x3b,
0x926, 0x947, 0x3b, 0x92c, 0x93e, 0x939, 0x92e, 0x93e, 0x928, 0x3b, 0x90f, 0x938, 0x92b, 0x93e, 0x902, 0x926, 0x3b, 0x967, 0x3b, 0x968,
0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x96e, 0x3b, 0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967,
0x3b, 0x967, 0x968, 0x3b, 0x648, 0x631, 0x6cc, 0x3b, 0x63a, 0x648, 0x6cc, 0x6cc, 0x3b, 0x63a, 0x628, 0x631, 0x6af, 0x648, 0x644, 0x6cc,
0x3b, 0x686, 0x646, 0x6af, 0x627, 0x69a, 0x3b, 0x632, 0x645, 0x631, 0x6cc, 0x3b, 0x648, 0x696, 0x6cc, 0x3b, 0x62a, 0x644, 0x647, 0x3b,
0x644, 0x693, 0x645, 0x3b, 0x644, 0x6cc, 0x646, 0x62f, 0x6cd, 0x3b, 0x645, 0x631, 0x63a, 0x648, 0x645, 0x6cc, 0x3b, 0x633, 0x644, 0x648,
0x627, 0x63a, 0x647, 0x3b, 0x6a9, 0x628, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x62f, 0x6cc, 0x646, 0x3b, 0x627, 0x631, 0x62f, 0x6cc, 0x628,
0x647, 0x634, 0x62a, 0x3b, 0x62e, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x62a, 0x6cc, 0x631, 0x3b, 0x645, 0x631, 0x62f, 0x627, 0x62f, 0x3b,
0x634, 0x647, 0x631, 0x6cc, 0x648, 0x631, 0x3b, 0x645, 0x647, 0x631, 0x3b, 0x622, 0x628, 0x627, 0x646, 0x3b, 0x622, 0x630, 0x631, 0x3b,
0x62f, 0x6cc, 0x3b, 0x628, 0x647, 0x645, 0x646, 0x3b, 0x627, 0x633, 0x641, 0x646, 0x62f, 0x3b, 0x641, 0x3b, 0x627, 0x3b, 0x62e, 0x3b,
0x62a, 0x3b, 0x645, 0x3b, 0x634, 0x3b, 0x645, 0x3b, 0x622, 0x3b, 0x622, 0x3b, 0x62f, 0x3b, 0x628, 0x3b, 0x627, 0x3b, 0x62d, 0x3b,
0x62b, 0x3b, 0x62c, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x645, 0x3b, 0x639, 0x3b, 0x642, 0x3b, 0x62c, 0x3b, 0x62f, 0x3b,
0x62d, 0x3b, 0x62d, 0x645, 0x644, 0x3b, 0x62b, 0x648, 0x631, 0x3b, 0x62c, 0x648, 0x632, 0x627, 0x3b, 0x633, 0x631, 0x637, 0x627, 0x646,
0x3b, 0x627, 0x633, 0x62f, 0x3b, 0x633, 0x646, 0x628, 0x644, 0x647, 0x654, 0x3b, 0x645, 0x6cc, 0x632, 0x627, 0x646, 0x3b, 0x639, 0x642,
0x631, 0x628, 0x3b, 0x642, 0x648, 0x633, 0x3b, 0x62c, 0x62f, 0x6cc, 0x3b, 0x62f, 0x644, 0x648, 0x3b, 0x62d, 0x648, 0x62a, 0x3b, 0x46,
0x61, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x7a, 0x74,
0x3b, 0x43, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b,
0x53, 0x7a, 0x61, 0x68, 0x72, 0x69, 0x77, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x100, 0x62, 0x101, 0x6e, 0x3b,
0x100, 0x73, 0x61, 0x72, 0x3b, 0x44, 0xe9, 0x69, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61,
0x6e, 0x64, 0x3b, 0xa2b, 0xa3e, 0xa30, 0xa35, 0xa30, 0xa21, 0xa40, 0xa28, 0x3b, 0xa14, 0xa30, 0xa21, 0xa3e, 0xa08, 0xa2c, 0xa39, 0xa48,
0xa38, 0xa3c, 0xa1f, 0x3b, 0xa16, 0xa4b, 0xa21, 0xa30, 0xa21, 0x3b, 0xa1f, 0xa3f, 0xa30, 0x3b, 0xa2e, 0xa4b, 0xa30, 0xa21, 0xa3e, 0xa26,
0x3b, 0xa38, 0xa3c, 0xa30, 0xa3e, 0xa07, 0xa35, 0xa30, 0x3b, 0xa2e, 0xa47, 0xa39, 0xa30, 0x3b, 0xa05, 0xa2c, 0xa3e, 0xa28, 0x3b, 0xa05,
0xa1c, 0xa3c, 0xa3e, 0xa30, 0x3b, 0xa21, 0xa47, 0xa05, 0x3b, 0xa2c, 0xa3e, 0xa39, 0xa2e, 0xa28, 0x3b, 0xa10, 0xa38, 0xa2b, 0xa70, 0xa21,
0x3b, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73,
0x68, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x41, 0x2d, 0x4d, 0x6f, 0x72,
0x64, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41,
0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b,
0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x444, 0x430, 0x440, 0x432, 0x430, 0x440, 0x434, 0x438, 0x43d, 0x3b, 0x43e, 0x440, 0x434,
0x438, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x445, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x442, 0x438, 0x440, 0x3b, 0x43c,
0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440, 0x438, 0x432, 0x435, 0x440, 0x3b, 0x43c, 0x435, 0x445, 0x440, 0x3b,
0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b, 0x434, 0x435, 0x439, 0x3b, 0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d,
0x3b, 0x44d, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x3b, 0x424, 0x430, 0x440, 0x430, 0x432, 0x430, 0x434, 0x438, 0x43d, 0x3b, 0x41e, 0x440,
0x434, 0x438, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x41a, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x422, 0x438, 0x440, 0x3b,
0x41c, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x428, 0x430, 0x445, 0x440, 0x438, 0x432, 0x430, 0x440, 0x3b, 0x41c, 0x435, 0x445, 0x440,
0x3b, 0x410, 0x431, 0x430, 0x43d, 0x3b, 0x410, 0x437, 0x430, 0x440, 0x3b, 0x414, 0x435, 0x458, 0x3b, 0x411, 0x430, 0x445, 0x43c, 0x430,
0x43d, 0x3b, 0x415, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x3b, 0x46, 0x61, 0x72, 0x61, 0x76, 0x61, 0x64, 0x69, 0x6e, 0x3b, 0x4f,
0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x4b, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72,
0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x160, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68,
0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x6a, 0x3b, 0x42, 0x61, 0x68, 0x6d,
0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b,
0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b,
0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72,
0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x100, 0x62, 0x101, 0x6e, 0x3b, 0x100, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b,
0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72,
0x64, 0x101, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x73, 0x68, 0x61, 0x68, 0x72,
0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x101, 0x62, 0x101, 0x6e, 0x3b, 0x101, 0x7a, 0x61, 0x72, 0x3b,
0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x3b, 0xb83, 0xbaa,
0xbb0, 0xbcd, 0x2e, 0x3b, 0xb86, 0xbb0, 0xbcd, 0xb9f, 0xbbf, 0x2e, 0x3b, 0xb95, 0xbca, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xba4, 0xbbf, 0xbb0,
0xbcd, 0x3b, 0xbae, 0xbca, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xbb7, 0xbbe, 0xbb0, 0xbbf, 0x2e, 0x3b, 0xbae, 0xbc6, 0xbb9, 0xbcd, 0x2e, 0x3b,
0xb85, 0xbaa, 0xbbe, 0x2e, 0x3b, 0xb85, 0xb9a, 0xbbe, 0x2e, 0x3b, 0xba4, 0xbc7, 0x3b, 0xbaa, 0xbb9, 0xbcd, 0x2e, 0x3b, 0xb8e, 0xb83,
0x2e, 0x3b, 0xb83, 0xbaa, 0xbb0, 0xbcd, 0xbb5, 0xbbe, 0xba4, 0xbbf, 0xba9, 0xbcd, 0x3b, 0xb86, 0xbb0, 0xbcd, 0xb9f, 0xbbf, 0xbaa, 0xbc6,
0xbb9, 0xbc6, 0xbb7, 0xbcd, 0xba4, 0xbcd, 0x3b, 0xb95, 0xbca, 0xbb0, 0xbcd, 0xba4, 0xbbe, 0xba4, 0xbcd, 0x3b, 0xba4, 0xbbf, 0xbb0, 0xbcd,
0x3b, 0xbae, 0xbca, 0xbb0, 0xbcd, 0xba4, 0xbbe, 0xba4, 0xbcd, 0x3b, 0xbb7, 0xbbe, 0xbb0, 0xbbf, 0xbb5, 0xbbe, 0xbb0, 0xbcd, 0x3b, 0xbae,
0xbc6, 0xbb9, 0xbcd, 0xbb0, 0xbcd, 0x3b, 0xb85, 0xbaa, 0xbbe, 0xba9, 0xbcd, 0x3b, 0xb85, 0xb9a, 0xbbe, 0xbb0, 0xbcd, 0x3b, 0xba4, 0xbc7,
0x3b, 0xbaa, 0xbb9, 0xbcd, 0xbae, 0xbbe, 0xba9, 0xbcd, 0x3b, 0xb8e, 0xb83, 0xbaa, 0xbbe, 0xba9, 0xbcd, 0x3b, 0xc2b, 0xc3e, 0xc35, 0xc30,
0xc4d, 0xc21, 0xc3f, 0xc28, 0xc4d, 0x3b, 0xc0a, 0xc21, 0xc3e, 0xc2c, 0xc39, 0xc37, 0xc4d, 0xc1f, 0xc4d, 0x3b, 0xc16, 0xc4b, 0xc30, 0xc4d,
0xc21, 0xc3e, 0xc21, 0xc4d, 0x3b, 0xc1f, 0xc3f, 0xc30, 0xc4d, 0x3b, 0xc2e, 0xc46, 0xc30, 0xc4d, 0xc21, 0xc3e, 0xc21, 0xc4d, 0x3b, 0xc36,
0xc36, 0xc3f, 0xc35, 0xc30, 0xc4d, 0x3b, 0xc2e, 0xc46, 0xc39, 0xc30, 0xc4d, 0x3b, 0xc05, 0xc2c, 0xc28, 0xc4d, 0x3b, 0xc05, 0xc1c, 0xc30,
0xc4d, 0x3b, 0xc21, 0xc47, 0x3b, 0xc2c, 0xc3e, 0xc39, 0xc4d, 0x200c, 0xc2e, 0xc3e, 0xc28, 0xc4d, 0x3b, 0xc0e, 0xc38, 0xc4d, 0x200c, 0xc2b,
0xc3e, 0xc02, 0xc21, 0xc4d, 0x3b, 0xe1f, 0xe32, 0xe23, 0xe4c, 0xe27, 0xe32, 0xe23, 0xe4c, 0xe14, 0xe34, 0xe19, 0x3b, 0xe2d, 0xe2d, 0xe23,
0xe4c, 0xe14, 0xe34, 0xe40, 0xe1a, 0xe40, 0xe2e, 0xe0a, 0xe15, 0xe4c, 0x3b, 0xe04, 0xe2d, 0xe23, 0xe4c, 0xe41, 0xe14, 0xe14, 0x3b, 0xe40,
0xe15, 0xe2d, 0xe23, 0xe4c, 0x3b, 0xe21, 0xe2d, 0xe23, 0xe4c, 0xe41, 0xe14, 0xe14, 0x3b, 0xe0a, 0xe32, 0xe2b, 0xe23, 0xe34, 0xe27, 0xe32,
0xe23, 0xe4c, 0x3b, 0xe40, 0xe21, 0xe2e, 0xe23, 0xe4c, 0x3b, 0xe2d, 0xe30, 0xe1a, 0xe32, 0xe19, 0x3b, 0xe2d, 0xe30, 0xe0b, 0xe32, 0xe23,
0xe4c, 0x3b, 0xe40, 0xe14, 0xe22, 0xe4c, 0x3b, 0xe1a, 0xe32, 0xe2e, 0xe4c, 0xe21, 0xe32, 0xe19, 0x3b, 0xe40, 0xe2d, 0xe2a, 0xe1f, 0xe32,
0xe19, 0xe14, 0xe4c, 0x3b, 0x46, 0x65, 0x72, 0x76, 0x65, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65,
0x68, 0x65, 0x15f, 0x74, 0x3b, 0x48, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64,
0x61, 0x64, 0x3b, 0x15e, 0x65, 0x68, 0x72, 0x69, 0x76, 0x65, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61,
0x6e, 0x3b, 0x41, 0x7a, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x65, 0x68, 0x6d, 0x65, 0x6e, 0x3b, 0x45, 0x73,
0x66, 0x65, 0x6e, 0x64, 0x3b, 0x444, 0x430, 0x440, 0x3b, 0x43e, 0x440, 0x434, 0x3b, 0x445, 0x43e, 0x440, 0x3b, 0x442, 0x456, 0x440,
0x3b, 0x43c, 0x43e, 0x440, 0x3b, 0x448, 0x430, 0x445, 0x3b, 0x43c, 0x435, 0x445, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437,
0x435, 0x440, 0x3b, 0x434, 0x435, 0x439, 0x3b, 0x431, 0x430, 0x445, 0x3b, 0x435, 0x441, 0x444, 0x3b, 0x444, 0x430, 0x440, 0x432, 0x430,
0x440, 0x434, 0x456, 0x43d, 0x3b, 0x43e, 0x440, 0x434, 0x456, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x445, 0x43e, 0x440, 0x434,
0x430, 0x434, 0x3b, 0x442, 0x456, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440, 0x456, 0x432,
0x435, 0x440, 0x3b, 0x43c, 0x435, 0x445, 0x440, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b, 0x434, 0x435,
0x439, 0x3b, 0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d, 0x3b, 0x435, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x3b, 0x444, 0x430, 0x440, 0x2e,
0x3b, 0x43e, 0x440, 0x434, 0x2e, 0x3b, 0x445, 0x43e, 0x440, 0x2e, 0x3b, 0x442, 0x456, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x2e, 0x3b,
0x448, 0x430, 0x445, 0x2e, 0x3b, 0x43c, 0x435, 0x445, 0x2e, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b,
0x434, 0x435, 0x439, 0x3b, 0x431, 0x430, 0x445, 0x2e, 0x3b, 0x435, 0x441, 0x444, 0x2e, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x62f, 0x646,
0x3b, 0x622, 0x631, 0x688, 0x628, 0x627, 0x626, 0x634, 0x3b, 0x62e, 0x62f, 0x627, 0x62f, 0x627, 0x62f, 0x3b, 0x62a, 0x6cc, 0x631, 0x3b,
0x645, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x634, 0x6c1, 0x631, 0x6cc, 0x648, 0x627, 0x631, 0x3b, 0x645, 0x6c1, 0x631, 0x3b, 0x627, 0x628,
0x627, 0x646, 0x3b, 0x622, 0x632, 0x631, 0x3b, 0x688, 0x6d2, 0x3b, 0x628, 0x6c1, 0x645, 0x646, 0x3b, 0x627, 0x633, 0x641, 0x646, 0x62f,
0x3b, 0x64, 0x7a, 0x76, 0x3b, 0x64, 0x7a, 0x64, 0x3b, 0x74, 0x65, 0x64, 0x3b, 0x61, 0x66, 0x254, 0x3b, 0x64, 0x61, 0x6d,
0x3b, 0x6d, 0x61, 0x73, 0x3b, 0x73, 0x69, 0x61, 0x3b, 0x64, 0x65, 0x61, 0x3b, 0x61, 0x6e, 0x79, 0x3b, 0x6b, 0x65, 0x6c,
0x3b, 0x61, 0x64, 0x65, 0x3b, 0x64, 0x7a, 0x6d, 0x3b, 0x64, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x64, 0x7a,
0x65, 0x3b, 0x74, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x61, 0x66, 0x254, 0x66, 0x69, 0x1ebd, 0x3b, 0x64, 0x61, 0x6d, 0x25b,
0x3b, 0x6d, 0x61, 0x73, 0x61, 0x3b, 0x73, 0x69, 0x61, 0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x64, 0x65, 0x61, 0x73, 0x69, 0x61,
0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x61, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254, 0x3b, 0x6b, 0x65, 0x6c, 0x65, 0x3b, 0x61, 0x64,
0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x62e, 0x627, 0x6a9, 0x6d5,
0x644, 0x6ce, 0x648, 0x6d5, 0x3b, 0x628, 0x627, 0x646, 0x6d5, 0x645, 0x6d5, 0x695, 0x3b, 0x62c, 0x6c6, 0x632, 0x6d5, 0x631, 0x62f, 0x627,
0x646, 0x3b, 0x67e, 0x648, 0x648, 0x634, 0x67e, 0x6d5, 0x695, 0x3b, 0x6af, 0x6d5, 0x644, 0x627, 0x648, 0x6ce, 0x698, 0x3b, 0x62e, 0x6d5,
0x631, 0x645, 0x627, 0x646, 0x627, 0x646, 0x3b, 0x695, 0x6d5, 0x632, 0x628, 0x6d5, 0x631, 0x3b, 0x62e, 0x6d5, 0x632, 0x6d5, 0x6b5, 0x648,
0x6d5, 0x631, 0x3b, 0x633, 0x6d5, 0x631, 0x645, 0x627, 0x648, 0x6d5, 0x632, 0x3b, 0x628, 0x6d5, 0x641, 0x631, 0x627, 0x646, 0x628, 0x627,
0x631, 0x3b, 0x695, 0x6ce, 0x628, 0x6d5, 0x646, 0x62f, 0x627, 0x646, 0x3b, 0x631, 0x6d5, 0x634, 0x6d5, 0x645, 0x6ce, 0x3b
};
// GENERATED PART ENDS HERE
QT_END_NAMESPACE
#endif

View File

@ -0,0 +1,86 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QJALALI_CALENDAR_P_H
#define QJALALI_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qcalendarbackend_p.h"
QT_REQUIRE_CONFIG(jalalicalendar);
QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QJalaliCalendar : public QCalendarBackend
{
public:
QJalaliCalendar();
// Calendar properties:
QString name() const override;
QCalendar::System calendarSystem() const override;
// Date queries:
int daysInMonth(int month, int year = QCalendar::Unspecified) const override;
bool isLeapYear(int year) const override;
// Properties of the calendar
bool isLunar() const override;
bool isLuniSolar() const override;
bool isSolar() const override;
// Julian Day conversions:
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
protected:
// locale support:
const QCalendarLocale *localeMonthIndexData() const override;
const ushort *localeMonthData() const override;
};
QT_END_NAMESPACE
#endif // QJALALI_CALENDAR_P_H

View File

@ -0,0 +1,128 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qjuliancalendar_p.h"
#include "qromancalendar_data_p.h"
#include "qcalendarmath_p.h"
#include <QtCore/qmath.h>
#include <QtCore/qlocale.h>
#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
using namespace QRoundingDown;
/*!
\since 5.14
\class QJulianCalendar
\inmodule QtCore
\brief The QJulianCalendar class provides Julian calendar system
implementation.
\section1 Julian Calendar
The Julian calendar, proposed by Julius Caesar in 46 BC (708 AUC), was a
reform of the Roman calendar. It took effect on 1 January 45 BC (AUC 709),
by edict. It was the predominant calendar in the Roman world, most of
Europe, and in European settlements in the Americas and elsewhere, until it
was refined and gradually replaced by the Gregorian calendar,
promulgated in 1582 by Pope Gregory XIII.
The Julian calendar gains against the mean tropical year at the rate of one
day in 128 years. For the Gregorian calendar, the figure is one day in
3030 years. The difference in the average length of the year
between Julian (365.25 days) and Gregorian (365.2425 days) is 0.002%.
Source: \l {https://en.wikipedia.org/wiki/Julian_calendar}{Wikipedia page on
Julian Calendar}
*/
QJulianCalendar::QJulianCalendar()
: QRomanCalendar(QStringLiteral("Julian"), QCalendar::System::Julian) {}
QString QJulianCalendar::name() const
{
return QStringLiteral("Julian");
}
QCalendar::System QJulianCalendar::calendarSystem() const
{
return QCalendar::System::Julian;
}
bool QJulianCalendar::isLeapYear(int year) const
{
if (year == QCalendar::Unspecified || !year)
return false;
return qMod(year < 0 ? year + 1 : year, 4) == 0;
}
// Julian Day 0 was January the first in the proleptic Julian calendar's 4713 BC
bool QJulianCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const
{
Q_ASSERT(jd);
if (!isDateValid(year, month, day))
return false;
if (year < 0)
++year;
const qint64 c0 = month < 3 ? -1 : 0;
const qint64 j1 = qDiv(1461 * (year + c0), 4);
const qint64 j2 = qDiv(153 * month - 1836 * c0 - 457, 5);
*jd = j1 + j2 + day + 1721117;
return true;
}
QCalendar::YearMonthDay QJulianCalendar::julianDayToDate(qint64 jd) const
{
const qint64 y2 = jd - 1721118;
const qint64 k2 = 4 * y2 + 3;
const qint64 k1 = 5 * qDiv(qMod(k2, 1461), 4) + 2;
const qint64 x1 = qDiv(k1, 153);
const qint64 c0 = qDiv(x1 + 2, 12);
const int y = qint16(qDiv(k2, 1461) + c0);
const int month = quint8(x1 - 12 * c0 + 3);
const int day = qDiv(qMod(k1, 153), 5) + 1;
return QCalendar::YearMonthDay(y > 0 ? y : y - 1, month, day);
}
QT_END_NAMESPACE

View File

@ -1,9 +1,9 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@ -37,36 +37,38 @@
**
****************************************************************************/
#include <QtCore/qglobal.h>
#ifndef QJULIAN_CALENDAR_P_H
#define QJULIAN_CALENDAR_P_H
#if 0 // Used to be included in Qt4 for Q_WS_MAC
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#import <AppKit/AppKit.h>
#include "qscroller_p.h"
#include "qromancalendar_p.h"
QT_BEGIN_NAMESPACE
QPointF QScrollerPrivate::realDpi(int screen) const
class Q_CORE_EXPORT QJulianCalendar : public QRomanCalendar
{
QMacAutoReleasePool pool;
NSArray *nsscreens = [NSScreen screens];
if (screen < 0 || screen >= int([nsscreens count]))
screen = 0;
NSScreen *nsscreen = [nsscreens objectAtIndex:screen];
CGDirectDisplayID display = [[[nsscreen deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
CGSize mmsize = CGDisplayScreenSize(display);
if (mmsize.width > 0 && mmsize.height > 0) {
return QPointF(CGDisplayPixelsWide(display) / mmsize.width,
CGDisplayPixelsHigh(display) / mmsize.height) * qreal(25.4);
} else {
return QPointF();
}
}
public:
QJulianCalendar();
// Calendar properties:
QString name() const override;
QCalendar::System calendarSystem() const override;
// Date queries:
bool isLeapYear(int year) const override;
// Julian Day conversions:
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
};
QT_END_NAMESPACE
#endif
#endif // QJULIAN_CALENDAR_P_H

View File

@ -0,0 +1,141 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qmilankoviccalendar_p.h"
#include "qcalendarmath_p.h"
#include <QtCore/qmath.h>
#include <QtCore/qlocale.h>
#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
using namespace QRoundingDown;
/*!
\since 5.14
\class QMilankovicCalendar
\inmodule QtCore
\brief The QMilankovicCalendar class provides Milanković calendar system
implementation.
\section1
The Revised Julian calendar, also known as the Milanković calendar, or,
less formally, new calendar, is a calendar, developed and proposed by the
Serbian scientist Milutin Milanković in 1923, which effectively discontinued
the 340 years of divergence between the naming of dates sanctioned by those
Eastern Orthodox churches adopting it and the Gregorian calendar that has
come to predominate worldwide. This calendar was intended to replace the
ecclesiastical calendar based on the Julian calendar hitherto in use by all
of the Eastern Orthodox Church. The Revised Julian calendar temporarily
aligned its dates with the Gregorian calendar proclaimed in 1582 by Pope
Gregory XIII for adoption by the Christian world. The calendar has been
adopted by the Orthodox churches of Constantinople, Albania, Alexandria,
Antioch, Bulgaria, Cyprus, Greece, Poland, and Romania.
Source: \l {https://en.wikipedia.org/wiki/Revised_Julian_calendar}{Wikipedia
page on Milanković Calendar}
*/
QMilankovicCalendar::QMilankovicCalendar()
: QRomanCalendar(QStringLiteral("Milankovic"), QCalendar::System::Milankovic) {}
QString QMilankovicCalendar::name() const
{
return QStringLiteral("Milankovic");
}
QCalendar::System QMilankovicCalendar::calendarSystem() const
{
return QCalendar::System::Milankovic;
}
bool QMilankovicCalendar::isLeapYear(int year) const
{
if (year == QCalendar::Unspecified)
return false;
if (year <= 0)
++year;
if (qMod(year, 4))
return false;
if (qMod(year, 100) == 0) {
const qint16 century = qMod(qDiv(year, 100), 9);
if (century != 2 && century != 6)
return false;
}
return true;
}
bool QMilankovicCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const
{
Q_ASSERT(jd);
if (!isDateValid(year, month, day))
return false;
if (year <= 0)
++year;
const qint16 c0 = month < 3 ? -1 : 0;
const qint16 x1 = month - 12 * c0 - 3;
const qint16 x4 = year + c0;
const qint16 x3 = qDiv(x4, 100);
const qint16 x2 = qMod(x4, 100);
*jd = qDiv(328718 * x3 + 6, 9)
+ qDiv(36525 * x2 , 100)
+ qDiv(153 * x1 + 2 , 5)
+ day + 1721119;
return true;
}
QCalendar::YearMonthDay QMilankovicCalendar::julianDayToDate(qint64 jd) const
{
const qint64 k3 = 9 * (jd - 1721120) + 2;
const qint64 x3 = qDiv(k3, 328718);
const qint64 k2 = 100 * qDiv(qMod(k3, 328718), 9) + 99;
const qint64 k1 = qDiv(qMod(k2, 36525), 100) * 5 + 2;
const qint64 x2 = qDiv(k2, 36525);
const qint64 x1 = qDiv(5 * qDiv(qMod(k2, 36525), 100) + 2, 153);
const qint64 c0 = qDiv(x1 + 2, 12);
const int y = 100 * x3 + x2 + c0;
const int month = x1 - 12 * c0 + 3;
const int day = qDiv(qMod(k1, 153), 5) + 1;
return QCalendar::YearMonthDay(y > 0 ? y : y - 1, month, day);
}
QT_END_NAMESPACE

View File

@ -0,0 +1,74 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMILANKOVICCALENDAR_CALENDAR_P_H
#define QMILANKOVICCALENDAR_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qromancalendar_p.h"
QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QMilankovicCalendar : public QRomanCalendar
{
public:
QMilankovicCalendar();
// Calendar properties:
QString name() const override;
QCalendar::System calendarSystem() const override;
// Date queries:
bool isLeapYear(int year) const override;
// Julian Day conversions:
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
};
QT_END_NAMESPACE
#endif // QMILANKOVICCALENDAR_CALENDAR_P_H

View File

@ -0,0 +1,105 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#include "qromancalendar_p.h"
#include "qromancalendar_data_p.h"
QT_BEGIN_NAMESPACE
/*!
\since 5.14
\class QRomanCalendar
\inmodule QtCore
\brief The QRomanCalendar class is a shared base for calendars based on the
ancient Roman calendar.
\section1
Calendars based on the ancient Roman calendar share the names of months, whose
lengths depend in a common way on whether the year is a leap year. They differ
in how they determine which years are leap years.
\sa QGregorianCalendar, QJulianCalendar, QMilankovicCalendar
*/
int QRomanCalendar::daysInMonth(int month, int year) const
{
if (!year || month < 1 || month > 12)
return 0;
if (month == 2)
return isLeapYear(year) ? 29 : 28;
// Long if odd up to July = 7, or if even from 8 = August onwards:
return 30 | ((month & 1) ^ (month >> 3));
}
int QRomanCalendar::minimumDaysInMonth() const
{
return 28;
}
bool QRomanCalendar::isLunar() const
{
return false;
}
bool QRomanCalendar::isLuniSolar() const
{
return false;
}
bool QRomanCalendar::isSolar() const
{
return true;
}
const QCalendarLocale *QRomanCalendar::localeMonthIndexData() const
{
return locale_data;
}
const ushort *QRomanCalendar::localeMonthData() const
{
return months_data;
}
QT_END_NAMESPACE

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QROMAN_CALENDAR_P_H
#define QROMAN_CALENDAR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of calendar implementations. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qcalendarbackend_p.h"
QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QRomanCalendar : public QCalendarBackend
{
public:
// date queries:
int daysInMonth(int month, int year = QCalendar::Unspecified) const override;
int minimumDaysInMonth() const override;
// properties of the calendar
bool isLunar() const override;
bool isLuniSolar() const override;
bool isSolar() const override;
protected:
// locale support:
const QCalendarLocale *localeMonthIndexData() const override;
const ushort *localeMonthData() const override;
// (The INTEGRITY compiler got upset at: using QCalendarBackend:QCalendarBackend;)
QRomanCalendar(const QString &name, QCalendar::System id = QCalendar::System::User)
: QCalendarBackend(name, id) {}
};
QT_END_NAMESPACE
#endif // QROMAN_CALENDAR_P_H

Some files were not shown because too many files have changed in this diff Show More