From a8c13a9e1dd58e2a13e98a8b966bedc41cea1ffd Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Tue, 4 Aug 2015 15:07:22 +0200 Subject: [PATCH] Add Q_DECL_OVERRIDE --- ui/annotationmodel.h | 14 +++++++------- ui/annotationproxymodels.h | 2 +- ui/annotationtools.h | 4 ++-- ui/annotwindow.h | 4 ++-- ui/embeddedfilesdialog.h | 2 +- ui/fileprinterpreview.h | 4 ++-- ui/magnifierview.h | 8 ++++---- ui/pageitemdelegate.h | 4 ++-- ui/pagesizelabel.h | 2 +- ui/presentationwidget.h | 10 +++++----- ui/propertiesdialog.h | 8 ++++---- ui/side_reviews.h | 2 +- ui/sidebar.h | 4 ++-- ui/thumbnaillist.h | 18 +++++++++--------- ui/toc.h | 4 ++-- ui/tocmodel.h | 14 +++++++------- 16 files changed, 52 insertions(+), 52 deletions(-) diff --git a/ui/annotationmodel.h b/ui/annotationmodel.h index 23052abc1..331393101 100644 --- a/ui/annotationmodel.h +++ b/ui/annotationmodel.h @@ -33,13 +33,13 @@ class AnnotationModel : public QAbstractItemModel virtual ~AnnotationModel(); // reimplementations from QAbstractItemModel - virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; - virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const; - virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const; - virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; - virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; - virtual QModelIndex parent( const QModelIndex &index ) const; - virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const; + int columnCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + bool hasChildren( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE; + int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; bool isAnnotation( const QModelIndex &index ) const; Okular::Annotation* annotationForIndex( const QModelIndex &index ) const; diff --git a/ui/annotationproxymodels.h b/ui/annotationproxymodels.h index ed7bd4b1e..b9896a0f3 100644 --- a/ui/annotationproxymodels.h +++ b/ui/annotationproxymodels.h @@ -32,7 +32,7 @@ class PageFilterProxyModel : public QSortFilterProxyModel /** * Reimplemented from QSortFilterProxy. */ - virtual bool filterAcceptsRow( int, const QModelIndex& ) const; + bool filterAcceptsRow( int, const QModelIndex& ) const Q_DECL_OVERRIDE; public Q_SLOTS: /** diff --git a/ui/annotationtools.h b/ui/annotationtools.h index dc36dc7c0..cd1b38079 100644 --- a/ui/annotationtools.h +++ b/ui/annotationtools.h @@ -87,9 +87,9 @@ class SmoothPathEngine public: SmoothPathEngine( const QDomElement & engineElement ); - QRect event( EventType type, Button button, double nX, double nY, double xScale, double yScale, const Okular::Page * /*page*/ ); + QRect event( EventType type, Button button, double nX, double nY, double xScale, double yScale, const Okular::Page * /*page*/ ) Q_DECL_OVERRIDE; - void paint( QPainter * painter, double xScale, double yScale, const QRect & /*clipRect*/ ); + void paint( QPainter * painter, double xScale, double yScale, const QRect & /*clipRect*/ ) Q_DECL_OVERRIDE; // These are two alternative ways to get the resulting path. Don't call them both! QList< Okular::Annotation* > end(); diff --git a/ui/annotwindow.h b/ui/annotwindow.h index 579f3d335..aa2bafae3 100644 --- a/ui/annotwindow.h +++ b/ui/annotwindow.h @@ -48,8 +48,8 @@ class AnnotWindow : public QFrame int m_prevAnchorPos; protected: - virtual void showEvent( QShowEvent * event ); - virtual bool eventFilter( QObject * obj, QEvent * event ); + void showEvent( QShowEvent * event ) Q_DECL_OVERRIDE; + bool eventFilter( QObject * obj, QEvent * event ) Q_DECL_OVERRIDE; private slots: void slotUpdateUndoAndRedoInContextMenu(QMenu *menu); diff --git a/ui/embeddedfilesdialog.h b/ui/embeddedfilesdialog.h index 1e0dbe04c..f0d616d25 100644 --- a/ui/embeddedfilesdialog.h +++ b/ui/embeddedfilesdialog.h @@ -34,7 +34,7 @@ Q_OBJECT void saveFile( Okular::EmbeddedFile* ); QTreeWidget *m_tw; - QPushButton *mUser1Button; + QPushButton *mUser1Button; }; #endif diff --git a/ui/fileprinterpreview.h b/ui/fileprinterpreview.h index 5ea5c609c..539d6123e 100644 --- a/ui/fileprinterpreview.h +++ b/ui/fileprinterpreview.h @@ -35,10 +35,10 @@ public: explicit FilePrinterPreview( const QString &filename, QWidget *parent = 0 ); virtual ~FilePrinterPreview(); - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; protected: - void showEvent( QShowEvent *event ); + void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE; private: FilePrinterPreviewPrivate * const d; diff --git a/ui/magnifierview.h b/ui/magnifierview.h index a38c44e76..49fb0aca0 100644 --- a/ui/magnifierview.h +++ b/ui/magnifierview.h @@ -32,10 +32,10 @@ class MagnifierView : public QWidget, public Okular::DocumentObserver MagnifierView( Okular::Document *document, QWidget *parent = 0 ); ~MagnifierView(); - void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ); - void notifyPageChanged( int page, int flags ); - void notifyCurrentPageChanged( int previous, int current ); - bool canUnloadPixmap( int page ) const; + void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) Q_DECL_OVERRIDE; + void notifyPageChanged( int page, int flags ) Q_DECL_OVERRIDE; + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; + bool canUnloadPixmap( int page ) const Q_DECL_OVERRIDE; void updateView( const Okular::NormalizedPoint &p, const Okular::Page * page ); void move( int x, int y ); diff --git a/ui/pageitemdelegate.h b/ui/pageitemdelegate.h index 0b425d00b..86d30890b 100644 --- a/ui/pageitemdelegate.h +++ b/ui/pageitemdelegate.h @@ -23,10 +23,10 @@ class PageItemDelegate : public QItemDelegate static const int PageRole = 0x000f0001; static const int PageLabelRole = 0x000f0002; - virtual void paint( QPainter *painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; + void paint( QPainter *painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE; protected: - virtual void drawDisplay( QPainter *painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const; + void drawDisplay( QPainter *painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const Q_DECL_OVERRIDE; private: class Private; diff --git a/ui/pagesizelabel.h b/ui/pagesizelabel.h index 3c1ec8b1d..9351f2cf8 100644 --- a/ui/pagesizelabel.h +++ b/ui/pagesizelabel.h @@ -30,7 +30,7 @@ class PageSizeLabel : public KSqueezedTextLabel, public Okular::DocumentObserver ~PageSizeLabel(); // [INHERITED] from DocumentObserver - void notifyCurrentPageChanged( int previous, int current ); + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; private: Okular::Document * m_document; diff --git a/ui/presentationwidget.h b/ui/presentationwidget.h index fd9d462a4..ffa4b471a 100644 --- a/ui/presentationwidget.h +++ b/ui/presentationwidget.h @@ -49,11 +49,11 @@ class PresentationWidget : public QWidget, public Okular::DocumentObserver ~PresentationWidget(); // inherited from DocumentObserver - void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ); - void notifyViewportChanged( bool smoothMove ); - void notifyPageChanged( int pageNumber, int changedFlags ); - bool canUnloadPixmap( int pageNumber ) const; - void notifyCurrentPageChanged( int previous, int current ); + void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) Q_DECL_OVERRIDE; + void notifyViewportChanged( bool smoothMove ) Q_DECL_OVERRIDE; + void notifyPageChanged( int pageNumber, int changedFlags ) Q_DECL_OVERRIDE; + bool canUnloadPixmap( int pageNumber ) const Q_DECL_OVERRIDE; + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; public slots: void slotFind(); diff --git a/ui/propertiesdialog.h b/ui/propertiesdialog.h index d63de7b4f..eecb80b6b 100644 --- a/ui/propertiesdialog.h +++ b/ui/propertiesdialog.h @@ -60,10 +60,10 @@ class FontsListModel virtual ~FontsListModel(); // reimplementations from QAbstractTableModel - virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; - virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const; - virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; - virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const; + int columnCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; public slots: void addFont( const Okular::FontInfo &fi ); diff --git a/ui/side_reviews.h b/ui/side_reviews.h index 49c02e7ed..3ccc2011c 100644 --- a/ui/side_reviews.h +++ b/ui/side_reviews.h @@ -41,7 +41,7 @@ class Reviews : public QWidget, public Okular::DocumentObserver ~Reviews(); // [INHERITED] from DocumentObserver - void notifyCurrentPageChanged( int previous, int current ); + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; void reparseConfig(); diff --git a/ui/sidebar.h b/ui/sidebar.h index 6b38fa37d..135b6e80b 100644 --- a/ui/sidebar.h +++ b/ui/sidebar.h @@ -47,8 +47,8 @@ class Sidebar : public QWidget void urlsDropped( const QList& urls ); protected: - void dragEnterEvent( QDragEnterEvent* event ); - void dropEvent( QDropEvent* event ); + void dragEnterEvent( QDragEnterEvent* event ) Q_DECL_OVERRIDE; + void dropEvent( QDropEvent* event ) Q_DECL_OVERRIDE; private slots: void itemClicked( QListWidgetItem *item ); diff --git a/ui/thumbnaillist.h b/ui/thumbnaillist.h index c37044bc5..d541adf47 100644 --- a/ui/thumbnaillist.h +++ b/ui/thumbnaillist.h @@ -35,17 +35,17 @@ Q_OBJECT ~ThumbnailList(); // inherited: create thumbnails ( inherited as a DocumentObserver ) - void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ); + void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) Q_DECL_OVERRIDE; // inherited: hilihght current thumbnail ( inherited as DocumentObserver ) - void notifyCurrentPageChanged( int previous, int current ); + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; // inherited: redraw thumbnail ( inherited as DocumentObserver ) - void notifyPageChanged( int pageNumber, int changedFlags ); + void notifyPageChanged( int pageNumber, int changedFlags ) Q_DECL_OVERRIDE; // inherited: request all visible pixmap (due to a global shange or so..) - void notifyContentsCleared( int changedFlags ); + void notifyContentsCleared( int changedFlags ) Q_DECL_OVERRIDE; // inherited: the visible areas of the page have changed - void notifyVisibleRectsChanged(); + void notifyVisibleRectsChanged() Q_DECL_OVERRIDE; // inherited: tell if pixmap is hidden and can be unloaded - bool canUnloadPixmap( int pageNumber ) const; + bool canUnloadPixmap( int pageNumber ) const Q_DECL_OVERRIDE; // redraw visible widgets (useful for refreshing contents...) void updateWidgets(); @@ -56,10 +56,10 @@ Q_OBJECT protected: // scroll up/down the view - void keyPressEvent( QKeyEvent * e ); + void keyPressEvent( QKeyEvent * e ) Q_DECL_OVERRIDE; // catch the viewport event and filter them if necessary - bool viewportEvent( QEvent * ); + bool viewportEvent( QEvent * ) Q_DECL_OVERRIDE; signals: void rightClick( const Okular::Page *, const QPoint & ); @@ -79,7 +79,7 @@ class ThumbnailsBox : public QWidget { public: ThumbnailsBox( QWidget * parent ) : QWidget( parent ) { QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0);} - QSize sizeHint() const { return QSize(); } + QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(); } }; /** diff --git a/ui/toc.h b/ui/toc.h index 588a21f0b..05f5168c4 100644 --- a/ui/toc.h +++ b/ui/toc.h @@ -37,8 +37,8 @@ Q_OBJECT ~TOC(); // inherited from DocumentObserver - void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ); - void notifyCurrentPageChanged( int previous, int current ); + void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) Q_DECL_OVERRIDE; + void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE; void reparseConfig(); diff --git a/ui/tocmodel.h b/ui/tocmodel.h index 0ef175ce9..8bc14f645 100644 --- a/ui/tocmodel.h +++ b/ui/tocmodel.h @@ -30,13 +30,13 @@ class TOCModel : public QAbstractItemModel virtual ~TOCModel(); // reimplementations from QAbstractItemModel - virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; - virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const; - virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const; - virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; - virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; - virtual QModelIndex parent( const QModelIndex &index ) const; - virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const; + int columnCount( const QModelIndex &parent = QModelIndex() ) const; + QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + bool hasChildren( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; + QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE; + int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE; void fill( const Okular::DocumentSynopsis *toc ); void clear();