summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-02 06:50:55 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-02 06:51:52 (GMT)
commite6e148ac2ab7094b42a01f9a18537446bc1f3014 (patch)
tree79b15d63eed21bc2c5de64d52f6d9002a763f3ad
parent1a11520817ffeebbfc6c482eff1a5c5a019a9d81 (diff)
use override keyword consistently
If one reimplemented method is marked with override, the other reimplemented methods should be marked with override as well, otherwise clang complains.
-rw-r--r--src/lib/marble/GeoDataTreeModel.h19
-rw-r--r--src/lib/marble/PlacemarkPositionProviderPlugin.h36
-rw-r--r--src/lib/marble/RouteSimulationPositionProviderPlugin.h32
-rw-r--r--src/lib/marble/graphicsview/BillboardGraphicsItem.cpp2
-rw-r--r--src/lib/marble/graphicsview/ScreenGraphicsItem_p.h2
5 files changed, 45 insertions, 46 deletions
diff --git a/src/lib/marble/GeoDataTreeModel.h b/src/lib/marble/GeoDataTreeModel.h
index b7a9ee5..ae4db80 100644
--- a/src/lib/marble/GeoDataTreeModel.h
+++ b/src/lib/marble/GeoDataTreeModel.h
@@ -48,32 +48,31 @@ class MARBLE_EXPORT GeoDataTreeModel : public QAbstractItemModel
*/
~GeoDataTreeModel();
- virtual bool hasChildren( const QModelIndex &parent ) const;
+ virtual bool hasChildren(const QModelIndex &parent) const override;
/**
* Return the number of Items in the Model.
*/
- int rowCount( const QModelIndex &parent = QModelIndex() ) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const;
+ int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
- QVariant data( const QModelIndex &index, int role ) const;
+ QVariant data(const QModelIndex &index, int role) const override;
- QModelIndex index( int row, int column,
- const QModelIndex &parent = QModelIndex() ) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index( GeoDataObject *object ) const;
- QModelIndex parent( const QModelIndex &index ) const;
+ QModelIndex parent(const QModelIndex &index) const override;
- int columnCount( const QModelIndex &parent = QModelIndex() ) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
- Qt::ItemFlags flags ( const QModelIndex & index ) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
- bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QItemSelectionModel *selectionModel();
diff --git a/src/lib/marble/PlacemarkPositionProviderPlugin.h b/src/lib/marble/PlacemarkPositionProviderPlugin.h
index 5f38ab7..6f34349 100644
--- a/src/lib/marble/PlacemarkPositionProviderPlugin.h
+++ b/src/lib/marble/PlacemarkPositionProviderPlugin.h
@@ -32,25 +32,25 @@ class PlacemarkPositionProviderPlugin: public PositionProviderPlugin
public:
explicit PlacemarkPositionProviderPlugin( MarbleModel *marbleModel );
- virtual QString name() const;
- virtual QString nameId() const;
- virtual QString guiString() const;
- virtual QString version() const;
- virtual QString description() const;
- virtual QString copyrightYears() const;
+ QString name() const override;
+ QString nameId() const override;
+ QString guiString() const override;
+ QString version() const override;
+ QString description() const override;
+ QString copyrightYears() const override;
QVector<PluginAuthor> pluginAuthors() const override;
- virtual QIcon icon() const;
- virtual void initialize();
- virtual bool isInitialized() const;
-
- virtual PositionProviderPlugin *newInstance() const;
-
- virtual PositionProviderStatus status() const;
- virtual GeoDataCoordinates position() const;
- virtual GeoDataAccuracy accuracy() const;
- virtual qreal speed() const;
- virtual qreal direction() const;
- virtual QDateTime timestamp() const;
+ QIcon icon() const override;
+ void initialize() override;
+ bool isInitialized() const override;
+
+ PositionProviderPlugin *newInstance() const override;
+
+ PositionProviderStatus status() const override;
+ GeoDataCoordinates position() const override;
+ GeoDataAccuracy accuracy() const override;
+ qreal speed() const override;
+ qreal direction() const override;
+ QDateTime timestamp() const override;
private:
MarbleModel *const m_marbleModel;
diff --git a/src/lib/marble/RouteSimulationPositionProviderPlugin.h b/src/lib/marble/RouteSimulationPositionProviderPlugin.h
index c4d1ad1..5540864 100644
--- a/src/lib/marble/RouteSimulationPositionProviderPlugin.h
+++ b/src/lib/marble/RouteSimulationPositionProviderPlugin.h
@@ -35,27 +35,27 @@ public:
virtual ~RouteSimulationPositionProviderPlugin();
// Implementing PluginInterface
- virtual QString name() const;
- virtual QString nameId() const;
- virtual QString guiString() const;
- virtual QString version() const;
- virtual QString description() const;
- virtual QString copyrightYears() const;
+ QString name() const override;
+ QString nameId() const override;
+ QString guiString() const override;
+ QString version() const override;
+ QString description() const override;
+ QString copyrightYears() const override;
QVector<PluginAuthor> pluginAuthors() const override;
- virtual QIcon icon() const;
- virtual void initialize();
- virtual bool isInitialized() const;
- virtual qreal speed() const;
- virtual qreal direction() const;
- virtual QDateTime timestamp() const;
+ QIcon icon() const override;
+ void initialize() override;
+ bool isInitialized() const override;
+ qreal speed() const override;
+ qreal direction() const override;
+ QDateTime timestamp() const override;
// Implementing PositionProviderPlugin
- virtual PositionProviderPlugin * newInstance() const;
+ PositionProviderPlugin * newInstance() const override;
// Implementing PositionProviderPluginInterface
- virtual PositionProviderStatus status() const;
- virtual GeoDataCoordinates position() const;
- virtual GeoDataAccuracy accuracy() const;
+ PositionProviderStatus status() const override;
+ GeoDataCoordinates position() const override;
+ GeoDataAccuracy accuracy() const override;
private Q_SLOTS:
/** Regular (each second) position and status update */
diff --git a/src/lib/marble/graphicsview/BillboardGraphicsItem.cpp b/src/lib/marble/graphicsview/BillboardGraphicsItem.cpp
index c4e7a7c..2752c3a 100644
--- a/src/lib/marble/graphicsview/BillboardGraphicsItem.cpp
+++ b/src/lib/marble/graphicsview/BillboardGraphicsItem.cpp
@@ -40,7 +40,7 @@ class Q_DECL_HIDDEN BillboardGraphicsItem::Private : public MarbleGraphicsItemPr
Qt::Alignment m_alignment;
- void setProjection( const ViewportParams *viewport )
+ void setProjection(const ViewportParams *viewport) override
{
m_positions.clear();
diff --git a/src/lib/marble/graphicsview/ScreenGraphicsItem_p.h b/src/lib/marble/graphicsview/ScreenGraphicsItem_p.h
index 3aaaa3e..62c29e7 100644
--- a/src/lib/marble/graphicsview/ScreenGraphicsItem_p.h
+++ b/src/lib/marble/graphicsview/ScreenGraphicsItem_p.h
@@ -89,7 +89,7 @@ class ScreenGraphicsItemPrivate : public MarbleGraphicsItemPrivate
return absolutePositions;
}
- void setProjection( const ViewportParams *viewport )
+ void setProjection(const ViewportParams *viewport) override
{
// If we have no parent
if( m_parent == 0 ) {