input method stuff
This commit is contained in:
parent
b17d8dcb68
commit
e300755027
@ -162,9 +162,12 @@ QQuickItem* qskInputContextItem()
|
||||
without losing the connected input item
|
||||
*/
|
||||
|
||||
if ( inputContext->metaObject()->indexOfMethod( "inputItem()" ) >= 0 )
|
||||
{
|
||||
QMetaObject::invokeMethod( inputContext, "inputItem",
|
||||
Qt::DirectConnection, Q_RETURN_ARG( QQuickItem*, inputItem ) );
|
||||
}
|
||||
}
|
||||
|
||||
return inputItem;
|
||||
}
|
||||
|
@ -401,11 +401,14 @@ void QskInputContext::setActive( bool on )
|
||||
|
||||
bool QskInputContext::isActive() const
|
||||
{
|
||||
if ( auto panel = inputPanel() )
|
||||
if ( m_data->inputEngine )
|
||||
{
|
||||
return panel && panel->isVisible()
|
||||
if ( auto panel = m_data->inputEngine->panel( false ) )
|
||||
{
|
||||
return panel->isVisible()
|
||||
&& panel->window() && panel->window()->isVisible();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ protected:
|
||||
virtual void setPredictionEnabled( bool on );
|
||||
virtual void showPrediction( const QStringList& );
|
||||
|
||||
private:
|
||||
void applyInput( bool success );
|
||||
void applyText( const QString&, bool isFinal );
|
||||
void applyKey( int keyCode );
|
||||
|
||||
private:
|
||||
void resetPredictor( const QLocale& );
|
||||
void updatePrediction();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user