Merge pull request #6 from lioncash/override

General: Use override where applicable
This commit is contained in:
Phillip Stephens 2019-08-31 16:28:12 -07:00 committed by GitHub
commit 0ef8e11114
6 changed files with 13 additions and 11 deletions

View File

@ -18,7 +18,7 @@ class ArgumentEditor : public QDialog {
QStringListModel m_model; QStringListModel m_model;
public: public:
explicit ArgumentEditor(QWidget* parent = nullptr); explicit ArgumentEditor(QWidget* parent = nullptr);
virtual ~ArgumentEditor(); ~ArgumentEditor() override;
private slots: private slots:
void on_addButton_clicked(); void on_addButton_clicked();

View File

@ -43,9 +43,11 @@ class MainWindow : public QMainWindow {
public: public:
explicit MainWindow(QWidget* parent = nullptr); explicit MainWindow(QWidget* parent = nullptr);
~MainWindow(); ~MainWindow() override;
void setTextTermFormatting(const QString& text); void setTextTermFormatting(const QString& text);
void insertContinueNote(const QString& text); void insertContinueNote(const QString& text);
private slots: private slots:
void onExtract(); void onExtract();
void onExtractFinished(int exitCode, QProcess::ExitStatus); void onExtractFinished(int exitCode, QProcess::ExitStatus);

View File

@ -27,10 +27,10 @@ class SysReqTableModel : public QAbstractTableModel {
public: public:
SysReqTableModel(QObject* parent = Q_NULLPTR); SysReqTableModel(QObject* parent = Q_NULLPTR);
int rowCount(const QModelIndex& parent = QModelIndex()) const; int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
bool isBlenderVersionOk() const { return m_blendMajor > 2 || (m_blendMajor == 2 && m_blendMinor >= 80); } bool isBlenderVersionOk() const { return m_blendMajor > 2 || (m_blendMajor == 2 && m_blendMinor >= 80); }
void updateFreeDiskSpace(const QString& path); void updateFreeDiskSpace(const QString& path);
}; };
@ -43,7 +43,7 @@ class SysReqTableView : public QTableView {
public: public:
SysReqTableView(QWidget* parent = Q_NULLPTR); SysReqTableView(QWidget* parent = Q_NULLPTR);
void paintEvent(QPaintEvent* e) Q_DECL_OVERRIDE; void paintEvent(QPaintEvent* e) override;
const SysReqTableModel& getModel() const { return m_model; } const SysReqTableModel& getModel() const { return m_model; }
const VectorISATableView& getVectorISATable() const { return m_vectorISATable; } const VectorISATableView& getVectorISATable() const { return m_vectorISATable; }
bool willRun(const URDEVersion& v) const { bool willRun(const URDEVersion& v) const {

View File

@ -10,5 +10,5 @@ protected:
public: public:
VectorISATableModel(QObject* parent = Q_NULLPTR) : QAbstractTableModel(parent) {} VectorISATableModel(QObject* parent = Q_NULLPTR) : QAbstractTableModel(parent) {}
int rowCount(const QModelIndex& parent = QModelIndex()) const { return 1; } int rowCount(const QModelIndex& parent = QModelIndex()) const override { return 1; }
}; };

View File

@ -7,9 +7,9 @@ class VectorISATableModelIntel : public VectorISATableModel {
public: public:
VectorISATableModelIntel(QObject* parent = Q_NULLPTR) : VectorISATableModel(parent) {} VectorISATableModelIntel(QObject* parent = Q_NULLPTR) : VectorISATableModel(parent) {}
int columnCount(const QModelIndex& parent = QModelIndex()) const { return 7; } int columnCount(const QModelIndex& parent = QModelIndex()) const override { return 7; }
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const { QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override {
if (role != Qt::DisplayRole && role != Qt::UserRole) if (role != Qt::DisplayRole && role != Qt::UserRole)
return {}; return {};

View File

@ -19,7 +19,7 @@ class VectorISATableView : public QTableView {
public: public:
VectorISATableView(QWidget* parent = Q_NULLPTR); VectorISATableView(QWidget* parent = Q_NULLPTR);
void paintEvent(QPaintEvent* e) Q_DECL_OVERRIDE; void paintEvent(QPaintEvent* e) override;
VectorISA getISA() const { return m_model.getISA(m_maxISA); } VectorISA getISA() const { return m_model.getISA(m_maxISA); }
bool willRun(VectorISA visa) const { return m_model.willRun(visa); } bool willRun(VectorISA visa) const { return m_model.willRun(visa); }
}; };