Commit a2d48676 authored by Friedemann Kleint's avatar Friedemann Kleint

CPaster: Introduce override.

Change-Id: I0c002895a6585fac79c8aa1d773b68c4a1540916
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 4f890dea
......@@ -44,7 +44,7 @@ public:
int columnIndicator() const { return m_columnIndicator; }
protected:
virtual void paintEvent(QPaintEvent *event);
void paintEvent(QPaintEvent *event) override;
private:
int m_columnIndicator = 0;
......
......@@ -71,11 +71,11 @@ public:
Q_DECLARE_FLAGS(PasteSources, PasteSource)
CodepasterPlugin();
~CodepasterPlugin();
~CodepasterPlugin() override;
virtual bool initialize(const QStringList &arguments, QString *errorMessage);
virtual void extensionsInitialized();
virtual ShutdownFlag aboutToShutdown();
bool initialize(const QStringList &arguments, QString *errorMessage) override;
void extensionsInitialized() override;
ShutdownFlag aboutToShutdown() override;
static CodepasterPlugin *instance();
......
......@@ -49,21 +49,21 @@ class FileShareProtocol : public Protocol
public:
FileShareProtocol();
virtual ~FileShareProtocol();
~FileShareProtocol() override;
virtual QString name() const;
virtual unsigned capabilities() const;
virtual bool hasSettings() const;
virtual Core::IOptionsPage *settingsPage() const;
QString name() const override;
unsigned capabilities() const override;
bool hasSettings() const override;
Core::IOptionsPage *settingsPage() const override;
virtual bool checkConfiguration(QString *errorMessage = 0);
virtual void fetch(const QString &id);
virtual void list();
virtual void paste(const QString &text,
ContentType ct = Text, int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString());
bool checkConfiguration(QString *errorMessage = 0) override;
void fetch(const QString &id) override;
void list() override;
void paste(const QString &text,
ContentType ct = Text, int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString()) override;
private:
const QSharedPointer<FileShareProtocolSettings> m_settings;
......
......@@ -39,16 +39,16 @@ class StickyNotesPasteProtocol : public NetworkProtocol
{
Q_OBJECT
public:
virtual unsigned capabilities() const;
unsigned capabilities() const override;
virtual void fetch(const QString &id);
virtual void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString());
virtual void list();
void fetch(const QString &id) override;
void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString()) override;
void list() override;
......@@ -61,7 +61,7 @@ public slots:
void listFinished();
protected:
virtual bool checkConfiguration(QString *errorMessage = 0);
bool checkConfiguration(QString *errorMessage = 0) override;
private:
QString m_hostUrl;
......
......@@ -39,19 +39,19 @@ class PasteBinDotCaProtocol : public NetworkProtocol
Q_OBJECT
public:
static QString protocolName();
QString name() const { return protocolName(); }
QString name() const override { return protocolName(); }
virtual bool hasSettings() const { return false; }
virtual unsigned capabilities() const;
bool hasSettings() const override { return false; }
unsigned capabilities() const override;
virtual void fetch(const QString &id);
virtual void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString());
virtual void list();
void fetch(const QString &id);
void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString()) override;
void list() override;
public slots:
void fetchFinished();
......@@ -59,7 +59,7 @@ public slots:
void pasteFinished();
protected:
virtual bool checkConfiguration(QString *errorMessage);
bool checkConfiguration(QString *errorMessage) override;
private:
QNetworkReply *m_fetchReply = nullptr;
......
......@@ -42,16 +42,16 @@ public:
static QString protocolName();
QString name() const { return protocolName(); }
virtual unsigned capabilities() const;
unsigned capabilities() const override;
virtual void fetch(const QString &id);
virtual void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString());
virtual void list();
void fetch(const QString &id);
void paste(const QString &text,
ContentType ct = Text,
int expiryDays = 1,
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString()) override;
void list() override;
public slots:
void fetchFinished();
......
......@@ -46,7 +46,7 @@ class PasteSelectDialog : public QDialog
public:
explicit PasteSelectDialog(const QList<Protocol*> &protocols,
QWidget *parent = 0);
~PasteSelectDialog();
~PasteSelectDialog() override;
QString pasteId() const;
......
......@@ -54,7 +54,7 @@ public:
explicit PasteView(const QList<Protocol *> &protocols,
const QString &mimeType,
QWidget *parent);
~PasteView();
~PasteView() override;
// Show up with checkable list of diff chunks.
int show(const QString &user, const QString &description, const QString &comment,
......@@ -73,7 +73,7 @@ public:
void setExpiryDays(int d);
int expiryDays() const;
virtual void accept();
void accept() override;
private slots:
void contentChanged();
......
......@@ -63,11 +63,11 @@ class SettingsPage : public Core::IOptionsPage
public:
explicit SettingsPage(const QSharedPointer<Settings> &settings);
~SettingsPage();
~SettingsPage() override;
QWidget *widget();
void apply();
void finish() { }
QWidget *widget() override;
void apply() override;
void finish() override { }
void addProtocol(const QString& name);
......
......@@ -39,10 +39,10 @@ class UrlOpenProtocol : public NetworkProtocol
{
Q_OBJECT
public:
QString name() const;
unsigned capabilities() const;
void fetch(const QString &url);
void paste(const QString &, ContentType, int, const QString &, const QString &, const QString &);
QString name() const override;
unsigned capabilities() const override;
void fetch(const QString &url) override;
void paste(const QString &, ContentType, int, const QString &, const QString &, const QString &) override;
private slots:
void fetchFinished();
......
Markdown is supported
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