aboutsummaryrefslogtreecommitdiff
path: root/src/qt/recentrequeststablemodel.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-11 13:34:01 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-11 13:34:07 -0400
commiteb2ffbb7c1347115e6a3d6fa30f909959b6170a5 (patch)
tree468939ea19cdfe96d4b82d42cc09a4b647861103 /src/qt/recentrequeststablemodel.h
parentf71a3a8829746cb17fc42c7475cf03229ad6c08e (diff)
parentd044e0ec7d37bbcdf10bbdb903b9119741c7297d (diff)
downloadbitcoin-eb2ffbb7c1347115e6a3d6fa30f909959b6170a5.tar.xz
Merge #18914: refactor: Apply override specifier consistently
d044e0ec7d37bbcdf10bbdb903b9119741c7297d refactor: Remove override for final overriders (Hennadii Stepanov) 1551cea2d52cac403ff506a7cc955d8de8fd6f3e refactor: Use override for non-final overriders (Hennadii Stepanov) Pull request description: Two commits are split out from #16710 to make reviewing [easier](https://github.com/bitcoin/bitcoin/pull/16710#issuecomment-625760894). From [C++ FAQ](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#c128-virtual-functions-should-specify-exactly-one-of-virtual-override-or-final): > C.128: Virtual functions should specify exactly one of virtual, override, or final > **Reason** Readability. Detection of mistakes. Writing explicit `virtual`, `override`, or `final` is self-documenting and enables the compiler to catch mismatch of types and/or names between base and derived classes. However, writing more than one of these three is both redundant and a potential source of errors. ACKs for top commit: practicalswift: ACK d044e0ec7d37bbcdf10bbdb903b9119741c7297d: consistent use of `override` prevents bugs + patch looks correct + Travis happy MarcoFalke: ACK d044e0ec7d37bbcdf10bbdb903b9119741c7297d, based on my understanding that adding `override` or `final` to a function must always be correct, unless it doesn't compile!? vasild: ACK d044e0ec7 Tree-SHA512: 245fd9b99b8b5cbf8694061f892cb3435f3378c97ebed9f9401ce86d21890211f2234bcc39c9f0f79a4d2806cb31bf8ce41a0f9c2acef4f3a2ac5beca6b077cf
Diffstat (limited to 'src/qt/recentrequeststablemodel.h')
-rw-r--r--src/qt/recentrequeststablemodel.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 5e7f6acdc8..addf5ad0ae 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -73,14 +73,15 @@ public:
/** @name Methods overridden from QAbstractTableModel
@{*/
- int rowCount(const QModelIndex &parent) const;
- int columnCount(const QModelIndex &parent) const;
- QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
- QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
- Qt::ItemFlags flags(const QModelIndex &index) const;
+ int rowCount(const QModelIndex &parent) const override;
+ int columnCount(const QModelIndex &parent) const override;
+ QVariant data(const QModelIndex &index, int role) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role) override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
/*@}*/
const RecentRequestEntry &entry(int row) const { return list[row]; }
@@ -89,7 +90,6 @@ public:
void addNewRequest(RecentRequestEntry &recipient);
public Q_SLOTS:
- void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
void updateDisplayUnit();
private: