QGuiApplication::font(): assert that a GUI app instance exists
Task-number: QTBUG-28306 Change-Id: Ia5b01265e7f88fdd8c2738ef03b14e83829625b0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
parent
40e6b1d0b8
commit
e93a69349f
@ -2293,6 +2293,7 @@ void QGuiApplication::setPalette(const QPalette &pal)
|
||||
*/
|
||||
QFont QGuiApplication::font()
|
||||
{
|
||||
Q_ASSERT_X(QGuiApplicationPrivate::self, "QGuiApplication::font()", "no QGuiApplication instance");
|
||||
QMutexLocker locker(&applicationFontMutex);
|
||||
initFontUnlocked();
|
||||
return *QGuiApplicationPrivate::app_font;
|
||||
|
Loading…
Reference in New Issue
Block a user