MCPcopy Create free account
hub / github.com/KDE/kdevelop / init

Method init

kdevplatform/sublime/tests/test_toolviewtoolbar.cpp:52–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void TestToolViewToolBar::init()
53{
54 // this is starting to become a GeneralFixture
55 controller = new Controller(this);
56 area = new Area( controller, QStringLiteral("Area") );
57 auto* mw = new MainWindow(controller);
58
59 // a horizontal tool with toolbar
60 auto* factoryT1 = new ToolViewToolBarFactory(QStringLiteral("tool1factory"));
61 actionTextT1 = QStringLiteral("Tool1Action");
62 factoryT1->addAction(actionTextT1);
63 tool1 = new ToolDocument( QStringLiteral("tool1"), controller, factoryT1 );
64 viewT11 = tool1->createView();
65 area->addToolView( viewT11, Sublime::Bottom );
66
67 // a vertical tool with toolbar
68 auto* factoryT2 = new ToolViewToolBarFactory(QStringLiteral("tool2factory"));
69 actionTextT2 = QStringLiteral("Tool2Action");
70 factoryT2->addAction(actionTextT2);
71 tool2 = new ToolDocument( QStringLiteral("tool2"), controller, factoryT2 );
72 viewT21 = tool2->createView();
73 area->addToolView( viewT21, Sublime::Left );
74
75 controller->showArea(area, mw);
76}
77
78void TestToolViewToolBar::cleanup()
79{

Callers

nothing calls this directly

Calls 4

showAreaMethod · 0.80
addActionMethod · 0.45
createViewMethod · 0.45
addToolViewMethod · 0.45

Tested by

no test coverage detected