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). Pick-to: 6.6 6.5 Task-number: QTBUG-115839 Change-Id: Ifef42704c4f695a8fb05ea5d9b3e095af3f35171 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
3b6ae86ce8
commit
29f911ab92
@ -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