kimpanel: don't crash when ibus is already loaded
ClosedPublic

Authored by apol on Oct 29 2019, 3:31 PM.

Details

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

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Oct 29 2019, 3:31 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 29 2019, 3:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Oct 29 2019, 3:31 PM
apol edited the summary of this revision. (Show Details)Oct 29 2019, 6:05 PM
hein accepted this revision.Oct 31 2019, 1:11 PM
This revision is now accepted and ready to land.Oct 31 2019, 1:11 PM
This revision was automatically updated to reflect the committed changes.