tst_QFontEngine: fix argc going out of scope

Q{Core,Gui,}Application constructors take a reference to argc.

Amends 4db368d4741eff4d2b2942c25d5e633648e23a64.

Pick-to: 6.9
Change-Id: I0a0c9a0ba574133ac7b8fffdb80e4656267d2ed2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Thiago Macieira 2025-02-13 10:17:44 -08:00
parent d8b4eb1a17
commit 434222f635

View File

@ -79,6 +79,7 @@ private:
QByteArray platformArgument;
QList<const char *> theArguments;
std::unique_ptr<QGuiApplication> theApp;
int argc = -1;
int QtsSpecialTestFont = -1;
int QtBidiTestFont = -1;
@ -159,7 +160,7 @@ void tst_QFontEngine::setupApplication()
}
theArguments = arguments;
int argc = arguments.size();
argc = arguments.size();
theApp = std::make_unique<QGuiApplication>(argc, const_cast<char **>(theArguments.data()));
}