diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 18d05f43..0e50fa81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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() diff --git a/src/widgets/flagswidget.cpp b/src/widgets/flagswidget.cpp index 78dc3251..ba408bf0 100644 --- a/src/widgets/flagswidget.cpp +++ b/src/widgets/flagswidget.cpp @@ -10,19 +10,18 @@ -FlagsModel::FlagsModel(QList *flags, MainWindow *main, QObject *parent) +FlagsModel::FlagsModel(QList *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); diff --git a/src/widgets/flagswidget.h b/src/widgets/flagswidget.h index 2aac4805..e90544b6 100644 --- a/src/widgets/flagswidget.h +++ b/src/widgets/flagswidget.h @@ -18,14 +18,13 @@ class FlagsModel: public QAbstractListModel Q_OBJECT private: - MainWindow *main; QList *flags; public: enum Columns { OFFSET = 0, SIZE, NAME, COUNT }; static const int FlagDescriptionRole = Qt::UserRole; - FlagsModel(QList *flags, MainWindow *main, QObject *parent = 0); + FlagsModel(QList *flags, QObject *parent = 0); int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const;