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;
|
||||
|
||||
QStringList families;
|
||||
families << QStringLiteral("Monaco");
|
||||
families << QStringLiteral("DejaVu Sans Mono");
|
||||
const QString families[] = {
|
||||
QStringLiteral("Monaco"),
|
||||
QStringLiteral("DejaVu Sans Mono"),
|
||||
};
|
||||
|
||||
foreach (const QString &family, families) {
|
||||
for (const QString &family : families) {
|
||||
QFont font(family);
|
||||
font.setStyleStrategy(QFont::NoFontMerging);
|
||||
if (QFontInfo(font).family() != family)
|
||||
|
Loading…
x
Reference in New Issue
Block a user