GUI: correctly show address column in search list view
This commit is contained in:
parent
8c169ae2ed
commit
32b400b834
|
@ -9,6 +9,8 @@ AbstractStdTable::AbstractStdTable(QWidget* parent) : AbstractTableView(parent)
|
|||
connect(Bridge::getBridge(), SIGNAL(repaintTableView()), this, SLOT(reloadData()));
|
||||
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequestedSlot(QPoint)));
|
||||
connect(this, SIGNAL(headerButtonPressed(int)), this, SLOT(headerButtonPressedSlot(int)));
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h)
|
||||
|
@ -46,7 +48,7 @@ QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int row
|
|||
if(col == mAddressColumn && isaddr)
|
||||
{
|
||||
char label[MAX_LABEL_SIZE] = "";
|
||||
if(DbgGetLabelAt(wVA, SEG_DEFAULT, label)) //has label
|
||||
if(bAddressLabel && DbgGetLabelAt(wVA, SEG_DEFAULT, label)) //has label
|
||||
{
|
||||
char module[MAX_MODULE_SIZE] = "";
|
||||
if(DbgGetModuleAt(wVA, module) && !QString(label).startsWith("JMP.&"))
|
||||
|
@ -65,7 +67,7 @@ QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int row
|
|||
cip = base;
|
||||
}
|
||||
|
||||
if(DbgIsDebugging() && wVA == cip) //cip + not running
|
||||
if(DbgIsDebugging() && wVA == cip) //debugging + cip
|
||||
{
|
||||
painter->fillRect(QRect(x, y, w, h), QBrush(mCipBackgroundColor));
|
||||
if(!isbookmark) //no bookmark
|
||||
|
|
|
@ -62,6 +62,11 @@ public:
|
|||
bCipBase = cipBase;
|
||||
}
|
||||
|
||||
void setAddressLabel(bool addressLabel)
|
||||
{
|
||||
bAddressLabel = addressLabel;
|
||||
}
|
||||
|
||||
signals:
|
||||
void selectionChangedSignal(int index);
|
||||
void keyPressedSignal(QKeyEvent* event);
|
||||
|
@ -126,7 +131,8 @@ protected:
|
|||
QColor mAddressColor;
|
||||
QColor mTracedBackgroundColor;
|
||||
QColor mTracedSelectedAddressBackgroundColor;
|
||||
bool bCipBase;
|
||||
bool bCipBase = false;
|
||||
QString mHighlightText;
|
||||
int mAddressColumn = -1;
|
||||
bool bAddressLabel = true;
|
||||
};
|
||||
|
|
|
@ -45,6 +45,7 @@ private:
|
|||
StdSearchListView::StdSearchListView(QWidget* parent, bool enableRegex, bool enableLock)
|
||||
: SearchListView(parent, mSearchListData = new StdTableSearchList(), enableRegex, enableLock)
|
||||
{
|
||||
setAddressColumn(0);
|
||||
}
|
||||
|
||||
StdSearchListView::~StdSearchListView()
|
||||
|
|
|
@ -25,7 +25,6 @@ BreakpointsView::BreakpointsView(QWidget* parent)
|
|||
enableMultiSelection(true);
|
||||
|
||||
setupContextMenu();
|
||||
updateColors();
|
||||
|
||||
connect(Bridge::getBridge(), SIGNAL(updateBreakpoints()), this, SLOT(updateBreakpointsSlot()));
|
||||
connect(Bridge::getBridge(), SIGNAL(disassembleAt(dsint, dsint)), this, SLOT(disassembleAtSlot(dsint, dsint)));
|
||||
|
@ -34,6 +33,8 @@ BreakpointsView::BreakpointsView(QWidget* parent)
|
|||
connect(this, SIGNAL(contextMenuSignal(QPoint)), this, SLOT(contextMenuSlot(QPoint)));
|
||||
connect(this, SIGNAL(doubleClickedSignal()), this, SLOT(followBreakpointSlot()));
|
||||
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followBreakpointSlot()));
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void BreakpointsView::setupContextMenu()
|
||||
|
|
|
@ -20,7 +20,11 @@ public:
|
|||
SymbolSearchList()
|
||||
{
|
||||
mList = new ZehSymbolTable();
|
||||
mList->setAddressColumn(0);
|
||||
mList->setAddressLabel(false);
|
||||
mSearchList = new ZehSymbolTable();
|
||||
mSearchList->setAddressColumn(0);
|
||||
mSearchList->setAddressLabel(false);
|
||||
}
|
||||
|
||||
void lock() override
|
||||
|
|
|
@ -17,9 +17,9 @@ WatchView::WatchView(CPUMultiDump* parent) : StdTable(parent)
|
|||
connect(Bridge::getBridge(), SIGNAL(updateWatch()), this, SLOT(updateWatch()));
|
||||
connect(this, SIGNAL(contextMenuSignal(QPoint)), this, SLOT(contextMenuSlot(QPoint)));
|
||||
|
||||
updateColors();
|
||||
setupContextMenu();
|
||||
setDrawDebugOnly(true);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void WatchView::updateWatch()
|
||||
|
|
|
@ -36,11 +36,12 @@ ZehSymbolTable::ZehSymbolTable(QWidget* parent)
|
|||
addColumnAt(charwidth * 80, tr("Symbol"), true);
|
||||
addColumnAt(2000, tr("Symbol (undecorated)"), true);
|
||||
loadColumnFromConfig("Symbol");
|
||||
updateColors();
|
||||
|
||||
trImport = tr("Import");
|
||||
trExport = tr("Export");
|
||||
trSymbol = tr("Symbol");
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
QString ZehSymbolTable::getCellContent(int r, int c)
|
||||
|
|
Loading…
Reference in New Issue