diff --git a/src/drivers/Qt/ConsoleDebugger.cpp b/src/drivers/Qt/ConsoleDebugger.cpp index ef88f1f7..6976c7e1 100644 --- a/src/drivers/Qt/ConsoleDebugger.cpp +++ b/src/drivers/Qt/ConsoleDebugger.cpp @@ -3010,19 +3010,19 @@ void QAsmView::contextMenuEvent(QContextMenuEvent *event) ctxMenuAddr = addr = asmEntry[line]->addr; - act = new QAction(tr("Add Breakpoint"), this); + act = new QAction(tr("Add Breakpoint"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddBP(void)) ); - act = new QAction(tr("Add Symbolic Debug Marker"), this); + act = new QAction(tr("Add Symbolic Debug Marker"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddSym(void)) ); - act = new QAction(tr("Add Bookmark"), this); + act = new QAction(tr("Add Bookmark"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddBM(void)) ); - act = new QAction(tr("Open Hex Editor"), this); + act = new QAction(tr("Open Hex Editor"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuOpenHexEdit(void)) ); @@ -3294,7 +3294,7 @@ void DebuggerStackDisplay::contextMenuEvent(QContextMenuEvent *event) menu.addAction( act ); subMenu = menu.addMenu(tr("Display Bytes Per Line")); - group = new QActionGroup(this); + group = new QActionGroup(&menu); group->setExclusive(true); diff --git a/src/drivers/Qt/HexEditor.cpp b/src/drivers/Qt/HexEditor.cpp index f1fdd389..8b2ff363 100644 --- a/src/drivers/Qt/HexEditor.cpp +++ b/src/drivers/Qt/HexEditor.cpp @@ -1753,22 +1753,22 @@ void QHexEdit::contextMenuEvent(QContextMenuEvent *event) { case MODE_NES_RAM: { - act = new QAction(tr("Add Symbolic Debug Name"), this); + act = new QAction(tr("Add Symbolic Debug Name"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addDebugSym(void)) ); sprintf( stmp, "Add Read Breakpoint for Address $%04X", addr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addRamReadBP(void)) ); sprintf( stmp, "Add Write Breakpoint for Address $%04X", addr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addRamWriteBP(void)) ); sprintf( stmp, "Add Execute Breakpoint for Address $%04X", addr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addRamExecuteBP(void)) ); @@ -1780,13 +1780,13 @@ void QHexEdit::contextMenuEvent(QContextMenuEvent *event) { jumpToRomValue = romAddr; sprintf( stmp, "Go Here in ROM File: (%08X)", romAddr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(jumpToROM(void)) ); } } - act = new QAction(tr("Add Bookmark"), this); + act = new QAction(tr("Add Bookmark"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addBookMarkCB(void)) ); } @@ -1794,30 +1794,30 @@ void QHexEdit::contextMenuEvent(QContextMenuEvent *event) case MODE_NES_PPU: { sprintf( stmp, "Add Read Breakpoint for Address $%04X", addr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addPpuReadBP(void)) ); sprintf( stmp, "Add Write Breakpoint for Address $%04X", addr ); - act = new QAction(tr(stmp), this); + act = new QAction(tr(stmp), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addPpuWriteBP(void)) ); - act = new QAction(tr("Add Bookmark"), this); + act = new QAction(tr("Add Bookmark"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addBookMarkCB(void)) ); } break; case MODE_NES_OAM: { - act = new QAction(tr("Add Bookmark"), this); + act = new QAction(tr("Add Bookmark"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addBookMarkCB(void)) ); } break; case MODE_NES_ROM: { - act = new QAction(tr("Add Bookmark"), this); + act = new QAction(tr("Add Bookmark"), &menu); menu.addAction(act); connect( act, SIGNAL(triggered(void)), this, SLOT(addBookMarkCB(void)) ); } diff --git a/src/drivers/Qt/ppuViewer.cpp b/src/drivers/Qt/ppuViewer.cpp index c9fc180d..d0b6b352 100644 --- a/src/drivers/Qt/ppuViewer.cpp +++ b/src/drivers/Qt/ppuViewer.cpp @@ -417,7 +417,7 @@ void ppuPatternView_t::contextMenuEvent(QContextMenuEvent *event) menu.addAction( act ); subMenu = menu.addMenu(tr("Palette Select")); - group = new QActionGroup(this); + group = new QActionGroup(&menu); group->setExclusive(true); diff --git a/src/drivers/Qt/sdl-throttle.cpp b/src/drivers/Qt/sdl-throttle.cpp index 11666f94..2ade8ae4 100644 --- a/src/drivers/Qt/sdl-throttle.cpp +++ b/src/drivers/Qt/sdl-throttle.cpp @@ -143,13 +143,13 @@ int CustomEmulationSpeed(int spdPercent) g_fpsScale = ((double)spdPercent) / 100.0f; if (g_fpsScale < Slowest) - { - g_fpsScale = Slowest; - } - else if (g_fpsScale > Fastest) - { - g_fpsScale = Fastest; - } + { + g_fpsScale = Slowest; + } + else if (g_fpsScale > Fastest) + { + g_fpsScale = Fastest; + } RefreshThrottleFPS();