diff options
author | 2021-01-28 02:59:43 +1100 | |
---|---|---|
committer | 2021-01-28 02:59:43 +1100 | |
commit | 83c9637635c575972c039d7d63a48d788e41ba34 (patch) | |
tree | 59bad3ada8a0f0f61bf503da21acef0f237d4d6b /src/osd/modules/debugger/qt/breakpointswindow.cpp | |
parent | 832acf5731d68ca411b5fb358ddb4e79ef0faffa (diff) |
-Qt debugger updates:
* Added context menu with Copy Visible and Paste commands to debug views (partially addresses #6066).
* Made memory view last PC display a context menu item.
* Fixed crash on right-clicking a memory view showing something other than an address space.
-debugger: Fixed commas in dumpkbd output.
Diffstat (limited to 'src/osd/modules/debugger/qt/breakpointswindow.cpp')
-rw-r--r-- | src/osd/modules/debugger/qt/breakpointswindow.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/osd/modules/debugger/qt/breakpointswindow.cpp b/src/osd/modules/debugger/qt/breakpointswindow.cpp index 5d091694d66..4f581137476 100644 --- a/src/osd/modules/debugger/qt/breakpointswindow.cpp +++ b/src/osd/modules/debugger/qt/breakpointswindow.cpp @@ -1,12 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Andrew Gardner #include "emu.h" -#include <QtWidgets/QActionGroup> -#include <QtWidgets/QHBoxLayout> -#include <QtWidgets/QMenu> -#include <QtWidgets/QMenuBar> -#include <QtWidgets/QVBoxLayout> - #include "breakpointswindow.h" #include "debug/debugcon.h" @@ -14,13 +8,19 @@ #include "debug/dvbpoints.h" #include "debug/dvwpoints.h" +#include <QtWidgets/QActionGroup> +#include <QtWidgets/QHBoxLayout> +#include <QtWidgets/QMenu> +#include <QtWidgets/QMenuBar> +#include <QtWidgets/QVBoxLayout> + -BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) : +BreakpointsWindow::BreakpointsWindow(running_machine &machine, QWidget *parent) : WindowQt(machine, nullptr) { setWindowTitle("Debug: All Breakpoints"); - if (parent != nullptr) + if (parent) { QPoint parentPos = parent->pos(); setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400); @@ -29,13 +29,13 @@ BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) // // The main frame and its input and breakpoints widgets // - QFrame* mainWindowFrame = new QFrame(this); + QFrame *mainWindowFrame = new QFrame(this); // The main breakpoints view m_breakpointsView = new DebuggerView(DVT_BREAK_POINTS, m_machine, this); // Layout - QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame); + QVBoxLayout *vLayout = new QVBoxLayout(mainWindowFrame); vLayout->setObjectName("vlayout"); vLayout->setSpacing(3); vLayout->setContentsMargins(2,2,2,2); @@ -46,11 +46,11 @@ BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) // // Menu bars // - QActionGroup* typeGroup = new QActionGroup(this); + QActionGroup *typeGroup = new QActionGroup(this); typeGroup->setObjectName("typegroup"); - QAction* typeBreak = new QAction("Breakpoints", this); + QAction *typeBreak = new QAction("Breakpoints", this); typeBreak->setObjectName("typebreak"); - QAction* typeWatch = new QAction("Watchpoints", this); + QAction *typeWatch = new QAction("Watchpoints", this); typeWatch->setObjectName("typewatch"); typeBreak->setCheckable(true); typeWatch->setCheckable(true); @@ -62,7 +62,7 @@ BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) connect(typeGroup, &QActionGroup::triggered, this, &BreakpointsWindow::typeChanged); // Assemble the options menu - QMenu* optionsMenu = menuBar()->addMenu("&Options"); + QMenu *optionsMenu = menuBar()->addMenu("&Options"); optionsMenu->addActions(typeGroup->actions()); } @@ -91,7 +91,7 @@ void BreakpointsWindow::typeChanged(QAction* changedTo) } // Re-register - QVBoxLayout* layout = findChild<QVBoxLayout*>("vlayout"); + QVBoxLayout *layout = findChild<QVBoxLayout *>("vlayout"); layout->addWidget(m_breakpointsView); } @@ -100,10 +100,10 @@ void BreakpointsWindow::typeChanged(QAction* changedTo) //========================================================================= // BreakpointsWindowQtConfig //========================================================================= -void BreakpointsWindowQtConfig::buildFromQWidget(QWidget* widget) +void BreakpointsWindowQtConfig::buildFromQWidget(QWidget *widget) { WindowQtConfig::buildFromQWidget(widget); - BreakpointsWindow* window = dynamic_cast<BreakpointsWindow*>(widget); + BreakpointsWindow *window = dynamic_cast<BreakpointsWindow *>(widget); QActionGroup* typeGroup = window->findChild<QActionGroup*>("typegroup"); if (typeGroup->checkedAction()->text() == "Breakpoints") @@ -116,9 +116,9 @@ void BreakpointsWindowQtConfig::buildFromQWidget(QWidget* widget) void BreakpointsWindowQtConfig::applyToQWidget(QWidget* widget) { WindowQtConfig::applyToQWidget(widget); - BreakpointsWindow* window = dynamic_cast<BreakpointsWindow*>(widget); + BreakpointsWindow *window = dynamic_cast<BreakpointsWindow *>(widget); - QActionGroup* typeGroup = window->findChild<QActionGroup*>("typegroup"); + QActionGroup *typeGroup = window->findChild<QActionGroup *>("typegroup"); typeGroup->actions()[m_bwType]->trigger(); } |