Commit 4072eb0c authored by Albert Astals Cid's avatar Albert Astals Cid

Add override

parent b50aff3e
......@@ -142,12 +142,12 @@ class OKULARCORE_EXPORT GotoAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns whether the goto action points to an external document.
......@@ -198,12 +198,12 @@ class OKULARCORE_EXPORT ExecuteAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the file name of the application to execute.
......@@ -242,12 +242,12 @@ class OKULARCORE_EXPORT BrowseAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the url to browse.
......@@ -301,12 +301,12 @@ class OKULARCORE_EXPORT DocumentAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the type of action.
......@@ -343,12 +343,12 @@ class OKULARCORE_EXPORT SoundAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the volume of the sound.
......@@ -403,12 +403,12 @@ class OKULARCORE_EXPORT ScriptAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the type of action.
......@@ -456,12 +456,12 @@ class OKULARCORE_EXPORT MovieAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the operation type.
......@@ -521,12 +521,12 @@ class OKULARCORE_EXPORT RenditionAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
/**
* Returns the action tip.
*/
QString actionTip() const;
QString actionTip() const override;
/**
* Returns the operation type.
......@@ -571,7 +571,7 @@ class OKULARCORE_EXPORT BackendOpaqueAction : public Action
/**
* Returns the action type.
*/
ActionType actionType() const;
ActionType actionType() const override;
private:
Q_DISABLE_COPY( BackendOpaqueAction )
......
......@@ -843,12 +843,12 @@ class OKULARCORE_EXPORT TextAnnotation : public Annotation
/**
* Returns the sub type of the text annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the text annotation as xml in @p document under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( TextAnnotation )
......@@ -1003,12 +1003,12 @@ class OKULARCORE_EXPORT LineAnnotation : public Annotation
/**
* Returns the sub type of the line annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the line annotation as xml in @p document under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( LineAnnotation )
......@@ -1064,13 +1064,13 @@ class OKULARCORE_EXPORT GeomAnnotation : public Annotation
/**
* Returns the sub type of the geometrical annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the geometrical annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( GeomAnnotation )
......@@ -1207,13 +1207,13 @@ class OKULARCORE_EXPORT HighlightAnnotation : public Annotation
/**
* Returns the sub type of the highlight annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the highlight annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( HighlightAnnotation )
......@@ -1251,13 +1251,13 @@ class OKULARCORE_EXPORT StampAnnotation : public Annotation
/**
* Returns the sub type of the stamp annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the stamp annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( StampAnnotation )
......@@ -1301,13 +1301,13 @@ class OKULARCORE_EXPORT InkAnnotation : public Annotation
/**
* Returns the sub type of the ink annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the ink annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( InkAnnotation )
......@@ -1354,13 +1354,13 @@ class OKULARCORE_EXPORT CaretAnnotation : public Annotation
/**
* Returns the sub type of the caret annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the caret annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( CaretAnnotation )
......@@ -1407,13 +1407,13 @@ class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
/**
* Returns the sub type of the file attachment annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the file attachment annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
......@@ -1467,13 +1467,13 @@ class OKULARCORE_EXPORT SoundAnnotation : public Annotation
/**
* Returns the sub type of the sound annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the sound annotation as xml in @p document
* under the given parent @p node.
*/
void store( QDomNode &node, QDomDocument &document ) const;
void store( QDomNode &node, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( SoundAnnotation )
......@@ -1513,12 +1513,12 @@ class OKULARCORE_EXPORT MovieAnnotation : public Annotation
/**
* Returns the sub type of the movie annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the movie annotation as xml in @p document
* under the given @p parentNode.
*/
void store( QDomNode &parentNode, QDomDocument &document ) const;
void store( QDomNode &parentNode, QDomDocument &document ) const override;
private:
Q_DECLARE_PRIVATE( MovieAnnotation )
......@@ -1554,13 +1554,13 @@ class OKULARCORE_EXPORT ScreenAnnotation : public Annotation
/**
* Returns the sub type of the screen annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the screen annotation as xml in @p document
* under the given @p parentNode.
*/
void store( QDomNode &parentNode, QDomDocument &document ) const;
void store( QDomNode &parentNode, QDomDocument &document ) const override;
/**
* Sets the @p action that is executed when the annotation is triggered.
......@@ -1623,13 +1623,13 @@ class OKULARCORE_EXPORT WidgetAnnotation : public Annotation
/**
* Returns the sub type of the widget annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the widget annotation as xml in @p document
* under the given @p parentNode.
*/
void store( QDomNode &parentNode, QDomDocument &document ) const;
void store( QDomNode &parentNode, QDomDocument &document ) const override;
/**
* Sets the additional @p action of the given @p type.
......@@ -1678,13 +1678,13 @@ class OKULARCORE_EXPORT RichMediaAnnotation : public Annotation
/**
* Returns the sub type of the rich media annotation.
*/
SubType subType() const;
SubType subType() const override;
/**
* Stores the rich media annotation as xml in @p document
* under the given @p parentNode.
*/
void store( QDomNode &parentNode, QDomDocument &document ) const;
void store( QDomNode &parentNode, QDomDocument &document ) const override;
/**
* Gets the movie object.
......
......@@ -452,18 +452,18 @@ class OKULARCORE_EXPORT AnnotationObjectRect : public ObjectRect
* Returns the bounding rect of the annotation object rectangle for the
* scaling factor @p xScale and @p yScale.
*/
virtual QRect boundingRect( double xScale, double yScale ) const;
QRect boundingRect( double xScale, double yScale ) const override;
/**
* Returns whether the annotation object rectangle contains the point @p x, @p y for the
* scaling factor @p xScale and @p yScale.
*/
virtual bool contains( double x, double y, double xScale, double yScale ) const;
bool contains( double x, double y, double xScale, double yScale ) const override;
/**
* Transforms the annotation object rectangle with the operations defined by @p matrix.
*/
virtual void transform( const QTransform &matrix );
void transform( const QTransform &matrix ) override;
private:
Annotation * m_annotation;
......@@ -489,13 +489,13 @@ class OKULARCORE_EXPORT SourceRefObjectRect : public ObjectRect
* Returns the bounding rect of the source reference object rectangle for the
* scaling factor @p xScale and @p yScale.
*/
virtual QRect boundingRect( double xScale, double yScale ) const;
QRect boundingRect( double xScale, double yScale ) const override;
/**
* Returns whether the source reference object rectangle contains the point @p x, @p y for the
* scaling factor @p xScale and @p yScale.
*/
virtual bool contains( double x, double y, double xScale, double yScale ) const;
bool contains( double x, double y, double xScale, double yScale ) const override;
private:
NormalizedPoint m_point;
......
......@@ -31,9 +31,9 @@ class AddAnnotationCommand : public QUndoCommand
virtual ~AddAnnotationCommand();
virtual void undo();
void undo() override;
virtual void redo();
void redo() override;
private:
Okular::DocumentPrivate * m_docPriv;
......@@ -47,8 +47,8 @@ class RemoveAnnotationCommand : public QUndoCommand
public:
RemoveAnnotationCommand(Okular::DocumentPrivate * doc, Okular::Annotation* annotation, int pageNumber);
virtual ~RemoveAnnotationCommand();
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
private:
Okular::DocumentPrivate * m_docPriv;
......@@ -65,8 +65,8 @@ class ModifyAnnotationPropertiesCommand : public QUndoCommand
QDomNode oldProperties,
QDomNode newProperties );
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
private:
Okular::DocumentPrivate * m_docPriv;
......@@ -85,10 +85,10 @@ class TranslateAnnotationCommand : public QUndoCommand
const Okular::NormalizedPoint & delta,
bool completeDrag
);
virtual void undo();
virtual void redo();
virtual int id() const;
virtual bool mergeWith(const QUndoCommand *uc);
void undo() override;
void redo() override;
int id() const override;
bool mergeWith(const QUndoCommand *uc) override;
Okular::NormalizedPoint minusDelta();
Okular::NormalizedRect translateBoundingRectangle( const Okular::NormalizedPoint & delta );
......@@ -110,10 +110,10 @@ class EditTextCommand : public QUndoCommand
int prevAnchorPos
);
virtual void undo() = 0;
virtual void redo() = 0;
virtual int id() const = 0;
virtual bool mergeWith(const QUndoCommand *uc);
void undo() override = 0;
void redo() override = 0;
int id() const override = 0;
bool mergeWith(const QUndoCommand *uc) override;
private:
enum EditType {
......@@ -151,10 +151,10 @@ class EditAnnotationContentsCommand : public EditTextCommand
int prevAnchorPos
);
virtual void undo();
virtual void redo();
virtual int id() const;
virtual bool mergeWith(const QUndoCommand *uc);
void undo() override;
void redo() override;
int id() const override;
bool mergeWith(const QUndoCommand *uc) override;
private:
Okular::DocumentPrivate * m_docPriv;
......@@ -173,10 +173,10 @@ class EditFormTextCommand : public EditTextCommand
const QString & prevContents,
int prevCursorPos,
int prevAnchorPos );
virtual void undo();
virtual void redo();
virtual int id() const;
virtual bool mergeWith( const QUndoCommand *uc );
void undo() override;
void redo() override;
int id() const override;
bool mergeWith( const QUndoCommand *uc ) override;
private:
Okular::DocumentPrivate* m_docPriv;
Okular::FormFieldText* m_form;
......@@ -193,8 +193,8 @@ class EditFormListCommand : public QUndoCommand
const QList< int > & prevChoices
);
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
private:
Okular::DocumentPrivate* m_docPriv;
......@@ -217,10 +217,10 @@ class EditFormComboCommand : public EditTextCommand
int prevAnchorPos
);
virtual void undo();
virtual void redo();
virtual int id() const;
virtual bool mergeWith( const QUndoCommand *uc );
void undo() override;
void redo() override;
int id() const override;
bool mergeWith( const QUndoCommand *uc ) override;
private:
Okular::DocumentPrivate* m_docPriv;
......@@ -239,8 +239,8 @@ class EditFormButtonsCommand : public QUndoCommand
const QList< bool > & newButtonStates
);
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
private:
void clearFormButtonStates();
......
......@@ -106,7 +106,7 @@ class PixmapGenerationThread : public QThread
NormalizedRect boundingBox() const;
protected:
virtual void run();
void run() override;
private:
Generator *mGenerator;
......@@ -133,7 +133,7 @@ class TextPageGenerationThread : public QThread
TextPage* textPage() const;
protected:
virtual void run();
void run() override;
private:
Generator *mGenerator;
......@@ -156,7 +156,7 @@ class FontExtractionThread : public QThread
void progress( int page );
protected:
virtual void run();
void run() override;
private:
Generator *mGenerator;
......
......@@ -174,24 +174,24 @@ class OKULARCORE_EXPORT TextDocumentGenerator : public Generator, public Okular:
virtual ~TextDocumentGenerator();
// [INHERITED] load a document and fill up the pagesVector
Document::OpenResult loadDocumentWithPassword( const QString & fileName, QVector<Okular::Page*> & pagesVector, const QString &password );
Document::OpenResult loadDocumentWithPassword( const QString & fileName, QVector<Okular::Page*> & pagesVector, const QString &password ) override;
// [INHERITED] perform actions on document / pages
bool canGeneratePixmap() const;
void generatePixmap( Okular::PixmapRequest * request );
bool canGeneratePixmap() const override;
void generatePixmap( Okular::PixmapRequest * request ) override;
// [INHERITED] print document using already configured QPrinter
bool print( QPrinter& printer );
bool print( QPrinter& printer ) override;
// [INHERITED] text exporting
Okular::ExportFormat::List exportFormats() const;
bool exportTo( const QString &fileName, const Okular::ExportFormat &format );
Okular::ExportFormat::List exportFormats() const override;
bool exportTo( const QString &fileName, const Okular::ExportFormat &format ) override;
// [INHERITED] config interface
/// By default checks if the default font has changed or not
bool reparseConfig();
bool reparseConfig() override;
/// Does nothing by default. You need to reimplement it in your generator
void addPages( KConfigDialog* dlg );
void addPages( KConfigDialog* dlg ) override;
/**
* Config skeleton for TextDocumentSettingsWidget
......@@ -203,12 +203,12 @@ class OKULARCORE_EXPORT TextDocumentGenerator : public Generator, public Okular:
*/
TextDocumentSettings* generalSettings();
Okular::DocumentInfo generateDocumentInfo( const QSet<DocumentInfo::Key> &keys ) const;
const Okular::DocumentSynopsis* generateDocumentSynopsis();
Okular::DocumentInfo generateDocumentInfo( const QSet<DocumentInfo::Key> &keys ) const override;
const Okular::DocumentSynopsis* generateDocumentSynopsis() override;
protected:
bool doCloseDocument();
Okular::TextPage* textPage( Okular::Page *page );
bool doCloseDocument() override;
Okular::TextPage* textPage( Okular::Page *page ) override;
private:
Q_DECLARE_PRIVATE( TextDocumentGenerator )
......
......@@ -130,8 +130,8 @@ class TextDocumentGeneratorPrivate : public GeneratorPrivate
Q_DECLARE_PUBLIC( TextDocumentGenerator )
/* reimp */ QVariant metaData( const QString &key, const QVariant &option ) const;
/* reimp */ QImage image( PixmapRequest * );
/* reimp */ QVariant metaData( const QString &key, const QVariant &option ) const override;
/* reimp */ QImage image( PixmapRequest * ) override;
void calculateBoundingRect( int startPosition, int endPosition, QRectF &rect, int &page ) const;
void calculatePositions( int page, int &start, int &end ) const;
......
......@@ -42,11 +42,11 @@ class OkularLiveConnectExtension : public KParts::LiveConnectExtension
OkularLiveConnectExtension( Part *parent );
// from LiveConnectExtension
virtual bool get( const unsigned long objid, const QString &field, Type &type,
unsigned long &retobjid, QString &value );
virtual bool put( const unsigned long objid, const QString &field, const QString &value );
virtual bool call( const unsigned long objid, const QString &func, const QStringList &args,
Type &type, unsigned long &retobjid, QString &value );
bool get( const unsigned long objid, const QString &field, Type &type,
unsigned long &retobjid, QString &value ) override;
bool put( const unsigned long objid, const QString &field, const QString &value ) override;
bool call( const unsigned long objid, const QString &func, const QStringList &args,
Type &type, unsigned long &retobjid, QString &value ) override;
private:
QString eval( const QString &script );
......
......@@ -37,9 +37,9 @@ public:
ProtocolMSITS ( const QByteArray&, const QByteArray& );
virtual ~ProtocolMSITS();
virtual void get (const QUrl & );
virtual void listDir (const QUrl & url);
virtual void stat (const QUrl & url);
void get (const QUrl & ) override;
void listDir (const QUrl & url) override;
void stat (const QUrl & url) override;
private:
// This function does next thing:
......
......@@ -92,7 +92,7 @@ class KDjVu
friend class KDjVu;
public:
virtual int type() const;
int type() const override;
QString page() const;
private:
......@@ -108,7 +108,7 @@ class KDjVu
friend class KDjVu;
public:
virtual int type() const;
int type() const override;
QString url() const;
private:
......@@ -150,9 +150,9 @@ class KDjVu
friend class KDjVu;
public:
virtual int type() const;
virtual QColor color() const;
virtual void setColor( const QColor &color );
int type() const override;
QColor color() const override;
void setColor( const QColor &color ) override;
QSize size() const;
bool inlineText() const;
......@@ -170,9 +170,9 @@ class KDjVu
friend class KDjVu;
public:
virtual int type() const;
virtual QColor color() const;
virtual void setColor( const QColor &color );
int type() const override;
QColor color() const override;
void setColor( const QColor &color ) override;
QPoint point2() const;
bool isArrow() const;
int width() const;
......
......@@ -26,7 +26,7 @@ class TeXFont_PFB : public TeXFont {
TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc=0, double slant=0.0 );
~TeXFont_PFB();
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) override;
private:
FT_Face face;
......
......@@ -13,7 +13,7 @@ class TeXFont_PK : public TeXFont {
TeXFont_PK(TeXFontDefinition *parent);
~TeXFont_PK();
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) override;
private:
// open font file or NULL
......
......@@ -26,7 +26,7 @@ class TeXFont_TFM : public TeXFont {
TeXFont_TFM(TeXFontDefinition *parent);
~TeXFont_TFM();
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
glyph* getGlyph(quint16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) override;
private:
fix_word characterWidth_in_units_of_design_size[256];
......
......@@ -128,8 +128,8 @@ public:
QPrinter::Orientation orientation = QPrinter::Portrait);
private:
virtual void abort_process_impl();
virtual void finished_impl(int exit_code);
void abort_process_impl() override;
void finished_impl(int exit_code) override;
QPrinter* printer_;
QString output_name_;
......
......@@ -29,25 +29,25 @@ class DviGenerator : public Okular::Generator
Q_INTERFACES( Okular::Generator )
public:
DviGenerator( QObject *parent, const QVariantList &args );
bool loadDocument( const QString & fileName, QVector< Okular::Page * > & pagesVector );
bool loadDocument( const QString & fileName, QVector< Okular::Page * > & pagesVector ) override;
// document information
Okular::DocumentInfo generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const;
Okular::DocumentInfo generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const override;
// table of contents
const Okular::DocumentSynopsis *generateDocumentSynopsis();
const Okular::DocumentSynopsis *generateDocumentSynopsis() override;
// list of fonts
Okular::FontInfo::List fontsForPage( int page );
Okular::FontInfo::List fontsForPage( int page ) override;
bool print( QPrinter &printer );
bool print( QPrinter &printer ) override;