Skip to content
Commit e9e09548 authored by Jakob Petsovits's avatar Jakob Petsovits Committed by Fushan Wen
Browse files

Fix kcm_solid_actions crash by expecting QList item relocation

In Qt 6, QList is synonymous with QVector and has different
behavior in terms of item storage compared to Qt 5.
In this particular case, ActionItem relied on the fact that
list items in configGroups would always retain the same address
as when initially inserted. This assumption turns out to be wrong,
the item gets moved and the original address is now an invalid
dangling pointer.

In order to avoid crashes from dereferencing invalid pointers,
we can store the index of the item in configGroups instead of
its address. ActionItem::configItem() gets reshuffled a little bit
to accommodate for this change, and also for some extra clarity.

As a result, the KCM now starts again without crashing.
parent 63b8471a
Pipeline #410815 passed with stage
in 5 minutes and 52 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment