using QMetaObject instead of QTimer for delayed calls

This commit is contained in:
Uwe Rathmann 2022-04-14 08:26:49 +02:00
parent eb771f8328
commit bf37fe000c
2 changed files with 4 additions and 3 deletions

View File

@ -126,8 +126,8 @@ void QskSubWindowArea::itemChange(
{
// the child is not fully constructed
// and we have to delay checking for sub windows
QTimer::singleShot( 0, this,
[ this ] { qskUpdateEventFilter( this ); } );
QMetaObject::invokeMethod( this,
[ this ] { qskUpdateEventFilter( this ); }, Qt::QueuedConnection );
break;
}

View File

@ -103,7 +103,8 @@ QskHunspellTextPredictor::QskHunspellTextPredictor(
m_data->locale = locale;
// make sure we call virtual functions:
QTimer::singleShot( 0, this, &QskHunspellTextPredictor::loadDictionaries );
QMetaObject::invokeMethod( this,
&QskHunspellTextPredictor::loadDictionaries, Qt::QueuedConnection );
}
QskHunspellTextPredictor::~QskHunspellTextPredictor()