From ecce8e81c8482a36db92290a546c536e8824f8a9 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 24 May 2024 15:42:04 -0700 Subject: BranchWatchDialog: Case-Insensitive Sorting --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index f68b6d5bbf..a5b6358e04 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -216,6 +216,7 @@ BranchWatchDialog::BranchWatchDialog(Core::System& system, Core::BranchWatch& br m_table_proxy->setSourceModel( m_table_model = new BranchWatchTableModel(m_system, m_branch_watch, ppc_symbol_db)); m_table_proxy->setSortRole(UserRole::SortRole); + m_table_proxy->setSortCaseSensitivity(Qt::CaseInsensitive); m_table_model->setFont(ui_settings.GetDebugFont()); connect(&ui_settings, &Settings::DebugFontChanged, m_table_model, -- cgit v1.2.3 From 4a2ec86a9a5bfaeefa2bb108c8d3fd7158f22d69 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 24 May 2024 15:44:49 -0700 Subject: Branch Watch Tool: Add Rule Of 5 And Remove Unnecessary Include --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index a5b6358e04..e35259d2d2 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -57,6 +57,12 @@ public: : QSortFilterProxyModel(parent), m_branch_watch(branch_watch) { } + ~BranchWatchProxyModel() override = default; + + BranchWatchProxyModel(const BranchWatchProxyModel&) = delete; + BranchWatchProxyModel(BranchWatchProxyModel&&) = delete; + BranchWatchProxyModel& operator=(const BranchWatchProxyModel&) = delete; + BranchWatchProxyModel& operator=(BranchWatchProxyModel&&) = delete; BranchWatchTableModel* sourceModel() const { -- cgit v1.2.3 From 3b214a4978129a96b136aa23ce9ca5843fb3e3f4 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 24 May 2024 16:44:43 -0700 Subject: BranchWatchDialog: Resolve Linux FIXME This stopped being an issue for me with a recent package update, so I guess Qt6 was fixed upstream? --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index e35259d2d2..c20b2e3c2d 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -207,7 +207,6 @@ BranchWatchDialog::BranchWatchDialog(Core::System& system, Core::BranchWatch& br { setWindowTitle(tr("Branch Watch Tool")); setWindowFlags((windowFlags() | Qt::WindowMinMaxButtonsHint) & ~Qt::WindowContextHelpButtonHint); - SetQWidgetWindowDecorations(this); setLayout([this, &ppc_symbol_db]() { auto* main_layout = new QVBoxLayout; @@ -241,6 +240,11 @@ BranchWatchDialog::BranchWatchDialog(Core::System& system, Core::BranchWatch& br table_view->setEditTriggers(QAbstractItemView::NoEditTriggers); table_view->setCornerButtonEnabled(false); table_view->verticalHeader()->hide(); + table_view->setColumnWidth(Column::Instruction, 50); + table_view->setColumnWidth(Column::Condition, 50); + table_view->setColumnWidth(Column::OriginSymbol, 250); + table_view->setColumnWidth(Column::DestinSymbol, 250); + // The default column width (100 units) is fine for the rest. QHeaderView* const horizontal_header = table_view->horizontalHeader(); horizontal_header->restoreState( // Restore column visibility state. @@ -502,16 +506,6 @@ BranchWatchDialog::BranchWatchDialog(Core::System& system, Core::BranchWatch& br return main_layout; }()); - // FIXME: On Linux, Qt6 has recently been resetting column widths to their defaults in many - // unexpected ways. This affects all kinds of QTables in Dolphin's GUI, so to avoid it in - // this QTableView, I have deferred this operation. Any earlier, and this would be undone. - // SetQWidgetWindowDecorations was moved to before these operations for the same reason. - m_table_view->setColumnWidth(Column::Instruction, 50); - m_table_view->setColumnWidth(Column::Condition, 50); - m_table_view->setColumnWidth(Column::OriginSymbol, 250); - m_table_view->setColumnWidth(Column::DestinSymbol, 250); - // The default column width (100 units) is fine for the rest. - const auto& settings = Settings::GetQSettings(); restoreGeometry(settings.value(QStringLiteral("branchwatchdialog/geometry")).toByteArray()); } -- cgit v1.2.3