Add missing dependencies for PART_STAGE
ClosedPublic

Authored by dcaliste on Sep 21 2018, 1:52 PM.

Details

Summary

Currently, KPrNotes is using the text shape and the picture shape in its creator method (see line 67 and line 78). As a consequence, in a presentation, when creating a new page in KPrDocument.cpp#171, the page creation itself is creating a KPrNotes (see KPrPage.cpp#56) and finally if one of the two shape plugins is not compiled, the Q_ASSERT() will catch the non existing shape, at best, or if compiled with QT_NO_DEBUG, the program will crash.

As PART_WORD is depending on PLUGIN_TEXTSHAPE, I'm modifying the depency tree to add PLUGIN_TEXTSHAPE and PLUGIN_PICTURESHAPE for PART_STAGE.

Compiling then plugins/pictureshape, I took the opportunity to update two function calls in QMouseEvent.

Maybe it would be nice to replace the Q_ASSERT with an if (factory) {} and put a warning in the else part in case of a wrong installation and plugins are missing. What do you think ?

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dcaliste created this revision.Sep 21 2018, 1:52 PM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald TranscriptSep 21 2018, 1:52 PM
dcaliste requested review of this revision.Sep 21 2018, 1:52 PM
leinir accepted this revision.Sep 24 2018, 11:16 AM

Maybe it would be nice to replace the Q_ASSERT with an if (factory) {} and put a warning in the else part in case of a wrong installation and plugins are missing. What do you think ?

Something more informative than a straight up crash would, at any rate, be handy to have, yes... even an assert with a message would be better than just an outright assert :)

This revision is now accepted and ready to land.Sep 24 2018, 11:16 AM
This revision was automatically updated to reflect the committed changes.