Commit 832828f2 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 0a391ced
......@@ -37,16 +37,16 @@ Q_OBJECT
public:
FlashView(QWidget *parent, KActionCollection *actionCollection);
void init();
void init() Q_DECL_OVERRIDE;
private slots:
void slotTimer();
public slots:
void slotCheck();
void slotCheck() Q_DECL_OVERRIDE;
void slotKnow();
void slotDontKnow();
void slotApplySettings();
void slotApplySettings() Q_DECL_OVERRIDE;
private:
QTimer* m_timer;
......
......@@ -118,17 +118,17 @@ class KWordQuizApp : public KXmlGuiWindow
* @see KXmlGuiWindow#queryClose
* @see KXmlGuiWindow#closeEvent
*/
virtual bool queryClose();
bool queryClose() Q_DECL_OVERRIDE;
/** saves the window properties for each open window during session end to the session config file, including saving the currently
* opened file by a temporary filename provided by QApplication.
* @see KXmlGuiWindow#saveProperties
*/
virtual void saveProperties(KConfigGroup &_cfg);
void saveProperties(KConfigGroup &_cfg) Q_DECL_OVERRIDE;
/** reads the session config file and restores the application's state including the last opened files and documents by reading the
* temporary files saved by saveProperties()
* @see KXmlGuiWindow#readProperties
*/
virtual void readProperties(const KConfigGroup &_cfg);
void readProperties(const KConfigGroup &_cfg) Q_DECL_OVERRIDE;
signals:
void settingsChanged();
......
......@@ -39,12 +39,12 @@ public:
KWordQuizPrefs(QWidget *parent, const QString & name, KConfigSkeleton *config, KActionCollection *actionCollection);
protected slots:
void updateSettings();
void updateWidgetsDefault();
void updateSettings() Q_DECL_OVERRIDE;
void updateWidgetsDefault() Q_DECL_OVERRIDE;
protected:
bool hasChanged();
bool isDefault();
bool hasChanged() Q_DECL_OVERRIDE;
bool isDefault() Q_DECL_OVERRIDE;
private:
PrefGeneral *m_prefGeneral;
......
......@@ -51,7 +51,7 @@ signals:
void cardClicked();
protected:
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
private:
QGraphicsRectItem *m_card;
......
......@@ -30,7 +30,7 @@ public:
explicit KWQCardView(QWidget *parent = 0);
QSize minimumSizeHint() const {if(scene()==0) return QSize(); else return qobject_cast<KWQCardScene*>(scene())->minimumSizeHint();}
QSize minimumSizeHint() const Q_DECL_OVERRIDE {if(scene()==0) return QSize(); else return qobject_cast<KWQCardScene*>(scene())->minimumSizeHint();}
void setIdentifier(const QString &);
void setText(const QString &);
......@@ -45,7 +45,7 @@ signals:
protected:
///Overloaded to resize card.
void resizeEvent(QResizeEvent* event);
void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
private:
KWQCardScene *m_scene;
......
......@@ -31,7 +31,7 @@ class KWQClearDialog : public QDialog, private Ui::ClearDialogBase {
explicit KWQClearDialog(QWidget *parent = 0);
public slots:
virtual void accept();
void accept() Q_DECL_OVERRIDE;
private slots:
void buttonGroupChanged(int );
......
......@@ -54,8 +54,8 @@ class KWQUndoCommand : public QUndoCommand
public:
explicit KWQUndoCommand(KWQTableView *view);
virtual void undo();
virtual void redo() {};
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE {};
KWQTableView * view() {return m_view;};
QModelIndex oldCurrentIndex() const {return m_currentIndex;};
......@@ -74,7 +74,7 @@ class KWQCommandClear : public KWQUndoCommand
{
public:
explicit KWQCommandClear(KWQTableView *view);
virtual void redo();
void redo() Q_DECL_OVERRIDE;
};
......@@ -82,7 +82,7 @@ class KWQCommandCut : public KWQCommandClear
{
public:
explicit KWQCommandCut(KWQTableView *view);
virtual void redo();
void redo() Q_DECL_OVERRIDE;
};
......@@ -90,8 +90,8 @@ class KWQCommandPaste : public KWQUndoCommand
{
public:
explicit KWQCommandPaste(KWQTableView *view);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
int m_rowCount;
IndexAndDataList m_pasteIndexAndData;
......@@ -103,10 +103,10 @@ class KWQCommandFont : public KWQUndoCommand
public:
KWQCommandFont(KWQTableView *view, const QFont &oldFont, const QFont &newFont) : KWQUndoCommand(view), m_oldFont(oldFont), m_newFont(newFont)
{ setText(i18n("Font")); }
virtual void undo()
void undo() Q_DECL_OVERRIDE
{ Prefs::setEditorFont(m_oldFont);
view()->reset(); }
virtual void redo()
void redo() Q_DECL_OVERRIDE
{ Prefs::setEditorFont(m_newFont);
view()->reset(); }
private:
......@@ -122,7 +122,7 @@ public:
: KWQUndoCommand(view), m_oldText(oldText), m_newText(newText)
{ setText(i18n("Entry")); }
virtual void redo()
void redo() Q_DECL_OVERRIDE
{ view()->model()->setData(oldCurrentIndex(), m_newText, Qt::EditRole);
view()->setCurrentIndex(oldCurrentIndex()); }
private:
......@@ -135,8 +135,8 @@ class KWQCommandSort : public QUndoCommand
{
public:
KWQCommandSort(QTableView *view, int column);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
QTableView *m_view;
int m_column;
......@@ -147,8 +147,8 @@ class KWQCommandShuffle : public KWQCommandSort
{
public:
KWQCommandShuffle(QTableView *view, int column);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
QTableView *m_view;
int m_column;
......@@ -159,8 +159,8 @@ class KWQCommandInsert : public KWQUndoCommand
{
public:
explicit KWQCommandInsert(KWQTableView *view);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
};
......@@ -168,8 +168,8 @@ class KWQCommandDelete : public KWQUndoCommand
{
public:
explicit KWQCommandDelete(KWQTableView *view);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
IndexAndDataList m_deleteIndexAndData;
};
......@@ -180,7 +180,7 @@ class KWQCommandUnmarkBlank : public KWQUndoCommand
public:
explicit KWQCommandUnmarkBlank(KWQTableView *view);
//virtual void undo();
virtual void redo();
void redo() Q_DECL_OVERRIDE;
};
......@@ -188,8 +188,8 @@ class KWQCommandIdentifiers : public KWQUndoCommand
{
public:
KWQCommandIdentifiers(KWQTableView *view, const ColumnDataList &newColumnData);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
ColumnDataList m_oldColumnData;
ColumnDataList m_newColumnData;
......@@ -200,8 +200,8 @@ class KWQCommandImage : public KWQUndoCommand
{
public:
KWQCommandImage(KWQTableView *view, const QUrl &);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
QUrl m_oldUrl;
......@@ -213,8 +213,8 @@ class KWQCommandSound : public KWQUndoCommand
{
public:
KWQCommandSound(KWQTableView *view, const QUrl &);
virtual void undo();
virtual void redo();
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
QUrl m_oldUrl;
......
......@@ -26,8 +26,8 @@ public:
explicit KWQPixmapItem(const QPixmap &pixmap, QGraphicsItem *parentItem = 0);
public:
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
void setImageRect(const QRect &rect);
private:
......
......@@ -40,7 +40,7 @@ public:
void setFilterModel(KWQSortFilterModel * sourceModel);
KWQSortFilterModel * sourceModel() const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
bool init();
......@@ -82,7 +82,7 @@ signals:
void checkingAnswer(int );
protected:
bool lessThan(const QModelIndex & left, const QModelIndex & right) const;
bool lessThan(const QModelIndex & left, const QModelIndex & right) const Q_DECL_OVERRIDE;
// Disable from external calls; use setFilterModel() instead
// (It's not even implemented so will give a link error anyway.)
......
......@@ -41,7 +41,7 @@ class KWQSortFilterModel : public QSortFilterProxyModel
void shuffle();
protected:
bool lessThan(const QModelIndex & left, const QModelIndex & right) const;
bool lessThan(const QModelIndex & left, const QModelIndex & right) const Q_DECL_OVERRIDE;
// Disable from public calls; use setTableModel instead.
//void setSourceModel(QAbstractItemModel *sourceModel);
......
......@@ -32,18 +32,18 @@ class KWQTableDelegate : public QItemDelegate
public:
explicit KWQTableDelegate(QObject *parent = 0);
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const Q_DECL_OVERRIDE;
protected:
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const;
void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const;
void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap ) const;
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const Q_DECL_OVERRIDE;
void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const Q_DECL_OVERRIDE;
void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap ) const Q_DECL_OVERRIDE;
private slots:
void commitAndCloseEditor();
......
......@@ -48,20 +48,20 @@ public:
void setDocument(KEduVocDocument * doc);
KEduVocDocument * document() { return m_doc;};
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
KEduVocLesson * currentLesson(int row);
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags (const QModelIndex & index) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole);
Qt::ItemFlags flags (const QModelIndex & index) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
bool isEmpty();
bool checkSyntax() const;
......
......@@ -63,7 +63,7 @@ public:
protected:
void nextCell();
void keyPressEvent(QKeyEvent*);
void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
void updateKeyboardLayout();
public slots:
......@@ -76,8 +76,8 @@ public slots:
void slotSortByColumn(int);
protected slots:
void closeEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint);
void commitData (QWidget * editor);
void closeEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint) Q_DECL_OVERRIDE;
void commitData (QWidget * editor) Q_DECL_OVERRIDE;
void verticalHeaderResized(int, int, int);
void horizontalHeaderResized(int, int, int);
void horizontalHeaderDataChanged(Qt::Orientation, int, int);
......
......@@ -33,7 +33,7 @@ class KWQTutorFlashCard : public QWidget
explicit KWQTutorFlashCard(QWidget* parent = 0);
void init();
/* reimplemented func to save flashcard geometry before closing */
void closeEvent (QCloseEvent* event);
void closeEvent (QCloseEvent* event) Q_DECL_OVERRIDE;
void setText(const QString &);
private:
......
......@@ -39,12 +39,12 @@ public:
KActionCollection *actionCollection);
protected slots:
void updateSettings();
void updateWidgetsDefault();
void updateSettings() Q_DECL_OVERRIDE;
void updateWidgetsDefault() Q_DECL_OVERRIDE;
void slotEnableApplyButton();
protected:
bool hasChanged();
bool hasChanged() Q_DECL_OVERRIDE;
private:
PrefTutor *m_prefTutor;
......
......@@ -38,13 +38,13 @@ class MultipleView : public KWQQuizView, public Ui::MultipleViewBase
Q_OBJECT
public:
MultipleView(QWidget *parent, KActionCollection *actionCollection);
void init();
void init() Q_DECL_OVERRIDE;
public slots:
void slotCheck();
void slotCheck() Q_DECL_OVERRIDE;
void slotChoiceClicked(int );
void slotChoiceActionTriggered(QAction *);
void slotApplySettings();
void slotApplySettings() Q_DECL_OVERRIDE;
private:
QActionGroup *m_choicesActions;
......
......@@ -41,12 +41,12 @@ Q_OBJECT
public:
QAView(QWidget *parent, KActionCollection * actionCollection);
void init();
void init() Q_DECL_OVERRIDE;
public slots:
void slotCheck();
void slotCheck() Q_DECL_OVERRIDE;
void slotHint();
void slotApplySettings();
void slotApplySettings() Q_DECL_OVERRIDE;
void slotSpecChar(const QChar &);
void slotMarkLastCorrect();
......
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