Commit bc8a1de8 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Run clang-tidy override fixit

The `virtual` keyword is useless when `override` is also used.

Patch generated by:

run-clang-tidy.py -header-filter='.*' -checks='-*,modernize-use-override' -fix
parent 168186c9
......@@ -61,7 +61,7 @@ public:
/**
* Destroys a BatchExtract object.
*/
virtual ~BatchExtract();
~BatchExtract() override;
/**
* Creates a BatchExtractJob for the given @p url and puts it on the queue.
......
......@@ -43,7 +43,7 @@ Q_OBJECT
public:
CompressFileItemAction(QObject* parent, const QVariantList& args);
virtual QList<QAction*> actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
QList<QAction*> actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
private:
QAction *createAction(const QIcon& icon, const QString& name, QWidget *parent, const QList<QUrl>& urls, const QString& exec);
......
......@@ -36,7 +36,7 @@ private slots:
public:
ExtractHereDndPlugin(QObject* parent, const QVariantList&);
virtual QList<QAction *> setup(const KFileItemListProperties& popupMenuInfo,
QList<QAction *> setup(const KFileItemListProperties& popupMenuInfo,
const QUrl& destination) override;
private:
......
......@@ -43,7 +43,7 @@ Q_OBJECT
public:
ExtractFileItemAction(QObject* parent, const QVariantList& args);
virtual QList<QAction*> actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
QList<QAction*> actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override;
private:
QAction *createAction(const QIcon& icon, const QString& name, QWidget *parent, const QList<QUrl>& urls, const QString& exec);
......
......@@ -37,7 +37,7 @@ class MainWindow: public KParts::MainWindow
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
~MainWindow() override;
bool loadPart();
void dragEnterEvent(class QDragEnterEvent * event) override;
......
......@@ -49,18 +49,18 @@ class JSONArchiveInterface : public Kerfuffle::ReadWriteArchiveInterface
public:
explicit JSONArchiveInterface(QObject *parent, const QVariantList& args);
virtual ~JSONArchiveInterface();
~JSONArchiveInterface() override;
virtual bool list() override;
virtual bool open() override;
bool list() override;
bool open() override;
virtual bool addFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options, uint numberOfEntriesToAdd = 0) override;
virtual bool moveFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) override;
virtual bool copyFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) override;
virtual bool extractFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options) override;
virtual bool deleteFiles(const QVector<Kerfuffle::Archive::Entry*>& files) override;
virtual bool addComment(const QString& comment) override;
virtual bool testArchive() override;
bool addFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options, uint numberOfEntriesToAdd = 0) override;
bool moveFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) override;
bool copyFiles(const QVector<Kerfuffle::Archive::Entry*>& files, Kerfuffle::Archive::Entry *destination, const Kerfuffle::CompressionOptions& options) override;
bool extractFiles(const QVector<Kerfuffle::Archive::Entry*>& files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions& options) override;
bool deleteFiles(const QVector<Kerfuffle::Archive::Entry*>& files) override;
bool addComment(const QString& comment) override;
bool testArchive() override;
private:
JSONParser::JSONArchive m_archive;
......
......@@ -50,7 +50,7 @@ public:
const QUrl &startDir,
const QMimeType &mimeType,
const CompressionOptions &opts = {});
virtual ~AddDialog();
~AddDialog() override;
QStringList selectedFiles() const;
CompressionOptions compressionOptions() const;
QDialog *optionsDialog;
......
......@@ -56,7 +56,7 @@ class KERFUFFLE_EXPORT AddToArchive : public KJob
public:
explicit AddToArchive(QObject *parent = nullptr);
~AddToArchive();
~AddToArchive() override;
bool showAddDialog();
void setPreservePaths(bool value);
......
......@@ -165,7 +165,7 @@ public:
*/
static LoadJob* load(const QString &fileName, Plugin *plugin, QObject *parent = nullptr);
~Archive();
~Archive() override;
ArchiveError error() const;
bool isValid() const;
......
......@@ -72,7 +72,7 @@ class Archive::Entry : public QObject
public:
explicit Entry(QObject *parent = nullptr, const QString &fullPath = {}, const QString &rootNode = {});
~Entry();
~Entry() override;
void copyMetaData(const Archive::Entry *sourceEntry);
......
......@@ -47,7 +47,7 @@ class KERFUFFLE_EXPORT ReadOnlyArchiveInterface: public QObject
Q_OBJECT
public:
explicit ReadOnlyArchiveInterface(QObject *parent, const QVariantList &args);
virtual ~ReadOnlyArchiveInterface();
~ReadOnlyArchiveInterface() override;
/**
* Returns the filename of the archive currently being handled.
......@@ -216,7 +216,7 @@ public:
};
explicit ReadWriteArchiveInterface(QObject *parent, const QVariantList &args);
virtual ~ReadWriteArchiveInterface();
~ReadWriteArchiveInterface() override;
bool isReadOnly() const override;
......
......@@ -55,18 +55,18 @@ public:
OperationMode m_operationMode = List;
explicit CliInterface(QObject *parent, const QVariantList & args);
virtual ~CliInterface();
virtual int copyRequiredSignals() const override;
virtual bool list() override;
virtual bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) override;
virtual bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options, uint numberOfEntriesToAdd = 0) override;
virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
virtual bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
virtual bool deleteFiles(const QVector<Archive::Entry*> &files) override;
virtual bool addComment(const QString &comment) override;
virtual bool testArchive() override;
~CliInterface() override;
int copyRequiredSignals() const override;
bool list() override;
bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) override;
bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options, uint numberOfEntriesToAdd = 0) override;
bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
bool deleteFiles(const QVector<Archive::Entry*> &files) override;
bool addComment(const QString &comment) override;
bool testArchive() override;
virtual void resetParsing() = 0;
virtual bool readListLine(const QString &line) = 0;
......
......@@ -84,7 +84,7 @@ public:
bool isHeaderEncryptionEnabled() const;
public slots:
virtual void accept() override;
void accept() override;
private:
void loadConfiguration();
......
......@@ -43,7 +43,7 @@ class KERFUFFLE_EXPORT ExtractionDialog : public QDialog
Q_OBJECT
public:
explicit ExtractionDialog(QWidget *parent = nullptr);
virtual ~ExtractionDialog();
~ExtractionDialog() override;
void setShowSelectedFiles(bool);
void setExtractToSubfolder(bool);
......
......@@ -55,7 +55,7 @@ public:
{
}
virtual void run() override;
void run() override;
private:
Job *q;
......
......@@ -61,8 +61,8 @@ protected:
Job(Archive *archive, ReadOnlyArchiveInterface *interface);
Job(Archive *archive);
Job(ReadOnlyArchiveInterface *interface);
virtual ~Job();
virtual bool doKill() override;
~Job() override;
bool doKill() override;
ReadOnlyArchiveInterface *archiveInterface();
QVector<Archive::Entry*> m_archiveEntries;
......@@ -127,10 +127,10 @@ public:
QString subfolderName() const;
public slots:
virtual void doWork() override;
void doWork() override;
protected slots:
virtual void onFinished(bool result) override;
void onFinished(bool result) override;
private:
explicit LoadJob(Archive *archive, ReadOnlyArchiveInterface *interface);
......@@ -164,10 +164,10 @@ signals:
void userQuery(Query *query);
public slots:
virtual void doWork() override;
void doWork() override;
protected:
virtual bool doKill() override;
bool doKill() override;
private slots:
void slotLoadingProgress(double progress);
......@@ -214,10 +214,10 @@ public:
void setMultiVolume(bool isMultiVolume);
public slots:
virtual void doWork() override;
void doWork() override;
protected:
virtual bool doKill() override;
bool doKill() override;
private:
AddJob *m_addJob = nullptr;
......@@ -236,7 +236,7 @@ public:
ExtractionOptions extractionOptions() const;
public slots:
virtual void doWork() override;
void doWork() override;
private:
......@@ -272,7 +272,7 @@ public:
QTemporaryDir *tempDir() const;
public slots:
virtual void doWork() override;
void doWork() override;
private:
QString extractionDir() const;
......@@ -322,10 +322,10 @@ public:
AddJob(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() override;
void doWork() override;
protected slots:
virtual void onFinished(bool result) override;
void onFinished(bool result) override;
private:
QString m_oldWorkingDir;
......@@ -346,10 +346,10 @@ public:
MoveJob(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() override;
void doWork() override;
protected slots:
virtual void onFinished(bool result) override;
void onFinished(bool result) override;
private:
int m_finishedSignalsCount;
......@@ -370,10 +370,10 @@ public:
CopyJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() override;
void doWork() override;
protected slots:
virtual void onFinished(bool result) override;
void onFinished(bool result) override;
private:
int m_finishedSignalsCount;
......@@ -390,7 +390,7 @@ public:
DeleteJob(const QVector<Archive::Entry*> &files, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() override;
void doWork() override;
private:
QVector<Archive::Entry*> m_entries;
......@@ -404,7 +404,7 @@ public:
CommentJob(const QString& comment, ReadWriteArchiveInterface *interface);
public slots:
virtual void doWork() override;
void doWork() override;
private:
QString m_comment;
......@@ -419,7 +419,7 @@ public:
bool testSucceeded();
public slots:
virtual void doWork() override;
void doWork() override;
private slots:
virtual void onTestSuccess();
......
......@@ -62,7 +62,7 @@ class ArchiveModel: public QAbstractItemModel
Q_OBJECT
public:
explicit ArchiveModel(const QString &dbusPathName, QObject *parent = nullptr);
~ArchiveModel();
~ArchiveModel() override;
QVariant data(const QModelIndex &index, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
......
......@@ -29,7 +29,7 @@ class ArchiveSortFilterModel: public KRecursiveFilterProxyModel
public:
explicit ArchiveSortFilterModel(QObject *parent = nullptr);
~ArchiveSortFilterModel();
~ArchiveSortFilterModel() override;
bool lessThan(const QModelIndex &leftIndex, const QModelIndex &rightIndex) const override;
};
......
......@@ -33,10 +33,10 @@ class ArchiveView : public QTreeView
public:
explicit ArchiveView(QWidget *parent = nullptr);
virtual void dragEnterEvent(class QDragEnterEvent * event) override;
virtual void dropEvent(class QDropEvent * event) override;
virtual void dragMoveEvent(class QDragMoveEvent * event) override;
virtual void startDrag(Qt::DropActions supportedActions) override;
void dragEnterEvent(class QDragEnterEvent * event) override;
void dropEvent(class QDropEvent * event) override;
void dragMoveEvent(class QDragMoveEvent * event) override;
void startDrag(Qt::DropActions supportedActions) override;
/**
* Expand the first level in the view if there is only one root folder.
......@@ -52,9 +52,9 @@ public:
void openEntryEditor(const QModelIndex &index);
protected:
virtual bool eventFilter(QObject *object, QEvent *event) override;
virtual void mouseReleaseEvent(QMouseEvent *event) override;
virtual void keyPressEvent(QKeyEvent *event) override;
bool eventFilter(QObject *object, QEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
signals:
void entryChanged(const QString &name);
......
......@@ -37,7 +37,7 @@ class ArkViewer : public QDialog, public Ui::ArkViewer
Q_OBJECT
public:
virtual ~ArkViewer();
~ArkViewer() override;
static void view(const QString& fileName);
......
......@@ -32,7 +32,7 @@ class InfoPanel: public QFrame, Ui::InformationPanel
Q_OBJECT
public:
explicit InfoPanel(ArchiveModel *model, QWidget *parent = nullptr);
virtual ~InfoPanel();
~InfoPanel() override;
void setIndex(const QModelIndex &);
void setIndexes(const QModelIndexList &list);
......
......@@ -42,7 +42,7 @@ class JobTracker: public KAbstractWidgetJobTracker
public:
explicit JobTracker(QWidget *parent = nullptr);
~JobTracker();
~JobTracker() override;
QWidget *widget(KJob *) override;
......
......@@ -47,7 +47,7 @@ class OverwriteDialog : public QDialog
Q_OBJECT
public:
explicit OverwriteDialog(QWidget *parent, const QList<const Kerfuffle::Archive::Entry*> &entries, const QHash<QString, QIcon> &icons, bool error = false);
virtual ~OverwriteDialog();
~OverwriteDialog() override;
private:
QVBoxLayout m_vBoxLayout;
......
......@@ -71,7 +71,7 @@ public:
};
Part(QWidget *parentWidget, QObject *parent, const QVariantList &);
~Part();
~Part() override;
bool openFile() override;
bool saveFile() override;
......
......@@ -33,12 +33,12 @@ class CliPlugin : public Kerfuffle::CliInterface
public:
explicit CliPlugin(QObject *parent, const QVariantList & args);
virtual ~CliPlugin();
~CliPlugin() override;
virtual void resetParsing() override;
virtual bool readListLine(const QString &line) override;
virtual bool readExtractLine(const QString &line) override;
virtual bool readDeleteLine(const QString &line) override;
void resetParsing() override;
bool readListLine(const QString &line) override;
bool readExtractLine(const QString &line) override;
bool readDeleteLine(const QString &line) override;
private:
enum ArchiveType {
......
......@@ -33,12 +33,12 @@ class CliPlugin : public Kerfuffle::CliInterface
public:
explicit CliPlugin(QObject *parent, const QVariantList &args);
virtual ~CliPlugin();
~CliPlugin() override;
virtual void resetParsing() override;
virtual bool readListLine(const QString &line) override;
virtual bool readExtractLine(const QString &line) override;
virtual bool hasBatchExtractionProgress() const override;
void resetParsing() override;
bool readListLine(const QString &line) override;
bool readExtractLine(const QString &line) override;
bool hasBatchExtractionProgress() const override;
private:
......
......@@ -31,13 +31,13 @@ class CliPlugin : public Kerfuffle::CliInterface
public:
explicit CliPlugin(QObject *parent, const QVariantList &args);
virtual ~CliPlugin();
~CliPlugin() override;
virtual bool list() override;
virtual bool extractFiles(const QVector<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) override;
virtual void resetParsing() override;
virtual bool readListLine(const QString &line) override;
virtual bool readExtractLine(const QString &line) override;
bool list() override;
bool extractFiles(const QVector<Kerfuffle::Archive::Entry*> &files, const QString &destinationDirectory, const Kerfuffle::ExtractionOptions &options) override;
void resetParsing() override;
bool readListLine(const QString &line) override;
bool readExtractLine(const QString &line) override;
/**
* Fill the lsar's json output all in once (useful for unit testing).
......
......@@ -32,15 +32,15 @@ class KERFUFFLE_EXPORT CliPlugin : public Kerfuffle::CliInterface
public:
explicit CliPlugin(QObject *parent, const QVariantList &args);
virtual ~CliPlugin();
~CliPlugin() override;
virtual void resetParsing() override;
virtual QString escapeFileName(const QString &fileName) const override;
virtual bool readListLine(const QString &line) override;
virtual bool readExtractLine(const QString &line) override;
void resetParsing() override;
QString escapeFileName(const QString &fileName) const override;
bool readListLine(const QString &line) override;
bool readExtractLine(const QString &line) override;
virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
virtual int moveRequiredSignals() const override;
bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options) override;
int moveRequiredSignals() const override;
private slots:
void continueMoving(bool result);
......
......@@ -42,19 +42,19 @@ class LibarchivePlugin : public ReadWriteArchiveInterface
public:
explicit LibarchivePlugin(QObject *parent, const QVariantList &args);
virtual ~LibarchivePlugin();
virtual bool list() override;
virtual bool doKill() override;
virtual bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) override;
virtual bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options, uint numberOfEntriesToAdd = 0) override;
virtual bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) override;
virtual bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) override;
virtual bool deleteFiles(const QVector<Archive::Entry*> &files) override;
virtual bool addComment(const QString &comment) override;
virtual bool testArchive() override;
virtual bool hasBatchExtractionProgress() const override;
~LibarchivePlugin() override;
bool list() override;
bool doKill() override;
bool extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options) override;
bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options, uint numberOfEntriesToAdd = 0) override;
bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) override;
bool copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) override;
bool deleteFiles(const QVector<Archive::Entry*> &files) override;
bool addComment(const QString &comment) override;
bool testArchive() override;
bool hasBatchExtractionProgress() const override;
protected:
struct ArchiveReadCustomDeleter
......
......@@ -35,7 +35,7 @@ class ReadOnlyLibarchivePlugin : public LibarchivePlugin
public:
explicit ReadOnlyLibarchivePlugin(QObject *parent, const QVariantList& args);
~ReadOnlyLibarchivePlugin();
~ReadOnlyLibarchivePlugin() override;
};
......
......@@ -42,7 +42,7 @@ class ReadWriteLibarchivePlugin : public LibarchivePlugin
public:
explicit ReadWriteLibarchivePlugin(QObject *parent, const QVariantList &args);
~ReadWriteLibarchivePlugin();
~ReadWriteLibarchivePlugin() override;
bool addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions &options, uint numberOfEntriesToAdd = 0) override;
bool moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options) override;
......
......@@ -34,7 +34,7 @@ class KERFUFFLE_EXPORT LibBzip2Interface : public LibSingleFileInterface
public:
LibBzip2Interface(QObject *parent, const QVariantList & args);
virtual ~LibBzip2Interface();
~LibBzip2Interface() override;
};
#endif // BZ2PLUGIN_H
......@@ -34,7 +34,7 @@ class KERFUFFLE_EXPORT LibGzipInterface : public LibSingleFileInterface
public:
LibGzipInterface(QObject *parent, const QVariantList & args);
virtual ~LibGzipInterface();
~LibGzipInterface() override;
};
#endif // GZPLUGIN_H
......@@ -34,11 +34,11 @@ class LibSingleFileInterface : public Kerfuffle::ReadOnlyArchiveInterface
public:
LibSingleFileInterface(QObject *parent, const QVariantList & args);
virtual ~