Summary: | Crash using the scroll wheel on the Style Select widget | ||
---|---|---|---|
Product: | [Applications] calligrawords | Reporter: | Marcus Harrison <marcus> |
Component: | general | Assignee: | Sebastian Sauer <sebsauer> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | mail, pstirnweiss |
Priority: | NOR | Keywords: | release_blocker |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Marcus Harrison
2011-06-17 17:03:01 UTC
A fix for that is in the calligra/words-emptyRootAreas-sebsauer branch and will be merged tomorrow to master if testing wents well. Actually the patch was unrelated. The problem here seems to be that somehow the listStyle the KoList has was either deleted so the KoList deals with a dangling pointer or the KoList itself was deleted meanwhile. First I was thinking of a patch like; diff --git a/libs/kotext/styles/KoParagraphStyle.cpp b/libs/kotext/styles/KoParagraphStyle.cpp index 4dee03b..c9f7ed9 100644 --- a/libs/kotext/styles/KoParagraphStyle.cpp +++ b/libs/kotext/styles/KoParagraphStyle.cpp @@ -998,6 +998,8 @@ void KoParagraphStyle::setListStyle(KoListStyle *style) { if (d->listStyle == style) return; + if (d->list) + d->list->setStyle(style); if (d->listStyle && d->listStyle->parent() == this) delete d->listStyle; d->listStyle = style; but since a d->list->setStyle(style) does actually style=style->clone(); that shouldn't be the problem but we probably do delete something somewhere else where we don't proper cleanup. Sebastian, you can now close this one. The style selection widget has been completely re-written to use a QComboBox derived class. Using the wheel now works. Great. Lot of thanks Pierre for the fix and Marcus for the feedback! Closing the bug-report. |