1
0
Fork 0

GUI: fixed a few bugs in SearchListViewTable + fixed a compile error with qMetaType

This commit is contained in:
Mr. eXoDia 2014-07-21 03:57:24 +02:00
parent 67513f78f9
commit 8f6cfd1516
2 changed files with 7 additions and 5 deletions

View File

@ -14,16 +14,17 @@ QString SearchListViewTable::paintContent(QPainter* painter, int_t rowBase, int
if(!getRowCount()) if(!getRowCount())
isaddr=false; isaddr=false;
const char* addrText = text.toUtf8().constData(); const char* addrText = text.toUtf8().constData();
if(!DbgIsValidExpression(addrText)) ULONGLONG val=0;
isaddr=false; uint_t wVA;
uint_t wVA = DbgValFromString(addrText); if(sscanf(addrText, "%llX", &val)!=1)
if(!DbgMemIsValidReadPtr(wVA))
isaddr=false; isaddr=false;
else
wVA=val;
if(col==0 && isaddr) if(col==0 && isaddr)
{ {
BPXTYPE bpxtype=DbgGetBpxTypeAt(wVA); BPXTYPE bpxtype=DbgGetBpxTypeAt(wVA);
bool isbookmark=DbgGetBookmarkAt(wVA); bool isbookmark=DbgGetBookmarkAt(wVA);
painter->setPen(ConfigColor("AbstractTableViewTextColor"));
if(!isbookmark) if(!isbookmark)
{ {
if(bpxtype&bp_normal) //normal breakpoint if(bpxtype&bp_normal) //normal breakpoint

View File

@ -50,6 +50,7 @@ int main(int argc, char *argv[])
qRegisterMetaType<uint_t>("uint_t"); qRegisterMetaType<uint_t>("uint_t");
qRegisterMetaType<byte_t>("byte_t"); qRegisterMetaType<byte_t>("byte_t");
qRegisterMetaType<DBGSTATE>("DBGSTATE");
qRegisterMetaType<DBGSTATE>("DBGSTATE"); qRegisterMetaType<DBGSTATE>("DBGSTATE");