diff --git a/pe-bear/HexView.cpp b/pe-bear/HexView.cpp index d762295..9f3e28b 100644 --- a/pe-bear/HexView.cpp +++ b/pe-bear/HexView.cpp @@ -156,11 +156,16 @@ void HexItemDelegate::paint(QPainter* painter, //-------------------------------------------------------------------- HexTableView::HexTableView(QWidget *parent) - : ExtTableView(parent), hexModel(NULL), hexColWidth(COL_WIDTH), m_delegate(NULL) + : ExtTableView(parent), hexModel(nullptr), hexColWidth(COL_WIDTH), m_delegate(nullptr), + followAddrSubmenu(nullptr), backAction(nullptr), undoAction(nullptr) { + for (int i = 0; i < static_cast(Executable::ADDR_TYPE_COUNT); ++i) { + followAction[i] = nullptr; + } + this->vHdr = new OffsetHeader(this); - hHdr = new QHeaderView(Qt::Horizontal, this); - + this->hHdr = new QHeaderView(Qt::Horizontal, this); + this->setVerticalHeader(vHdr); this->setHorizontalHeader(hHdr); vHdr->setVisible(true); @@ -278,7 +283,7 @@ void HexTableView::initMenu() followAddrSubmenu->addAction(followAction[Executable::VA]); connect(followAction[Executable::VA], SIGNAL(triggered()), this, SLOT(followSelectedVa())); - connect(menu, &QMenu::aboutToShow, this, &HexTableView::updateFollowAction); + connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateFollowAction())); } void HexTableView::initHeader() diff --git a/pe-bear/HexView.h b/pe-bear/HexView.h index 4699eee..2206821 100644 --- a/pe-bear/HexView.h +++ b/pe-bear/HexView.h @@ -101,7 +101,7 @@ protected: void setSelectionColor(const QColor& bgColor, const QColor& textColor); QMenu* followAddrSubmenu; - QAction* followAction[Executable::ADDR_TYPE_COUNT] = { nullptr }; + QAction* followAction[Executable::ADDR_TYPE_COUNT]; QAction *backAction, *undoAction; OffsetHeader* vHdr; diff --git a/pe-bear/gui/windows/DiffWindow.cpp b/pe-bear/gui/windows/DiffWindow.cpp index 0c5ec6a..951d9f4 100644 --- a/pe-bear/gui/windows/DiffWindow.cpp +++ b/pe-bear/gui/windows/DiffWindow.cpp @@ -261,7 +261,7 @@ void DiffWindow::createActions() connect(setHexView, SIGNAL(triggered(bool)), &hexDumpModelR, SLOT(setHexView(bool)) ); this->nextDiff = new QAction("Next Diff", this); - connect(nextDiff, &QAction::triggered, this, &DiffWindow::onNextDiff); + connect(nextDiff, SIGNAL(triggered()), this, SLOT(onNextDiff())); } void DiffWindow::onNextDiff()