Commit 31cd0834 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent d6c0b63e
......@@ -36,10 +36,10 @@ class BookmarkOwner : public QObject, public KBookmarkOwner
BookmarkOwner( View *view, QObject *parent = 0 );
virtual ~BookmarkOwner();
virtual QString currentTitle() const;
virtual QUrl currentUrl() const;
virtual bool enableOption( BookmarkOption option ) const;
virtual void openBookmark( const KBookmark& bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km );
QString currentTitle() const Q_DECL_OVERRIDE;
QUrl currentUrl() const Q_DECL_OVERRIDE;
bool enableOption( BookmarkOption option ) const Q_DECL_OVERRIDE;
void openBookmark( const KBookmark& bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km ) Q_DECL_OVERRIDE;
Q_SIGNALS:
void openUrl( const QUrl& url );
......
......@@ -95,7 +95,7 @@ namespace KHC {
void treeItemSelected( QTreeWidgetItem *item );
protected:
virtual void showEvent(QShowEvent *event);
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
private:
enum CacheStatus { NeedRebuild, CacheOk };
......
......@@ -44,12 +44,12 @@ class PlainOutputStream : public Grantlee::OutputStream
{
}
virtual QString escape( const QString& input ) const
QString escape( const QString& input ) const Q_DECL_OVERRIDE
{
return input;
}
virtual QSharedPointer<OutputStream> clone( QTextStream *stream ) const
QSharedPointer<OutputStream> clone( QTextStream *stream ) const Q_DECL_OVERRIDE
{
return QSharedPointer<OutputStream>( new PlainOutputStream( stream ) );
}
......
......@@ -39,7 +39,7 @@ class InfoCategoryItem : public NavigatorItem
public:
InfoCategoryItem( NavigatorItem *parent, const QString &text );
virtual void itemExpanded( bool open );
void itemExpanded( bool open ) Q_DECL_OVERRIDE;
};
class InfoNodeItem : public NavigatorItem
......
......@@ -31,7 +31,7 @@ namespace KHC
public:
InfoTree( QObject *parent );
virtual void build( NavigatorItem *parentItem );
void build( NavigatorItem *parentItem ) Q_DECL_OVERRIDE;
private:
void parseInfoDirFile( const QString &fileName );
......
......@@ -65,8 +65,8 @@ class MainWindow : public KXmlGuiWindow
const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments() );
virtual void saveProperties( KConfigGroup &config );
virtual void readProperties( const KConfigGroup &config );
void saveProperties( KConfigGroup &config ) Q_DECL_OVERRIDE;
void readProperties( const KConfigGroup &config ) Q_DECL_OVERRIDE;
void readConfig();
void writeConfig();
......
......@@ -42,7 +42,7 @@ class NavigatorAppGroupItem : public NavigatorItem
void setRelpath( const QString & );
virtual void itemExpanded(bool);
void itemExpanded(bool) Q_DECL_OVERRIDE;
void populate( bool recursive = false );
protected:
......
......@@ -39,7 +39,7 @@ class NavigatorAppItem : public NavigatorItem
~NavigatorAppItem();
virtual void itemExpanded( bool open );
void itemExpanded( bool open ) Q_DECL_OVERRIDE;
private:
void scheduleTOCBuild();
......
......@@ -21,7 +21,7 @@
#define KHC_PLUGINTRAVERSER_H
#include "docentrytraverser.h"
#include <QtGlobal>
class QTreeWidget;
namespace KHC {
......@@ -35,9 +35,9 @@ namespace KHC {
PluginTraverser( Navigator *navigator, QTreeWidget *parent );
PluginTraverser( Navigator *navigator, NavigatorItem *parent );
virtual void process( DocEntry *entry );
void process( DocEntry *entry ) Q_DECL_OVERRIDE;
virtual DocEntryTraverser *createChild( DocEntry *entry );
DocEntryTraverser *createChild( DocEntry *entry ) Q_DECL_OVERRIDE;
private:
QTreeWidget *mListView;
......
......@@ -23,17 +23,17 @@ class SearchTraverser : public QObject, public DocEntryTraverser
SearchTraverser( SearchEngine *engine, int level );
~SearchTraverser();
void process( DocEntry * );
void process( DocEntry * ) Q_DECL_OVERRIDE;
void startProcess( DocEntry * );
void startProcess( DocEntry * ) Q_DECL_OVERRIDE;
DocEntryTraverser *createChild( DocEntry * );
DocEntryTraverser *createChild( DocEntry * ) Q_DECL_OVERRIDE;
DocEntryTraverser *parentTraverser();
DocEntryTraverser *parentTraverser() Q_DECL_OVERRIDE;
void deleteTraverser();
void deleteTraverser() Q_DECL_OVERRIDE;
void finishTraversal();
void finishTraversal() Q_DECL_OVERRIDE;
void setWords( const QString &words );
......
......@@ -101,11 +101,11 @@ namespace KHC {
void search( DocEntry *, const QStringList &words,
int maxResults = 10,
SearchEngine::Operation operation = SearchEngine::And );
SearchEngine::Operation operation = SearchEngine::And ) Q_DECL_OVERRIDE;
QString indexCommand( const QString &identifier ) const;
QString indexCommand( const QString &identifier ) const Q_DECL_OVERRIDE;
bool checkPaths(QString* error) const;
bool checkPaths(QString* error) const Q_DECL_OVERRIDE;
private:
bool checkBinary( const QString &cmd ) const;
......
......@@ -251,7 +251,7 @@ class ScopeTraverser : public DocEntryTraverser
if( mParentItem->type() == TemporaryItem && !mParentItem->childCount() ) delete mParentItem;
}
void process( DocEntry *entry )
void process( DocEntry *entry ) Q_DECL_OVERRIDE
{
if ( mEngine->canSearch( entry ) ) {
ScopeItem *item = new ScopeItem( mParentItem, entry );
......@@ -260,7 +260,7 @@ class ScopeTraverser : public DocEntryTraverser
}
}
DocEntryTraverser *createChild( DocEntry *entry )
DocEntryTraverser *createChild( DocEntry *entry ) Q_DECL_OVERRIDE
{
if ( mLevel >= MaxNestingLevel ) {
++mLevel;
......@@ -276,13 +276,13 @@ class ScopeTraverser : public DocEntryTraverser
}
}
DocEntryTraverser *parentTraverser()
DocEntryTraverser *parentTraverser() Q_DECL_OVERRIDE
{
if ( mLevel > MaxNestingLevel ) return this;
else return mParent;
}
void deleteTraverser()
void deleteTraverser() Q_DECL_OVERRIDE
{
if ( mLevel > MaxNestingLevel ) --mLevel;
else delete this;
......
......@@ -11,7 +11,7 @@ class MyTraverser : public DocEntryTraverser
public:
MyTraverser( const QByteArray &indent = "" ) : mIndent( indent ) {}
void process( DocEntry *entry )
void process( DocEntry *entry ) Q_DECL_OVERRIDE
{
qDebug() << mIndent.constData() << entry->name() << " - WEIGHT: " << entry->weight();
#if 0
......@@ -22,7 +22,7 @@ class MyTraverser : public DocEntryTraverser
#endif
}
DocEntryTraverser *createChild( DocEntry * )
DocEntryTraverser *createChild( DocEntry * ) Q_DECL_OVERRIDE
{
return new MyTraverser( mIndent + " " );
}
......@@ -34,22 +34,22 @@ class MyTraverser : public DocEntryTraverser
class LinearTraverser : public DocEntryTraverser
{
public:
void process( DocEntry *entry )
void process( DocEntry *entry ) Q_DECL_OVERRIDE
{
qDebug() << "PROCESS: " << entry->name();
}
DocEntryTraverser *createChild( DocEntry * )
DocEntryTraverser *createChild( DocEntry * ) Q_DECL_OVERRIDE
{
return this;
}
DocEntryTraverser *parentTraverser()
DocEntryTraverser *parentTraverser() Q_DECL_OVERRIDE
{
return this;
}
void deleteTraverser() {}
void deleteTraverser() Q_DECL_OVERRIDE {}
};
class AsyncTraverser : public DocEntryTraverser
......@@ -65,12 +65,12 @@ class AsyncTraverser : public DocEntryTraverser
// qDebug() << "~AsyncTraverser()";
}
void process( DocEntry *entry )
void process( DocEntry *entry ) Q_DECL_OVERRIDE
{
qDebug() << mIndent.constData() << entry->name();
}
DocEntryTraverser *createChild( DocEntry * )
DocEntryTraverser *createChild( DocEntry * ) Q_DECL_OVERRIDE
{
// qDebug() << "AsyncTraverser::childTraverser()";
return new AsyncTraverser( mIndent + " " );
......
......@@ -24,10 +24,10 @@ class View : public KHTMLPart
~View();
virtual bool openUrl( const QUrl &url );
bool openUrl( const QUrl &url ) Q_DECL_OVERRIDE;
virtual void saveState( QDataStream &stream );
virtual void restoreState( QDataStream &stream );
void saveState( QDataStream &stream ) Q_DECL_OVERRIDE;
void restoreState( QDataStream &stream ) Q_DECL_OVERRIDE;
enum State { Docu, About, Search };
......@@ -62,7 +62,7 @@ class View : public KHTMLPart
void searchResultCacheAvailable();
protected:
bool eventFilter( QObject *o, QEvent *e );
bool eventFilter( QObject *o, QEvent *e ) Q_DECL_OVERRIDE;
private Q_SLOTS:
void setTitle( const QString &title );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment