From 79713d500b14ed3c71a632009c3ed8a6c2e68406 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 3 Feb 2015 20:45:33 +0100 Subject: citra-qt: Fix a crash when double-clicking a disassembler list item. --- src/citra_qt/debugger/disassembler.cpp | 9 +-------- src/citra_qt/debugger/disassembler.h | 9 +++++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index c61ace925..54d21dc90 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -17,16 +17,9 @@ #include "core/arm/skyeye_common/armdefs.h" #include "core/arm/disassembler/arm_disasm.h" -DisassemblerModel::DisassemblerModel(QObject* parent) : QAbstractItemModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) { -} - -QModelIndex DisassemblerModel::index(int row, int column, const QModelIndex& parent) const { - return createIndex(row, column); -} +DisassemblerModel::DisassemblerModel(QObject* parent) : QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) { -QModelIndex DisassemblerModel::parent(const QModelIndex& child) const { - return QModelIndex(); } int DisassemblerModel::columnCount(const QModelIndex& parent) const { diff --git a/src/citra_qt/debugger/disassembler.h b/src/citra_qt/debugger/disassembler.h index 0deccc240..5e19d7c51 100644 --- a/src/citra_qt/debugger/disassembler.h +++ b/src/citra_qt/debugger/disassembler.h @@ -2,8 +2,11 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include +#pragma once + +#include #include + #include "ui_disassembler.h" #include "common/common.h" @@ -12,15 +15,13 @@ class QAction; class EmuThread; -class DisassemblerModel : public QAbstractItemModel +class DisassemblerModel : public QAbstractListModel { Q_OBJECT public: DisassemblerModel(QObject* parent); - QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; - QModelIndex parent(const QModelIndex& child) const override; int columnCount(const QModelIndex& parent = QModelIndex()) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; -- cgit v1.2.3 From 5a90420c0b402f62119f5fae013f97e7c09a7334 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 3 Feb 2015 20:50:31 +0100 Subject: citra-qt: Fix horrible scrolling responsiveness in disassembler by giving the uniformRowHeight hint. --- src/citra_qt/debugger/disassembler.ui | 117 +++++++++++++++++----------------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/src/citra_qt/debugger/disassembler.ui b/src/citra_qt/debugger/disassembler.ui index bd0752aa4..5ca6dc5d2 100644 --- a/src/citra_qt/debugger/disassembler.ui +++ b/src/citra_qt/debugger/disassembler.ui @@ -13,63 +13,66 @@ Disassembly - - - - - - - - Step - - - - - - - Pause - - - - - - - Continue - - - - - - - Step Into - - - - - - - Set Breakpoint - - - - - - - - - true - - - 20 - - - false - - - false - - - + + + + + + + + Step + + + + + + + Pause + + + + + + + Continue + + + + + + + Step Into + + + + + + + Set Breakpoint + + + + + + + + + true + + + 20 + + + false + + + true + + + false + + + -- cgit v1.2.3