Commit cfe1d9d3 authored by Kevin Funk's avatar Kevin Funk

clang-tidy: modernize-use-override run

parent aef84898
......@@ -32,9 +32,9 @@ class KDiff3FileItemAction : public KAbstractFileItemActionPlugin
Q_OBJECT
public:
KDiff3FileItemAction (QObject* pParent, const QVariantList & args);
virtual ~KDiff3FileItemAction();
~KDiff3FileItemAction() override;
// implement pure virtual method from KonqPopupMenuPlugin
virtual QList<QAction*> actions( const KFileItemListProperties& fileItemInfos, QWidget* pParentWidget );
QList<QAction*> actions( const KFileItemListProperties& fileItemInfos, QWidget* pParentWidget ) override;
private Q_SLOTS:
void slotCompareWith();
......
......@@ -1594,7 +1594,7 @@ class RecalcWordWrapRunnable : public QRunnable
//++s_runnableCount; // in Qt>=5.3 only
s_runnableCount.fetchAndAddOrdered(1);
}
void run()
void run() override
{
m_pDTW->recalcWordWrapHelper(0, m_visibleTextWidth, m_cacheIdx);
// int newValue = --s_runnableCount; // in Qt>=5.3 only
......
......@@ -40,7 +40,7 @@ public:
int winIdx
);
~DiffTextWindow();
~DiffTextWindow() override;
void init(
const QString& fileName,
QTextCodec* pCodec,
......@@ -96,17 +96,17 @@ public Q_SLOTS:
void setFastSelectorRange( int line1, int nofLines );
protected:
virtual void mousePressEvent ( QMouseEvent * );
virtual void mouseReleaseEvent ( QMouseEvent * );
virtual void mouseMoveEvent ( QMouseEvent * );
virtual void mouseDoubleClickEvent ( QMouseEvent * e );
void mousePressEvent ( QMouseEvent * ) override;
void mouseReleaseEvent ( QMouseEvent * ) override;
void mouseMoveEvent ( QMouseEvent * ) override;
void mouseDoubleClickEvent ( QMouseEvent * e ) override;
virtual void paintEvent( QPaintEvent* );
virtual void dragEnterEvent( QDragEnterEvent* e );
virtual void focusInEvent( QFocusEvent* e );
void paintEvent( QPaintEvent* ) override;
void dragEnterEvent( QDragEnterEvent* e ) override;
void focusInEvent( QFocusEvent* e ) override;
virtual void resizeEvent( QResizeEvent* );
virtual void timerEvent(QTimerEvent*);
void resizeEvent( QResizeEvent* ) override;
void timerEvent(QTimerEvent*) override;
private:
DiffTextWindowData* d;
......@@ -122,7 +122,7 @@ class DiffTextWindowFrame : public QWidget
Q_OBJECT
public:
DiffTextWindowFrame( QWidget* pParent, QStatusBar* pStatusBar, Options* pOptions, int winIdx, SourceData* psd);
~DiffTextWindowFrame();
~DiffTextWindowFrame() override;
DiffTextWindow* getDiffTextWindow();
void init();
void setFirstLine(int firstLine);
......@@ -131,7 +131,7 @@ Q_SIGNALS:
void fileNameChanged(const QString&, int);
void encodingChanged(QTextCodec*);
protected:
bool eventFilter( QObject*, QEvent* );
bool eventFilter( QObject*, QEvent* ) override;
//void paintEvent(QPaintEvent*);
private Q_SLOTS:
void slotReturnPressed();
......@@ -146,8 +146,8 @@ class EncodingLabel : public QLabel
public:
EncodingLabel( const QString & text, DiffTextWindowFrame* pDiffTextWindowFrame, SourceData* psd, Options* pOptions);
protected:
void mouseMoveEvent(QMouseEvent *ev);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev) override;
void mousePressEvent(QMouseEvent *ev) override;
private Q_SLOTS:
void slotEncodingChanged();
private:
......
......@@ -87,7 +87,7 @@ class StatusInfo : public QDialog
m_pTextEdit->clear();
}
void setVisible(bool bVisible)
void setVisible(bool bVisible) override
{
if(bVisible)
{
......@@ -253,14 +253,14 @@ class DirectoryMergeWindow::Data : public QAbstractItemModel
m_bSkipDirStatus = false;
m_pRoot = new MergeFileInfos;
}
~Data()
~Data() override
{
delete m_pRoot;
}
// Implement QAbstractItemModel
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
//Qt::ItemFlags flags ( const QModelIndex & index ) const
QModelIndex parent(const QModelIndex& index) const
QModelIndex parent(const QModelIndex& index) const override
{
MergeFileInfos* pMFI = getMFI(index);
if(pMFI == nullptr || pMFI == m_pRoot || pMFI->m_pParent == m_pRoot)
......@@ -271,7 +271,7 @@ class DirectoryMergeWindow::Data : public QAbstractItemModel
return createIndex(pParentsParent->m_children.indexOf(pMFI->m_pParent), 0, pMFI->m_pParent);
}
}
int rowCount(const QModelIndex& parent = QModelIndex()) const
int rowCount(const QModelIndex& parent = QModelIndex()) const override
{
MergeFileInfos* pParentMFI = getMFI(parent);
if(pParentMFI != nullptr)
......@@ -279,11 +279,11 @@ class DirectoryMergeWindow::Data : public QAbstractItemModel
else
return m_pRoot->m_children.count();
}
int columnCount(const QModelIndex& /*parent*/) const
int columnCount(const QModelIndex& /*parent*/) const override
{
return 10;
}
QModelIndex index(int row, int column, const QModelIndex& parent) const
QModelIndex index(int row, int column, const QModelIndex& parent) const override
{
MergeFileInfos* pParentMFI = getMFI(parent);
if(pParentMFI == nullptr && row < m_pRoot->m_children.count())
......@@ -293,8 +293,8 @@ class DirectoryMergeWindow::Data : public QAbstractItemModel
else
return QModelIndex();
}
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
void sort(int column, Qt::SortOrder order);
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
void sort(int column, Qt::SortOrder order) override;
// private data and helper methods
MergeFileInfos* getMFI(const QModelIndex& mi) const
{
......@@ -686,7 +686,7 @@ class DirectoryMergeWindow::DirMergeItemDelegate : public QStyledItemDelegate
: QStyledItemDelegate(pParent), m_pDMW(pParent), d(pParent->d)
{
}
void paint(QPainter* p, const QStyleOptionViewItem& option, const QModelIndex& index) const
void paint(QPainter* p, const QStyleOptionViewItem& option, const QModelIndex& index) const override
{
int column = index.column();
if(column == s_ACol || column == s_BCol || column == s_CCol)
......@@ -746,7 +746,7 @@ class DirectoryMergeWindow::DirMergeItemDelegate : public QStyledItemDelegate
}
QStyledItemDelegate::paint(p, option2, index);
}
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override
{
QSize sz = QStyledItemDelegate::sizeHint(option, index);
return sz.expandedTo(QSize(0, 18));
......
......@@ -61,7 +61,7 @@ class DirectoryMergeWindow : public QTreeView
Q_OBJECT
public:
DirectoryMergeWindow( QWidget* pParent, Options* pOptions, KIconLoader* pIconLoader );
~DirectoryMergeWindow();
~DirectoryMergeWindow() override;
void setDirectoryMergeInfo(DirectoryMergeInfo* p);
bool init(
FileAccess& dirA,
......@@ -81,11 +81,11 @@ public:
KToggleAction* chooseA, KToggleAction* chooseB, KToggleAction* chooseC );
void updateFileVisibilities();
virtual void mousePressEvent( QMouseEvent* e );
virtual void keyPressEvent( QKeyEvent* e );
virtual void focusInEvent( QFocusEvent* e );
virtual void focusOutEvent( QFocusEvent* e );
virtual void contextMenuEvent( QContextMenuEvent* e );
void mousePressEvent( QMouseEvent* e ) override;
void keyPressEvent( QKeyEvent* e ) override;
void focusInEvent( QFocusEvent* e ) override;
void focusOutEvent( QFocusEvent* e ) override;
void contextMenuEvent( QContextMenuEvent* e ) override;
QString getDirNameA();
QString getDirNameB();
QString getDirNameC();
......@@ -145,7 +145,7 @@ Q_SIGNALS:
protected Q_SLOTS:
void onDoubleClick( const QModelIndex& );
void onExpanded();
void currentChanged( const QModelIndex & current, const QModelIndex & previous ); // override
void currentChanged( const QModelIndex & current, const QModelIndex & previous ) override; // override
private:
class Data;
friend class Data;
......@@ -166,7 +166,7 @@ public:
const FileAccess& DestPath,
MergeFileInfos& mfi );
QTreeWidget* getInfoList() {return m_pInfoList;}
virtual bool eventFilter( QObject* o, QEvent* e );
bool eventFilter( QObject* o, QEvent* e ) override;
Q_SIGNALS:
void gotFocus();
private:
......
......@@ -109,7 +109,7 @@ class KDiff3App : public QSplitter
/** constructor of KDiff3App, calls all init functions to create the application.
*/
KDiff3App( QWidget* parent, const char* name, KDiff3Part* pKDiff3Part );
~KDiff3App();
~KDiff3App() override;
bool isPart();
......@@ -321,9 +321,9 @@ class KDiff3App : public QSplitter
bool m_bFinishMainInit;
bool m_bLoadFiles;
virtual bool eventFilter( QObject* o, QEvent* e );
virtual void resizeEvent(QResizeEvent*);
virtual void childEvent(QChildEvent *c);
bool eventFilter( QObject* o, QEvent* e ) override;
void resizeEvent(QResizeEvent*) override;
void childEvent(QChildEvent *c) override;
bool improveFilenames(bool bCreateNewInstance);
......
......@@ -46,30 +46,30 @@ public:
/**
* Destructor
*/
virtual ~KDiff3Part();
~KDiff3Part() override;
/**
* This is a virtual function inherited from KParts::ReadWritePart.
* A shell will use this to inform this Part if it should act
* read-only
*/
virtual void setReadWrite(bool rw);
void setReadWrite(bool rw) override;
/**
* Reimplemented to disable and enable Save action
*/
virtual void setModified(bool modified);
void setModified(bool modified) override;
protected:
/**
* This must be implemented by each part
*/
virtual bool openFile();
bool openFile() override;
/**
* This must be implemented by each read-write part
*/
virtual bool saveFile();
bool saveFile() override;
private:
KDiff3App* m_widget;
......
......@@ -50,11 +50,11 @@ public:
/**
* Default Destructor
*/
virtual ~KDiff3Shell();
~KDiff3Shell() override;
bool queryClose();
bool queryClose() override;
bool queryExit();
virtual void closeEvent(QCloseEvent*e);
void closeEvent(QCloseEvent*e) override;
static inline QCommandLineParser* getParser(){
static QCommandLineParser *parser = new QCommandLineParser();
......
......@@ -59,9 +59,9 @@ private:
e_OverviewMode m_eOverviewMode;
int m_nofLines;
virtual void paintEvent( QPaintEvent* e );
virtual void mousePressEvent( QMouseEvent* e );
virtual void mouseMoveEvent( QMouseEvent* e );
void paintEvent( QPaintEvent* e ) override;
void mousePressEvent( QMouseEvent* e ) override;
void mouseMoveEvent( QMouseEvent* e ) override;
void drawColumn( QPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines );
};
......@@ -370,27 +370,27 @@ private:
);
MergeLineList::iterator splitAtDiff3LineIdx( int d3lLineIdx );
virtual void paintEvent( QPaintEvent* e );
void paintEvent( QPaintEvent* e ) override;
int getTextXOffset();
QVector<QTextLayout::FormatRange> getTextLayoutForLine(int line, const QString& s, QTextLayout& textLayout );
void myUpdate(int afterMilliSecs);
virtual void timerEvent(QTimerEvent*);
void timerEvent(QTimerEvent*) override;
void writeLine(
MyPainter& p, int line, const QString& str,
int srcSelect, e_MergeDetails mergeDetails, int rangeMark, bool bUserModified, bool bLineRemoved, bool bWhiteSpaceConflict
);
void setFastSelector(MergeLineList::iterator i);
int convertToLine( int y );
bool event(QEvent*);
virtual void mousePressEvent ( QMouseEvent* e );
virtual void mouseDoubleClickEvent ( QMouseEvent* e );
virtual void mouseReleaseEvent ( QMouseEvent * );
virtual void mouseMoveEvent ( QMouseEvent * );
virtual void resizeEvent( QResizeEvent* e );
virtual void keyPressEvent( QKeyEvent* e );
virtual void wheelEvent( QWheelEvent* e );
virtual void focusInEvent( QFocusEvent* e );
bool event(QEvent*) override;
void mousePressEvent ( QMouseEvent* e ) override;
void mouseDoubleClickEvent ( QMouseEvent* e ) override;
void mouseReleaseEvent ( QMouseEvent * ) override;
void mouseMoveEvent ( QMouseEvent * ) override;
void resizeEvent( QResizeEvent* e ) override;
void keyPressEvent( QKeyEvent* e ) override;
void wheelEvent( QWheelEvent* e ) override;
void focusInEvent( QFocusEvent* e ) override;
QPixmap m_pixmap;
int m_firstLine;
......@@ -453,7 +453,7 @@ public:
void setLineEndStyles( e_LineEndStyle eLineEndStyleA, e_LineEndStyle eLineEndStyleB, e_LineEndStyle eLineEndStyleC);
e_LineEndStyle getLineEndStyle();
bool eventFilter( QObject* o, QEvent* e );
bool eventFilter( QObject* o, QEvent* e ) override;
public Q_SLOTS:
void slotSetModified( bool bModified );
//private Q_SLOTS:
......
This diff is collapsed.
......@@ -46,7 +46,7 @@ class OptionDialog : public KPageDialog
public:
OptionDialog( bool bShowDirMergeSettings, QWidget *parent = nullptr, char *name = nullptr );
~OptionDialog( void );
~OptionDialog( void ) override;
QString parseOptions( const QStringList& optionList );
QString calcOptionHelp();
......
......@@ -57,7 +57,7 @@ public:
void hideStatusBarWidget();
void delayedHideStatusBarWidget();
virtual void timerEvent(QTimerEvent*);
void timerEvent(QTimerEvent*) override;
public slots:
void recalc(bool bRedrawUpdate);
private:
......@@ -102,7 +102,7 @@ private:
QProgressBar* m_pStatusProgressBar;
QPushButton* m_pStatusAbortButton;
protected:
virtual void reject();
void reject() override;
private slots:
void delayedHide();
void slotAbort();
......@@ -114,7 +114,7 @@ class ProgressProxy: public QObject
Q_OBJECT
public:
ProgressProxy();
~ProgressProxy();
~ProgressProxy() override;
void setInformation( const QString& info, bool bRedrawUpdate=true );
void setInformation( const QString& info, int current, bool bRedrawUpdate=true );
......
......@@ -42,8 +42,8 @@ public:
QComboBox* m_pLineOut;
QCheckBox* m_pMerge;
virtual void accept();
virtual bool eventFilter(QObject* o, QEvent* e);
void accept() override;
bool eventFilter(QObject* o, QEvent* e) override;
private:
Options* m_pOptions;
void selectURL( QComboBox* pLine, bool bDir, int i, bool bSave );
......@@ -69,7 +69,7 @@ class FindDialog : public QDialog
Q_OBJECT
public:
explicit FindDialog(QWidget* pParent);
void setVisible(bool); //override QDialog::setVisible()
void setVisible(bool) override;
Q_SIGNALS:
void findNext();
......
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