kimpanel: don't crash when ibus is already loaded

Authored by apol on Oct 31 2019, 1:12 PM.

Description

kimpanel: don't crash when ibus is already loaded

Summary:
No need to replace the current engine if we already have an acceptable one set.

Otherwise it confuses Qt and it asserts in Qt.

7  0x00007f517fcdf8e6 in qt_assert (assertion=assertion@entry=0x7f5179fee560 "engine_name == desc.engine_name", file=file@entry=0x7f5179fee318 "/home/apol/devel/frameworks/qt5/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp",
   line=line@entry=583) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.h:90
8  0x00007f5179fdb6f4 in QIBusPlatformInputContext::globalEngineChanged (this=0x55831b2c7ff0, engine_name=...) at ../../../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/tools/qarraydata.h:236
9  0x00007f5179fe7f6d in QIBusPlatformInputContext::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qibusplatforminputcontext.cpp:147

Test Plan:
Now I can start the plasmoid without it crashing.
I'm guessing users so far were running against a release build of Qt without asserts.
Starting ibus with the session now works as well, in contrast to having to start it explicitly

Reviewers: hein

Reviewed By: hein

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D25045

Details

Committed
apolOct 31 2019, 1:15 PM
Reviewer
hein
Differential Revision
D25045: kimpanel: don't crash when ibus is already loaded
Parents
R119:3a6dc8c07617: [kcms/krdb] Fix krdb executable
Branches
Unknown
Tags
Unknown