Commit 355f89b4 authored by Kevin Funk's avatar Kevin Funk
Browse files

Modernize: Use override

Changes:
* Replace Q_DECL_OVERRIDE with override
* Also strip 'virtual' from methods having 'override' already.
parent 394dc542
......@@ -31,10 +31,10 @@ class AboutProtocol : public KIO::SlaveBase
{
public:
AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~AboutProtocol();
~AboutProtocol() override;
virtual void get(const QUrl& url);
virtual void mimetype(const QUrl& url);
void get(const QUrl& url) override;
void mimetype(const QUrl& url) override;
};
#endif
......@@ -30,15 +30,15 @@ class ActivitiesProtocol : public KIO::ForwardingSlaveBase {
public:
ActivitiesProtocol(const QByteArray &poolSocket, const QByteArray &appSocket);
~ActivitiesProtocol();
~ActivitiesProtocol() override;
protected:
bool rewriteUrl(const QUrl &url, QUrl &newUrl) Q_DECL_OVERRIDE;
void listDir(const QUrl &url) Q_DECL_OVERRIDE;
void prepareUDSEntry(KIO::UDSEntry &entry, bool listing = false) const Q_DECL_OVERRIDE;
void stat(const QUrl& url) Q_DECL_OVERRIDE;
void mimetype(const QUrl& url) Q_DECL_OVERRIDE;
void del(const QUrl& url, bool isfile) Q_DECL_OVERRIDE;
bool rewriteUrl(const QUrl &url, QUrl &newUrl) override;
void listDir(const QUrl &url) override;
void prepareUDSEntry(KIO::UDSEntry &entry, bool listing = false) const override;
void stat(const QUrl& url) override;
void mimetype(const QUrl& url) override;
void del(const QUrl& url, bool isfile) override;
private:
D_PTR;
......
......@@ -35,10 +35,10 @@
class FileItemLinkingPlugin : public KAbstractFileItemActionPlugin {
public:
FileItemLinkingPlugin(QObject *parent, const QVariantList &);
~FileItemLinkingPlugin();
~FileItemLinkingPlugin() override;
QList<QAction *> actions(const KFileItemListProperties &fileItemInfos,
QWidget *parentWidget) Q_DECL_OVERRIDE;
QWidget *parentWidget) override;
private:
D_PTR;
......
......@@ -36,7 +36,7 @@ class FileItemLinkingPluginActionLoader: public QThread {
public:
static FileItemLinkingPluginActionLoader* create(const KFileItemListProperties &items);
void run() Q_DECL_OVERRIDE;
void run() override;
Action createAction(const QString &activity, bool link,
const QString &title = QString(),
......
......@@ -26,9 +26,9 @@ class ArchiveProtocol : public ArchiveProtocolBase
{
public:
ArchiveProtocol( const QByteArray &proto, const QByteArray &pool, const QByteArray &app );
virtual ~ArchiveProtocol() = default;
~ArchiveProtocol() override = default;
KArchive *createArchive( const QString & proto, const QString & archiveFile ) Q_DECL_OVERRIDE;
KArchive *createArchive( const QString & proto, const QString & archiveFile ) override;
};
#endif // KIO_ARCHIVE_H
......@@ -34,11 +34,11 @@ class LIBKIOARCHIVE_EXPORT ArchiveProtocolBase : public KIO::SlaveBase
{
public:
ArchiveProtocolBase( const QByteArray &proto, const QByteArray &pool, const QByteArray &app );
virtual ~ArchiveProtocolBase();
~ArchiveProtocolBase() override;
virtual void listDir( const QUrl & url );
virtual void stat( const QUrl & url );
virtual void get( const QUrl & url );
void listDir( const QUrl & url ) override;
void stat( const QUrl & url ) override;
void get( const QUrl & url ) override;
private:
void createRootUDSEntry( KIO::UDSEntry & entry );
......
......@@ -28,9 +28,9 @@ class BookmarksProtocol : public KIO::SlaveBase
{
public:
BookmarksProtocol( const QByteArray &pool, const QByteArray &app );
~BookmarksProtocol();
~BookmarksProtocol() override;
void get( const QUrl& url );
void get( const QUrl& url ) override;
private:
int columns;
......
......@@ -44,9 +44,9 @@ class FileNameSearchProtocol : public KIO::SlaveBase
{
public:
FileNameSearchProtocol(const QByteArray &pool, const QByteArray &app);
virtual ~FileNameSearchProtocol();
~FileNameSearchProtocol() override;
void listDir(const QUrl &url) Q_DECL_OVERRIDE;
void listDir(const QUrl &url) override;
private:
void searchDirectory(const QUrl &directory,
......
......@@ -39,7 +39,7 @@ class FilterProtocol : /*public QObject, */ public KIO::SlaveBase
public:
FilterProtocol( const QByteArray & protocol, const QByteArray &pool, const QByteArray &app );
virtual void get( const QUrl &url );
void get( const QUrl &url ) override;
#if 0
virtual void put( const QUrl &url, int _mode, KIO::JobFlags _flags );
virtual void setSubURL(const QUrl &url);
......
......@@ -26,7 +26,7 @@ class fishProtocol : public KIO::SlaveBase
{
public:
fishProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~fishProtocol();
~fishProtocol() override;
/**
Connects to a server and logs us in via SSH. Then starts FISH protocol.
......@@ -34,46 +34,46 @@ Connects to a server and logs us in via SSH. Then starts FISH protocol.
It is set to false if the connection becomes closed.
*/
void openConnection();
void openConnection() override;
/**
Clean up connection
*/
void shutdownConnection(bool forced=false);
/** sets connection information for subsequent commands */
void setHost(const QString & host, quint16 port, const QString & user, const QString & pass);
void setHost(const QString & host, quint16 port, const QString & user, const QString & pass) override;
/** Forced close of the connection */
void closeConnection();
void closeConnection() override;
/** get a file */
void get(const QUrl& url);
void get(const QUrl& url) override;
/** put a file */
void put(const QUrl& url, int permissions, KIO::JobFlags flags );
void put(const QUrl& url, int permissions, KIO::JobFlags flags ) override;
/** aborts command sequence and calls error() */
void error(int type, const QString &detail);
/** executes next command in sequence or calls finished() if all is done */
void finished();
/** stat a file */
void stat(const QUrl& url);
void stat(const QUrl& url) override;
/** find mimetype for a file */
void mimetype(const QUrl& url);
void mimetype(const QUrl& url) override;
/** list a directory */
void listDir(const QUrl& url);
void listDir(const QUrl& url) override;
/** create a directory */
void mkdir(const QUrl&url, int permissions);
void mkdir(const QUrl&url, int permissions) override;
/** rename a file */
void rename(const QUrl& src, const QUrl& dest, KIO::JobFlags flags);
void rename(const QUrl& src, const QUrl& dest, KIO::JobFlags flags) override;
/** create a symlink */
void symlink(const QString& target, const QUrl& dest, KIO::JobFlags flags);
void symlink(const QString& target, const QUrl& dest, KIO::JobFlags flags) override;
/** change file permissions */
void chmod(const QUrl& url, int permissions);
void chmod(const QUrl& url, int permissions) override;
/** copies a file */
void copy(const QUrl &src, const QUrl &dest, int permissions, KIO::JobFlags flags);
void copy(const QUrl &src, const QUrl &dest, int permissions, KIO::JobFlags flags) override;
/** report status */
void slave_status();
void slave_status() override;
/** removes a file or directory */
void del(const QUrl &u, bool isfile);
void del(const QUrl &u, bool isfile) override;
/** special like background execute */
void special( const QByteArray &data );
void special( const QByteArray &data ) override;
private: // Private attributes
/** fd for reading and writing to the process */
......
......@@ -12,11 +12,11 @@ class InfoProtocol : public KIO::SlaveBase
public:
InfoProtocol( const QByteArray &pool, const QByteArray &app );
virtual ~InfoProtocol();
~InfoProtocol() override;
virtual void get( const QUrl& url );
virtual void stat( const QUrl& url );
virtual void mimetype( const QUrl& url );
void get( const QUrl& url ) override;
void stat( const QUrl& url ) override;
void mimetype( const QUrl& url ) override;
protected:
......
......@@ -37,11 +37,11 @@ class KFileAudioPreview : public KPreviewWidgetBase
public:
explicit KFileAudioPreview(QWidget *parent = nullptr,
const QVariantList &args = QVariantList());
~KFileAudioPreview();
~KFileAudioPreview() override;
public Q_SLOTS:
virtual void showPreview(const QUrl &url);
virtual void clearPreview();
void showPreview(const QUrl &url) override;
void clearPreview() override;
private Q_SLOTS:
void toggleAuto(bool on);
......
......@@ -67,7 +67,7 @@ public:
* Constructs a media control widget with a \p parent.
*/
explicit MediaControls(QWidget *parent = nullptr);
~MediaControls();
~MediaControls() override;
bool isSeekSliderVisible() const;
bool isVolumeControlVisible() const;
......@@ -87,7 +87,7 @@ public Q_SLOTS:
void setAudioOutput(AudioOutput *audioOutput);
protected:
void resizeEvent(QResizeEvent *event);
void resizeEvent(QResizeEvent *event) override;
private:
Q_PRIVATE_SLOT(d_func(), void _k_stateChanged(Phonon::State, Phonon::State))
......
......@@ -35,13 +35,13 @@ class MANProtocol : public QObject, public KIO::SlaveBase
public:
MANProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~MANProtocol();
~MANProtocol() override;
virtual void get(const QUrl& url);
virtual void stat(const QUrl& url);
void get(const QUrl& url) override;
void stat(const QUrl& url) override;
virtual void mimetype(const QUrl &url);
virtual void listDir(const QUrl &url);
void mimetype(const QUrl &url) override;
void listDir(const QUrl &url) override;
void outputError(const QString& errmsg);
void outputMatchingPages(const QStringList &matchingPages);
......
......@@ -44,12 +44,12 @@ class KManPart : public KHTMLPart
KParts::BrowserExtension * extension() {return m_extension;}
public Q_SLOTS:
virtual bool openUrl( const QUrl &url );
bool openUrl( const QUrl &url ) override;
protected Q_SLOTS:
void readData(KIO::Job * , const QByteArray & data);
void jobDone( KJob *);
protected:
virtual bool openFile();
bool openFile() override;
KParts::BrowserExtension * m_extension;
KIO::TransferJob *m_job;
};
......
......@@ -39,7 +39,7 @@ Q_OBJECT
public:
explicit CachedDevice(LIBMTP_mtpdevice_t *device, LIBMTP_raw_device_t *rawdevice, const QString udi, qint32 timeout);
virtual ~CachedDevice();
~CachedDevice() override;
LIBMTP_mtpdevice_t *getDevice();
const QString getName();
......@@ -61,7 +61,7 @@ Q_OBJECT
public:
DeviceCache(qint32 timeout, QObject *parent = nullptr);
virtual ~DeviceCache();
~DeviceCache() override;
QHash< QString, CachedDevice * > getAll();
CachedDevice *get(const QString &string, bool isUdi = false);
......
......@@ -54,24 +54,24 @@ public:
* Overwritten KIO-functions, see "kio_mtp.cpp"
*/
MTPSlave(const QByteArray &pool, const QByteArray &app);
virtual ~MTPSlave();
virtual void listDir(const QUrl &url) Q_DECL_OVERRIDE;
virtual void stat(const QUrl &url) Q_DECL_OVERRIDE;
virtual void mimetype(const QUrl &url) Q_DECL_OVERRIDE;
virtual void get(const QUrl &url) Q_DECL_OVERRIDE;
virtual void put(const QUrl &url, int, JobFlags flags) Q_DECL_OVERRIDE;
virtual void copy(const QUrl &src, const QUrl &dest, int, JobFlags flags) Q_DECL_OVERRIDE;
virtual void mkdir(const QUrl &url, int) Q_DECL_OVERRIDE;
virtual void del(const QUrl &url, bool) Q_DECL_OVERRIDE;
virtual void rename(const QUrl &src, const QUrl &dest, JobFlags flags) Q_DECL_OVERRIDE;
~MTPSlave() override;
void listDir(const QUrl &url) override;
void stat(const QUrl &url) override;
void mimetype(const QUrl &url) override;
void get(const QUrl &url) override;
void put(const QUrl &url, int, JobFlags flags) override;
void copy(const QUrl &src, const QUrl &dest, int, JobFlags flags) override;
void mkdir(const QUrl &url, int) override;
void del(const QUrl &url, bool) override;
void rename(const QUrl &src, const QUrl &dest, JobFlags flags) override;
// private slots:
//
// void test();
protected:
void virtual_hook(int id, void *data) Q_DECL_OVERRIDE;
void virtual_hook(int id, void *data) override;
private:
/**
......
......@@ -38,7 +38,7 @@ class NetworkDBusInterface: public QDBusAbstractInterface
public:
NetworkDBusInterface( const QString& service, const QString& path, const QDBusConnection& connection, QObject* parent = nullptr );
virtual ~NetworkDBusInterface();
~NetworkDBusInterface() override;
public Q_SLOTS:
QDBusReply<Mollet::NetDevice> deviceData( const QString& hostAddress );
......
......@@ -39,7 +39,7 @@ class NetworkInitWatcher : public QObject
public:
NetworkInitWatcher( Network* network, QMutex* mutex );
virtual ~NetworkInitWatcher();
~NetworkInitWatcher() override;
public Q_SLOTS:
void onNetworkInitDone();
......
......@@ -40,13 +40,13 @@ class NetworkSlave : public KIO::SlaveBase
{
public:
NetworkSlave( const QByteArray& name, const QByteArray& poolSocket, const QByteArray& programSocket );
virtual ~NetworkSlave();
~NetworkSlave() override;
public: // KIO::SlaveBase API
virtual void mimetype( const QUrl& url );
virtual void get( const QUrl& url );
virtual void stat( const QUrl& url );
virtual void listDir( const QUrl& url );
void mimetype( const QUrl& url ) override;
void get( const QUrl& url ) override;
void stat( const QUrl& url ) override;
void listDir( const QUrl& url ) override;
private:
void feedEntryAsNetwork( KIO::UDSEntry* entry );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment