diff options
Diffstat (limited to 'src/corelib/text/qunicodetools_p.h')
-rw-r--r-- | src/corelib/text/qunicodetools_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/text/qunicodetools_p.h b/src/corelib/text/qunicodetools_p.h index ed6fcb5d65..5715444025 100644 --- a/src/corelib/text/qunicodetools_p.h +++ b/src/corelib/text/qunicodetools_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -53,6 +53,7 @@ #include <QtCore/private/qglobal_p.h> #include <QtCore/qchar.h> +#include <QtCore/qvarlengtharray.h> QT_BEGIN_NAMESPACE @@ -71,13 +72,14 @@ Q_DECLARE_TYPEINFO(QCharAttributes, Q_PRIMITIVE_TYPE); namespace QUnicodeTools { -// ### temporary struct ScriptItem { int position; - int script; + QChar::Script script; }; +using ScriptItemArray = QVarLengthArray<ScriptItem, 64>; + } // namespace QUnicodeTools Q_DECLARE_TYPEINFO(QUnicodeTools::ScriptItem, Q_PRIMITIVE_TYPE); namespace QUnicodeTools { @@ -101,7 +103,7 @@ Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length, QCharAttributes *attributes, CharAttributeOptions options = DefaultOptionsCompat); -Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts); +Q_CORE_EXPORT void initScripts(const ushort *string, int length, ScriptItemArray *scripts); } // namespace QUnicodeTools |