Commit 952f8c2a authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Add Q_DECL_OVERRIDE

parent 177caa5a
......@@ -58,10 +58,10 @@ private slots:
void slotProtocolListDoubleClicked();
protected slots:
virtual void back();
virtual void next();
virtual void accept();
virtual void reject();
void back() Q_DECL_OVERRIDE;
void next() Q_DECL_OVERRIDE;
void accept() Q_DECL_OVERRIDE;
void reject() Q_DECL_OVERRIDE;
private:
class Private;
......
......@@ -46,7 +46,7 @@ public:
virtual QString attributes( int offset, int* startOffset, int* endOffset );
virtual int childCount() const;
int childCount() const Q_DECL_OVERRIDE;
//DEPRECATED: virtual int navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface** target) const;
virtual void selection( int selectionIndex, int* startOffset, int* endOffset );
......
......@@ -24,7 +24,7 @@
class ChatWindowAccessibleWidgetFactory: public QAccessiblePlugin {
public:
ChatWindowAccessibleWidgetFactory( QObject *parent = nullptr );
virtual QAccessibleInterface *create( const QString &key, QObject *object );
QAccessibleInterface *create( const QString &key, QObject *object ) Q_DECL_OVERRIDE;
virtual QStringList keys() const;
};
......
......@@ -208,7 +208,7 @@ private slots:
void saveVoiceClip( uint messageId );
protected:
virtual void khtmlDrawContentsEvent( khtml::DrawContentsEvent * );
void khtmlDrawContentsEvent( khtml::DrawContentsEvent * ) Q_DECL_OVERRIDE;
private:
void readOverrides();
......@@ -308,7 +308,7 @@ class HTMLEventListener: public QObject, public DOM::EventListener
{
Q_OBJECT
public:
virtual void handleEvent( DOM::Event &event );
void handleEvent( DOM::Event &event ) Q_DECL_OVERRIDE;
Q_SIGNALS:
void resendMessage( uint messageId );
void playVoiceClip( uint messageId );
......
......@@ -96,7 +96,7 @@ public:
/**
* @brief Disable file open, because it's not used by this part.
*/
virtual bool openFile() {
bool openFile() Q_DECL_OVERRIDE {
return false;
}
......
......@@ -102,7 +102,7 @@ public:
*
* Reimplemented from KopeteView
*/
virtual void clear();
void clear() Q_DECL_OVERRIDE;
/**
* Sets the text to be displayed on tab label and window caption
......@@ -121,7 +121,7 @@ public:
*
* Reimplemented from KopeteView
*/
virtual Kopete::Message currentMessage();
Kopete::Message currentMessage() Q_DECL_OVERRIDE;
/**
* Sets the current message in the chat window
......@@ -129,7 +129,7 @@ public:
*
* Reimplemented from KopeteView
*/
virtual void setCurrentMessage( const Kopete::Message &newMessage );
void setCurrentMessage( const Kopete::Message &newMessage ) Q_DECL_OVERRIDE;
/**
* Returns the chat window this view is in
......@@ -144,16 +144,16 @@ public:
bool sendInProgress() const;
/** Reimplemented from KopeteView **/
virtual void raise( bool activate=false );
void raise( bool activate=false ) Q_DECL_OVERRIDE;
/** Reimplemented from KopeteView **/
virtual void makeVisible();
void makeVisible() Q_DECL_OVERRIDE;
/** Reimplemented from KopeteView **/
virtual bool isVisible();
bool isVisible() Q_DECL_OVERRIDE;
/** Reimplemented from KopeteView **/
virtual QWidget *mainWidget();
QWidget *mainWidget() Q_DECL_OVERRIDE;
KTextEdit *editWidget();
......@@ -161,10 +161,10 @@ public:
bool canSendFile() const;
/** Reimplemented from KopeteView **/
virtual void registerContextMenuHandler( QObject *target, const char* slot );
void registerContextMenuHandler( QObject *target, const char* slot ) Q_DECL_OVERRIDE;
/** Reimplemented from KopeteView **/
virtual void registerTooltipHandler( QObject *target, const char* slot );
void registerTooltipHandler( QObject *target, const char* slot ) Q_DECL_OVERRIDE;
public slots:
/**
......@@ -200,7 +200,7 @@ public slots:
* Called when a message is received from someone
* @param message The message received
*/
virtual void appendMessage( Kopete::Message &message );
void appendMessage( Kopete::Message &message ) Q_DECL_OVERRIDE;
/**
* Send file (opens file dialog)
......@@ -228,11 +228,11 @@ public slots:
void slotRecalculateSize(int difference);
/** Reimplemented from KopeteView **/
virtual void messageSentSuccessfully();
void messageSentSuccessfully() Q_DECL_OVERRIDE;
virtual bool closeView( bool force = false );
bool closeView( bool force = false ) Q_DECL_OVERRIDE;
virtual void dropEvent ( QDropEvent * );
void dropEvent ( QDropEvent * ) Q_DECL_OVERRIDE;
bool isDragEventAccepted( const QDragMoveEvent * ) const;
/** Retrieves the tab state. */
......@@ -339,8 +339,8 @@ private slots:
void slotDisplayNameChanged(const QString &oldValue, const QString &newValue);
protected:
virtual void dragEnterEvent ( QDragEnterEvent * );
virtual void dragMoveEvent ( QDragMoveEvent * );
void dragEnterEvent ( QDragEnterEvent * ) Q_DECL_OVERRIDE;
void dragMoveEvent ( QDragMoveEvent * ) Q_DECL_OVERRIDE;
private:
// widget stuff
......@@ -380,7 +380,7 @@ class ChatWindowPlugin : public Kopete::ViewPlugin
{
public:
ChatWindowPlugin(QObject *parent, const QVariantList &args);
KopeteView* createView( Kopete::ChatSession *manager );
KopeteView* createView( Kopete::ChatSession *manager ) Q_DECL_OVERRIDE;
};
#endif
......
......@@ -67,8 +67,8 @@ public slots:
void prepareList();
protected:
virtual void hideEvent( QHideEvent* );
virtual void showEvent( QShowEvent* );
void hideEvent( QHideEvent* ) Q_DECL_OVERRIDE;
void showEvent( QShowEvent* ) Q_DECL_OVERRIDE;
protected slots:
void emoticonClicked( QListWidgetItem* );
......
......@@ -105,7 +105,7 @@ public:
* Reimplemented from KXmlGuiWindow - asks each ChatView in the window if it is ok to close the window
* @return true if no ChatView objects to closing.
*/
virtual bool queryClose();
bool queryClose() Q_DECL_OVERRIDE;
virtual bool queryExit();
KTemporaryFile *backgroundFile;
......@@ -247,10 +247,10 @@ private:
void updateSpellCheckAction();
protected:
virtual void closeEvent( QCloseEvent *e );
virtual void changeEvent( QEvent *e );
virtual void resizeEvent( QResizeEvent *e);
virtual bool eventFilter( QObject *obj, QEvent *event );
void closeEvent( QCloseEvent *e ) Q_DECL_OVERRIDE;
void changeEvent( QEvent *e ) Q_DECL_OVERRIDE;
void resizeEvent( QResizeEvent *e) Q_DECL_OVERRIDE;
bool eventFilter( QObject *obj, QEvent *event ) Q_DECL_OVERRIDE;
};
#endif
......
......@@ -38,18 +38,18 @@ public:
KopeteEmailWindow( Kopete::ChatSession *, EmailWindowPlugin *parent, bool foreignMessage );
~KopeteEmailWindow();
virtual Kopete::Message currentMessage();
virtual void setCurrentMessage( const Kopete::Message &newMessage );
virtual void raise(bool activate=false);
virtual void makeVisible();
virtual bool closeView( bool force = false );
virtual bool isVisible();
virtual QWidget *mainWidget() { return this; }
Kopete::Message currentMessage() Q_DECL_OVERRIDE;
void setCurrentMessage( const Kopete::Message &newMessage ) Q_DECL_OVERRIDE;
void raise(bool activate=false) Q_DECL_OVERRIDE;
void makeVisible() Q_DECL_OVERRIDE;
bool closeView( bool force = false ) Q_DECL_OVERRIDE;
bool isVisible() Q_DECL_OVERRIDE;
QWidget *mainWidget() Q_DECL_OVERRIDE { return this; }
public slots:
virtual void sendMessage();
virtual void appendMessage( Kopete::Message &message );
virtual void messageSentSuccessfully();
void appendMessage( Kopete::Message &message ) Q_DECL_OVERRIDE;
void messageSentSuccessfully() Q_DECL_OVERRIDE;
signals:
void shown();
......@@ -58,8 +58,8 @@ signals:
void activated( KopeteView *view );
protected:
virtual void closeEvent( QCloseEvent *e );
virtual void changeEvent( QEvent *e );
void closeEvent( QCloseEvent *e ) Q_DECL_OVERRIDE;
void changeEvent( QEvent *e ) Q_DECL_OVERRIDE;
private slots:
void slotReplySend();
......@@ -95,7 +95,7 @@ class EmailWindowPlugin : public Kopete::ViewPlugin
{
public:
EmailWindowPlugin(QObject *parent, const QVariantList &args);
KopeteView* createView( Kopete::ChatSession *manager );
KopeteView* createView( Kopete::ChatSession *manager ) Q_DECL_OVERRIDE;
};
#endif // __KOPETEEMAILWINDOW_H__
......
......@@ -87,8 +87,8 @@ signals:
void documentSizeUpdated(int difference);
protected:
virtual void insertFromMimeData(const QMimeData * source);
virtual bool event(QEvent *event);
void insertFromMimeData(const QMimeData * source) Q_DECL_OVERRIDE;
bool event(QEvent *event) Q_DECL_OVERRIDE;
protected slots:
void updateTextFormat();
......
......@@ -31,8 +31,8 @@ signals:
void itemPositionChanged();
protected:
void dragEnterEvent( QDragEnterEvent *event );
void dropEvent( QDropEvent *event );
void dragEnterEvent( QDragEnterEvent *event ) Q_DECL_OVERRIDE;
void dropEvent( QDropEvent *event ) Q_DECL_OVERRIDE;
};
......
......@@ -50,11 +50,11 @@ public:
KopeteAccountConfig(QWidget *parent, const QVariantList &args );
protected:
virtual bool eventFilter( QObject *obj, QEvent *event );
bool eventFilter( QObject *obj, QEvent *event ) Q_DECL_OVERRIDE;
public slots:
virtual void save();
virtual void load();
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
private:
KopeteAccountLVI* selectedAccount();
......
......@@ -34,8 +34,8 @@ public:
AppearanceConfig( QWidget *parent, const QVariantList &args );
~AppearanceConfig();
virtual void save();
virtual void load();
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
private slots:
void slotHighlightChanged();
......
......@@ -23,7 +23,7 @@
class ContactListTokenFactory : public TokenFactory
{
public:
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr ) Q_DECL_OVERRIDE;
};
class ContactListToken : public TokenWithLayout
......@@ -39,8 +39,8 @@ public:
void setOptimalSize( bool optimalSize );
protected:
virtual void fillMenu( QMenu * menu );
virtual void menuExecuted( const QAction* action );
void fillMenu( QMenu * menu ) Q_DECL_OVERRIDE;
void menuExecuted( const QAction* action ) Q_DECL_OVERRIDE;
private:
bool m_small;
......
......@@ -52,7 +52,7 @@ class Token : public QWidget
void changed();
protected:
virtual void paintEvent(QPaintEvent *pe);
void paintEvent(QPaintEvent *pe) Q_DECL_OVERRIDE;
protected:
......
......@@ -37,7 +37,7 @@ public:
TokenDragger( const QString &mimeType, TokenDropTarget *parent ) : QObject(parent), m_mimeType( mimeType )
{}
protected:
bool eventFilter( QObject *o, QEvent *e )
bool eventFilter( QObject *o, QEvent *e ) Q_DECL_OVERRIDE
{
if ( e->type() == QEvent::MouseMove )
{
......
......@@ -54,7 +54,7 @@ signals:
void focussed( QWidget* );
protected:
bool eventFilter( QObject *, QEvent * );
bool eventFilter( QObject *, QEvent * ) Q_DECL_OVERRIDE;
QBoxLayout *rowBox( QWidget *w, QPoint *idx = 0 ) const;
QBoxLayout *rowBox( const QPoint &pt ) const;
protected:
......
......@@ -37,12 +37,12 @@ class TokenPool : public KListWidget
QString mimeType() const;
void setMimeType( const QString& mimeType );
protected:
void mouseDoubleClickEvent( QMouseEvent *event );
void mousePressEvent( QMouseEvent *event );
void mouseMoveEvent( QMouseEvent *event );
void dragEnterEvent( QDragEnterEvent *event );
void dragMoveEvent( QDragMoveEvent *event );
void dropEvent( QDropEvent *event );
void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void dragEnterEvent( QDragEnterEvent *event ) Q_DECL_OVERRIDE;
void dragMoveEvent( QDragMoveEvent *event ) Q_DECL_OVERRIDE;
void dropEvent( QDropEvent *event ) Q_DECL_OVERRIDE;
signals:
void onDoubleClick( Token *token ); //connects to TokenLayoutWidget::addToken( QString )
......
......@@ -27,7 +27,7 @@ class QMenu;
class TokenWithLayoutFactory : public TokenFactory
{
public:
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr ) Q_DECL_OVERRIDE;
};
/**
......@@ -67,7 +67,7 @@ public slots:
protected:
virtual void fillMenu( QMenu * menu );
virtual void menuExecuted( const QAction* action );
virtual void contextMenuEvent( QContextMenuEvent * event );
void contextMenuEvent( QContextMenuEvent * event ) Q_DECL_OVERRIDE;
private:
......
......@@ -33,8 +33,8 @@ class BehaviorConfig : public KCModule
public:
BehaviorConfig(QWidget *parent, const QVariantList &args) ;
virtual void save();
virtual void load();
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
private slots:
void slotSettingsChanged(bool);
......
......@@ -92,8 +92,8 @@ class FakeContact : public Kopete::Contact
{
public:
FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {}
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; }
virtual void slotUserInfo() {}
Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) Q_DECL_OVERRIDE { return 0L; }
void slotUserInfo() Q_DECL_OVERRIDE {}
};
// This is for style preview.
......@@ -101,9 +101,9 @@ class FakeProtocol : public Kopete::Protocol
{
public:
FakeProtocol( QObject *parent ) : Kopete::Protocol(parent){}
Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;}
AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;}
KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;}
Kopete::Account* createNewAccount( const QString &/*accountId*/ )Q_DECL_OVERRIDE {return 0L;}
AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/)Q_DECL_OVERRIDE {return 0L;}
KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */)Q_DECL_OVERRIDE {return 0L;}
};
// This is for style preview.
......@@ -133,11 +133,11 @@ public:
delete m_identity;
}
bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;}
void connect( const Kopete::OnlineStatus& /*initialStatus*/){}
void disconnect(){}
void setOnlineStatus( const Kopete::OnlineStatus& /*status*/, const Kopete::StatusMessage &/*reason*/, const OnlineStatusOptions&/*options*/){}
void setStatusMessage(const Kopete::StatusMessage& /*statusMessage*/){}
bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ )Q_DECL_OVERRIDE {return true;}
void connect( const Kopete::OnlineStatus& /*initialStatus*/)Q_DECL_OVERRIDE {}
void disconnect()Q_DECL_OVERRIDE {}
void setOnlineStatus( const Kopete::OnlineStatus& /*status*/, const Kopete::StatusMessage &/*reason*/, const OnlineStatusOptions&/*options*/)Q_DECL_OVERRIDE {}
void setStatusMessage(const Kopete::StatusMessage& /*statusMessage*/)Q_DECL_OVERRIDE {}
private:
FakeIdentity *m_identity;
......
......@@ -47,8 +47,8 @@ public:
ChatWindowConfig( QWidget *parent, const QVariantList &args );
~ChatWindowConfig();
virtual void save();
virtual void load();
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
private slots:
//----- Style TAB ---------------------
......
......@@ -25,8 +25,8 @@ class EmoticonThemeDelegate : public QStyledItemDelegate
Q_OBJECT
public:
EmoticonThemeDelegate(QObject *parent = nullptr);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
};
#endif
......@@ -39,10 +39,10 @@ public:
~KopetePluginConfig();
public slots:
virtual void load();
virtual void save();
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
virtual void defaults();
void defaults() Q_DECL_OVERRIDE;
void reparseConfiguration(const QByteArray&conf);
private:
KPluginSelector *m_pluginSelector;
......
......@@ -34,8 +34,8 @@ class StatusConfig : public KCModule
StatusConfig( QWidget *parent, const QVariantList &args );
public slots:
virtual void save();
virtual void load();
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
private:
QTabWidget* mStatusTabCtl;
......
......@@ -45,23 +45,23 @@ public:
Group
};
virtual QVariant data( const QModelIndex &index, int role ) const;
virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );
virtual Qt::ItemFlags flags( const QModelIndex &index ) 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;
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
QVariant data( const QModelIndex &index, int role ) const Q_DECL_OVERRIDE;
bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index )