Created attachment 130497 [details] Assert crash backtrace after adding Stamp tool. SUMMARY I added the default Stamp tool (despite warning) to Quick Annotations, and selected it. STEPS TO REPRODUCE 1. Add tool: Quick Annotations -> Configure... 2. Use tool: Quick Annotations -> Stamp [Alt+7] OBSERVED RESULT Crash: See backtrace EXPECTED RESULT Makes useless Stamp annotations, so I can test transparency SOFTWARE/OS VERSIONS KDE Neon 5.19 KDE Plasma Version: 5.19.2 KDE Frameworks Version: 5.72 Qt Version: 5.14.2 First idea is that AnnotationTools is not updated at configChanged(), but only at “Add to Quick Annotations”. But the crash persists after restart, and produces the same backtrace. It still seems like tool() returns a null QDomNode, since QList<QAction*>::at(-2) is called. When I add another Stamp tool from “Add to Quick Annotations”, only the second Stamp tool works. Apparently the same is true for other tool types.
Same here.
Git commit 280fe3c7a211a1e19f1bd4b602b7402a471f9931 by Simone Gaiarin. Committed on 31/07/2020 at 07:50. Pushed by gaiarin into branch 'fix-424810'. Define sourceId when creating quick tools from Okular settings Only the quick annotation tools created using the "bookmark" action were correctly assigned the sourceId. Now also those created in the Okular settings page have this attribute correctly defined. Without this field it was not possible to identify which built-in annotation tool action to check when the corresponding quick tool action is triggered by the user. FIXED-IN: 1.11.0 M +18 -0 conf/editannottooldialog.cpp https://invent.kde.org/graphics/okular/commit/280fe3c7a211a1e19f1bd4b602b7402a471f9931
> Pushed by gaiarin into branch 'fix-424810'. :) > + if (la->lineStartStyle() != 5 || la->lineEndStyle() != 5) { Since lineStartStyle() returns the enum directly, use “None” instead of “5”?
I wrongly pushed my branch to upstream instead that on my fork and I think it triggered something here. I have removed the branch from upstream and created it on my fork now. Hopefully I have not messed up anything.
(In reply to Simone Gaiarin from comment #4) > I wrongly pushed my branch to upstream instead that on my fork and I think > it triggered something here. > > I have removed the branch from upstream and created it on my fork now. > > Hopefully I have not messed up anything. If you push upstream, push under work/ i.e. work/gaiarin/fix_blabla and then triggers are ignored.
Git commit 72f5a2db089178c1e9eca82ba5a9a97fff2a49dc by Albert Astals Cid, on behalf of Simone Gaiarin. Committed on 05/08/2020 at 22:49. Pushed by aacid into branch 'release/20.08'. Find built-in tool corresponding to quick tool at runtime In this way it is possible to drop the `sourceId` attribute from the quick tools definition. This simplifies the code logic and makes it easier to update user settings from the previous version of Okular (because there is no need to add the attribute `sourceId` This also fixes the crash due to the fact that `sourceId` was not correctly created when a quick annotation is created from the Annotation page of Okualr Settings. FIXED-IN: 1.11.0 M +1 -1 autotests/CMakeLists.txt M +19 -2 autotests/annotationtoolbartest.cpp M +30 -5 ui/annotationactionhandler.cpp M +5 -0 ui/data/tools.xml M +12 -6 ui/data/toolsQuick.xml M +17 -3 ui/pageviewannotator.cpp https://invent.kde.org/graphics/okular/commit/72f5a2db089178c1e9eca82ba5a9a97fff2a49dc