forked from suyu/suyu
citra-qt: Fix a crash when double-clicking a disassembler list item.
This commit is contained in:
parent
a9b3f29b90
commit
79713d500b
2 changed files with 6 additions and 12 deletions
|
@ -17,16 +17,9 @@
|
||||||
#include "core/arm/skyeye_common/armdefs.h"
|
#include "core/arm/skyeye_common/armdefs.h"
|
||||||
#include "core/arm/disassembler/arm_disasm.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()) {
|
|
||||||
|
|
||||||
}
|
DisassemblerModel::DisassemblerModel(QObject* parent) : QAbstractListModel(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);
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndex DisassemblerModel::parent(const QModelIndex& child) const {
|
|
||||||
return QModelIndex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int DisassemblerModel::columnCount(const QModelIndex& parent) const {
|
int DisassemblerModel::columnCount(const QModelIndex& parent) const {
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#pragma once
|
||||||
|
|
||||||
|
#include <QAbstractListModel>
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
|
|
||||||
#include "ui_disassembler.h"
|
#include "ui_disassembler.h"
|
||||||
|
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
|
@ -12,15 +15,13 @@
|
||||||
class QAction;
|
class QAction;
|
||||||
class EmuThread;
|
class EmuThread;
|
||||||
|
|
||||||
class DisassemblerModel : public QAbstractItemModel
|
class DisassemblerModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DisassemblerModel(QObject* parent);
|
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 columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
int rowCount(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;
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
Loading…
Reference in a new issue