defensive checks added

This commit is contained in:
Uwe Rathmann 2019-04-26 18:07:35 +02:00
parent a9b5eeec96
commit 8dc73dfdac
1 changed files with 7 additions and 0 deletions

View File

@ -330,6 +330,10 @@ void QskInputPanel::attachInputItem( QQuickItem* item )
QCoreApplication::postEvent( item,
new QInputMethodEvent( QString(), { attribute } ) );
}
connect( item, &QObject::destroyed,
this, &QskInputPanel::inputItemDestroyed,
Qt::UniqueConnection );
}
else
{
@ -474,6 +478,9 @@ Qt::Alignment QskInputPanel::alignment() const
void QskInputPanel::commitKey( int key )
{
if ( m_data->inputItem == nullptr )
return;
int spaceLeft = -1;
if ( !( m_data->inputHints & Qt::ImhMultiLine ) )