diff --git a/iso/iso.h b/iso/iso.h --- a/iso/iso.h +++ b/iso/iso.h @@ -41,9 +41,9 @@ kio_isoProtocol(const QByteArray &pool, const QByteArray &app); virtual ~kio_isoProtocol(); - virtual void listDir(const QUrl &url) Q_DECL_OVERRIDE; - virtual void stat(const QUrl &url) Q_DECL_OVERRIDE; - virtual void get(const QUrl &url) Q_DECL_OVERRIDE; + virtual void listDir(const QUrl &url) override; + virtual void stat(const QUrl &url) override; + virtual void get(const QUrl &url) override; protected: void getFile(const KIsoFile *isoFileEntry, const QString &path); diff --git a/iso/kiso.h b/iso/kiso.h --- a/iso/kiso.h +++ b/iso/kiso.h @@ -96,12 +96,12 @@ * */ void readParams(); - virtual bool openArchive(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - virtual bool closeArchive() Q_DECL_OVERRIDE; - virtual bool doWriteDir(const QString&, const QString&, const QString&, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) Q_DECL_OVERRIDE; - virtual bool doWriteSymLink(const QString &, const QString &, const QString &, const QString &, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) Q_DECL_OVERRIDE; - virtual bool doPrepareWriting(const QString& , const QString& , const QString& , qint64, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) Q_DECL_OVERRIDE; - virtual bool doFinishWriting(qint64) Q_DECL_OVERRIDE; + virtual bool openArchive(QIODevice::OpenMode mode) override; + virtual bool closeArchive() override; + virtual bool doWriteDir(const QString&, const QString&, const QString&, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) override; + virtual bool doWriteSymLink(const QString &, const QString &, const QString &, const QString &, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) override; + virtual bool doPrepareWriting(const QString& , const QString& , const QString& , qint64, mode_t, const QDateTime &, const QDateTime &, const QDateTime &) override; + virtual bool doFinishWriting(qint64) override; private: /** @@ -114,7 +114,7 @@ QString m_filename; protected: - virtual void virtual_hook(int id, void* data) Q_DECL_OVERRIDE; + virtual void virtual_hook(int id, void* data) override; private: class KIsoPrivate; diff --git a/iso/qfilehack.h b/iso/qfilehack.h --- a/iso/qfilehack.h +++ b/iso/qfilehack.h @@ -35,7 +35,7 @@ QFileHack(); explicit QFileHack(const QString & name); ~QFileHack(); - virtual bool open(QFile::OpenMode m) Q_DECL_OVERRIDE; + virtual bool open(QFile::OpenMode m) override; }; #endif diff --git a/krArc/krarc.h b/krArc/krarc.h --- a/krArc/krarc.h +++ b/krArc/krarc.h @@ -47,23 +47,23 @@ public: kio_krarcProtocol(const QByteArray &pool_socket, const QByteArray &app_socket); ~kio_krarcProtocol() override; - void stat(const QUrl &url) Q_DECL_OVERRIDE; - void get(const QUrl &url) Q_DECL_OVERRIDE; - void put(const QUrl &url, int permissions, KIO::JobFlags flags) Q_DECL_OVERRIDE; - void mkdir(const QUrl &url, int permissions) Q_DECL_OVERRIDE; - void listDir(const QUrl &url) Q_DECL_OVERRIDE; - void del(QUrl const & url, bool isFile) Q_DECL_OVERRIDE; - void copy(const QUrl &src, const QUrl &dest, int permissions, KIO::JobFlags flags) Q_DECL_OVERRIDE; - void rename(const QUrl &src, const QUrl & dest, KIO::JobFlags flags) Q_DECL_OVERRIDE; + void stat(const QUrl &url) override; + void get(const QUrl &url) override; + void put(const QUrl &url, int permissions, KIO::JobFlags flags) override; + void mkdir(const QUrl &url, int permissions) override; + void listDir(const QUrl &url) override; + void del(QUrl const & url, bool isFile) override; + void copy(const QUrl &src, const QUrl &dest, int permissions, KIO::JobFlags flags) override; + void rename(const QUrl &src, const QUrl & dest, KIO::JobFlags flags) override; public slots: void receivedData(KProcess *, QByteArray &); void checkOutputForPassword(KProcess *, QByteArray &); protected: virtual bool initDirDict(const QUrl &url, bool forced = false); virtual bool initArcParameters(); - void checkIf7zIsEncrypted(bool &, QString) Q_DECL_OVERRIDE; + void checkIf7zIsEncrypted(bool &, QString) override; virtual void parseLine(int lineNo, QString line); virtual bool setArcFile(const QUrl &url); virtual QString getPassword(); diff --git a/krArc/krarc.cpp b/krArc/krarc.cpp --- a/krArc/krarc.cpp +++ b/krArc/krarc.cpp @@ -74,21 +74,21 @@ KrArcCodec(QTextCodec * codec) : originalCodec(codec) {} ~KrArcCodec() override = default; - QByteArray name() const Q_DECL_OVERRIDE { + QByteArray name() const override { return originalCodec->name(); } - QList aliases() const Q_DECL_OVERRIDE { + QList aliases() const override { return originalCodec->aliases(); } - int mibEnum() const Q_DECL_OVERRIDE { + int mibEnum() const override { return originalCodec->mibEnum(); } protected: - QString convertToUnicode(const char *in, int length, ConverterState *state) const Q_DECL_OVERRIDE { + QString convertToUnicode(const char *in, int length, ConverterState *state) const override { return originalCodec->toUnicode(in, length, state); } - QByteArray convertFromUnicode(const QChar *in, int length, ConverterState *state) const Q_DECL_OVERRIDE { + QByteArray convertFromUnicode(const QChar *in, int length, ConverterState *state) const override { // the QByteArray is embedded into the unicode charset (QProcess hell) QByteArray result; for (int i = 0; i != length; i++) { diff --git a/krusader/ActionMan/addplaceholderpopup.h b/krusader/ActionMan/addplaceholderpopup.h --- a/krusader/ActionMan/addplaceholderpopup.h +++ b/krusader/ActionMan/addplaceholderpopup.h @@ -116,10 +116,10 @@ { public: ParameterText(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KLineEdit * _lineEdit; QString _preset; @@ -134,10 +134,10 @@ Q_OBJECT public: ParameterPlaceholder(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KLineEdit * _lineEdit; QToolButton* _button; @@ -153,10 +153,10 @@ { public: ParameterYes(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: QCheckBox* _checkBox; }; @@ -169,10 +169,10 @@ { public: ParameterNo(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: QCheckBox* _checkBox; }; @@ -186,10 +186,10 @@ Q_OBJECT public: ParameterFile(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KLineEdit * _lineEdit; QToolButton* _button; @@ -205,10 +205,10 @@ { public: ParameterChoose(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KComboBox * _combobox; }; @@ -221,10 +221,10 @@ { public: ParameterSelect(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KComboBox * _combobox; }; @@ -238,10 +238,10 @@ Q_OBJECT public: ParameterGoto(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KLineEdit * _lineEdit; QToolButton* _dirButton, *_placeholderButton; @@ -258,10 +258,10 @@ { public: ParameterSyncprofile(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KComboBox * _combobox; }; @@ -274,10 +274,10 @@ { public: ParameterPanelprofile(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KComboBox * _combobox; }; @@ -290,10 +290,10 @@ { public: ParameterSearch(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: KComboBox * _combobox; }; @@ -306,10 +306,10 @@ { public: ParameterInt(const exp_parameter& parameter, QWidget* parent); - QString text() Q_DECL_OVERRIDE; - QString preset() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - bool valid() Q_DECL_OVERRIDE; + QString text() override; + QString preset() override; + void reset() override; + bool valid() override; private: QSpinBox * _spinbox; int _default; diff --git a/krusader/ActionMan/useractionlistview.h b/krusader/ActionMan/useractionlistview.h --- a/krusader/ActionMan/useractionlistview.h +++ b/krusader/ActionMan/useractionlistview.h @@ -35,7 +35,7 @@ public: explicit UserActionListView(QWidget* parent = nullptr); ~UserActionListView() override; - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; void update(); void update(KrAction* action); @@ -78,7 +78,7 @@ /** * This reimplements qt's compare-function in order to have categories on the top of the list */ - bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE; + bool operator<(const QTreeWidgetItem &other) const override; private: KrAction* _action; diff --git a/krusader/Archive/abstractthreadedjob.h b/krusader/Archive/abstractthreadedjob.h --- a/krusader/Archive/abstractthreadedjob.h +++ b/krusader/Archive/abstractthreadedjob.h @@ -56,9 +56,9 @@ void sendEvent(UserEvent * event); virtual ~AbstractThreadedJob(); - virtual bool event(QEvent *) Q_DECL_OVERRIDE; + virtual bool event(QEvent *) override; virtual void startAbstractJobThread(AbstractJobThread*); - virtual bool doSuspend() Q_DECL_OVERRIDE { + virtual bool doSuspend() override { return false; } @@ -103,7 +103,7 @@ virtual void slotStart() = 0; protected: - virtual void run() Q_DECL_OVERRIDE; + virtual void run() override; void setJob(AbstractThreadedJob * job) { _job = job; } diff --git a/krusader/Archive/abstractthreadedjob.cpp b/krusader/Archive/abstractthreadedjob.cpp --- a/krusader/Archive/abstractthreadedjob.cpp +++ b/krusader/Archive/abstractthreadedjob.cpp @@ -258,32 +258,32 @@ explicit AbstractJobObserver(AbstractJobThread * thread): _jobThread(thread) {} ~AbstractJobObserver() override = default; - void processEvents() Q_DECL_OVERRIDE { + void processEvents() override { usleep(1000); qApp->processEvents(); } - void subJobStarted(const QString & jobTitle, int count) Q_DECL_OVERRIDE { + void subJobStarted(const QString & jobTitle, int count) override { _jobThread->sendReset(jobTitle); _jobThread->sendMaxProgressValue(count); } - void subJobStopped() Q_DECL_OVERRIDE { + void subJobStopped() override { } - bool wasCancelled() Q_DECL_OVERRIDE { + bool wasCancelled() override { return _jobThread->_exited; } - void error(const QString & error) Q_DECL_OVERRIDE { + void error(const QString & error) override { _jobThread->sendError(KIO::ERR_NO_CONTENT, error); } - void detailedError(const QString & error, const QString & details) Q_DECL_OVERRIDE { + void detailedError(const QString & error, const QString & details) override { _jobThread->sendError(KIO::ERR_NO_CONTENT, error + '\n' + details); } - void incrementProgress(int c) Q_DECL_OVERRIDE { + void incrementProgress(int c) override { _jobThread->sendAddProgress(c, _jobThread->_progressTitle); } }; diff --git a/krusader/Archive/kr7zencryptionchecker.h b/krusader/Archive/kr7zencryptionchecker.h --- a/krusader/Archive/kr7zencryptionchecker.h +++ b/krusader/Archive/kr7zencryptionchecker.h @@ -38,7 +38,7 @@ Kr7zEncryptionChecker(); protected: - void setupChildProcess() Q_DECL_OVERRIDE; + void setupChildProcess() override; public slots: void receivedOutput(); diff --git a/krusader/Archive/krarchandler.h b/krusader/Archive/krarchandler.h --- a/krusader/Archive/krarchandler.h +++ b/krusader/Archive/krarchandler.h @@ -74,7 +74,7 @@ // queries the password from the user static QString getPassword(const QString& path); // detects the archive type - void checkIf7zIsEncrypted(bool &, QString) Q_DECL_OVERRIDE; + void checkIf7zIsEncrypted(bool &, QString) override; private: //! checks if a returned status ("exit code") of an archiving-related process is OK static bool checkStatus(const QString& type, int exitCode); diff --git a/krusader/Archive/krarchandler.cpp b/krusader/Archive/krarchandler.cpp --- a/krusader/Archive/krarchandler.cpp +++ b/krusader/Archive/krarchandler.cpp @@ -51,32 +51,32 @@ DefaultKRarcObserver() {} virtual ~DefaultKRarcObserver() {} - virtual void processEvents() Q_DECL_OVERRIDE { + virtual void processEvents() override { usleep(1000); qApp->processEvents(); } - virtual void subJobStarted(const QString & jobTitle, int count) Q_DECL_OVERRIDE { + virtual void subJobStarted(const QString & jobTitle, int count) override { krApp->startWaiting(jobTitle, count, true); } - virtual void subJobStopped() Q_DECL_OVERRIDE { + virtual void subJobStopped() override { krApp->stopWait(); } - virtual bool wasCancelled() Q_DECL_OVERRIDE { + virtual bool wasCancelled() override { return krApp->wasWaitingCancelled(); } - virtual void error(const QString & error) Q_DECL_OVERRIDE { + virtual void error(const QString & error) override { KMessageBox::error(krApp, error, i18n("Error")); } - virtual void detailedError(const QString & error, const QString & details) Q_DECL_OVERRIDE { + virtual void detailedError(const QString & error, const QString & details) override { KMessageBox::detailedError(krApp, error, details, i18n("Error")); } - virtual void incrementProgress(int c) Q_DECL_OVERRIDE { + virtual void incrementProgress(int c) override { krApp->plzWait->incProgress(c); } }; diff --git a/krusader/Archive/packjob.h b/krusader/Archive/packjob.h --- a/krusader/Archive/packjob.h +++ b/krusader/Archive/packjob.h @@ -51,7 +51,7 @@ ~PackThread() override = default; protected slots: - void slotStart() Q_DECL_OVERRIDE; + void slotStart() override; private: QUrl _sourceUrl; @@ -83,7 +83,7 @@ ~TestArchiveThread() override = default; protected slots: - void slotStart() Q_DECL_OVERRIDE; + void slotStart() override; private: QUrl _sourceUrl; @@ -113,7 +113,7 @@ ~UnpackThread() override = default; protected slots: - void slotStart() Q_DECL_OVERRIDE; + void slotStart() override; private: QUrl _sourceUrl; diff --git a/krusader/BookMan/krbookmarkhandler.h b/krusader/BookMan/krbookmarkhandler.h --- a/krusader/BookMan/krbookmarkhandler.h +++ b/krusader/BookMan/krbookmarkhandler.h @@ -64,7 +64,7 @@ void clearBookmarks(KrBookmark *root, bool removeBookmarks = true); void buildMenu(KrBookmark *parent, QMenu *menu, int depth = 0); - bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE; + bool eventFilter(QObject *obj, QEvent *ev) override; void rightClicked(QMenu *menu, KrBookmark *bm); void rightClickOnSpecialBookmark(); diff --git a/krusader/Dialogs/checksumdlg.h b/krusader/Dialogs/checksumdlg.h --- a/krusader/Dialogs/checksumdlg.h +++ b/krusader/Dialogs/checksumdlg.h @@ -118,15 +118,15 @@ CreateWizard(const QString &path, const QStringList &_files); public slots: - void accept() Q_DECL_OVERRIDE; + void accept() override; private: - QWizardPage *createIntroPage() Q_DECL_OVERRIDE; - QWizardPage *createResultPage() Q_DECL_OVERRIDE; + QWizardPage *createIntroPage() override; + QWizardPage *createResultPage() override; - void onIntroPage() Q_DECL_OVERRIDE; - void onProgressPage() Q_DECL_OVERRIDE; - void onResultPage() Q_DECL_OVERRIDE; + void onIntroPage() override; + void onProgressPage() override; + void onResultPage() override; void createChecksums(); bool savePerFile(); @@ -157,12 +157,12 @@ void slotChecksumPathChanged(const QString &path); private: - QWizardPage *createIntroPage() Q_DECL_OVERRIDE; - QWizardPage *createResultPage() Q_DECL_OVERRIDE; + QWizardPage *createIntroPage() override; + QWizardPage *createResultPage() override; - void onIntroPage() Q_DECL_OVERRIDE; - void onProgressPage() Q_DECL_OVERRIDE; - void onResultPage() Q_DECL_OVERRIDE; + void onIntroPage() override; + void onProgressPage() override; + void onResultPage() override; bool isSupported(const QString &path); diff --git a/krusader/Dialogs/krdialogs.h b/krusader/Dialogs/krdialogs.h --- a/krusader/Dialogs/krdialogs.h +++ b/krusader/Dialogs/krdialogs.h @@ -89,7 +89,7 @@ KUrlRequester *urlRequester(); protected: - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *e) override; private slots: void slotQueueButtonClicked(); diff --git a/krusader/Dialogs/krpleasewait.h b/krusader/Dialogs/krpleasewait.h --- a/krusader/Dialogs/krpleasewait.h +++ b/krusader/Dialogs/krpleasewait.h @@ -74,7 +74,7 @@ protected: bool inc; QTimer* timer; - void closeEvent(QCloseEvent * e) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent * e) override; bool canClose; }; diff --git a/krusader/Dialogs/krspecialwidgets.h b/krusader/Dialogs/krspecialwidgets.h --- a/krusader/Dialogs/krspecialwidgets.h +++ b/krusader/Dialogs/krspecialwidgets.h @@ -47,7 +47,7 @@ void addSlice(KIO::filesize_t size, QString label); protected: - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *) override; private: QList slices; @@ -89,7 +89,7 @@ } protected: - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *) override; private: KIO::filesize_t totalSpace, freeSpace; diff --git a/krusader/Dialogs/krspwidgets.h b/krusader/Dialogs/krspwidgets.h --- a/krusader/Dialogs/krspwidgets.h +++ b/krusader/Dialogs/krspwidgets.h @@ -56,8 +56,8 @@ newFTPSub(); protected: - void reject() Q_DECL_OVERRIDE; - void accept() Q_DECL_OVERRIDE; + void reject() override; + void accept() override; }; /////////////////////////// KRMaskChoiceSub ///////////////////////////////// @@ -69,15 +69,15 @@ explicit KRMaskChoiceSub(QWidget * parent = 0); public slots: - void addSelection() Q_DECL_OVERRIDE; - void deleteSelection() Q_DECL_OVERRIDE; - void clearSelections() Q_DECL_OVERRIDE; - void acceptFromList(QListWidgetItem *i) Q_DECL_OVERRIDE; - void currentItemChanged(QListWidgetItem *i) Q_DECL_OVERRIDE; + void addSelection() override; + void deleteSelection() override; + void clearSelections() override; + void acceptFromList(QListWidgetItem *i) override; + void currentItemChanged(QListWidgetItem *i) override; protected: - void reject() Q_DECL_OVERRIDE; - void accept() Q_DECL_OVERRIDE; + void reject() override; + void accept() override; }; #endif diff --git a/krusader/Dialogs/krsqueezedtextlabel.h b/krusader/Dialogs/krsqueezedtextlabel.h --- a/krusader/Dialogs/krsqueezedtextlabel.h +++ b/krusader/Dialogs/krsqueezedtextlabel.h @@ -54,11 +54,11 @@ void clicked(QMouseEvent *); /**< emitted when someone clicks on the label */ protected: - void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE { + void resizeEvent(QResizeEvent *) override { squeezeTextToLabel(_index, _length); } - void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent * e) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *e) override; + void paintEvent(QPaintEvent * e) override; void squeezeTextToLabel(int index = -1, int length = -1); QString fullText; diff --git a/krusader/Dialogs/kurllistrequester.h b/krusader/Dialogs/kurllistrequester.h --- a/krusader/Dialogs/kurllistrequester.h +++ b/krusader/Dialogs/kurllistrequester.h @@ -62,7 +62,7 @@ void slotRightClicked(QListWidgetItem *, const QPoint &); protected: - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *e) override; void deleteSelectedItems(); Mode mode; diff --git a/krusader/Dialogs/newftpgui.h b/krusader/Dialogs/newftpgui.h --- a/krusader/Dialogs/newftpgui.h +++ b/krusader/Dialogs/newftpgui.h @@ -50,7 +50,7 @@ KLineEdit* password; protected: - bool event(QEvent *) Q_DECL_OVERRIDE; + bool event(QEvent *) override; private slots: void slotTextChanged(const QString &); diff --git a/krusader/Dialogs/packgui.h b/krusader/Dialogs/packgui.h --- a/krusader/Dialogs/packgui.h +++ b/krusader/Dialogs/packgui.h @@ -31,11 +31,11 @@ PackGUI(const QString& defaultName, const QString& defaultPath, int noOfFiles, const QString& filename = ""); public slots: - void browse() Q_DECL_OVERRIDE; + void browse() override; protected slots: - void accept() Q_DECL_OVERRIDE; - void reject() Q_DECL_OVERRIDE; + void accept() override; + void reject() override; public: static QString filename, destination, type; diff --git a/krusader/Dialogs/percentalsplitter.h b/krusader/Dialogs/percentalsplitter.h --- a/krusader/Dialogs/percentalsplitter.h +++ b/krusader/Dialogs/percentalsplitter.h @@ -36,7 +36,7 @@ QString toolTipString(int p); protected: - void showEvent(QShowEvent * event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent * event) override; protected slots: void slotSplitterMoved(int pos, int index); diff --git a/krusader/DiskUsage/diskusage.h b/krusader/DiskUsage/diskusage.h --- a/krusader/DiskUsage/diskusage.h +++ b/krusader/DiskUsage/diskusage.h @@ -133,8 +133,8 @@ Directory* currentDirectory; KIO::filesize_t currentSize; - virtual void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; - virtual bool event(QEvent *) Q_DECL_OVERRIDE; + virtual void keyPressEvent(QKeyEvent *) override; + virtual bool event(QEvent *) override; int calculateSizes(Directory *dir = 0, bool emitSig = false, int depth = 0); int calculatePercents(bool emitSig = false, Directory *dir = 0 , int depth = 0); diff --git a/krusader/DiskUsage/diskusagegui.h b/krusader/DiskUsage/diskusagegui.h --- a/krusader/DiskUsage/diskusagegui.h +++ b/krusader/DiskUsage/diskusagegui.h @@ -44,10 +44,10 @@ void askDirAndShow(); protected slots: - void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent *event) override; protected: - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *e) override; private slots: bool askDir(); diff --git a/krusader/DiskUsage/dufilelight.h b/krusader/DiskUsage/dufilelight.h --- a/krusader/DiskUsage/dufilelight.h +++ b/krusader/DiskUsage/dufilelight.h @@ -64,7 +64,7 @@ void minFontSize(); protected: - void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent*) override; void setScheme(Filelight::MapScheme); diff --git a/krusader/DiskUsage/dulines.h b/krusader/DiskUsage/dulines.h --- a/krusader/DiskUsage/dulines.h +++ b/krusader/DiskUsage/dulines.h @@ -55,10 +55,10 @@ protected: DiskUsage *diskUsage; - bool event(QEvent * event) Q_DECL_OVERRIDE; - void mouseDoubleClickEvent(QMouseEvent * e) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE; + bool event(QEvent * event) override; + void mouseDoubleClickEvent(QMouseEvent * e) override; + void keyPressEvent(QKeyEvent *e) override; + void resizeEvent(QResizeEvent *) override; private: QPixmap createPixmap(int percent, int maxPercent, int maxWidth); diff --git a/krusader/DiskUsage/dulines.cpp b/krusader/DiskUsage/dulines.cpp --- a/krusader/DiskUsage/dulines.cpp +++ b/krusader/DiskUsage/dulines.cpp @@ -51,7 +51,7 @@ explicit DULinesItemDelegate(QObject *parent = nullptr) : QItemDelegate(parent) {} - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE { + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override { QItemDelegate::paint(painter, option, index); QVariant value = index.data(Qt::UserRole); @@ -144,7 +144,7 @@ setTextAlignment(1, Qt::AlignRight); } - bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE { + bool operator<(const QTreeWidgetItem &other) const override { int column = treeWidget() ? treeWidget()->sortColumn() : 0; if (text(0) == "..") diff --git a/krusader/DiskUsage/dulistview.h b/krusader/DiskUsage/dulistview.h --- a/krusader/DiskUsage/dulistview.h +++ b/krusader/DiskUsage/dulistview.h @@ -120,7 +120,7 @@ diskUsage->removeProperty(file, "ListView-Ref"); } - bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE { + bool operator<(const QTreeWidgetItem &other) const override { int column = treeWidget() ? treeWidget()->sortColumn() : 0; if (text(0) == "..") @@ -172,8 +172,8 @@ protected: DiskUsage *diskUsage; - void mouseDoubleClickEvent(QMouseEvent * e) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void mouseDoubleClickEvent(QMouseEvent * e) override; + void keyPressEvent(QKeyEvent *e) override; private: void addDirectory(Directory *dirEntry, QTreeWidgetItem *parent); diff --git a/krusader/DiskUsage/filelightParts/fileTree.h b/krusader/DiskUsage/filelightParts/fileTree.h --- a/krusader/DiskUsage/filelightParts/fileTree.h +++ b/krusader/DiskUsage/filelightParts/fileTree.h @@ -338,7 +338,7 @@ } virtual ~Directory() {} - virtual bool isDir() const Q_DECL_OVERRIDE { + virtual bool isDir() const override { return true; } diff --git a/krusader/DiskUsage/radialMap/segmentTip.h b/krusader/DiskUsage/radialMap/segmentTip.h --- a/krusader/DiskUsage/radialMap/segmentTip.h +++ b/krusader/DiskUsage/radialMap/segmentTip.h @@ -42,8 +42,8 @@ void moveto(QPoint, QWidget&, bool); private: - virtual bool eventFilter(QObject*, QEvent*) Q_DECL_OVERRIDE; - virtual bool event(QEvent*) Q_DECL_OVERRIDE; + virtual bool eventFilter(QObject*, QEvent*) override; + virtual bool event(QEvent*) override; uint m_cursorHeight; QPixmap m_pixmap; diff --git a/krusader/DiskUsage/radialMap/widget.h b/krusader/DiskUsage/radialMap/widget.h --- a/krusader/DiskUsage/radialMap/widget.h +++ b/krusader/DiskUsage/radialMap/widget.h @@ -110,10 +110,10 @@ void mouseHover(const QString&); protected: - void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent*) override; + void resizeEvent(QResizeEvent*) override; + void mouseMoveEvent(QMouseEvent*) override; + void mousePressEvent(QMouseEvent*) override; protected: const Segment *segmentAt(QPoint&) const; //FIXME const reference for a library others can use diff --git a/krusader/FileSystem/defaultfilesystem.h b/krusader/FileSystem/defaultfilesystem.h --- a/krusader/FileSystem/defaultfilesystem.h +++ b/krusader/FileSystem/defaultfilesystem.h @@ -50,23 +50,23 @@ void copyFiles(const QList &urls, const QUrl &destination, KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, bool showProgressInfo = true, - JobMan::StartMode startMode = JobMan::Default) Q_DECL_OVERRIDE; - void dropFiles(const QUrl &destination, QDropEvent *event) Q_DECL_OVERRIDE; + JobMan::StartMode startMode = JobMan::Default) override; + void dropFiles(const QUrl &destination, QDropEvent *event) override; void addFiles(const QList &fileUrls, KIO::CopyJob::CopyMode mode, - const QString &dir = "") Q_DECL_OVERRIDE; - void mkDir(const QString &name) Q_DECL_OVERRIDE; - void rename(const QString &fileName, const QString &newName) Q_DECL_OVERRIDE; + const QString &dir = "") override; + void mkDir(const QString &name) override; + void rename(const QString &fileName, const QString &newName) override; /// Return URL for file name - even if file does not exist. - QUrl getUrl(const QString &name) const Q_DECL_OVERRIDE; - bool canMoveToTrash(const QStringList &) const Q_DECL_OVERRIDE { return isLocal(); } + QUrl getUrl(const QString &name) const override; + bool canMoveToTrash(const QStringList &) const override { return isLocal(); } - QString mountPoint() const Q_DECL_OVERRIDE { return _mountPoint; } - bool hasAutoUpdate() const Q_DECL_OVERRIDE { return !_watcher.isNull(); } - void updateFilesystemInfo() Q_DECL_OVERRIDE; + QString mountPoint() const override { return _mountPoint; } + bool hasAutoUpdate() const override { return !_watcher.isNull(); } + void updateFilesystemInfo() override; protected: - bool refreshInternal(const QUrl &origin, bool onlyScan) Q_DECL_OVERRIDE; + bool refreshInternal(const QUrl &origin, bool onlyScan) override; protected slots: /// Handle result after dir listing job is finished diff --git a/krusader/FileSystem/filesystem.h b/krusader/FileSystem/filesystem.h --- a/krusader/FileSystem/filesystem.h +++ b/krusader/FileSystem/filesystem.h @@ -67,9 +67,9 @@ ~FileSystem() override; // DirListerInterface implementation - inline QList fileItems() const Q_DECL_OVERRIDE { return _fileItems.values(); } - inline unsigned long numFileItems() const Q_DECL_OVERRIDE { return _fileItems.count(); } - inline bool isRoot() const Q_DECL_OVERRIDE { + inline QList fileItems() const override { return _fileItems.values(); } + inline unsigned long numFileItems() const override { return _fileItems.count(); } + inline bool isRoot() const override { const QString path = _currentDirectory.path(); return path.isEmpty() || path == "/"; } diff --git a/krusader/FileSystem/krquery.h b/krusader/FileSystem/krquery.h --- a/krusader/FileSystem/krquery.h +++ b/krusader/FileSystem/krquery.h @@ -146,9 +146,9 @@ protected: // important to know whether the event processor is connected - void connectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE; + void connectNotify(const QMetaMethod &signal) override; // important to know whether the event processor is connected - void disconnectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE; + void disconnectNotify(const QMetaMethod &signal) override; protected: QStringList matches; // what to search diff --git a/krusader/FileSystem/virtualfilesystem.h b/krusader/FileSystem/virtualfilesystem.h --- a/krusader/FileSystem/virtualfilesystem.h +++ b/krusader/FileSystem/virtualfilesystem.h @@ -51,28 +51,28 @@ /// Create virtual files in this filesystem. Copy mode and showProgressInfo are ignored. void copyFiles(const QList &urls, const QUrl &destination, KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, bool showProgressInfo = false, - JobMan::StartMode startMode = JobMan::Start) Q_DECL_OVERRIDE; + JobMan::StartMode startMode = JobMan::Start) override; /// Handle file dropping in this filesystem: Always creates virtual files. - void dropFiles(const QUrl &destination, QDropEvent *event) Q_DECL_OVERRIDE; + void dropFiles(const QUrl &destination, QDropEvent *event) override; /// Add virtual files to the current directory. void addFiles(const QList &fileUrls, KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, - const QString &dir = "") Q_DECL_OVERRIDE; + const QString &dir = "") override; /// Create a virtual directory. Only possible in the root directory. - void mkDir(const QString &name) Q_DECL_OVERRIDE; + void mkDir(const QString &name) override; /// Rename a (real) file in the current directory. - void rename(const QString &fileName, const QString &newName) Q_DECL_OVERRIDE; + void rename(const QString &fileName, const QString &newName) override; /// Returns the URL of the real file or an empty URL if file with name does not exist. - QUrl getUrl(const QString& name) const Q_DECL_OVERRIDE; - bool canMoveToTrash(const QStringList &fileNames) const Q_DECL_OVERRIDE; + QUrl getUrl(const QString& name) const override; + bool canMoveToTrash(const QStringList &fileNames) const override; /// Remove virtual files or directories. Real files stay untouched. void remove(const QStringList &fileNames); /// Set meta information to be displayed in UI for the current directory void setMetaInformation(const QString &info); protected: - bool refreshInternal(const QUrl &origin, bool onlyScan) Q_DECL_OVERRIDE; + bool refreshInternal(const QUrl &origin, bool onlyScan) override; private: /// Return current dir: "/" or pure directory name diff --git a/krusader/Filter/advancedfilter.h b/krusader/Filter/advancedfilter.h --- a/krusader/Filter/advancedfilter.h +++ b/krusader/Filter/advancedfilter.h @@ -43,15 +43,15 @@ public: explicit AdvancedFilter(FilterTabs *tabs, QWidget *parent = nullptr); - void queryAccepted() Q_DECL_OVERRIDE {} - QString name() Q_DECL_OVERRIDE { + void queryAccepted() override {} + QString name() override { return "AdvancedFilter"; } - FilterTabs * filterTabs() Q_DECL_OVERRIDE { + FilterTabs * filterTabs() override { return fltTabs; } - bool getSettings(FilterSettings&) Q_DECL_OVERRIDE; - void applySettings(const FilterSettings&) Q_DECL_OVERRIDE; + bool getSettings(FilterSettings&) override; + void applySettings(const FilterSettings&) override; public slots: void modifiedBetweenSetDate1(); diff --git a/krusader/Filter/generalfilter.h b/krusader/Filter/generalfilter.h --- a/krusader/Filter/generalfilter.h +++ b/krusader/Filter/generalfilter.h @@ -48,15 +48,15 @@ QStringList extraOptions = QStringList()); ~GeneralFilter() override; - void queryAccepted() Q_DECL_OVERRIDE; - QString name() Q_DECL_OVERRIDE { + void queryAccepted() override; + QString name() override { return "GeneralFilter"; } - FilterTabs * filterTabs() Q_DECL_OVERRIDE { + FilterTabs * filterTabs() override { return fltTabs; } - bool getSettings(FilterSettings&) Q_DECL_OVERRIDE; - void applySettings(const FilterSettings&) Q_DECL_OVERRIDE; + bool getSettings(FilterSettings&) override; + void applySettings(const FilterSettings&) override; bool isExtraOptionChecked(const QString& name); void checkExtraOption(const QString& name, bool check); diff --git a/krusader/GUI/kcmdline.h b/krusader/GUI/kcmdline.h --- a/krusader/GUI/kcmdline.h +++ b/krusader/GUI/kcmdline.h @@ -45,7 +45,7 @@ public: explicit CmdLineCombo(QWidget *parent); - bool eventFilter(QObject *watched, QEvent *e) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *e) override; QString path() { return _path; @@ -59,8 +59,8 @@ void doLayout(); protected: - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; void updateLineEditGeometry(); @@ -79,14 +79,14 @@ void setCurrent(const QString &path); //virtual methods from KrActionBase void setText(const QString& text); - QString command() const Q_DECL_OVERRIDE; - ExecType execType() const Q_DECL_OVERRIDE; - QString startpath() const Q_DECL_OVERRIDE; - QString user() const Q_DECL_OVERRIDE; - QString text() const Q_DECL_OVERRIDE; - bool acceptURLs() const Q_DECL_OVERRIDE; - bool confirmExecution() const Q_DECL_OVERRIDE; - bool doSubstitution() const Q_DECL_OVERRIDE; + QString command() const override; + ExecType execType() const override; + QString startpath() const override; + QString user() const override; + QString text() const override; + bool acceptURLs() const override; + bool confirmExecution() const override; + bool doSubstitution() const override; signals: void signalRun(); @@ -103,7 +103,7 @@ } protected: - void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE { + void focusInEvent(QFocusEvent*) override { cmdLine->setFocus(); } diff --git a/krusader/GUI/krstyleproxy.h b/krusader/GUI/krstyleproxy.h --- a/krusader/GUI/krstyleproxy.h +++ b/krusader/GUI/krstyleproxy.h @@ -28,12 +28,12 @@ { public: void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, - const QWidget *widget = 0) const Q_DECL_OVERRIDE; + const QWidget *widget = 0) const override; int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, - QStyleHintReturn *returnData) const Q_DECL_OVERRIDE; + QStyleHintReturn *returnData) const override; }; #endif /* KRSTYLEPROXY_H */ diff --git a/krusader/GUI/krtreewidget.h b/krusader/GUI/krtreewidget.h --- a/krusader/GUI/krtreewidget.h +++ b/krusader/GUI/krtreewidget.h @@ -46,7 +46,7 @@ void itemRightClicked(QTreeWidgetItem * it, const QPoint & pos, int column); protected: - bool event(QEvent * event) Q_DECL_OVERRIDE; + bool event(QEvent * event) override; private: int _stretchingColumn; diff --git a/krusader/GUI/mediabutton.h b/krusader/GUI/mediabutton.h --- a/krusader/GUI/mediabutton.h +++ b/krusader/GUI/mediabutton.h @@ -61,7 +61,7 @@ void aboutToShow(); protected: - bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE; + bool eventFilter(QObject *o, QEvent *e) override; bool getNameAndIcon(Solid::Device &, QString &, QIcon &); private: diff --git a/krusader/GUI/terminaldock.h b/krusader/GUI/terminaldock.h --- a/krusader/GUI/terminaldock.h +++ b/krusader/GUI/terminaldock.h @@ -49,12 +49,12 @@ ~TerminalDock() override; void sendInput(const QString& input, bool clearCommand=true); void sendCd(const QString& path); - bool eventFilter(QObject * watched, QEvent * e) Q_DECL_OVERRIDE; + bool eventFilter(QObject * watched, QEvent * e) override; bool isTerminalVisible() const; bool isInitialised() const; bool initialise(); - void hideEvent(QHideEvent * e) Q_DECL_OVERRIDE; - void showEvent(QShowEvent * e) Q_DECL_OVERRIDE; + void hideEvent(QHideEvent * e) override; + void showEvent(QShowEvent * e) override; inline KParts::Part* part() { return konsole_part; } diff --git a/krusader/KViewer/krviewer.h b/krusader/KViewer/krviewer.h --- a/krusader/KViewer/krviewer.h +++ b/krusader/KViewer/krviewer.h @@ -57,7 +57,7 @@ static void edit(const QUrl& url, Mode mode = Text, int new_window = -1, QWidget * parent = krMainWindow); static void configureDeps(); - virtual bool eventFilter(QObject * watched, QEvent * e) Q_DECL_OVERRIDE; + virtual bool eventFilter(QObject * watched, QEvent * e) override; public slots: void createGUI(KParts::Part*); @@ -84,10 +84,10 @@ void checkModified(); protected: - virtual bool queryClose() Q_DECL_OVERRIDE; - virtual void changeEvent(QEvent *e) Q_DECL_OVERRIDE; - virtual void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; - virtual void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE { + virtual bool queryClose() override; + virtual void changeEvent(QEvent *e) override; + virtual void resizeEvent(QResizeEvent *e) override; + virtual void focusInEvent(QFocusEvent *) override { if (viewers.removeAll(this)) viewers.prepend(this); } // move to first diff --git a/krusader/KViewer/lister.h b/krusader/KViewer/lister.h --- a/krusader/KViewer/lister.h +++ b/krusader/KViewer/lister.h @@ -91,12 +91,12 @@ void sizeChanged(); protected: - void resizeEvent(QResizeEvent * event) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent * e) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent * e) Q_DECL_OVERRIDE; - void mouseDoubleClickEvent(QMouseEvent * e) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent * e) Q_DECL_OVERRIDE; - void wheelEvent(QWheelEvent * event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent * event) override; + void keyPressEvent(QKeyEvent * e) override; + void mousePressEvent(QMouseEvent * e) override; + void mouseDoubleClickEvent(QMouseEvent * e) override; + void mouseMoveEvent(QMouseEvent * e) override; + void wheelEvent(QWheelEvent * event) override; QStringList readLines(const qint64 filePos, qint64 &endPos, const int lines, QList * locs = nullptr); QString readSection(qint64 p1, qint64 p2); @@ -174,7 +174,7 @@ ListerPane(Lister *lister, QWidget *parent); protected: - bool event(QEvent *event) Q_DECL_OVERRIDE; + bool event(QEvent *event) override; protected: bool handleCloseEvent(QEvent *e); @@ -242,14 +242,14 @@ void slotSendFinished(KJob *); protected: - bool openUrl(const QUrl &url) Q_DECL_OVERRIDE; - bool closeUrl() Q_DECL_OVERRIDE { + bool openUrl(const QUrl &url) override; + bool closeUrl() override { return true; } - bool openFile() Q_DECL_OVERRIDE { + bool openFile() override { return true; } - void guiActivateEvent(KParts::GUIActivateEvent * event) Q_DECL_OVERRIDE; + void guiActivateEvent(KParts::GUIActivateEvent * event) override; void setColor(const bool match, const bool restore); void hideProgressBar(); void updateProgressBar(); diff --git a/krusader/KViewer/lister.cpp b/krusader/KViewer/lister.cpp --- a/krusader/KViewer/lister.cpp +++ b/krusader/KViewer/lister.cpp @@ -1184,15 +1184,15 @@ } protected: - QString currentCharacterSet() Q_DECL_OVERRIDE { + QString currentCharacterSet() override { return _lister->characterSet(); } - void chooseDefault() Q_DECL_OVERRIDE { + void chooseDefault() override { _lister->setCharacterSet(QString()); } - void chooseEncoding(QString encodingName) Q_DECL_OVERRIDE { + void chooseEncoding(QString encodingName) override { QString charset = KCharsets::charsets()->encodingForName(encodingName); _lister->setCharacterSet(charset); } diff --git a/krusader/KViewer/panelviewer.h b/krusader/KViewer/panelviewer.h --- a/krusader/KViewer/panelviewer.h +++ b/krusader/KViewer/panelviewer.h @@ -93,19 +93,19 @@ { Q_OBJECT public slots: - bool closeUrl() Q_DECL_OVERRIDE; + bool closeUrl() override; public: explicit PanelViewer(QWidget *parent, KrViewer::Mode mode = KrViewer::Default); ~PanelViewer() override; - bool isEditor() Q_DECL_OVERRIDE { + bool isEditor() override { return false; } protected: - void openFile(KFileItem fi) Q_DECL_OVERRIDE; - KParts::ReadOnlyPart* createPart(QString mimetype) Q_DECL_OVERRIDE; + void openFile(KFileItem fi) override; + KParts::ReadOnlyPart* createPart(QString mimetype) override; KParts::ReadOnlyPart* getDefaultPart(const KFileItem& fi); KParts::ReadOnlyPart* getHexPart(); KParts::ReadOnlyPart* getListerPart(bool hexMode = false); @@ -116,24 +116,24 @@ { Q_OBJECT public: - bool isModified() Q_DECL_OVERRIDE; - bool isEditor() Q_DECL_OVERRIDE { + bool isModified() override; + bool isEditor() override { return true; } static void configureDeps(); public slots: - bool closeUrl() Q_DECL_OVERRIDE; - bool queryClose() Q_DECL_OVERRIDE; + bool closeUrl() override; + bool queryClose() override; public: explicit PanelEditor(QWidget *parent, KrViewer::Mode mode = KrViewer::Default); ~PanelEditor() override; protected: - void openFile(KFileItem fi) Q_DECL_OVERRIDE; - KParts::ReadOnlyPart* createPart(QString mimetype) Q_DECL_OVERRIDE; + void openFile(KFileItem fi) override; + KParts::ReadOnlyPart* createPart(QString mimetype) override; static QString missingKPartMsg(); }; diff --git a/krusader/Konfigurator/kgcolors.h b/krusader/Konfigurator/kgcolors.h --- a/krusader/Konfigurator/kgcolors.h +++ b/krusader/Konfigurator/kgcolors.h @@ -39,7 +39,7 @@ public: explicit KgColors(bool first, QWidget* parent = nullptr); - bool apply() Q_DECL_OVERRIDE; + bool apply() override; public slots: void slotDisable(); diff --git a/krusader/Konfigurator/kgdependencies.h b/krusader/Konfigurator/kgdependencies.h --- a/krusader/Konfigurator/kgdependencies.h +++ b/krusader/Konfigurator/kgdependencies.h @@ -36,7 +36,7 @@ public: explicit KgDependencies(bool first, QWidget* parent = nullptr); - int activeSubPage() Q_DECL_OVERRIDE; + int activeSubPage() override; private: void addApplication(const QString& name, QGridLayout *grid, int row, QWidget *parent, int page, const QString& additionalList = QString()); diff --git a/krusader/Konfigurator/kgpanel.h b/krusader/Konfigurator/kgpanel.h --- a/krusader/Konfigurator/kgpanel.h +++ b/krusader/Konfigurator/kgpanel.h @@ -33,7 +33,7 @@ public: explicit KgPanel(bool first, QWidget* parent = nullptr); - int activeSubPage() Q_DECL_OVERRIDE; + int activeSubPage() override; protected: KonfiguratorCheckBoxGroup *panelToolbarButtonsCheckboxes; diff --git a/krusader/Konfigurator/kgprotocols.h b/krusader/Konfigurator/kgprotocols.h --- a/krusader/Konfigurator/kgprotocols.h +++ b/krusader/Konfigurator/kgprotocols.h @@ -35,10 +35,10 @@ public: explicit KgProtocols(bool first, QWidget* parent = nullptr); - void loadInitialValues() Q_DECL_OVERRIDE; - void setDefaults() Q_DECL_OVERRIDE; - bool apply() Q_DECL_OVERRIDE; - bool isChanged() Q_DECL_OVERRIDE; + void loadInitialValues() override; + void setDefaults() override; + bool apply() override; + bool isChanged() override; static void init(); diff --git a/krusader/Konfigurator/konfigurator.h b/krusader/Konfigurator/konfigurator.h --- a/krusader/Konfigurator/konfigurator.h +++ b/krusader/Konfigurator/konfigurator.h @@ -44,15 +44,15 @@ public: explicit Konfigurator(bool f = false, int startPage = 0); // true if Konfigurator is run for the first time - void reject() Q_DECL_OVERRIDE; + void reject() override; protected: void newPage(KonfiguratorPage *, const QString &, const QString &, const QIcon &); // adds widget and connects to slot void createLayout(int startPage); void closeDialog(); - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; - void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *e) override; + void closeEvent(QCloseEvent *event) override; protected slots: void slotApplyEnable(); diff --git a/krusader/Konfigurator/konfiguratoritems.h b/krusader/Konfigurator/konfiguratoritems.h --- a/krusader/Konfigurator/konfiguratoritems.h +++ b/krusader/Konfigurator/konfiguratoritems.h @@ -93,7 +93,7 @@ QString configGroup; QString configName; - void connectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE; + void connectNotify(const QMetaMethod &signal) override; }; @@ -121,8 +121,8 @@ void slotSetDefaults(QObject *); protected: - void checkStateSet() Q_DECL_OVERRIDE; - void nextCheckState() Q_DECL_OVERRIDE; + void checkStateSet() override; + void nextCheckState() override; void updateDeps(); bool defaultValue; diff --git a/krusader/Konfigurator/krresulttable.h b/krusader/Konfigurator/krresulttable.h --- a/krusader/Konfigurator/krresulttable.h +++ b/krusader/Konfigurator/krresulttable.h @@ -88,7 +88,7 @@ explicit KrArchiverResultTable(QWidget* parent); ~KrArchiverResultTable() override; - bool addRow(SearchObject* search, QGridLayout* grid) Q_DECL_OVERRIDE; + bool addRow(SearchObject* search, QGridLayout* grid) override; protected: KUrlLabel* _nameLabel; @@ -107,7 +107,7 @@ explicit KrToolResultTable(QWidget* parent); ~KrToolResultTable() override; - bool addRow(SearchObject* search, QGridLayout* grid) Q_DECL_OVERRIDE; + bool addRow(SearchObject* search, QGridLayout* grid) override; protected: QList _apps; diff --git a/krusader/Locate/locate.h b/krusader/Locate/locate.h --- a/krusader/Locate/locate.h +++ b/krusader/Locate/locate.h @@ -61,7 +61,7 @@ void updateFinished(); protected: - void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *) override; private: void operate(QTreeWidgetItem *item, int task); diff --git a/krusader/Locate/locate.cpp b/krusader/Locate/locate.cpp --- a/krusader/Locate/locate.cpp +++ b/krusader/Locate/locate.cpp @@ -85,7 +85,7 @@ setAlternatingRowColors(true); } - void startDrag(Qt::DropActions supportedActs) Q_DECL_OVERRIDE { + void startDrag(Qt::DropActions supportedActs) override { Q_UNUSED(supportedActs); QList urls; diff --git a/krusader/MountMan/kmountmangui.h b/krusader/MountMan/kmountmangui.h --- a/krusader/MountMan/kmountmangui.h +++ b/krusader/MountMan/kmountmangui.h @@ -58,7 +58,7 @@ ~KMountManGUI() override; protected: - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *e) override; protected slots: void doubleClicked(QTreeWidgetItem *); diff --git a/krusader/Panel/PanelView/krinterbriefview.h b/krusader/Panel/PanelView/krinterbriefview.h --- a/krusader/Panel/PanelView/krinterbriefview.h +++ b/krusader/Panel/PanelView/krinterbriefview.h @@ -43,69 +43,69 @@ ~KrInterBriefView() override; // ---- reimplemented from QAbstractItemView ---- - QRect visualRect(const QModelIndex&) const Q_DECL_OVERRIDE; - QModelIndex indexAt(const QPoint&) const Q_DECL_OVERRIDE; - void scrollTo(const QModelIndex &, QAbstractItemView::ScrollHint = QAbstractItemView::EnsureVisible) Q_DECL_OVERRIDE; + QRect visualRect(const QModelIndex&) const override; + QModelIndex indexAt(const QPoint&) const override; + void scrollTo(const QModelIndex &, QAbstractItemView::ScrollHint = QAbstractItemView::EnsureVisible) override; // ---- reimplemented from KrView ---- - int itemsPerPage() Q_DECL_OVERRIDE; - void updateView() Q_DECL_OVERRIDE; - bool ensureVisibilityAfterSelect() Q_DECL_OVERRIDE { + int itemsPerPage() override; + void updateView() override; + bool ensureVisibilityAfterSelect() override { return false; } - void setSortMode(KrViewProperties::ColumnType sortColumn, bool descending) Q_DECL_OVERRIDE; + void setSortMode(KrViewProperties::ColumnType sortColumn, bool descending) override; // ---- reimplemented from QAbstractItemView ---- // Don't do anything, selections are handled by the mouse handler - void setSelection(const QRect &, QItemSelectionModel::SelectionFlags) Q_DECL_OVERRIDE {} - void selectAll() Q_DECL_OVERRIDE {} + void setSelection(const QRect &, QItemSelectionModel::SelectionFlags) override {} + void selectAll() override {} // this shouldn't be called - QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE { + QRegion visualRegionForSelection(const QItemSelection&) const override { return QRegion(); } // ---- reimplemented from KrView ---- - void setFileIconSize(int size) Q_DECL_OVERRIDE; + void setFileIconSize(int size) override; protected slots: // ---- reimplemented from QAbstractItemView ---- - void updateGeometries() Q_DECL_OVERRIDE; + void updateGeometries() override; // ---- reimplemented from KrView ---- - void currentChanged(const QModelIndex & current, const QModelIndex & previous) Q_DECL_OVERRIDE; + void currentChanged(const QModelIndex & current, const QModelIndex & previous) override; - void renameCurrentItem() Q_DECL_OVERRIDE; + void renameCurrentItem() override; protected: // ---- reimplemented from KrView ---- - bool handleKeyEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + bool handleKeyEvent(QKeyEvent *e) override; // ---- reimplemented from QAbstractItemView ---- - bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE; - QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE; - int horizontalOffset() const Q_DECL_OVERRIDE; - int verticalOffset() const Q_DECL_OVERRIDE; - bool isIndexHidden(const QModelIndex&) const Q_DECL_OVERRIDE; -// QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE; - bool event(QEvent * e) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void mouseDoubleClickEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; - void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE; - void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE; - void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE; - void dropEvent(QDropEvent *) Q_DECL_OVERRIDE; + bool eventFilter(QObject *object, QEvent *event) override; + void keyPressEvent(QKeyEvent *e) override; + void paintEvent(QPaintEvent *e) override; + QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) override; + int horizontalOffset() const override; + int verticalOffset() const override; + bool isIndexHidden(const QModelIndex&) const override; +// QRegion visualRegionForSelection(const QItemSelection&) const override; + bool event(QEvent * e) override; + void mousePressEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void mouseDoubleClickEvent(QMouseEvent *ev) override; + void mouseMoveEvent(QMouseEvent *) override; + void wheelEvent(QWheelEvent *) override; + void dragEnterEvent(QDragEnterEvent *e) override; + void dragMoveEvent(QDragMoveEvent *e) override; + void dragLeaveEvent(QDragLeaveEvent *e) override; + void dropEvent(QDropEvent *) override; // ---- reimplemented from KrView ---- - void setup() Q_DECL_OVERRIDE; - void doRestoreSettings(KConfigGroup group) Q_DECL_OVERRIDE; - void saveSettings(KConfigGroup grp, KrViewProperties::PropertyType properties) Q_DECL_OVERRIDE; - void copySettingsFrom(KrView *other) Q_DECL_OVERRIDE; - QRect itemRect(const FileItem *fileitem) Q_DECL_OVERRIDE; - void showContextMenu(const QPoint & p) Q_DECL_OVERRIDE; + void setup() override; + void doRestoreSettings(KConfigGroup group) override; + void saveSettings(KConfigGroup grp, KrViewProperties::PropertyType properties) override; + void copySettingsFrom(KrView *other) override; + QRect itemRect(const FileItem *fileitem) override; + void showContextMenu(const QPoint & p) override; QRect mapToViewport(const QRect &rect) const; int getItemHeight() const; diff --git a/krusader/Panel/PanelView/krinterdetailedview.h b/krusader/Panel/PanelView/krinterdetailedview.h --- a/krusader/Panel/PanelView/krinterdetailedview.h +++ b/krusader/Panel/PanelView/krinterdetailedview.h @@ -43,50 +43,50 @@ KrInterDetailedView(QWidget *parent, KrViewInstance &instance, KConfig *cfg); ~KrInterDetailedView() override; - void updateView() Q_DECL_OVERRIDE; + void updateView() override; - bool ensureVisibilityAfterSelect() Q_DECL_OVERRIDE { + bool ensureVisibilityAfterSelect() override { return false; } - int itemsPerPage() Q_DECL_OVERRIDE; - void setSortMode(KrViewProperties::ColumnType sortColumn, bool descending) Q_DECL_OVERRIDE; - void setFileIconSize(int size) Q_DECL_OVERRIDE; - void doRestoreSettings(KConfigGroup grp) Q_DECL_OVERRIDE; + int itemsPerPage() override; + void setSortMode(KrViewProperties::ColumnType sortColumn, bool descending) override; + void setFileIconSize(int size) override; + void doRestoreSettings(KConfigGroup grp) override; protected slots: - void renameCurrentItem() Q_DECL_OVERRIDE; + void renameCurrentItem() override; void sectionResized(int, int, int); void sectionMoved(int, int, int); - void currentChanged(const QModelIndex & current, const QModelIndex & previous) Q_DECL_OVERRIDE; + void currentChanged(const QModelIndex & current, const QModelIndex & previous) override; protected: - void setup() Q_DECL_OVERRIDE; - void copySettingsFrom(KrView *other) Q_DECL_OVERRIDE; - void saveSettings(KConfigGroup grp, KrViewProperties::PropertyType properties) Q_DECL_OVERRIDE; + void setup() override; + void copySettingsFrom(KrView *other) override; + void saveSettings(KConfigGroup grp, KrViewProperties::PropertyType properties) override; // Don't do anything, selections are handled by the mouse handler - void setSelection(const QRect &, QItemSelectionModel::SelectionFlags) Q_DECL_OVERRIDE {} - void selectAll() Q_DECL_OVERRIDE {} + void setSelection(const QRect &, QItemSelectionModel::SelectionFlags) override {} + void selectAll() override {} - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void mouseDoubleClickEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; - void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE; - bool event(QEvent * e) Q_DECL_OVERRIDE; - void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE; - void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE; - void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE; - void dropEvent(QDropEvent *) Q_DECL_OVERRIDE; - bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; - bool viewportEvent(QEvent * event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *e) override; + void mousePressEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void mouseDoubleClickEvent(QMouseEvent *ev) override; + void mouseMoveEvent(QMouseEvent *) override; + void wheelEvent(QWheelEvent *) override; + bool event(QEvent * e) override; + void dragEnterEvent(QDragEnterEvent *e) override; + void dragMoveEvent(QDragMoveEvent *e) override; + void dragLeaveEvent(QDragLeaveEvent *e) override; + void dropEvent(QDropEvent *) override; + bool eventFilter(QObject *object, QEvent *event) override; + bool viewportEvent(QEvent * event) override; void drawRow(QPainter *painter, const QStyleOptionViewItem &options, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; - QRect itemRect(const FileItem *fileitem) Q_DECL_OVERRIDE; + QRect itemRect(const FileItem *fileitem) override; - void showContextMenu(const QPoint & p) Q_DECL_OVERRIDE; + void showContextMenu(const QPoint & p) override; void recalculateColumnSizes(); private: diff --git a/krusader/Panel/PanelView/krinterview.h b/krusader/Panel/PanelView/krinterview.h --- a/krusader/Panel/PanelView/krinterview.h +++ b/krusader/Panel/PanelView/krinterview.h @@ -45,36 +45,36 @@ public: KrInterView(KrViewInstance &instance, KConfig *cfg, QAbstractItemView *itemView); virtual ~KrInterView(); - QModelIndex getCurrentIndex() Q_DECL_OVERRIDE { + QModelIndex getCurrentIndex() override { return _itemView->currentIndex(); } - bool isSelected(const QModelIndex &ndx) Q_DECL_OVERRIDE; - uint numSelected() const Q_DECL_OVERRIDE { + bool isSelected(const QModelIndex &ndx) override; + uint numSelected() const override { return _selection.count(); } - QList selectedUrls() Q_DECL_OVERRIDE; - void setSelectionUrls(const QList urls) Q_DECL_OVERRIDE; - KrViewItem* getFirst() Q_DECL_OVERRIDE; - KrViewItem* getLast() Q_DECL_OVERRIDE; - KrViewItem* getNext(KrViewItem *current) Q_DECL_OVERRIDE; - KrViewItem* getPrev(KrViewItem *current) Q_DECL_OVERRIDE; - KrViewItem* getCurrentKrViewItem() Q_DECL_OVERRIDE; - KrViewItem* findItemByName(const QString &name) Q_DECL_OVERRIDE; - KrViewItem *findItemByUrl(const QUrl &url) Q_DECL_OVERRIDE; - QString getCurrentItem() const Q_DECL_OVERRIDE; - KrViewItem *getKrViewItemAt(const QPoint &vp) Q_DECL_OVERRIDE; + QList selectedUrls() override; + void setSelectionUrls(const QList urls) override; + KrViewItem* getFirst() override; + KrViewItem* getLast() override; + KrViewItem* getNext(KrViewItem *current) override; + KrViewItem* getPrev(KrViewItem *current) override; + KrViewItem* getCurrentKrViewItem() override; + KrViewItem* findItemByName(const QString &name) override; + KrViewItem *findItemByUrl(const QUrl &url) override; + QString getCurrentItem() const override; + KrViewItem *getKrViewItemAt(const QPoint &vp) override; void setCurrentItem(const QString &name, bool scrollToCurrent = true, - const QModelIndex &fallbackToIndex = QModelIndex()) Q_DECL_OVERRIDE; - void setCurrentKrViewItem(KrViewItem *item, bool scrollToCurrent = true) Q_DECL_OVERRIDE; - void makeItemVisible(const KrViewItem *item) Q_DECL_OVERRIDE; - bool isItemVisible(const KrViewItem *item) Q_DECL_OVERRIDE; - void clear() Q_DECL_OVERRIDE; - void sort() Q_DECL_OVERRIDE; - void refreshColors() Q_DECL_OVERRIDE; - void redraw() Q_DECL_OVERRIDE; - void prepareForActive() Q_DECL_OVERRIDE; - void prepareForPassive() Q_DECL_OVERRIDE; - void selectRegion(KrViewItem *i1, KrViewItem *i2, bool select) Q_DECL_OVERRIDE; + const QModelIndex &fallbackToIndex = QModelIndex()) override; + void setCurrentKrViewItem(KrViewItem *item, bool scrollToCurrent = true) override; + void makeItemVisible(const KrViewItem *item) override; + bool isItemVisible(const KrViewItem *item) override; + void clear() override; + void sort() override; + void refreshColors() override; + void redraw() override; + void prepareForActive() override; + void prepareForPassive() override; + void selectRegion(KrViewItem *i1, KrViewItem *i2, bool select) override; void sortModeUpdated(int column, Qt::SortOrder order); @@ -89,19 +89,19 @@ DummySelectionModel(QAbstractItemModel *model, QObject *parent) : QItemSelectionModel(model, parent) {} // do nothing - selection is managed by KrInterView - void select(const QModelIndex &, QItemSelectionModel::SelectionFlags) Q_DECL_OVERRIDE {} - void select(const QItemSelection &, QItemSelectionModel::SelectionFlags) Q_DECL_OVERRIDE {} + void select(const QModelIndex &, QItemSelectionModel::SelectionFlags) override {} + void select(const QItemSelection &, QItemSelectionModel::SelectionFlags) override {} }; - KIO::filesize_t calcSize() Q_DECL_OVERRIDE; - KIO::filesize_t calcSelectedSize() Q_DECL_OVERRIDE; - void populate(const QList &fileItems, FileItem *dummy) Q_DECL_OVERRIDE; - KrViewItem* preAddItem(FileItem *fileitem) Q_DECL_OVERRIDE; + KIO::filesize_t calcSize() override; + KIO::filesize_t calcSelectedSize() override; + void populate(const QList &fileItems, FileItem *dummy) override; + KrViewItem* preAddItem(FileItem *fileitem) override; /** * Remove an item. Does not handle new current selection. */ - void preDeleteItem(KrViewItem *item) Q_DECL_OVERRIDE; - void intSetSelected(const FileItem* fileitem, bool select) Q_DECL_OVERRIDE; + void preDeleteItem(KrViewItem *item) override; + void intSetSelected(const FileItem* fileitem, bool select) override; virtual QRect itemRect(const FileItem *fileitem) = 0; diff --git a/krusader/Panel/PanelView/krselectionmode.h b/krusader/Panel/PanelView/krselectionmode.h --- a/krusader/Panel/PanelView/krselectionmode.h +++ b/krusader/Panel/PanelView/krselectionmode.h @@ -89,7 +89,7 @@ class KonqSelectionMode : public KrSelectionMode { public: - void init() Q_DECL_OVERRIDE { + void init() override { _useQTSelection = true; _spaceMovesDown = false; _insertMovesDown = true; @@ -107,7 +107,7 @@ class OriginalSelectionMode : public KrSelectionMode { public: - void init() Q_DECL_OVERRIDE { + void init() override { _useQTSelection = false; _spaceMovesDown = true; _insertMovesDown = true; @@ -125,7 +125,7 @@ class TCSelectionMode : public KrSelectionMode { public: - void init() Q_DECL_OVERRIDE { + void init() override { _useQTSelection = false; _spaceMovesDown = false; _insertMovesDown = true; @@ -143,7 +143,7 @@ class ErgonomicSelectionMode : public KrSelectionMode { public: - void init() Q_DECL_OVERRIDE { + void init() override { _useQTSelection = false; _spaceMovesDown = false; _insertMovesDown = true; @@ -161,7 +161,7 @@ class UserSelectionMode: public KrSelectionMode { public: - void init() Q_DECL_OVERRIDE; + void init() override; }; #endif // KR_SELECTION_MODE_H diff --git a/krusader/Panel/PanelView/krviewfactory.cpp b/krusader/Panel/PanelView/krviewfactory.cpp --- a/krusader/Panel/PanelView/krviewfactory.cpp +++ b/krusader/Panel/PanelView/krviewfactory.cpp @@ -43,7 +43,7 @@ const QKeySequence &shortcut) : KrViewInstance(id, name, desc, icon, shortcut) {} - KrView *create(QWidget *w, KConfig *cfg) Q_DECL_OVERRIDE { + KrView *create(QWidget *w, KConfig *cfg) override { return new T(w, *this, cfg); } }; diff --git a/krusader/Panel/PanelView/krviewitemdelegate.h b/krusader/Panel/PanelView/krviewitemdelegate.h --- a/krusader/Panel/PanelView/krviewitemdelegate.h +++ b/krusader/Panel/PanelView/krviewitemdelegate.h @@ -30,15 +30,15 @@ explicit KrViewItemDelegate(QObject *parent = 0); void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, - const QString &text) const Q_DECL_OVERRIDE; + const QString &text) const override; QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, - const QModelIndex &index) const Q_DECL_OVERRIDE; - void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; + void setEditorData(QWidget *editor, const QModelIndex &index) const override; QSize sizeHint(const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; - bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; + const QModelIndex &index) const override; + bool eventFilter(QObject *object, QEvent *event) override; private: mutable int _currentlyEdited; diff --git a/krusader/Panel/PanelView/listmodel.h b/krusader/Panel/PanelView/listmodel.h --- a/krusader/Panel/PanelView/listmodel.h +++ b/krusader/Panel/PanelView/listmodel.h @@ -51,11 +51,11 @@ QModelIndex addItem(FileItem *); void removeItem(FileItem *); - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - 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; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role) const override; + bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; void setExtensionEnabled(bool exten) { _extensionEnabled = exten; } @@ -74,7 +74,7 @@ const QModelIndex & fileItemIndex(const FileItem *); const QModelIndex & nameIndex(const QString &); const QModelIndex & indexFromUrl(const QUrl &url); - Qt::ItemFlags flags(const QModelIndex & index) const Q_DECL_OVERRIDE; + Qt::ItemFlags flags(const QModelIndex & index) const override; void emitChanged() { emit layoutChanged(); } @@ -85,7 +85,7 @@ } public slots: - void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE; + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; protected: KrSort::LessThanFunc lessThanFunc() { diff --git a/krusader/Panel/krcalcspacedialog.h b/krusader/Panel/krcalcspacedialog.h --- a/krusader/Panel/krcalcspacedialog.h +++ b/krusader/Panel/krcalcspacedialog.h @@ -39,8 +39,8 @@ * to avoid a short appearance and is autoclosed when the calculation finished. */ static void showDialog(QWidget *parent, SizeCalculator *calculator); - void closeEvent(QCloseEvent *) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent *) override; + void keyPressEvent(QKeyEvent *e) override; private slots: void slotCancel(); // cancel was pressed diff --git a/krusader/Panel/krfiletreeview.h b/krusader/Panel/krfiletreeview.h --- a/krusader/Panel/krfiletreeview.h +++ b/krusader/Panel/krfiletreeview.h @@ -63,7 +63,7 @@ void slotCustomContextMenuRequested(const QPoint &point); protected: - void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE; + void dropEvent(QDropEvent *event) override; private: QUrl urlForProxyIndex(const QModelIndex &index) const; diff --git a/krusader/Panel/krfiletreeview.cpp b/krusader/Panel/krfiletreeview.cpp --- a/krusader/Panel/krfiletreeview.cpp +++ b/krusader/Panel/krfiletreeview.cpp @@ -57,7 +57,7 @@ KrDirModel(QWidget *parent, KrFileTreeView *ftv) : KDirModel(parent), fileTreeView(ftv) {} protected: - Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE + Qt::ItemFlags flags(const QModelIndex &index) const override { Qt::ItemFlags itflags = KDirModel::flags(index); if (index.column() != KDirModel::Name) @@ -75,7 +75,7 @@ explicit TreeStyle(QStyle *style) : QProxyStyle(style) {} int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, - QStyleHintReturn *returnData) const Q_DECL_OVERRIDE + QStyleHintReturn *returnData) const override { if (hint == QStyle::SH_ItemView_ActivateItemOnSingleClick) { return true; diff --git a/krusader/Panel/krpreviewjob.h b/krusader/Panel/krpreviewjob.h --- a/krusader/Panel/krpreviewjob.h +++ b/krusader/Panel/krpreviewjob.h @@ -39,7 +39,7 @@ friend class KrPreviews; Q_OBJECT public: - void start() Q_DECL_OVERRIDE {} + void start() override {} protected slots: void slotStartJob(); @@ -60,7 +60,7 @@ void removeItem(KrViewItem *item); void sort(); - bool doKill() Q_DECL_OVERRIDE; + bool doKill() override; }; #endif // __krpreviewjob__ diff --git a/krusader/Panel/krpreviewpopup.h b/krusader/Panel/krpreviewpopup.h --- a/krusader/Panel/krpreviewpopup.h +++ b/krusader/Panel/krpreviewpopup.h @@ -44,7 +44,7 @@ void view(QAction *); protected: - void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *event) override; QAction * prevNotAvailAction; QList files; diff --git a/krusader/Panel/krpreviewpopup.cpp b/krusader/Panel/krpreviewpopup.cpp --- a/krusader/Panel/krpreviewpopup.cpp +++ b/krusader/Panel/krpreviewpopup.cpp @@ -42,7 +42,7 @@ ProxyStyle() : QProxyStyle(QApplication::style()) {} QSize sizeFromContents(ContentsType type, const QStyleOption *option, - const QSize &contentsSize, const QWidget *widget = nullptr) const Q_DECL_OVERRIDE + const QSize &contentsSize, const QWidget *widget = nullptr) const override { if(type == QStyle::CT_MenuItem) { const auto *menuItem = @@ -60,7 +60,7 @@ } void drawControl(ControlElement element, const QStyleOption *option, - QPainter *painter, const QWidget *widget = nullptr ) const Q_DECL_OVERRIDE + QPainter *painter, const QWidget *widget = nullptr ) const override { if(element == QStyle::CE_MenuItem) { painter->save(); diff --git a/krusader/Panel/krsearchbar.h b/krusader/Panel/krsearchbar.h --- a/krusader/Panel/krsearchbar.h +++ b/krusader/Panel/krsearchbar.h @@ -84,11 +84,11 @@ void saveSearchString(); protected: - void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *) override; /** * Filter key events from view widget and text combo box */ - bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE; + bool eventFilter(QObject *, QEvent *) override; private: /** diff --git a/krusader/Panel/listpanel.h b/krusader/Panel/listpanel.h --- a/krusader/Panel/listpanel.h +++ b/krusader/Panel/listpanel.h @@ -89,7 +89,7 @@ ListPanel(QWidget *parent, AbstractPanelManager *manager, const KConfigGroup& cfg = KConfigGroup()); ~ListPanel() override; - void otherPanelChanged() Q_DECL_OVERRIDE; + void otherPanelChanged() override; void start(const QUrl &url = QUrl()); @@ -164,13 +164,13 @@ void prepareToDelete(); // internal use only protected: - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE { + void keyPressEvent(QKeyEvent *e) override; + void mousePressEvent(QMouseEvent*) override { slotFocusOnMe(); } - void showEvent(QShowEvent *) Q_DECL_OVERRIDE; - void hideEvent(QHideEvent *) Q_DECL_OVERRIDE; - bool eventFilter(QObject * watched, QEvent * e) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *) override; + void hideEvent(QHideEvent *) override; + bool eventFilter(QObject * watched, QEvent * e) override; void showButtonMenu(QToolButton *b); void createView(); diff --git a/krusader/Panel/listpanel.cpp b/krusader/Panel/listpanel.cpp --- a/krusader/Panel/listpanel.cpp +++ b/krusader/Panel/listpanel.cpp @@ -107,7 +107,7 @@ } protected: - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { + void mousePressEvent(QMouseEvent *) override { panel->slotFocusOnMe(); action->trigger(); } diff --git a/krusader/Panel/listpanelframe.h b/krusader/Panel/listpanelframe.h --- a/krusader/Panel/listpanelframe.h +++ b/krusader/Panel/listpanelframe.h @@ -48,10 +48,10 @@ protected: QColor getColor(KConfigGroup &cg, const QString& name, const QColor &def, const QColor &kdedef); - void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE { + void dropEvent(QDropEvent *e) override { emit dropped(e, this); } - void dragEnterEvent(QDragEnterEvent*) Q_DECL_OVERRIDE; + void dragEnterEvent(QDragEnterEvent*) override; QString color; QPalette palActive, palInactive; diff --git a/krusader/Panel/sidebar.h b/krusader/Panel/sidebar.h --- a/krusader/Panel/sidebar.h +++ b/krusader/Panel/sidebar.h @@ -85,7 +85,7 @@ void handleOpenUrlRequest(const QUrl &url); protected: - void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE; + void focusInEvent(QFocusEvent*) override; bool _hidden; QStackedWidget *stack; diff --git a/krusader/Search/krsearchdialog.h b/krusader/Search/krsearchdialog.h --- a/krusader/Search/krsearchdialog.h +++ b/krusader/Search/krsearchdialog.h @@ -65,12 +65,12 @@ void currentChanged(KrViewItem *item); void contextMenu(const QPoint &); - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; - void closeEvent(QCloseEvent *e) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *e) override; + void closeEvent(QCloseEvent *e) override; + void resizeEvent(QResizeEvent *e) override; protected slots: - void reject() Q_DECL_OVERRIDE; + void reject() override; private slots: void editCurrent(); diff --git a/krusader/Search/krsearchdialog.cpp b/krusader/Search/krsearchdialog.cpp --- a/krusader/Search/krsearchdialog.cpp +++ b/krusader/Search/krsearchdialog.cpp @@ -78,13 +78,13 @@ clear(); } - QList fileItems() const Q_DECL_OVERRIDE { + QList fileItems() const override { return _fileItems; } - unsigned long numFileItems() const Q_DECL_OVERRIDE { + unsigned long numFileItems() const override { return _fileItems.count(); } - bool isRoot() const Q_DECL_OVERRIDE { + bool isRoot() const override { return true; } diff --git a/krusader/Splitter/splittergui.h b/krusader/Splitter/splittergui.h --- a/krusader/Splitter/splittergui.h +++ b/krusader/Splitter/splittergui.h @@ -68,7 +68,7 @@ virtual void splitPressed(); protected: - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *e) override; }; #endif /* __SPLITTERGUI_H__ */ diff --git a/krusader/Synchronizer/synchronizergui.h b/krusader/Synchronizer/synchronizergui.h --- a/krusader/Synchronizer/synchronizergui.h +++ b/krusader/Synchronizer/synchronizergui.h @@ -151,7 +151,7 @@ void saveToProfile(const QString&); protected slots: - void reject() Q_DECL_OVERRIDE; + void reject() override; void addFile(SynchronizerFileItem *); void markChanged(SynchronizerFileItem *, bool); void setScrolling(bool); @@ -179,8 +179,8 @@ const QString &text = QString(), bool textAndIcon = false); protected: - void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; - bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *) override; + bool eventFilter(QObject *, QEvent *) override; void executeOperation(SynchronizerFileItem *item, int op); diff --git a/krusader/Synchronizer/synchronizergui.cpp b/krusader/Synchronizer/synchronizergui.cpp --- a/krusader/Synchronizer/synchronizergui.cpp +++ b/krusader/Synchronizer/synchronizergui.cpp @@ -78,12 +78,12 @@ SynchronizerListView(Synchronizer * sync, QWidget * parent) : KrTreeWidget(parent), synchronizer(sync) { } - void mouseMoveEvent(QMouseEvent * e) Q_DECL_OVERRIDE { + void mouseMoveEvent(QMouseEvent * e) override { isLeft = ((e->modifiers() & Qt::ShiftModifier) == 0); KrTreeWidget::mouseMoveEvent(e); } - void startDrag(Qt::DropActions /* supportedActs */) Q_DECL_OVERRIDE { + void startDrag(Qt::DropActions /* supportedActs */) override { QList urls; unsigned ndx = 0; diff --git a/krusader/Synchronizer/synchronizertask.h b/krusader/Synchronizer/synchronizertask.h --- a/krusader/Synchronizer/synchronizertask.h +++ b/krusader/Synchronizer/synchronizertask.h @@ -126,7 +126,7 @@ } protected slots: - void start() Q_DECL_OVERRIDE; + void start() override; void slotFinished(bool result); void slotOtherFinished(bool result); @@ -160,7 +160,7 @@ void sendStatusMessage(); protected: - void start() Q_DECL_OVERRIDE; + void start() override; protected slots: void localFileCompareCycle(); diff --git a/krusader/UserAction/expander.cpp b/krusader/UserAction/expander.cpp --- a/krusader/UserAction/expander.cpp +++ b/krusader/UserAction/expander.cpp @@ -113,24 +113,24 @@ class exp_simpleplaceholder : public exp_placeholder { public: - EXP_FUNC Q_DECL_OVERRIDE; + EXP_FUNC override; virtual TagString expFunc(const KrPanel*, const QStringList&, const bool&, Expander&) const = 0; }; #define PLACEHOLDER_CLASS(name) \ class name : public exp_placeholder { \ public: \ name(); \ - virtual TagString expFunc ( const KrPanel*, const TagStringList&, const bool&, Expander& ) const Q_DECL_OVERRIDE; \ + virtual TagString expFunc ( const KrPanel*, const TagStringList&, const bool&, Expander& ) const override; \ }; #define SIMPLE_PLACEHOLDER_CLASS(name) \ class name : public exp_simpleplaceholder { \ public: \ using exp_simpleplaceholder::expFunc; \ name(); \ - virtual TagString expFunc ( const KrPanel*, const QStringList&, const bool&, Expander& ) const Q_DECL_OVERRIDE; \ + virtual TagString expFunc ( const KrPanel*, const QStringList&, const bool&, Expander& ) const override; \ }; diff --git a/krusader/UserAction/kraction.h b/krusader/UserAction/kraction.h --- a/krusader/UserAction/kraction.h +++ b/krusader/UserAction/kraction.h @@ -77,42 +77,42 @@ _category = category; }; - QString command() const Q_DECL_OVERRIDE { + QString command() const override { return _command; }; void setCommand(const QString& command) { _command = command; }; - QString user() const Q_DECL_OVERRIDE { + QString user() const override { return _user; }; void setUser(const QString& user) { _user = user; }; - QString startpath() const Q_DECL_OVERRIDE { + QString startpath() const override { return _startpath; }; void setStartpath(const QString& startpath) { _startpath = startpath; }; - ExecType execType() const Q_DECL_OVERRIDE { + ExecType execType() const override { return _execType; }; void setExecType(ExecType execType) { _execType = execType; }; - bool acceptURLs() const Q_DECL_OVERRIDE { + bool acceptURLs() const override { return _acceptURLs; }; void setAcceptURLs(const bool& acceptURLs) { _acceptURLs = acceptURLs; }; - bool confirmExecution() const Q_DECL_OVERRIDE { + bool confirmExecution() const override { return _confirmExecution; }; void setConfirmExecution(const bool& confirmExecution) { @@ -147,11 +147,11 @@ _showonlyFile = showonlyFile; }; - bool doSubstitution() const Q_DECL_OVERRIDE { + bool doSubstitution() const override { return true; } - QString text() const Q_DECL_OVERRIDE { + QString text() const override { return QAction::text(); } diff --git a/krusader/krusader.h b/krusader/krusader.h --- a/krusader/krusader.h +++ b/krusader/krusader.h @@ -78,32 +78,32 @@ void setTray(bool forceCreation = false); // KrMainWindow implementation - QWidget *widget() Q_DECL_OVERRIDE { + QWidget *widget() override { return this; } - KrView *activeView() Q_DECL_OVERRIDE; - ViewActions *viewActions() Q_DECL_OVERRIDE { + KrView *activeView() override; + ViewActions *viewActions() override { return _viewActions; } - KActionCollection *actions() Q_DECL_OVERRIDE { + KActionCollection *actions() override { return actionCollection(); } - AbstractPanelManager *activeManager() Q_DECL_OVERRIDE; - AbstractPanelManager *leftManager() Q_DECL_OVERRIDE; - AbstractPanelManager *rightManager() Q_DECL_OVERRIDE; - PopularUrls *popularUrls() Q_DECL_OVERRIDE { + AbstractPanelManager *activeManager() override; + AbstractPanelManager *leftManager() override; + AbstractPanelManager *rightManager() override; + PopularUrls *popularUrls() override { return _popularUrls; } - KrActions *krActions() Q_DECL_OVERRIDE { + KrActions *krActions() override { return _krActions; } - ListPanelActions *listPanelActions() Q_DECL_OVERRIDE { + ListPanelActions *listPanelActions() override { return _listPanelActions; } - TabActions *tabActions() Q_DECL_OVERRIDE { + TabActions *tabActions() override { return _tabActions; } - void plugActionList(const char *name, QList &list) Q_DECL_OVERRIDE { + void plugActionList(const char *name, QList &list) override { KParts::MainWindow::plugActionList(name, list); } @@ -129,12 +129,12 @@ void slotGotRemoveStartup(const KStartupInfoId &id, const KStartupInfoData &data); protected: - void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; - void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; - bool queryClose() Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent *event) override; + void showEvent(QShowEvent *event) override; + bool queryClose() override; void setupActions(); bool versionControl(); // handle version differences in krusaderrc - bool event(QEvent *) Q_DECL_OVERRIDE; + bool event(QEvent *) override; public Q_SLOTS: Q_SCRIPTABLE bool isRunning(); diff --git a/krusader/panelmanager.h b/krusader/panelmanager.h --- a/krusader/panelmanager.h +++ b/krusader/panelmanager.h @@ -78,10 +78,10 @@ } // AbstractPanelManager implementation - bool isLeft() const Q_DECL_OVERRIDE { return _left; } - AbstractPanelManager *otherManager() const Q_DECL_OVERRIDE { return _otherManager; } - KrPanel *currentPanel() const Q_DECL_OVERRIDE; - void newTab(const QUrl &url, KrPanel *nextTo) Q_DECL_OVERRIDE { + bool isLeft() const override { return _left; } + AbstractPanelManager *otherManager() const override { return _otherManager; } + KrPanel *currentPanel() const override; + void newTab(const QUrl &url, KrPanel *nextTo) override { slotNewTab(url, true, nextTo); } diff --git a/krusader/paneltabbar.h b/krusader/paneltabbar.h --- a/krusader/paneltabbar.h +++ b/krusader/paneltabbar.h @@ -88,15 +88,15 @@ void draggingTabFinished(QMouseEvent*); protected: - void mouseMoveEvent(QMouseEvent*e) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE; - void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE; + void mouseMoveEvent(QMouseEvent*e) override; + void mousePressEvent(QMouseEvent*) override; + void mouseReleaseEvent(QMouseEvent*) override; void insertAction(QAction*); QString squeeze(const QUrl &url, int tabIndex = -1); - void dragEnterEvent(QDragEnterEvent *) Q_DECL_OVERRIDE; - void dragLeaveEvent(QDragLeaveEvent *) Q_DECL_OVERRIDE; - void dragMoveEvent(QDragMoveEvent *) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; + void dragEnterEvent(QDragEnterEvent *) override; + void dragLeaveEvent(QDragLeaveEvent *) override; + void dragMoveEvent(QDragMoveEvent *) override; + void resizeEvent(QResizeEvent *e) override; protected slots: void duplicateTab();