KGantt: Fix crash when setGraphivsView() is called

Authored by danders on Apr 2 2020, 11:11 AM.

Description

KGantt: Fix crash when setGraphivsView() is called

This patch introduces getGrid() and takeGrid() methods
that ensures a valid grid is always returned.

From the unit test that trigger the crash:

view = new KGantt::View();

itemModel = new QStandardItemModel();

GraphicsView *gv = new GraphicsView();
view->setGraphicsView(gv);
QVERIFY(view->graphicsView() == gv);

view->setModel(itemModel);
view->setConstraintModel(new KGantt::ConstraintModel());

initTreeModel();

Details

Committed
dandersApr 2 2020, 11:11 AM
Parents
R478:17637e81ef98: KGantt: Remove unused hack
Branches
Unknown
Tags
Unknown