Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10423 from Pokechu22/improperly-exclusive-radio-b…
…uttons

Fix improperly exclusive radio buttons
  • Loading branch information
JosJuice committed Feb 18, 2022
2 parents 35b436b + f2f9df7 commit 9ebfdff
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/CheatSearchFactoryWidget.cpp
Expand Up @@ -55,7 +55,7 @@ void CheatSearchFactoryWidget::CreateWidgets()

auto* custom_address_space_layout = new QVBoxLayout();
custom_address_space_layout->setMargin(6);
auto* custom_address_space_button_group = new QButtonGroup();
auto* custom_address_space_button_group = new QButtonGroup(this);
m_custom_virtual_address_space = new QRadioButton(tr("Use virtual addresses when possible"));
m_custom_virtual_address_space->setChecked(true);
m_custom_physical_address_space = new QRadioButton(tr("Use physical addresses"));
Expand Down
1 change: 0 additions & 1 deletion Source/Core/DolphinQt/Config/ARCodeWidget.cpp
Expand Up @@ -5,7 +5,6 @@

#include <utility>

#include <QButtonGroup>
#include <QCursor>
#include <QHBoxLayout>
#include <QListWidget>
Expand Down
Expand Up @@ -5,7 +5,6 @@

#include <fmt/format.h>

#include <QButtonGroup>
#include <QDialog>
#include <QDialogButtonBox>
#include <QGridLayout>
Expand Down
9 changes: 7 additions & 2 deletions Source/Core/DolphinQt/Debugger/MemoryWidget.cpp
Expand Up @@ -6,6 +6,7 @@
#include <optional>
#include <string>

#include <QButtonGroup>
#include <QCheckBox>
#include <QGroupBox>
#include <QHBoxLayout>
Expand Down Expand Up @@ -103,6 +104,12 @@ void MemoryWidget::CreateWidgets()
m_address_splitter->setCollapsible(0, false);
m_address_splitter->setStretchFactor(1, 2);

auto* search_type_group = new QButtonGroup(this);
m_find_ascii = new QRadioButton(tr("ASCII"));
m_find_hex = new QRadioButton(tr("Hex string"));
search_type_group->addButton(m_find_ascii);
search_type_group->addButton(m_find_hex);

// Dump
m_dump_mram = new QPushButton(tr("Dump &MRAM"));
m_dump_exram = new QPushButton(tr("Dump &ExRAM"));
Expand All @@ -116,8 +123,6 @@ void MemoryWidget::CreateWidgets()

m_find_next = new QPushButton(tr("Find &Next"));
m_find_previous = new QPushButton(tr("Find &Previous"));
m_find_ascii = new QRadioButton(tr("ASCII"));
m_find_hex = new QRadioButton(tr("Hex string"));
m_result_label = new QLabel;

search_layout->addWidget(m_find_next);
Expand Down
7 changes: 7 additions & 0 deletions Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp
Expand Up @@ -3,6 +3,7 @@

#include "DolphinQt/Debugger/NewBreakpointDialog.h"

#include <QButtonGroup>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QGridLayout>
Expand Down Expand Up @@ -31,10 +32,12 @@ NewBreakpointDialog::NewBreakpointDialog(BreakpointWidget* parent)
void NewBreakpointDialog::CreateWidgets()
{
m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
auto* type_group = new QButtonGroup(this);

// Instruction BP
m_instruction_bp = new QRadioButton(tr("Instruction Breakpoint"));
m_instruction_bp->setChecked(true);
type_group->addButton(m_instruction_bp);
m_instruction_box = new QGroupBox;
m_instruction_address = new QLineEdit;

Expand All @@ -45,11 +48,15 @@ void NewBreakpointDialog::CreateWidgets()

// Memory BP
m_memory_bp = new QRadioButton(tr("Memory Breakpoint"));
type_group->addButton(m_memory_bp);
m_memory_box = new QGroupBox;
auto* memory_type_group = new QButtonGroup(this);
m_memory_use_address = new QRadioButton(tr("Address"));
m_memory_use_address->setChecked(true);
memory_type_group->addButton(m_memory_use_address);
// i18n: A range of memory addresses
m_memory_use_range = new QRadioButton(tr("Range"));
memory_type_group->addButton(m_memory_use_range);
m_memory_address_from = new QLineEdit;
m_memory_address_to = new QLineEdit;
m_memory_address_from_label = new QLabel; // Set by OnAddressTypeChanged
Expand Down
Expand Up @@ -3,7 +3,6 @@

#include "DolphinQt/Settings/USBDeviceAddToWhitelistDialog.h"

#include <QButtonGroup>
#include <QDialog>
#include <QDialogButtonBox>
#include <QErrorMessage>
Expand Down
Expand Up @@ -7,7 +7,6 @@

class QTimer;
class QDialog;
class QButtonGroup;
class QHeaderView;
class QLabel;
class QLineEdit;
Expand Down

0 comments on commit 9ebfdff

Please sign in to comment.