Check defaultActionsCfg is valid
Commit 752626ad550552232d73d8b009db62b0f8e86113 left a code path through the switch statement where defaultActionsCfg would be an invalid group. This is semantically correct as there is no relevant actions config for this type of containment, however we then call methods on it which leads to an assert in kconfig - and a failing unit test. REVIEW: 129096
This commit is contained in:
parent
89a3e34bd2
commit
0f2bc677b9
@ -213,10 +213,11 @@ void Containment::restore(KConfigGroup &group)
|
||||
//for any other type of containment, there are no defaults
|
||||
break;
|
||||
}
|
||||
defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions");
|
||||
|
||||
foreach (const QString &key, defaultActionsCfg.keyList()) {
|
||||
setContainmentActions(key, defaultActionsCfg.readEntry(key, QString()));
|
||||
if (defaultActionsCfg.isValid()) {
|
||||
defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions");
|
||||
foreach (const QString &key, defaultActionsCfg.keyList()) {
|
||||
setContainmentActions(key, defaultActionsCfg.readEntry(key, QString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user