Commit e8d42621 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Run clang modernize-use-override fixit

parent 28b33f08
......@@ -61,7 +61,7 @@ class AutoPasteModel : public QAbstractTableModel
};
explicit AutoPasteModel(QObject *parent = 0);
~AutoPasteModel();
~AutoPasteModel() override;
int rowCount(const QModelIndex &index = QModelIndex()) const override;
int columnCount(const QModelIndex &index = QModelIndex()) const override;
......
......@@ -25,7 +25,7 @@ class DlgWebinterface : public QWidget, public Ui::DlgWebinterface
public:
DlgWebinterface(QDialog *parent = nullptr);
~DlgWebinterface();
~DlgWebinterface() override;
signals:
void changed();
......
......@@ -33,7 +33,7 @@ class IntegrationPreferences : public QWidget
public:
explicit IntegrationPreferences(KConfigDialog *parent, Qt::WindowFlags f = Qt::Widget);
~IntegrationPreferences();
~IntegrationPreferences() override;
private slots:
void slotUpdateButtons();
......
......@@ -19,7 +19,7 @@ class PluginSelector : public KPluginSelector
Q_OBJECT
public:
PluginSelector(QDialog * parent);
~PluginSelector();
~PluginSelector() override;
private slots:
void saveState();
......
......@@ -30,7 +30,7 @@ class PreferencesDialog : public KConfigDialog
void slotToggleAfterFinishAction(int state);
void disableApplyButton();
void enableApplyButton();
virtual void updateWidgetsDefault() override;
void updateWidgetsDefault() override;
private:
Ui::DlgAdvanced dlgAdv;
......
......@@ -37,7 +37,7 @@ class KGET_EXPORT KGetSaveSizeDialog : public QDialog
* Restores the dialog to the size saved for name
*/
explicit KGetSaveSizeDialog(const QByteArray &name, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
virtual ~KGetSaveSizeDialog();
~KGetSaveSizeDialog() override;
private:
QByteArray m_name;
......
......@@ -46,7 +46,7 @@ class KGET_EXPORT DataSourceFactory : public QObject
*/
explicit DataSourceFactory(QObject *parent, const QUrl &dest = QUrl(), KIO::filesize_t size = 0, KIO::fileoffset_t segSize = 512000);
~DataSourceFactory();
~DataSourceFactory() override;
/**
* The capabilities the DataSourceFactory supports
......
......@@ -25,7 +25,7 @@ class KGET_EXPORT Download : public QObject
Q_OBJECT
public:
Download(const QUrl &srcUrl, const QUrl &destUrl);
~Download();
~Download() override;
Q_SIGNALS:
void finishedSuccessfully(QUrl dest, QByteArray data);
......
......@@ -33,7 +33,7 @@ class FileDeleter::Private : QObject
Q_OBJECT
public:
Private();
~Private();
~Private() override;
KJob *deleteFile(const QUrl &dest, QObject *receiver, const char *method);
......
......@@ -106,7 +106,7 @@ class KGET_EXPORT FileModel : public QAbstractItemModel
public:
FileModel(const QList<QUrl> &files, const QUrl &destDirectory, QObject *parent = nullptr);
~FileModel();
~FileModel() override;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
......
......@@ -19,7 +19,7 @@ class Handler : public QObject
Q_OBJECT
public:
Handler(Scheduler * scheduler, QObject * parent);
virtual ~Handler();
~Handler() override;
virtual void start() = 0;
virtual void stop() = 0;
......
......@@ -77,7 +77,7 @@ class KGET_EXPORT Job : public QObject
ErrorType type;
};
Job(Scheduler * scheduler, JobQueue * parent);
virtual ~Job();
~Job() override;
//Job commands
virtual void start()=0;
......
......@@ -38,7 +38,7 @@ class KGET_EXPORT JobQueue : public QObject
typedef QList<Job *>::iterator iterator;
JobQueue(Scheduler * parent);
virtual ~JobQueue();
~JobQueue() override;
/**
* Sets the JobQueue status
......
......@@ -468,7 +468,7 @@ class GenericObserver : public QObject
Q_OBJECT
public:
GenericObserver(QObject *parent = nullptr);
virtual ~GenericObserver ();
~GenericObserver () override;
public slots:
void groupAddedEvent(TransferGroupHandler *handler);
......
......@@ -20,7 +20,7 @@ class KGetGlobalJob : public KJob
Q_OBJECT
public:
KGetGlobalJob(QObject *parent = nullptr);
~KGetGlobalJob();
~KGetGlobalJob() override;
void update();
......@@ -37,7 +37,7 @@ signals:
void requestStop(KJob *job, TransferHandler *handler);
protected:
virtual bool doKill() override;
bool doKill() override;
};
#endif
......@@ -25,7 +25,7 @@ class KGetKJobAdapter : public KJob
Q_OBJECT
public:
KGetKJobAdapter(QObject *parent, TransferHandler *transfer);
~KGetKJobAdapter();
~KGetKJobAdapter() override;
void start() override {};
......@@ -47,9 +47,9 @@ signals:
void requestResume(KJob *job, TransferHandler *handler);
protected:
virtual bool doKill() override;
virtual bool doSuspend() override;
virtual bool doResume() override;
bool doKill() override;
bool doSuspend() override;
bool doResume() override;
private:
TransferHandler *m_transferHandler;
......
......@@ -30,7 +30,7 @@ class KUiServerJobs : public QObject
Q_OBJECT
public:
KUiServerJobs(QObject *parent = nullptr);
~KUiServerJobs();
~KUiServerJobs() override;
void settingsChanged();
......
......@@ -28,7 +28,7 @@ Q_OBJECT
public:
LinkImporter(const QUrl &source, QObject *parent);
LinkImporter(QObject *parent);
~LinkImporter();
~LinkImporter() override;
/**
* Check for urls in clipboard
......
......@@ -57,7 +57,7 @@ class KGET_EXPORT MostLocalUrlJob : public KIO::Job
public:
MostLocalUrlJob(const QUrl &url);
virtual void start() override;
void start() override;
QUrl url();
/**
......@@ -66,7 +66,7 @@ class KGET_EXPORT MostLocalUrlJob : public KIO::Job
QUrl mostLocalUrl() const;
protected:
virtual void slotResult(KJob *job) override;
void slotResult(KJob *job) override;
private:
QUrl m_url;
......
......@@ -63,7 +63,7 @@ class KGET_EXPORT KGetPlugin : public QObject
Q_OBJECT
public:
KGetPlugin(QObject *parent, const QVariantList &args);
virtual ~KGetPlugin();
~KGetPlugin() override;
/*
// set and retrieve properties
......
......@@ -64,7 +64,7 @@ class KGET_EXPORT Scheduler : public QObject
};
Scheduler(QObject * parent = nullptr);
~Scheduler();
~Scheduler() override;
/**
* Starts globally the execution of the jobs
......
......@@ -46,7 +46,7 @@ class KGET_EXPORT Signature : public QObject
//TODO also support verification and decryption of files that contain the signature?
public:
explicit Signature(const QUrl &dest, QObject *object = nullptr);
~Signature();
~Signature() override;
enum SignatureType
{
......
......@@ -35,7 +35,7 @@ class SignatureThread : public QThread
public:
SignatureThread(QObject *parent = nullptr);
~SignatureThread();
~SignatureThread() override;
/**
* @return true if the thread is valid, i.e. has QGPGME support
......
......@@ -102,7 +102,7 @@ class KGET_EXPORT Transfer : public Job
Scheduler * scheduler, const QUrl & src, const QUrl & dest,
const QDomElement * e = nullptr);
virtual ~Transfer();
~Transfer() override;
/**
* Returns the capabilities this Transfer supports
......@@ -178,10 +178,10 @@ class KGET_EXPORT Transfer : public Job
int downloadSpeed() const {return m_downloadSpeed;}
int averageDownloadSpeed() const;
int uploadSpeed() const {return m_uploadSpeed;}
virtual int remainingTime() const override {return KIO::calculateRemainingSeconds(totalSize(), downloadedSize(), downloadSpeed());}
virtual int elapsedTime() const override;
virtual bool isStalled() const override {return (status() == Job::Running && downloadSpeed() == 0);}
virtual bool isWorking() const override {return downloadSpeed() > 0;}
int remainingTime() const override {return KIO::calculateRemainingSeconds(totalSize(), downloadedSize(), downloadSpeed());}
int elapsedTime() const override;
bool isStalled() const override {return (status() == Job::Running && downloadSpeed() == 0);}
bool isWorking() const override {return downloadSpeed() > 0;}
/**
* The mirrors that are available
......
......@@ -28,7 +28,7 @@ class KGET_EXPORT TransferDataSource : public QObject
Q_OBJECT
public:
TransferDataSource(const QUrl &srcUrl, QObject *parent);
virtual ~TransferDataSource();
~TransferDataSource() override;
/**
* @enum Error
......
......@@ -60,7 +60,7 @@ class KGET_EXPORT TransferGroup : public JobQueue
TransferGroup(TransferTreeModel * model, Scheduler * parent, const QString & name=QString());
virtual ~TransferGroup();
~TransferGroup() override;
/**
* This function is reimplemented by JobQueue::setStatus
......
......@@ -38,7 +38,7 @@ class KGET_EXPORT TransferGroupHandler : public Handler
TransferGroupHandler(Scheduler * scheduler, TransferGroup * parent);
~TransferGroupHandler();
~TransferGroupHandler() override;
JobQueue::Status status() const {return m_group->status();}
......
......@@ -25,7 +25,7 @@ class TransferGroupScheduler : public Scheduler
Q_OBJECT
public:
explicit TransferGroupScheduler(QObject *parent = nullptr);
~TransferGroupScheduler();
~TransferGroupScheduler() override;
/**
* Calculates the whole SpeedLimits
......
......@@ -58,7 +58,7 @@ class KGET_EXPORT TransferHandler : public Handler
TransferHandler(Transfer * parent, Scheduler * scheduler);
virtual ~TransferHandler();
~TransferHandler() override;
Job::Status status() const {return m_transfer->status();}
Job::Error error() const {return m_transfer->error();}
......@@ -289,8 +289,8 @@ class KGET_EXPORT TransferHandler : public Handler
/**
* These are all Job-related functions
*/
virtual void start() override;
virtual void stop() override;
void start() override;
void stop() override;
signals:
/**
......
......@@ -60,7 +60,7 @@ public:
};
TransferHistoryStore();
~TransferHistoryStore();
~TransferHistoryStore() override;
QList<TransferHistoryItem> items() const;
......
......@@ -24,7 +24,7 @@ class SQLiteStore : public TransferHistoryStore
Q_OBJECT
public:
SQLiteStore(const QString &database);
~SQLiteStore();
~SQLiteStore() override;
public slots:
void load() override;
......
......@@ -22,7 +22,7 @@ class XmlStore : public TransferHistoryStore
Q_OBJECT
public:
XmlStore(const QString &url);
~XmlStore();
~XmlStore() override;
public slots:
void load() override;
......
......@@ -37,7 +37,7 @@ class ItemMimeData : public QMimeData
Q_OBJECT
public:
ItemMimeData();
~ItemMimeData();
~ItemMimeData() override;
/**
* Appends a transfer to the list of transfers.
......@@ -59,9 +59,9 @@ class KGET_EXPORT ModelItem : public QStandardItem
{
public:
ModelItem(Handler * handler);
virtual ~ModelItem();
~ModelItem() override;
virtual QVariant data(int role = Qt::UserRole + 1) const override = 0;
QVariant data(int role = Qt::UserRole + 1) const override = 0;
void emitDataChanged();
Handler * handler();
virtual bool isGroup();
......@@ -77,9 +77,9 @@ class KGET_EXPORT TransferModelItem : public ModelItem
{
public:
TransferModelItem(TransferHandler *handler);
virtual ~TransferModelItem();
~TransferModelItem() override;
virtual QVariant data(int role = Qt::UserRole + 1) const override;
QVariant data(int role = Qt::UserRole + 1) const override;
TransferHandler * transferHandler();
......@@ -92,13 +92,13 @@ class KGET_EXPORT GroupModelItem : public ModelItem
{
public:
GroupModelItem(TransferGroupHandler *handler);
virtual ~GroupModelItem();
~GroupModelItem() override;
virtual QVariant data(int role = Qt::UserRole + 1) const override;
QVariant data(int role = Qt::UserRole + 1) const override;
TransferGroupHandler * groupHandler();
virtual bool isGroup() override;
bool isGroup() override;
private:
TransferGroupHandler * m_groupHandler;
......@@ -123,7 +123,7 @@ class KGET_EXPORT TransferTreeModel : public QStandardItemModel
RemainingTime
};
TransferTreeModel(Scheduler * scheduler);
~TransferTreeModel();
~TransferTreeModel() override;
void addGroup(TransferGroup * group);
void delGroup(TransferGroup * group);
......
......@@ -19,7 +19,7 @@ class TransferTreeSelectionModel : public QItemSelectionModel
public:
TransferTreeSelectionModel(QAbstractItemModel * model);
virtual ~TransferTreeSelectionModel();
~TransferTreeSelectionModel() override;
};
#endif
......@@ -32,7 +32,7 @@ class VerificationThread : public QThread
public:
VerificationThread(QObject *parent = nullptr);
~VerificationThread();
~VerificationThread() override;
void verify(const QString &type, const QString &checksum, const QUrl &file);
......
......@@ -69,7 +69,7 @@ class KGET_EXPORT Verifier : public QObject
public:
explicit Verifier(const QUrl &dest, QObject *parent = nullptr);
~Verifier();
~Verifier() override;
enum VerificationStatus
{
......
......@@ -35,7 +35,7 @@ class DBusKGetWrapper : public QObject
public:
DBusKGetWrapper(MainWindow *parent);
~DBusKGetWrapper();
~DBusKGetWrapper() override;
QStringList addTransfer(const QString& src, const QString& destDir = QString(), bool start = false);
bool delTransfer(const QString& dbusObjectPath);
......
......@@ -22,7 +22,7 @@ class DBusTransferWrapper : public QObject
Q_OBJECT
public:
DBusTransferWrapper(TransferHandler * parent);
~DBusTransferWrapper();
~DBusTransferWrapper() override;
public slots:
int capabilities() const;
......
......@@ -30,7 +30,7 @@ class DBusVerifierWrapper : public QObject
Q_OBJECT
public:
DBusVerifierWrapper(Verifier *parent);
~DBusVerifierWrapper();
~DBusVerifierWrapper() override;
public slots:
/**
......
......@@ -23,7 +23,7 @@ class KGetPlugin : public KParts::Plugin
Q_OBJECT
public:
KGetPlugin(QObject* parent, const QVariantList&);
virtual ~KGetPlugin();
~KGetPlugin() override;
private Q_SLOTS:
void slotShowDrop();
......
......@@ -25,7 +25,7 @@ class HttpServer : public QObject
public:
HttpServer(QWidget *parent = nullptr);
~HttpServer();
~HttpServer() override;
void settingsChanged();
......
......@@ -37,7 +37,7 @@ public:
{
}
~KGetApp()
~KGetApp() override
{
delete kget;
}
......
......@@ -44,7 +44,7 @@ class MainWindow : public KXmlGuiWindow
Q_OBJECT
public:
explicit MainWindow(bool showMainwindow = true, bool startWithoutAnimation = false, bool doTesting = false, QWidget *parent = nullptr);
~MainWindow();
~MainWindow() override;
virtual void setSystemTrayDownloading(bool running);
......@@ -58,16 +58,16 @@ public slots:
protected:
// ignore/accept quit events
virtual void closeEvent(QCloseEvent *) override;
virtual void hideEvent(QHideEvent *) override;
virtual void showEvent(QShowEvent *) override;
void closeEvent(QCloseEvent *) override;
void hideEvent(QHideEvent *) override;
void showEvent(QShowEvent *) override;
// drag and drop
virtual void dragEnterEvent(QDragEnterEvent *) override;
virtual void dropEvent(QDropEvent *) override;
void dragEnterEvent(QDragEnterEvent *) override;
void dropEvent(QDropEvent *) override;
// set sensitive initial size
virtual QSize sizeHint() const override;
QSize sizeHint() const override;
private slots:
// slots connected to actions
......
......@@ -31,7 +31,7 @@ class ChecksumSearch : public QObject
public:
ChecksumSearch(const QList<QUrl> &srcs, const QString &fileName, const QStringList &types, QObject *parent = nullptr);
~ChecksumSearch();
~ChecksumSearch() override;
/**
* Used to define in whiche way the url should be changed to try and find
......
......@@ -21,7 +21,7 @@ class ChecksumSearchFactory : public TransferFactory
Q_OBJECT
public:
ChecksumSearchFactory(QObject *parent, const QVariantList &args);
~ChecksumSearchFactory();
~ChecksumSearchFactory() override;
TransferDataSource * createTransferDataSource(const QUrl &srcUrl, const QDomElement &type, QObject *parent) override;
};
......
......@@ -37,7 +37,7 @@ class ChecksumSearchController : public QObject
Q_OBJECT
public:
ChecksumSearchController(QObject *parent = nullptr);
~ChecksumSearchController();
~ChecksumSearchController() override;
/**
* Registers a search, downloads baseUrl if that has not be downloaded and then
......@@ -70,7 +70,7 @@ class ChecksumSearchTransferDataSource : public TransferDataSource
Q_OBJECT
public:
ChecksumSearchTransferDataSource(const QUrl &srcUrl, QObject *parent);
virtual ~ChecksumSearchTransferDataSource();
~ChecksumSearchTransferDataSource() override;
void start() override;
void stop() override;
......
......@@ -92,7 +92,7 @@ class DlgChecksumSettingsWidget : public KCModule
public:
explicit DlgChecksumSettingsWidget(QWidget *parent = nullptr, const QVariantList &args = QVariantList());