diff --git a/Qt/ctrldisasmview.cpp b/Qt/ctrldisasmview.cpp index 90f794bc8b..3bf021f23e 100644 --- a/Qt/ctrldisasmview.cpp +++ b/Qt/ctrldisasmview.cpp @@ -281,12 +281,12 @@ void CtrlDisAsmView::paintEvent(QPaintEvent *) int rowY1 = rect().bottom()/2 + rowHeight*i - rowHeight/2; int rowY2 = rect().bottom()/2 + rowHeight*i + rowHeight/2 - 1; - lbr.setColor(marker==address?QColor(0xFFFFEEE0):QColor(debugger->getColor(address))); + lbr.setColor((unsigned int)marker == address ? QColor(0xFFFFEEE0) : QColor(debugger->getColor(address))); QColor bg = lbr.color(); painter.setPen(nullPen); painter.drawRect(0,rowY1,16-1,rowY2-rowY1); - if (selecting && address == selection) + if (selecting && address == (unsigned int)selection) painter.setPen(selPen); else painter.setPen(i==0 ? currentPen : nullPen); diff --git a/Qt/ctrlmemview.cpp b/Qt/ctrlmemview.cpp index 978e3a230b..5023d4f5f4 100644 --- a/Qt/ctrlmemview.cpp +++ b/Qt/ctrlmemview.cpp @@ -97,7 +97,7 @@ void CtrlMemView::paintEvent(QPaintEvent *) painter.setBrush(currentBrush); - if (selecting && address == selection) + if (selecting && address == (unsigned int)selection) painter.setPen(selPen); else painter.setPen(i==0 ? currentPen : nullPen); @@ -173,6 +173,7 @@ void CtrlMemView::paintEvent(QPaintEvent *) painter.drawText(85,rowY1 - 2 + rowHeight, temp); break; } + case MV_MAX: break; } } } diff --git a/Qt/debugger_disasm.cpp b/Qt/debugger_disasm.cpp index a94f80c0ec..342f4aede0 100644 --- a/Qt/debugger_disasm.cpp +++ b/Qt/debugger_disasm.cpp @@ -346,7 +346,7 @@ void Debugger_Disasm::FillFunctions() if(symbolMap.GetSymbolType(i) & ST_FUNCTION) { QListWidgetItem* item = new QListWidgetItem(); - item->setText(QString(symbolMap.GetSymbolName(i)) + " ("+ QString::number(symbolMap.GetSymbolSize(i)) +")"); + item->setText(QString("%1 (%2)").arg(symbolMap.GetSymbolName(i)).arg(symbolMap.GetSymbolSize(i))); item->setData(Qt::UserRole, symbolMap.GetAddress(i)); ui->FuncList->addItem(item); } @@ -431,7 +431,7 @@ void Debugger_Disasm::UpdateThreadGUI() std::vector threads = GetThreadsInfo(); EmuThread_LockDraw(false); - for(int i = 0; i < threads.size(); i++) + for(size_t i = 0; i < threads.size(); i++) { QTreeWidgetItem* item = new QTreeWidgetItem(); item->setText(0,QString::number(threads[i].id)); @@ -480,7 +480,7 @@ void Debugger_Disasm::on_threadList_customContextMenuRequested(const QPoint &pos connect(gotoEntryPoint, SIGNAL(triggered()), this, SLOT(GotoThreadEntryPoint())); menu.addAction(gotoEntryPoint); - QMenu* changeStatus = menu.addMenu("Change status"); + QMenu* changeStatus = menu.addMenu(tr("Change status")); QAction *statusRunning = new QAction(tr("Running"), this); connect(statusRunning, SIGNAL(triggered()), this, SLOT(SetThreadStatusRun())); @@ -566,7 +566,7 @@ void Debugger_Disasm::UpdateDisplayListGUI() item->setText(3,QString("%1").arg(dl->pc,8,16,QChar('0'))); item->setData(3, Qt::UserRole, dl->pc); ui->displayList->addTopLevelItem(item); - if(curDlId == dl->id) + if(curDlId == (u32)dl->id) { ui->displayList->setCurrentItem(item); displayListRowSelected = item; @@ -595,7 +595,7 @@ void Debugger_Disasm::UpdateDisplayListGUI() item->setText(3,QString("%1").arg(it->pc,8,16,QChar('0'))); item->setData(3, Qt::UserRole, it->pc); ui->displayList->addTopLevelItem(item); - if(curDlId == it->id) + if(curDlId == (u32)it->id) { ui->displayList->setCurrentItem(item); displayListRowSelected = item; diff --git a/Qt/debugger_disasm.h b/Qt/debugger_disasm.h index 5ca646e4be..4788b42fbf 100644 --- a/Qt/debugger_disasm.h +++ b/Qt/debugger_disasm.h @@ -58,49 +58,31 @@ private slots: void UpdateThreadGUI(); void on_GotoPc_clicked(); - void on_Go_clicked(); - void on_Stop_clicked(); - void on_StepInto_clicked(); - void on_StepOver_clicked(); - void on_Skip_clicked(); - void on_NextHLE_clicked(); - void on_GotoLr_clicked(); - void on_GotoInt_currentIndexChanged(int index); - void on_Address_textChanged(const QString &arg1); - void on_DisasmView_customContextMenuRequested(const QPoint &pos); - void releaseLock(); void on_RegList_customContextMenuRequested(const QPoint &pos); - void on_vfpu_clicked(); - void on_FuncList_itemClicked(QListWidgetItem *item); - void on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column); - void on_breakpointsList_customContextMenuRequested(const QPoint &pos); - void on_clearAllBP_clicked(); - void on_threadList_itemClicked(QTreeWidgetItem *item, int column); - void on_threadList_customContextMenuRequested(const QPoint &pos); void SetThreadStatusRun(); void SetThreadStatusWait(); void SetThreadStatusSuspend(); void on_displayList_customContextMenuRequested(const QPoint &pos); - + void releaseLock(); private: void SetThreadStatus(ThreadStatus status); diff --git a/Qt/debugger_displaylist.cpp b/Qt/debugger_displaylist.cpp index 9c125a2a76..43b89f9b0d 100644 --- a/Qt/debugger_displaylist.cpp +++ b/Qt/debugger_displaylist.cpp @@ -99,7 +99,7 @@ void Debugger_DisplayList::UpdateDisplayListGUI() item->setText(3,QString("%1").arg(dl->pc,8,16,QChar('0'))); item->setData(3, Qt::UserRole, dl->pc); ui->displayList->addTopLevelItem(item); - if(curDlId == dl->id) + if(curDlId == (u32)dl->id) { ui->displayList->setCurrentItem(item); displayListRowSelected = item; @@ -129,7 +129,7 @@ void Debugger_DisplayList::UpdateDisplayListGUI() item->setText(3,QString("%1").arg(it->pc,8,16,QChar('0'))); item->setData(3, Qt::UserRole, it->pc); ui->displayList->addTopLevelItem(item); - if(curDlId == it->id) + if(curDlId == (u32)it->id) { ui->displayList->setCurrentItem(item); displayListRowSelected = item; @@ -171,7 +171,7 @@ void Debugger_DisplayList::ShowDLCode() item->setText(1,QString("%1").arg(it->second.cmd,2,16,QChar('0'))); item->setText(2,QString("%1").arg(it->second.data,6,16,QChar('0'))); item->setText(3,it->second.comment); - if(curPc == it->first) + if(curPc == (u32)it->first) { curTexAddr = it->second.texAddr; curVtxAddr = it->second.vtxAddr; @@ -187,7 +187,7 @@ void Debugger_DisplayList::ShowDLCode() } ui->displayListData->addTopLevelItem(item); - if(curPc == it->first) + if(curPc == (u32)it->first) { ui->displayListData->setCurrentItem(item); } @@ -1573,7 +1573,7 @@ void Debugger_DisplayList::on_gotoPCBtn_clicked() for(int i = 0; i < ui->displayListData->topLevelItemCount(); i++) { - if(ui->displayListData->topLevelItem(i)->data(0, Qt::UserRole).toInt() == currentPC) + if((u32)ui->displayListData->topLevelItem(i)->data(0, Qt::UserRole).toInt() == currentPC) { ui->displayListData->setCurrentItem(ui->displayListData->topLevelItem(i)); } @@ -1610,7 +1610,7 @@ void Debugger_DisplayList::UpdateRenderBufferListGUI() std::vector fboList = gpu->GetFramebufferList(); - for(int i = 0; i < fboList.size(); i++) + for(size_t i = 0; i < fboList.size(); i++) { QTreeWidgetItem* item = new QTreeWidgetItem(); item->setText(0,QString("%1").arg(fboList[i].fb_address,8,16,QChar('0'))); @@ -1643,7 +1643,7 @@ void Debugger_DisplayList::setCurrentFBO(u32 addr) { for(int i = 0; i < ui->fboList->topLevelItemCount(); i++) { - if(ui->fboList->topLevelItem(i)->data(0,Qt::UserRole+1).toInt() == addr) + if((u32)ui->fboList->topLevelItem(i)->data(0,Qt::UserRole+1).toInt() == addr) { for(int j = 0; j < ui->fboList->colorCount(); j++) ui->fboList->topLevelItem(i)->setTextColor(j,Qt::green); diff --git a/Qt/debugger_displaylist.h b/Qt/debugger_displaylist.h index 7ecec82302..78b19d86b4 100644 --- a/Qt/debugger_displaylist.h +++ b/Qt/debugger_displaylist.h @@ -63,40 +63,23 @@ private slots: void releaseLock(); void on_displayList_itemClicked(QTreeWidgetItem *item, int column); - void on_stepBtn_clicked(); - void on_runBtn_clicked(); - void on_stopBtn_clicked(); - void on_nextDrawBtn_clicked(); - void on_gotoPCBtn_clicked(); - void on_texturesList_itemDoubleClicked(QTreeWidgetItem *item, int column); - void on_comboBox_currentIndexChanged(int index); - void on_fboList_itemClicked(QTreeWidgetItem *item, int column); - void on_nextDLBtn_clicked(); void setCurrentFBO(u32 addr); - void on_zoommBtn_clicked(); - void on_zoompBtn_clicked(); - void on_vertexList_itemClicked(QTreeWidgetItem *item, int column); - void on_pushButton_clicked(); - void on_nextIdx_clicked(); - void on_indexList_itemClicked(QTreeWidgetItem *item, int column); - void on_displayListData_customContextMenuRequested(const QPoint &pos); - void on_texturesList_customContextMenuRequested(const QPoint &pos); void RunToDLPC(); void RunToDrawTex(); diff --git a/Qt/debugger_vfpu.cpp b/Qt/debugger_vfpu.cpp index 5c30f3e12f..290dd26f08 100644 --- a/Qt/debugger_vfpu.cpp +++ b/Qt/debugger_vfpu.cpp @@ -12,7 +12,7 @@ Debugger_VFPU::Debugger_VFPU(DebugInterface *_cpu, MainWindow* mainWindow_, QWid { ui->setupUi(this); - setWindowTitle(QString("VFPU - ")+cpu->GetName()); + setWindowTitle(QString("VFPU - %1").arg(cpu->GetName())); ui->vfpu->setCPU(_cpu); } diff --git a/Qt/gamepaddialog.cpp b/Qt/gamepaddialog.cpp index 5094fc032c..2b1fb03e03 100644 --- a/Qt/gamepaddialog.cpp +++ b/Qt/gamepaddialog.cpp @@ -44,10 +44,10 @@ const int configOffset = 200; GamePadDialog::GamePadDialog(InputState* state, QWidget *parent) : QDialog(parent), ui(new Ui::GamePadDialog), - m_inputState(state), #if QT_HAS_SDL m_joystick(0), #endif + m_inputState(state), m_isInit(false) { ui->setupUi(this); @@ -108,15 +108,10 @@ void GamePadDialog::showEvent(QShowEvent *) void GamePadDialog::changeEvent(QEvent *event) { - QDialog::changeEvent(event); - - if (0 != event) + if (event->type() == QEvent::LanguageChange) { - if (event->type() == QEvent::LanguageChange) - { - ui->retranslateUi(this); - on_refreshListBtn_clicked(); - } + ui->retranslateUi(this); + on_refreshListBtn_clicked(); } } diff --git a/Qt/gamepaddialog.h b/Qt/gamepaddialog.h index 24163731cc..4157fa2aa5 100644 --- a/Qt/gamepaddialog.h +++ b/Qt/gamepaddialog.h @@ -21,23 +21,16 @@ public: ~GamePadDialog(); void SetViewMode(); - void SetCalibMode(); - void CalibNextButton(); protected: void showEvent(QShowEvent *); void changeEvent(QEvent *); private slots: void releaseLock(); void on_refreshListBtn_clicked(); - void on_SelectPadBtn_clicked(); - void pollJoystick(); - void on_AssignBtn_clicked(); - void on_buttonBox_accepted(); - private: int GetIntFromMapping(int inputId, int type, int sign); void GetMappingFromInt(int value, int &inputId, int &type, int &sign);