mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Minor cleanups
This commit is contained in:
parent
b4f1a77a14
commit
9e729e56cd
@ -36,7 +36,7 @@ link_directories(${RADARE2_LIBRARY_DIRS})
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_definitions(-Wall)
|
||||
add_definitions(-Wall -Wextra)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -10,19 +10,18 @@
|
||||
|
||||
|
||||
|
||||
FlagsModel::FlagsModel(QList<FlagDescription> *flags, MainWindow *main, QObject *parent)
|
||||
FlagsModel::FlagsModel(QList<FlagDescription> *flags, QObject *parent)
|
||||
: QAbstractListModel(parent),
|
||||
main(main),
|
||||
flags(flags)
|
||||
{
|
||||
}
|
||||
|
||||
int FlagsModel::rowCount(const QModelIndex &parent) const
|
||||
int FlagsModel::rowCount(const QModelIndex &) const
|
||||
{
|
||||
return flags->count();
|
||||
}
|
||||
|
||||
int FlagsModel::columnCount(const QModelIndex &parent) const
|
||||
int FlagsModel::columnCount(const QModelIndex &) const
|
||||
{
|
||||
return Columns::COUNT;
|
||||
}
|
||||
@ -136,7 +135,7 @@ FlagsWidget::FlagsWidget(MainWindow *main, QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
flags_model = new FlagsModel(&flags, main, this);
|
||||
flags_model = new FlagsModel(&flags, this);
|
||||
flags_proxy_model = new FlagsSortFilterProxyModel(flags_model, this);
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(const QString &)), flags_proxy_model, SLOT(setFilterWildcard(const QString &)));
|
||||
ui->flagsTreeView->setModel(flags_proxy_model);
|
||||
|
@ -18,14 +18,13 @@ class FlagsModel: public QAbstractListModel
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
MainWindow *main;
|
||||
QList<FlagDescription> *flags;
|
||||
|
||||
public:
|
||||
enum Columns { OFFSET = 0, SIZE, NAME, COUNT };
|
||||
static const int FlagDescriptionRole = Qt::UserRole;
|
||||
|
||||
FlagsModel(QList<FlagDescription> *flags, MainWindow *main, QObject *parent = 0);
|
||||
FlagsModel(QList<FlagDescription> *flags, QObject *parent = 0);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
|
Loading…
Reference in New Issue
Block a user