Commit f60ab0c3 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Replace Q_DECL_OVERRIDE with override

Summary: override is standard C++ since C++11. Let's use it

Test Plan: builds

Reviewers: #krusader, gengisdave

Reviewed By: gengisdave

Subscribers: gengisdave

Tags: #krusader

Differential Revision: https://phabricator.kde.org/D25669
parent 4300ab4e
......@@ -41,9 +41,9 @@ public:
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);
......
......@@ -96,12 +96,12 @@ protected:
*
*/
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 @@ private:
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;
......
......@@ -35,7 +35,7 @@ public:
QFileHack();
explicit QFileHack(const QString & name);
~QFileHack();
virtual bool open(QFile::OpenMode m) Q_DECL_OVERRIDE;
virtual bool open(QFile::OpenMode m) override;
};
#endif
......@@ -74,21 +74,21 @@ extern "C"
KrArcCodec(QTextCodec * codec) : originalCodec(codec) {}
~KrArcCodec() override = default;
QByteArray name() const Q_DECL_OVERRIDE {
QByteArray name() const override {
return originalCodec->name();
}
QList<QByteArray> aliases() const Q_DECL_OVERRIDE {
QList<QByteArray> 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++) {
......
......@@ -47,14 +47,14 @@ class kio_krarcProtocol : public QObject, public KIO::SlaveBase, public KrArcBas
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 &);
......@@ -63,7 +63,7 @@ public slots:
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();
......
......@@ -116,10 +116,10 @@ class ParameterText : public ParameterBase
{
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 @@ class ParameterPlaceholder : public ParameterBase
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 @@ class ParameterYes : public ParameterBase
{
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 @@ class ParameterNo : public ParameterBase
{
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 @@ class ParameterFile : public ParameterBase
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 @@ class ParameterChoose : public ParameterBase
{
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 @@ class ParameterSelect : public ParameterBase
{
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 @@ class ParameterGoto : public ParameterBase
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 @@ class ParameterSyncprofile : public ParameterBase
{
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 @@ class ParameterPanelprofile : public ParameterBase
{
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 @@ class ParameterSearch : public ParameterBase
{
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 @@ class ParameterInt : public ParameterBase
{
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;
......
......@@ -35,7 +35,7 @@ class UserActionListView : public KrTreeWidget
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 @@ public:
/**
* 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;
......
......@@ -258,32 +258,32 @@ public:
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);
}
};
......
......@@ -56,9 +56,9 @@ protected:
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 @@ protected slots:
virtual void slotStart() = 0;
protected:
virtual void run() Q_DECL_OVERRIDE;
virtual void run() override;
void setJob(AbstractThreadedJob * job) {
_job = job;
}
......
......@@ -38,7 +38,7 @@ public:
Kr7zEncryptionChecker();
protected:
void setupChildProcess() Q_DECL_OVERRIDE;
void setupChildProcess() override;
public slots:
void receivedOutput();
......
......@@ -51,32 +51,32 @@ public:
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);
}
};
......
......@@ -74,7 +74,7 @@ public:
// 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);
......
......@@ -51,7 +51,7 @@ public:
~PackThread() override = default;
protected slots:
void slotStart() Q_DECL_OVERRIDE;
void slotStart() override;
private:
QUrl _sourceUrl;
......@@ -83,7 +83,7 @@ public:
~TestArchiveThread() override = default;
protected slots:
void slotStart() Q_DECL_OVERRIDE;
void slotStart() override;
private:
QUrl _sourceUrl;
......@@ -113,7 +113,7 @@ public:
~UnpackThread() override = default;
protected slots:
void slotStart() Q_DECL_OVERRIDE;
void slotStart() override;
private:
QUrl _sourceUrl;
......
......@@ -64,7 +64,7 @@ protected:
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();
......
......@@ -118,15 +118,15 @@ public:
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 @@ private slots:
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);
......
......@@ -89,7 +89,7 @@ public:
KUrlRequester *urlRequester();
protected:
void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *e) override;
private slots:
void slotQueueButtonClicked();
......
......@@ -74,7 +74,7 @@ public slots:
protected:
bool inc;
QTimer* timer;
void closeEvent(QCloseEvent * e) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent * e) override;
bool canClose;
};
......
......@@ -47,7 +47,7 @@ public:
void addSlice(KIO::filesize_t size, QString label);
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *) override;
private:
QList<KRPieSlice> slices;
......@@ -89,7 +89,7 @@ public:
}
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *) override;
private:
KIO::filesize_t totalSpace, freeSpace;
......
......@@ -56,8 +56,8 @@ public:
newFTPSub();
protected:
void reject() Q_DECL_OVERRIDE;
void accept() Q_DECL_OVERRIDE;
void reject() override;
void accept() override;
};
/////////////////////////// KRMaskChoiceSub /////////////////////////////////
......@@ -69,15 +69,15 @@ public:
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