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();