Fix a bunch of warnings in the GUI
This commit is contained in:
parent
524c124dfd
commit
cb7e6ea892
|
|
@ -553,7 +553,7 @@ void HexDump::wheelEvent(QWheelEvent* event)
|
|||
void HexDump::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
int key = event->key();
|
||||
dsint selStart = getInitialSelection();
|
||||
duint selStart = getInitialSelection();
|
||||
char granularity = 1; //Size of a data word.
|
||||
char action = 0; //Where to scroll the scrollbar
|
||||
Qt::KeyboardModifiers modifiers = event->modifiers();
|
||||
|
|
|
|||
|
|
@ -386,14 +386,14 @@ void QBeaEngine::UpdateConfig()
|
|||
void formatOpcodeString(const Instruction_t & inst, RichTextPainter::List & list, std::vector<std::pair<size_t, bool>> & realBytes)
|
||||
{
|
||||
RichTextPainter::CustomRichText_t curByte;
|
||||
size_t size = inst.dump.size();
|
||||
auto size = inst.dump.size();
|
||||
assert(list.empty()); //List must be empty before use
|
||||
curByte.underlineWidth = 1;
|
||||
curByte.flags = RichTextPainter::FlagAll;
|
||||
curByte.underline = false;
|
||||
list.reserve(size + 5);
|
||||
realBytes.reserve(size + 5);
|
||||
for(size_t i = 0; i < size; i++)
|
||||
for(int i = 0; i < size; i++)
|
||||
{
|
||||
curByte.text = ToByteString(inst.dump.at(i));
|
||||
list.push_back(curByte);
|
||||
|
|
|
|||
|
|
@ -674,6 +674,7 @@ bool ZydisTokenizer::tokenizePtrOperand(const ZydisDecodedOperand & op)
|
|||
|
||||
bool ZydisTokenizer::tokenizeInvalidOperand(const ZydisDecodedOperand & op)
|
||||
{
|
||||
Q_UNUSED(op);
|
||||
addToken(TokenType::MnemonicUnusual, "???");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ void CPUWidget::detachGraph()
|
|||
|
||||
void CPUWidget::attachGraph(QWidget* widget)
|
||||
{
|
||||
Q_UNUSED(widget);
|
||||
mGraph->setParent(this);
|
||||
ui->mTopLeftUpperRightFrameLayout->addWidget(mGraph);
|
||||
mGraph->hide();
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ void HandlesView::enumPrivileges()
|
|||
"SeUndockPrivilege", "SeUnsolicitedInputPrivilege"
|
||||
};
|
||||
mPrivilegesTable->setRowCount(_countof(PrivilegeString));
|
||||
for(size_t row = 0; row < _countof(PrivilegeString); row++)
|
||||
for(int row = 0; row < _countof(PrivilegeString); row++)
|
||||
{
|
||||
QString temp(PrivilegeString[row]);
|
||||
DbgCmdExecDirect(QString("GetPrivilegeState \"%1\"").arg(temp).toUtf8().constData());
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,7 @@ void RegistersView::fontsUpdatedSlot()
|
|||
|
||||
void RegistersView::displayCustomContextMenuSlot(QPoint pos)
|
||||
{
|
||||
|
||||
Q_UNUSED(pos);
|
||||
}
|
||||
|
||||
void RegistersView::ShowFPU(bool set_showfpu)
|
||||
|
|
@ -1502,6 +1502,7 @@ void RegistersView::mouseMoveEvent(QMouseEvent* event)
|
|||
|
||||
void RegistersView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
}
|
||||
|
||||
void RegistersView::paintEvent(QPaintEvent* event)
|
||||
|
|
@ -2424,6 +2425,7 @@ void RegistersView::onCopyAllAction()
|
|||
|
||||
void RegistersView::debugStateChangedSlot(DBGSTATE state)
|
||||
{
|
||||
Q_UNUSED(state);
|
||||
}
|
||||
|
||||
void RegistersView::reload()
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ void TraceBrowser::contextMenuEvent(QContextMenuEvent* event)
|
|||
|
||||
void TraceBrowser::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
duint index = getIndexOffsetFromY(transY(event->y())) + getTableOffset();
|
||||
auto index = getIndexOffsetFromY(transY(event->y())) + getTableOffset();
|
||||
if(getGuiState() != AbstractTableView::NoState || !mTraceFile || mTraceFile->Progress() < 100)
|
||||
{
|
||||
AbstractTableView::mousePressEvent(event);
|
||||
|
|
@ -1149,6 +1149,7 @@ void TraceBrowser::keyPressEvent(QKeyEvent* event)
|
|||
|
||||
void TraceBrowser::onSelectionChanged(unsigned long long selection)
|
||||
{
|
||||
Q_UNUSED(selection);
|
||||
if(mAutoDisassemblyFollowSelection)
|
||||
mCommonActions->followDisassemblySlot();
|
||||
}
|
||||
|
|
@ -1203,9 +1204,10 @@ duint TraceBrowser::getSelectionEnd()
|
|||
|
||||
void TraceBrowser::makeVisible(duint index)
|
||||
{
|
||||
if(index < getTableOffset())
|
||||
duint tableOffset = getTableOffset();
|
||||
if(index < tableOffset)
|
||||
setTableOffset(index);
|
||||
else if(index + 2 > getTableOffset() + getViewableRowsCount())
|
||||
else if(index + 2 > tableOffset + getViewableRowsCount())
|
||||
setTableOffset(index - getViewableRowsCount() + 2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -481,6 +481,7 @@ void TraceFileParser::run()
|
|||
}
|
||||
catch(const std::wstring & errReason)
|
||||
{
|
||||
Q_UNUSED(errReason);
|
||||
//MessageBox(0, errReason.c_str(), L"debug", MB_ICONERROR);
|
||||
that->error = true;
|
||||
}
|
||||
|
|
@ -538,6 +539,7 @@ void TraceFileReader::purgeLastPage()
|
|||
}
|
||||
catch(std::wstring & errReason)
|
||||
{
|
||||
Q_UNUSED(errReason);
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -699,9 +701,9 @@ int TraceFilePage::MemoryAccessCount(unsigned long long index) const
|
|||
{
|
||||
size_t a = memoryOperandOffset.at(index);
|
||||
if(index == length - 1)
|
||||
return memoryAddress.size() - a;
|
||||
return (int)(memoryAddress.size() - a);
|
||||
else
|
||||
return memoryOperandOffset.at(index + 1) - a;
|
||||
return (int)(memoryOperandOffset.at(index + 1) - a);
|
||||
}
|
||||
|
||||
void TraceFilePage::MemoryAccessInfo(unsigned long long index, duint* address, duint* oldMemory, duint* newMemory, bool* isValid) const
|
||||
|
|
|
|||
|
|
@ -14,16 +14,19 @@ SymbolAutoCompleteModel::SymbolAutoCompleteModel(std::function<QString()> getTex
|
|||
|
||||
QModelIndex SymbolAutoCompleteModel::parent(const QModelIndex & child) const
|
||||
{
|
||||
Q_UNUSED(child);
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
QModelIndex SymbolAutoCompleteModel::index(int row, int column, const QModelIndex & parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return createIndex(row, column);
|
||||
}
|
||||
|
||||
int SymbolAutoCompleteModel::rowCount(const QModelIndex & parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if(DbgIsDebugging())
|
||||
{
|
||||
QString text = mGetTextProc();
|
||||
|
|
@ -42,6 +45,7 @@ int SymbolAutoCompleteModel::rowCount(const QModelIndex & parent) const
|
|||
|
||||
int SymbolAutoCompleteModel::columnCount(const QModelIndex & parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue