diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-13 15:46:35 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-28 21:29:45 +0200 |
commit | 1aa412987f9f71232e6ed36d16df8f15efec9903 (patch) | |
tree | f0a911b8fe50fee90af6b5924439e3211fc5cd5d | |
parent | 429985b53aeb930ec3fdd14ccb429992a3539629 (diff) | |
download | qtbase-1aa412987f9f71232e6ed36d16df8f15efec9903.tar.gz |
Remove QUnicodeTools::DefaultOptionsCompat
Used in only one place, declared in a private header with a comment
saying to remove it. All callers of the one function that had it as
default parameter value are passing a value for the parameter.
Task-number: QTBUG-85700
Change-Id: Ic72e4df730740a4023b0a43be6bf7acf33a3166b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/text/qunicodetools_p.h | 3 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/corelib/text/qunicodetools_p.h b/src/corelib/text/qunicodetools_p.h index 5715444025..259f3f209e 100644 --- a/src/corelib/text/qunicodetools_p.h +++ b/src/corelib/text/qunicodetools_p.h @@ -91,7 +91,6 @@ enum CharAttributeOption { LineBreaks = 0x08, WhiteSpaces = 0x10, HangulLineBreakTailoring = 0x20, - DefaultOptionsCompat = GraphemeBreaks | LineBreaks | WhiteSpaces, // ### remove DontClearAttributes = 0x1000 }; @@ -100,7 +99,7 @@ Q_DECLARE_FLAGS(CharAttributeOptions, CharAttributeOption) // attributes buffer has to have a length of string length + 1 Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length, const ScriptItem *items, int numItems, - QCharAttributes *attributes, CharAttributeOptions options = DefaultOptionsCompat); + QCharAttributes *attributes, CharAttributeOptions options); Q_CORE_EXPORT void initScripts(const ushort *string, int length, ScriptItemArray *scripts); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index c04bbba70c..9e104e118e 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1807,12 +1807,15 @@ const QCharAttributes *QTextEngine::attributes() const scriptItems[i].script = QChar::Script(si.analysis.script); } - QUnicodeTools::initCharAttributes(reinterpret_cast<const ushort *>(layoutData->string.constData()), - layoutData->string.length(), - scriptItems.data(), scriptItems.size(), - (QCharAttributes *)layoutData->memory, - QUnicodeTools::CharAttributeOptions(QUnicodeTools::DefaultOptionsCompat - | QUnicodeTools::HangulLineBreakTailoring)); + QUnicodeTools::initCharAttributes( + reinterpret_cast<const ushort *>(layoutData->string.constData()), + layoutData->string.length(), + scriptItems.data(), scriptItems.size(), + reinterpret_cast<QCharAttributes *>(layoutData->memory), + QUnicodeTools::CharAttributeOptions(QUnicodeTools::GraphemeBreaks + | QUnicodeTools::LineBreaks + | QUnicodeTools::WhiteSpaces + | QUnicodeTools::HangulLineBreakTailoring)); layoutData->haveCharAttributes = true; |