Commit e6f3d0a1 authored by Nicolas Fella's avatar Nicolas Fella Committed by Kurt Hindenburg
Browse files

Replace Q_DECL_OVERRIDE with override

parent 5f60bc5a
......@@ -55,7 +55,7 @@ public:
static void populateCommandLineParser(QCommandLineParser *parser);
static QStringList getCustomCommand(QStringList &args);
~Application() Q_DECL_OVERRIDE;
~Application() override;
/** Creates a new main window and opens a default terminal session */
int newInstance();
......
......@@ -62,13 +62,13 @@ public:
* @param parent The parent object
*/
BookmarkHandler(KActionCollection *collection, QMenu *menu, bool toplevel, QObject *parent);
~BookmarkHandler() Q_DECL_OVERRIDE;
~BookmarkHandler() override;
QUrl currentUrl() const Q_DECL_OVERRIDE;
QString currentTitle() const Q_DECL_OVERRIDE;
QString currentIcon() const Q_DECL_OVERRIDE;
bool enableOption(BookmarkOption option) const Q_DECL_OVERRIDE;
void openFolderinTabs(const KBookmarkGroup &group) Q_DECL_OVERRIDE;
QUrl currentUrl() const override;
QString currentTitle() const override;
QString currentIcon() const override;
bool enableOption(BookmarkOption option) const override;
void openFolderinTabs(const KBookmarkGroup &group) override;
/**
* Returns the menu which this bookmark handler inserts its actions into.
......@@ -107,7 +107,7 @@ Q_SIGNALS:
void openUrls(const QList<QUrl> &urls);
private Q_SLOTS:
void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers) Q_DECL_OVERRIDE;
void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers) override;
private:
Q_DISABLE_COPY(BookmarkHandler)
......
......@@ -57,7 +57,7 @@ class KONSOLEPRIVATE_EXPORT ColorSchemeEditor : public QDialog
public:
/** Constructs a new color scheme editor with the specified parent. */
explicit ColorSchemeEditor(QWidget *parent = nullptr);
~ColorSchemeEditor() Q_DECL_OVERRIDE;
~ColorSchemeEditor() override;
/** Initializes the dialog with the properties of the specified color scheme. */
void setup(const ColorScheme *scheme, bool isNewScheme);
......
......@@ -51,7 +51,7 @@ class CopyInputDialog : public QDialog
public:
explicit CopyInputDialog(QWidget *parent = nullptr);
~CopyInputDialog() Q_DECL_OVERRIDE;
~CopyInputDialog() override;
/**
* Sets the 'source' session whose input will be copied to
* other sessions. This session is displayed grayed out in the list
......@@ -117,12 +117,12 @@ public:
QSet<Session *> checkedSessions() const;
// reimplemented from QAbstractItemModel
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
protected:
void sessionRemoved(Session *) Q_DECL_OVERRIDE;
void sessionRemoved(Session *) override;
private:
QSet<Session *> _checkedSessions;
......
......@@ -74,7 +74,7 @@ class KONSOLEPRIVATE_EXPORT EditProfileDialog: public KPageDialog
public:
/** Constructs a new dialog with the specified parent. */
explicit EditProfileDialog(QWidget *parent = nullptr);
~EditProfileDialog() Q_DECL_OVERRIDE;
~EditProfileDialog() override;
/**
* Initializes the dialog with the settings for the specified session
......@@ -98,14 +98,14 @@ public:
public Q_SLOTS:
// reimplemented
void accept() Q_DECL_OVERRIDE;
void accept() override;
// reimplemented
void reject() Q_DECL_OVERRIDE;
void reject() override;
void apply();
protected:
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *watched, QEvent *event) override;
private Q_SLOTS:
QSize sizeHint() const override;
......@@ -359,9 +359,9 @@ public:
// reimplemented
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;
const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;
const QModelIndex &index) const override;
};
/**
......
......@@ -121,7 +121,7 @@ class KONSOLEPRIVATE_EXPORT Emulation : public QObject
public:
/** Constructs a new terminal emulation */
Emulation();
~Emulation() Q_DECL_OVERRIDE;
~Emulation() override;
/**
* Creates a new window onto the output from this emulation. The contents
......
......@@ -192,7 +192,7 @@ public:
public:
HotSpot(int startLine, int startColumn, int endLine, int endColumn,
const QStringList &capturedTexts);
void activate(QObject *object = nullptr) Q_DECL_OVERRIDE;
void activate(QObject *object = nullptr) override;
/** Returns the texts found by the filter when matching the filter's regular expression */
QStringList capturedTexts() const;
......@@ -219,7 +219,7 @@ public:
* If regexp matches the empty string, then process() will return immediately
* without finding results.
*/
void process() Q_DECL_OVERRIDE;
void process() override;
protected:
/**
......@@ -248,15 +248,15 @@ public:
public:
HotSpot(int startLine, int startColumn, int endLine, int endColumn,
const QStringList &capturedTexts);
~HotSpot() Q_DECL_OVERRIDE;
~HotSpot() override;
QList<QAction *> actions() Q_DECL_OVERRIDE;
QList<QAction *> actions() override;
/**
* Open a web browser at the current URL. The url itself can be determined using
* the capturedTexts() method.
*/
void activate(QObject *object = nullptr) Q_DECL_OVERRIDE;
void activate(QObject *object = nullptr) override;
private:
enum UrlType {
......@@ -272,7 +272,7 @@ public:
UrlFilter();
protected:
RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) Q_DECL_OVERRIDE;
RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) override;
private:
static const QRegularExpression FullUrlRegExp;
......@@ -297,14 +297,14 @@ public:
public:
HotSpot(int startLine, int startColumn, int endLine, int endColumn,
const QStringList &capturedTexts, const QString &filePath);
~HotSpot() Q_DECL_OVERRIDE;
~HotSpot() override;
QList<QAction *> actions() Q_DECL_OVERRIDE;
QList<QAction *> actions() override;
/**
* Opens kate for editing the file.
*/
void activate(QObject *object = nullptr) Q_DECL_OVERRIDE;
void activate(QObject *object = nullptr) override;
private:
FilterObject *_fileObject;
......@@ -313,10 +313,10 @@ public:
explicit FileFilter(Session *session);
void process() Q_DECL_OVERRIDE;
void process() override;
protected:
RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) Q_DECL_OVERRIDE;
RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) override;
private:
QPointer<Session> _session;
......@@ -390,7 +390,7 @@ class TerminalImageFilterChain : public FilterChain
{
public:
TerminalImageFilterChain();
~TerminalImageFilterChain() Q_DECL_OVERRIDE;
~TerminalImageFilterChain() override;
/**
* Set the current terminal image to @p image.
......
......@@ -125,15 +125,15 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollFile : public HistoryScroll
{
public:
explicit HistoryScrollFile();
~HistoryScrollFile() Q_DECL_OVERRIDE;
~HistoryScrollFile() override;
int getLines() Q_DECL_OVERRIDE;
int getLineLen(int lineno) Q_DECL_OVERRIDE;
void getCells(int lineno, int colno, int count, Character res[]) Q_DECL_OVERRIDE;
bool isWrappedLine(int lineno) Q_DECL_OVERRIDE;
int getLines() override;
int getLineLen(int lineno) override;
void getCells(int lineno, int colno, int count, Character res[]) override;
bool isWrappedLine(int lineno) override;
void addCells(const Character text[], int count) Q_DECL_OVERRIDE;
void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE;
void addCells(const Character text[], int count) override;
void addLine(bool previousWrapped = false) override;
private:
qint64 startOfLine(int lineno);
......@@ -150,17 +150,17 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollNone : public HistoryScroll
{
public:
HistoryScrollNone();
~HistoryScrollNone() Q_DECL_OVERRIDE;
~HistoryScrollNone() override;
bool hasScroll() Q_DECL_OVERRIDE;
bool hasScroll() override;
int getLines() Q_DECL_OVERRIDE;
int getLineLen(int lineno) Q_DECL_OVERRIDE;
void getCells(int lineno, int colno, int count, Character res[]) Q_DECL_OVERRIDE;
bool isWrappedLine(int lineno) Q_DECL_OVERRIDE;
int getLines() override;
int getLineLen(int lineno) override;
void getCells(int lineno, int colno, int count, Character res[]) override;
bool isWrappedLine(int lineno) override;
void addCells(const Character a[], int count) Q_DECL_OVERRIDE;
void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE;
void addCells(const Character a[], int count) override;
void addLine(bool previousWrapped = false) override;
};
//////////////////////////////////////////////////////////////////////
......@@ -315,16 +315,16 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryScroll : public HistoryScroll
public:
explicit CompactHistoryScroll(unsigned int maxLineCount = 1000);
~CompactHistoryScroll() Q_DECL_OVERRIDE;
~CompactHistoryScroll() override;
int getLines() Q_DECL_OVERRIDE;
int getLineLen(int lineNumber) Q_DECL_OVERRIDE;
void getCells(int lineNumber, int startColumn, int count, Character buffer[]) Q_DECL_OVERRIDE;
bool isWrappedLine(int lineNumber) Q_DECL_OVERRIDE;
int getLines() override;
int getLineLen(int lineNumber) override;
void getCells(int lineNumber, int startColumn, int count, Character buffer[]) override;
bool isWrappedLine(int lineNumber) override;
void addCells(const Character a[], int count) Q_DECL_OVERRIDE;
void addCellsVector(const TextLine &cells) Q_DECL_OVERRIDE;
void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE;
void addCells(const Character a[], int count) override;
void addCellsVector(const TextLine &cells) override;
void addLine(bool previousWrapped = false) override;
void setMaxNbLines(unsigned int lineCount);
......@@ -375,10 +375,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeNone : public HistoryType
public:
HistoryTypeNone();
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
bool isEnabled() const override;
int maximumLineCount() const override;
HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
HistoryScroll *scroll(HistoryScroll *) const override;
};
class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType
......@@ -386,10 +386,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType
public:
explicit HistoryTypeFile();
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
bool isEnabled() const override;
int maximumLineCount() const override;
HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
HistoryScroll *scroll(HistoryScroll *) const override;
};
class KONSOLEPRIVATE_EXPORT CompactHistoryType : public HistoryType
......@@ -397,10 +397,10 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryType : public HistoryType
public:
explicit CompactHistoryType(unsigned int nbLines);
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
bool isEnabled() const override;
int maximumLineCount() const override;
HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
HistoryScroll *scroll(HistoryScroll *) const override;
protected:
unsigned int _maxLines;
......
......@@ -38,7 +38,7 @@ class HistorySizeDialog : public QDialog
public:
explicit HistorySizeDialog(QWidget *parent = nullptr);
~HistorySizeDialog() Q_DECL_OVERRIDE;
~HistorySizeDialog() override;
/** See HistorySizeWidget::setMode. */
void setMode(Enum::HistoryModeEnum aMode);
......
......@@ -43,7 +43,7 @@ class HistorySizeWidget : public QWidget
public:
explicit HistorySizeWidget(QWidget *parent);
~HistorySizeWidget() Q_DECL_OVERRIDE;
~HistorySizeWidget() override;
/** Specifies the history mode. */
void setMode(Enum::HistoryModeEnum aMode);
......
......@@ -101,7 +101,7 @@ public:
void setOptions();
// reimplemented
void setVisible(bool visible) Q_DECL_OVERRIDE;
void setVisible(bool visible) override;
Q_SIGNALS:
/** Emitted when the text entered in the search box is altered */
void searchChanged(const QString &text);
......@@ -136,8 +136,8 @@ Q_SIGNALS:
void unhandledMovementKeyPressed(QKeyEvent *event);
protected:
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *watched, QEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
public Q_SLOTS:
void clearLineEdit();
......
......@@ -55,7 +55,7 @@ class KeyBindingEditor : public QDialog
public:
/** Constructs a new key bindings editor with the specified parent. */
explicit KeyBindingEditor(QWidget *parent = nullptr);
~KeyBindingEditor() Q_DECL_OVERRIDE;
~KeyBindingEditor() override;
/**
* Initializes the dialog with the bindings and other settings
......@@ -86,7 +86,7 @@ public:
QString description() const;
// reimplemented to handle test area input
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *watched, QEvent *event) override;
Q_SIGNALS:
/**
......@@ -111,7 +111,7 @@ Q_SIGNALS:
private Q_SLOTS:
// reimplemented
void accept() Q_DECL_OVERRIDE;
void accept() override;
void setTranslatorDescription(const QString &description);
void bindingTableItemChanged(QTableWidgetItem *item);
......@@ -142,7 +142,7 @@ private:
// Sets the size hint of the dialog to be slightly smaller than the
// size of EditProfileDialog
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
};
}
......
......@@ -126,18 +126,18 @@ Q_SIGNALS:
protected:
// Reimplemented for internal reasons.
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
void showEvent(QShowEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
// reimplemented from KMainWindow
bool queryClose() Q_DECL_OVERRIDE;
void saveProperties(KConfigGroup &group) Q_DECL_OVERRIDE;
void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE;
void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE;
void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE;
bool queryClose() override;
void saveProperties(KConfigGroup &group) override;
void readProperties(const KConfigGroup &group) override;
void saveGlobalProperties(KConfig *config) override;
void readGlobalProperties(KConfig *config) override;
// reimplemented from QWidget
bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
bool focusNextPrevChild(bool next) override;
private Q_SLOTS:
void newTab();
......
......@@ -58,7 +58,7 @@ class Part : public KParts::ReadOnlyPart, public TerminalInterface
public:
/** Constructs a new Konsole part with the specified parent. */
explicit Part(QWidget *parentWidget, QObject *parent, const QVariantList &);
~Part() Q_DECL_OVERRIDE;
~Part() override;
/** Reimplemented from TerminalInterface. */
void startProgram(const QString &program, const QStringList &arguments) override;
......@@ -199,8 +199,8 @@ Q_SIGNALS:
protected:
/** Reimplemented from KParts::PartBase. */
bool openFile() Q_DECL_OVERRIDE;
bool openUrl(const QUrl &url) Q_DECL_OVERRIDE;
bool openFile() override;
bool openUrl(const QUrl &url) override;
private Q_SLOTS:
void activeViewChanged(SessionController *controller);
......
......@@ -30,7 +30,7 @@ class PrintOptions : public QWidget, private Ui::PrintOptions
public:
explicit PrintOptions(QWidget *parent = nullptr);
~PrintOptions() Q_DECL_OVERRIDE;
~PrintOptions() override;
public Q_SLOTS:
void saveSettings();
......
......@@ -428,7 +428,7 @@ public:
}
protected:
bool readCurrentDir(int pid) Q_DECL_OVERRIDE
bool readCurrentDir(int pid) override
{
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
......@@ -447,7 +447,7 @@ protected:
}
private:
bool readProcInfo(int pid) Q_DECL_OVERRIDE
bool readProcInfo(int pid) override
{
// indicies of various fields within the process status file which
// contain various information about the process
......@@ -569,7 +569,7 @@ private:
return ok;
}
bool readArguments(int pid) Q_DECL_OVERRIDE
bool readArguments(int pid) override
{
// read command-line arguments file found at /proc/<pid>/cmdline
// the expected format is a list of strings delimited by null characters,
......@@ -605,7 +605,7 @@ public:
}
protected:
bool readCurrentDir(int pid) Q_DECL_OVERRIDE
bool readCurrentDir(int pid) override
{
#if defined(HAVE_OS_DRAGONFLYBSD)
char buf[PATH_MAX];
......@@ -650,7 +650,7 @@ protected:
}
private:
bool readProcInfo(int pid) Q_DECL_OVERRIDE
bool readProcInfo(int pid) override
{
int managementInfoBase[4];
size_t mibLength;
......@@ -692,7 +692,7 @@ private:
return true;
}
bool readArguments(int pid) Q_DECL_OVERRIDE
bool readArguments(int pid) override
{
char args[ARG_MAX];
int managementInfoBase[4];
......@@ -730,7 +730,7 @@ public:
}
protected:
bool readCurrentDir(int pid) Q_DECL_OVERRIDE
bool readCurrentDir(int pid) override
{
char buf[PATH_MAX];
int managementInfoBase[3];
......@@ -751,7 +751,7 @@ protected:
}
private:
bool readProcInfo(int pid) Q_DECL_OVERRIDE
bool readProcInfo(int pid) override
{
int managementInfoBase[6];
size_t mibLength;
......@@ -821,7 +821,7 @@ private:
return (char **)buf;
}
bool readArguments(int pid) Q_DECL_OVERRIDE
bool readArguments(int pid) override
{
char **argv;
......@@ -848,7 +848,7 @@ public:
}
protected:
bool readCurrentDir(int pid) Q_DECL_OVERRIDE
bool readCurrentDir(int pid) override
{
struct proc_vnodepathinfo vpi;
const int nb = proc_pidinfo(pid, PROC_PIDVNODEPATHINFO, 0, &vpi, sizeof(vpi));
......@@ -860,7 +860,7 @@ protected:
}
private:
bool readProcInfo(int pid) Q_DECL_OVERRIDE
bool readProcInfo(int pid) override
{
int managementInfoBase[4];
size_t mibLength;
......@@ -921,7 +921,7 @@ private:
return true;
}
bool readArguments(int pid) Q_DECL_OVERRIDE
bool readArguments(int pid) override
{
Q_UNUSED(pid);
return false;
......@@ -951,7 +951,7 @@ public:
protected:
// FIXME: This will have the same issues as BKO 251351; the Linux
// version uses readlink.
bool readCurrentDir(int pid) Q_DECL_OVERRIDE
bool readCurrentDir(int pid) override
{
QFileInfo info(QString("/proc/%1/path/cwd").arg(pid));
const bool readable = info.isReadable();
......@@ -971,7 +971,7 @@ protected:
}
private:
bool readProcInfo(int pid) Q_DECL_OVERRIDE
bool readProcInfo(int pid) override
{
QFile psinfo(QString("/proc/%1/psinfo").arg(pid));
if (psinfo.open(QIODevice::ReadOnly)) {
......@@ -992,7 +992,7 @@ private:
return true;
}
bool readArguments(int /*pid*/) Q_DECL_OVERRIDE
bool readArguments(int /*pid*/) override
{
// Handled in readProcInfo()
return false;
......
......@@ -304,9 +304,9 @@ public:
*/
explicit NullProcessInfo(int pid);
protected:
void readProcessInfo(int pid) Q_DECL_OVERRIDE;
bool readCurrentDir(int pid) Q_DECL_OVERRIDE;
void readUserName(void) Q_DECL_OVERRIDE;
void readProcessInfo(int pid) override;
bool readCurrentDir(int pid) override;
void readUserName(void) override;
};
#if !defined(Q_OS_WIN)
......@@ -328,9 +328,9 @@ protected:
* Implementation of ProcessInfo::readProcessInfo(); calls the
* four private methods below in turn.
*/
void readProcessInfo(int pid) Q_DECL_OVERRIDE;
void readProcessInfo(int pid) override;
void readUserName(void) Q_DECL_OVERRIDE;
void readUserName(void) override;
private:
/**
......
......@@ -751,7 +751,7 @@ public:
/** Sets the value of @p property in each of the group's profiles to
* @p value.
*/
void setProperty(Property p, const QVariant &value) Q_DECL_OVERRIDE;