tst_QTextScriptEngine: replace QList with const array
"Never use a dynamically-sized container for statically-sized data." Port the loop from Q_FOREACH (which can't deal with arrays) to ranged for (which can). Task-number: QTBUG-115839 Change-Id: Ifef42704c4f695a8fb05ea5d9b3e095af3f35171 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 29f911ab92b77f402e1082b457f1d83d3da28943) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c9d8bcb9dd
commit
db8a15de70
@ -1097,11 +1097,12 @@ void tst_QTextScriptEngine::combiningMarks_qtbug15675_data()
|
|||||||
|
|
||||||
bool hasTests = false;
|
bool hasTests = false;
|
||||||
|
|
||||||
QStringList families;
|
const QString families[] = {
|
||||||
families << QStringLiteral("Monaco");
|
QStringLiteral("Monaco"),
|
||||||
families << QStringLiteral("DejaVu Sans Mono");
|
QStringLiteral("DejaVu Sans Mono"),
|
||||||
|
};
|
||||||
|
|
||||||
foreach (const QString &family, families) {
|
for (const QString &family : families) {
|
||||||
QFont font(family);
|
QFont font(family);
|
||||||
font.setStyleStrategy(QFont::NoFontMerging);
|
font.setStyleStrategy(QFont::NoFontMerging);
|
||||||
if (QFontInfo(font).family() != family)
|
if (QFontInfo(font).family() != family)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user