1
0
Fork 0

GUI: removed references of repaint() to avoid confusion

This commit is contained in:
mrexodia 2016-09-06 10:09:43 +02:00
parent 19a3b14e8b
commit 2189072018
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
6 changed files with 14 additions and 13 deletions

View File

@ -1466,7 +1466,7 @@ void CPUDisassembly::paintEvent(QPaintEvent* event)
auto sidebar = mParentCPUWindow->getSidebarWidget(); auto sidebar = mParentCPUWindow->getSidebarWidget();
if(sidebar) if(sidebar)
sidebar->repaint(); sidebar->reload();
// Signal to render the original content // Signal to render the original content
Disassembly::paintEvent(event); Disassembly::paintEvent(event);

View File

@ -87,11 +87,11 @@ void CPUSideBar::debugStateChangedSlot(DBGSTATE state)
{ {
if(state == stopped) if(state == stopped)
{ {
repaint(); //clear reload(); //clear
} }
} }
void CPUSideBar::repaint() void CPUSideBar::reload()
{ {
fontHeight = mDisas->getRowHeight(); fontHeight = mDisas->getRowHeight();
viewport()->update(); viewport()->update();
@ -102,7 +102,7 @@ void CPUSideBar::changeTopmostAddress(dsint i)
topVA = i; topVA = i;
memset(&regDump, 0, sizeof(REGDUMP)); memset(&regDump, 0, sizeof(REGDUMP));
DbgGetRegDump(&regDump); DbgGetRegDump(&regDump);
repaint(); reload();
} }
void CPUSideBar::setViewableRows(int rows) void CPUSideBar::setViewableRows(int rows)
@ -115,7 +115,7 @@ void CPUSideBar::setSelection(dsint selVA)
if(selVA != selectedVA) if(selVA != selectedVA)
{ {
selectedVA = selVA; selectedVA = selVA;
repaint(); reload();
} }
} }
@ -373,7 +373,7 @@ void CPUSideBar::mouseReleaseEvent(QMouseEvent* e)
mCodeFoldingManager.delFoldSegment(wVA); mCodeFoldingManager.delFoldSegment(wVA);
} }
mDisas->reloadData(); mDisas->reloadData();
viewport()->repaint(); viewport()->update();
} }
} }
if(x < bulletX - mBulletRadius) if(x < bulletX - mBulletRadius)

View File

@ -38,7 +38,7 @@ public slots:
void updateFonts(); void updateFonts();
void debugStateChangedSlot(DBGSTATE state); void debugStateChangedSlot(DBGSTATE state);
void repaint(); void reload();
void changeTopmostAddress(dsint i); void changeTopmostAddress(dsint i);
void setViewableRows(int rows); void setViewableRows(int rows);
void setSelection(dsint selVA); void setSelection(dsint selVA);

View File

@ -24,7 +24,7 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget)
connect(mDisas, SIGNAL(selectionChanged(dsint)), mSideBar, SLOT(setSelection(dsint))); connect(mDisas, SIGNAL(selectionChanged(dsint)), mSideBar, SLOT(setSelection(dsint)));
connect(mDisas, SIGNAL(disassembledAt(dsint, dsint, bool, dsint)), mArgumentWidget, SLOT(disassembledAtSlot(dsint, dsint, bool, dsint))); connect(mDisas, SIGNAL(disassembledAt(dsint, dsint, bool, dsint)), mArgumentWidget, SLOT(disassembledAtSlot(dsint, dsint, bool, dsint)));
connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE))); connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE)));
connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(repaint())); connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(reload()));
connect(Bridge::getBridge(), SIGNAL(updateArgumentView()), mArgumentWidget, SLOT(refreshData())); connect(Bridge::getBridge(), SIGNAL(updateArgumentView()), mArgumentWidget, SLOT(refreshData()));
mDisas->setCodeFoldingManager(mSideBar->getCodeFoldingManager()); mDisas->setCodeFoldingManager(mSideBar->getCodeFoldingManager());

View File

@ -1139,7 +1139,7 @@ RegistersView::RegistersView(CPUWidget* parent, CPUMultiDump* multiDump) : QScro
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(displayCustomContextMenuSlot(QPoint))); connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(displayCustomContextMenuSlot(QPoint)));
connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(debugStateChangedSlot(DBGSTATE))); connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(debugStateChangedSlot(DBGSTATE)));
// self communication for repainting (maybe some other widgets needs this information, too) // self communication for repainting (maybe some other widgets needs this information, too)
connect(this, SIGNAL(refresh()), this, SLOT(repaint())); connect(this, SIGNAL(refresh()), this, SLOT(reload()));
// context menu actions // context menu actions
connect(wCM_Increment, SIGNAL(triggered()), this, SLOT(onIncrementAction())); connect(wCM_Increment, SIGNAL(triggered()), this, SLOT(onIncrementAction()));
connect(wCM_ChangeFPUView, SIGNAL(triggered()), this, SLOT(onChangeFPUViewAction())); connect(wCM_ChangeFPUView, SIGNAL(triggered()), this, SLOT(onChangeFPUViewAction()));
@ -1201,14 +1201,14 @@ void RegistersView::fontsUpdatedSlot()
mRowHeight = wRowsHeight; mRowHeight = wRowsHeight;
mCharWidth = QFontMetrics(this->font()).averageCharWidth(); mCharWidth = QFontMetrics(this->font()).averageCharWidth();
setFixedHeight(getEstimateHeight()); setFixedHeight(getEstimateHeight());
repaint(); reload();
} }
void RegistersView::ShowFPU(bool set_showfpu) void RegistersView::ShowFPU(bool set_showfpu)
{ {
mShowFpu = set_showfpu; mShowFpu = set_showfpu;
InitMappings(); InitMappings();
repaint(); reload();
} }
@ -2521,7 +2521,7 @@ void RegistersView::debugStateChangedSlot(DBGSTATE state)
} }
} }
void RegistersView::repaint() void RegistersView::reload()
{ {
this->viewport()->update(); this->viewport()->update();
} }

View File

@ -107,10 +107,11 @@ public slots:
void displayCustomContextMenuSlot(QPoint pos); void displayCustomContextMenuSlot(QPoint pos);
void setRegister(REGISTER_NAME reg, duint value); void setRegister(REGISTER_NAME reg, duint value);
void debugStateChangedSlot(DBGSTATE state); void debugStateChangedSlot(DBGSTATE state);
void repaint(); void reload();
void ShowFPU(bool set_showfpu); void ShowFPU(bool set_showfpu);
void onChangeFPUViewAction(); void onChangeFPUViewAction();
void SetChangeButton(QPushButton* push_button); void SetChangeButton(QPushButton* push_button);
signals: signals:
void refresh(); void refresh();