From 119d1aff7df9c3235177c3bf55bd618feb3c1519 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Thu, 8 Jan 2015 18:45:43 +0100 Subject: [PATCH] formating improvements --- src/gui/Mainwindow.cxx | 16 +++++++++++----- src/gui/widgets/BasicBlockWidget.hxx | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 34dcfb1..5643beb 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -23,9 +23,11 @@ Mainwindow::Mainwindow(InformationManager* mgr) // saveAction = new QAction(tr("&Save"), this); exitAction = new QAction(tr("E&xit"), this); - connect(openAction, SIGNAL(triggered()), this, SLOT(open())); + connect(openAction, SIGNAL(triggered()), + this, SLOT(open())); // connect(saveAction, SIGNAL(triggered()), this, SLOT(save())); - connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit())); + connect(exitAction, SIGNAL(triggered()), + qApp, SLOT(quit())); fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(openAction); @@ -86,7 +88,8 @@ void Mainwindow::addFunction(Function* fun) { Disassembler * dis = manager->getDisassembler(); BasicBlock * block = dis->getBasicBlock(fun->getStartAddress()); - local__add_basic_block(block, manager->getDisassembler(), blocks, scene, block->getStartAddress(), 100); + local__add_basic_block(block, manager->getDisassembler(), blocks, scene, + block->getStartAddress(), 100); QGraphicsView * view = new QGraphicsView(scene); w->addTab(view, "CFG"); @@ -123,8 +126,11 @@ namespace { widget->setFlag(QGraphicsItem::ItemIsMovable, true); widget->moveBy(100*startx, block->getStartAddress() - starty); - dis->printEachInstruction(block->getStartAddress(), block->getEndAddress(), - [&](uint8_t* bytes, size_t byte_count, const std::string& line) { + dis->printEachInstruction(block->getStartAddress(), + block->getEndAddress(), + [&](uint8_t* bytes, + size_t byte_count, + const std::string& line) { widget->addItem(bytes, byte_count, line.c_str() + 1); }); diff --git a/src/gui/widgets/BasicBlockWidget.hxx b/src/gui/widgets/BasicBlockWidget.hxx index 8aa182f..8c86667 100644 --- a/src/gui/widgets/BasicBlockWidget.hxx +++ b/src/gui/widgets/BasicBlockWidget.hxx @@ -32,9 +32,9 @@ public: } std::array getExits() const { - return { { mapToScene(QPointF( width/3, height)), - mapToScene(QPointF( width/2, height)), - mapToScene(QPointF(2*width/3, height)) } }; + return { { mapToScene(QPointF( width/3, height)), + mapToScene(QPointF( width/2, height)), + mapToScene(QPointF(2*width/3, height)) } }; } void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, -- 2.39.5