1
0
Fork 0

GUI: fixed warnings

This commit is contained in:
mrexodia 2016-07-19 16:13:21 +02:00
parent bc1ca1f3c6
commit 1a8781aa45
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
2 changed files with 9 additions and 11 deletions

View File

@ -176,21 +176,19 @@ void DisassemblerGraphView::paintEvent(QPaintEvent* event)
for(auto & blockIt : this->blocks)
{
DisassemblerBlock & block = blockIt.second;
QRect blockRect = QRect(block.x + this->charWidth + 4, block.y + this->charWidth + 4,
block.width - (4 + 2 * this->charWidth), block.height - (4 + 2 * this->charWidth));
//Render shadow
p.setPen(QColor(0, 0, 0, 0));
p.setBrush(QColor(0, 0, 0, 128));
p.drawRect(block.x + this->charWidth + 4, block.y + this->charWidth + 4,
block.width - (4 + 2 * this->charWidth), block.height - (4 + 2 * this->charWidth));
p.drawRect(blockRect);
//Render node background
QLinearGradient gradient = QLinearGradient(QPointF(0, block.y + this->charWidth),
QPointF(0, block.y + block.height - this->charWidth));
gradient.setColorAt(0, ConfigColor("DisassemblyBackgroundColor"));
gradient.setColorAt(1, ConfigColor("DisassemblyBackgroundColor"));
p.setPen(Qt::black);
p.setBrush(QBrush(gradient));
p.drawRect(block.x + this->charWidth, block.y + this->charWidth,
block.width - (4 + 2 * this->charWidth), block.height - (4 + 2 * this->charWidth));
p.setBrush(QBrush(ConfigColor("DisassemblyBackgroundColor")));
p.drawRect(blockRect);
//Print current instruction background
if(this->cur_instr != 0)
@ -1213,7 +1211,7 @@ void DisassemblerGraphView::loadGraphSlot(BridgeCFGraphList* graphList)
auto size = instrTok.length;
instr.addr = addr;
instr.opcode.resize(size);
for(size_t j = 0; j < size; j++)
for(int j = 0; j < size; j++)
instr.opcode[j] = data[j];
instr.text = Text(richText);
block.instrs.push_back(instr);

View File

@ -415,7 +415,7 @@ void MainWindow::loadTabSavedOrder()
else
{
// Conflicts. Try to find an unused tab index.
for(duint j = 0; j < mWidgetList.size(); j++)
for(int j = 0; j < mWidgetList.size(); j++)
{
auto item = tabIndexToWidget.find(j);
if(item == tabIndexToWidget.end())