Commit 35d419e7 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Add Q_DECL_OVERRIDE via clang-tidy

parent 0e4439d8
......@@ -55,7 +55,7 @@ public:
static void populateCommandLineParser(QCommandLineParser *parser);
static QStringList getCustomCommand(QStringList &args);
~Application();
~Application() Q_DECL_OVERRIDE;
/** Creates a new main window and opens a default terminal session */
int newInstance();
......
......@@ -65,15 +65,15 @@ public:
* @param parent The parent object
*/
BookmarkHandler(KActionCollection* collection , QMenu* menu, bool toplevel , QObject* parent);
~BookmarkHandler();
~BookmarkHandler() Q_DECL_OVERRIDE;
virtual QUrl currentUrl() const;
virtual QString currentTitle() const;
virtual QString currentIcon() const;
virtual bool enableOption(BookmarkOption option) const;
virtual bool supportsTabs() const;
virtual QList<KBookmarkOwner::FutureBookmark> currentBookmarkList() const;
virtual void openFolderinTabs(const KBookmarkGroup& group);
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;
bool supportsTabs() const Q_DECL_OVERRIDE;
QList<KBookmarkOwner::FutureBookmark> currentBookmarkList() const Q_DECL_OVERRIDE;
void openFolderinTabs(const KBookmarkGroup& group) Q_DECL_OVERRIDE;
/**
* Returns the menu which this bookmark handler inserts its actions into.
......@@ -111,7 +111,7 @@ signals:
void openUrls(const QList<QUrl>& urls);
private slots:
void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers);
void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers) Q_DECL_OVERRIDE;
private:
QString titleForView(ViewProperties* view) const;
......
......@@ -59,7 +59,7 @@ class KONSOLEPRIVATE_EXPORT ColorSchemeEditor : public QDialog
public:
/** Constructs a new color scheme editor with the specified parent. */
explicit ColorSchemeEditor(QWidget* parent = 0);
virtual ~ColorSchemeEditor();
~ColorSchemeEditor() Q_DECL_OVERRIDE;
/** Initializes the dialog with the properties of the specified color scheme. */
void setup(const ColorScheme* scheme, bool isNewScheme);
......
......@@ -53,7 +53,7 @@ class CopyInputDialog : public QDialog
public:
explicit CopyInputDialog(QWidget* parent = 0);
~CopyInputDialog();
~CopyInputDialog() Q_DECL_OVERRIDE;
/**
* Sets the 'source' session whose input will be copied to
* other sessions. This session is displayed grayed out in the list
......@@ -114,12 +114,12 @@ public:
QSet<Session*> checkedSessions() const;
// reimplemented from QAbstractItemModel
virtual Qt::ItemFlags flags(const QModelIndex& index) const;
virtual QVariant data(const QModelIndex& index, int role) const;
virtual bool setData(const QModelIndex& index, const QVariant& value, int role);
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;
protected:
virtual void sessionRemoved(Session*);
void sessionRemoved(Session*) Q_DECL_OVERRIDE;
private:
QSet<Session*> _checkedSessions;
......
......@@ -65,7 +65,7 @@ class KONSOLEPRIVATE_EXPORT EditProfileDialog : public QDialog
public:
/** Constructs a new dialog with the specified parent. */
explicit EditProfileDialog(QWidget* parent = 0);
virtual ~EditProfileDialog();
~EditProfileDialog() Q_DECL_OVERRIDE;
/**
* Initializes the dialog with the settings for the specified session
......@@ -89,12 +89,12 @@ public:
public slots:
// reimplemented
virtual void accept();
void accept() Q_DECL_OVERRIDE;
// reimplemented
virtual void reject();
void reject() Q_DECL_OVERRIDE;
protected:
virtual bool eventFilter(QObject* watched , QEvent* event);
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
private slots:
// sets up the specified tab page if necessary
......@@ -271,10 +271,10 @@ public:
explicit ColorSchemeViewDelegate(QObject* parent = 0);
// reimplemented
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const;
virtual QSize sizeHint(const QStyleOptionViewItem& option,
const QModelIndex& index) const;
void paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem& option,
const QModelIndex& index) const Q_DECL_OVERRIDE;
};
}
......
......@@ -121,7 +121,7 @@ class KONSOLEPRIVATE_EXPORT Emulation : public QObject
public:
/** Constructs a new terminal emulation */
Emulation();
~Emulation();
~Emulation() Q_DECL_OVERRIDE;
/**
* Creates a new window onto the output from this emulation. The contents
......
......@@ -195,7 +195,7 @@ public:
{
public:
HotSpot(int startLine, int startColumn, int endLine , int endColumn, const QStringList& capturedTexts);
virtual void activate(QObject* object = 0);
void activate(QObject* object = 0) Q_DECL_OVERRIDE;
/** Returns the texts found by the filter when matching the filter's regular expression */
QStringList capturedTexts() const;
......@@ -222,7 +222,7 @@ public:
* If regexp matches the empty string, then process() will return immediately
* without finding results.
*/
virtual void process();
void process() Q_DECL_OVERRIDE;
protected:
/**
......@@ -250,15 +250,15 @@ public:
{
public:
HotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList& capturedTexts);
virtual ~HotSpot();
~HotSpot() Q_DECL_OVERRIDE;
virtual QList<QAction*> actions();
QList<QAction*> actions() Q_DECL_OVERRIDE;
/**
* Open a web browser at the current URL. The url itself can be determined using
* the capturedTexts() method.
*/
virtual void activate(QObject* object = 0);
void activate(QObject* object = 0) Q_DECL_OVERRIDE;
private:
enum UrlType {
......@@ -274,7 +274,7 @@ public:
UrlFilter();
protected:
virtual RegExpFilter::HotSpot* newHotSpot(int, int, int, int, const QStringList&);
RegExpFilter::HotSpot* newHotSpot(int, int, int, int, const QStringList&) Q_DECL_OVERRIDE;
private:
static const QRegularExpression FullUrlRegExp;
......@@ -298,14 +298,14 @@ public:
{
public:
HotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList& capturedTexts, const QFileInfo &file);
virtual ~HotSpot();
~HotSpot() Q_DECL_OVERRIDE;
virtual QList<QAction*> actions();
QList<QAction*> actions() Q_DECL_OVERRIDE;
/**
* Opens kate for editing the file.
*/
virtual void activate(QObject* object = 0);
void activate(QObject* object = 0) Q_DECL_OVERRIDE;
private:
FilterObject* _fileObject;
......@@ -315,7 +315,7 @@ public:
explicit FileFilter(Session* session);
protected:
virtual RegExpFilter::HotSpot* newHotSpot(int, int, int, int, const QStringList&);
RegExpFilter::HotSpot* newHotSpot(int, int, int, int, const QStringList&) Q_DECL_OVERRIDE;
private:
QPointer<Session> _session;
......@@ -384,7 +384,7 @@ class TerminalImageFilterChain : public FilterChain
{
public:
TerminalImageFilterChain();
virtual ~TerminalImageFilterChain();
~TerminalImageFilterChain() Q_DECL_OVERRIDE;
/**
* Set the current terminal image to @p image.
......
......@@ -128,15 +128,15 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollFile : public HistoryScroll
{
public:
explicit HistoryScrollFile(const QString& logFileName);
virtual ~HistoryScrollFile();
~HistoryScrollFile() Q_DECL_OVERRIDE;
virtual int getLines();
virtual int getLineLen(int lineno);
virtual void getCells(int lineno, int colno, int count, Character res[]);
virtual bool isWrappedLine(int lineno);
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;
virtual void addCells(const Character a[], int count);
virtual void addLine(bool previousWrapped = false);
void addCells(const Character a[], int count) Q_DECL_OVERRIDE;
void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE;
private:
int startOfLine(int lineno);
......@@ -153,17 +153,17 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollNone : public HistoryScroll
{
public:
HistoryScrollNone();
virtual ~HistoryScrollNone();
~HistoryScrollNone() Q_DECL_OVERRIDE;
virtual bool hasScroll();
bool hasScroll() Q_DECL_OVERRIDE;
virtual int getLines();
virtual int getLineLen(int lineno);
virtual void getCells(int lineno, int colno, int count, Character res[]);
virtual bool isWrappedLine(int lineno);
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;
virtual void addCells(const Character a[], int count);
virtual void addLine(bool previousWrapped = false);
void addCells(const Character a[], int count) Q_DECL_OVERRIDE;
void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE;
};
//////////////////////////////////////////////////////////////////////
......@@ -291,16 +291,16 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryScroll : public HistoryScroll
public:
explicit CompactHistoryScroll(unsigned int maxNbLines = 1000);
virtual ~CompactHistoryScroll();
~CompactHistoryScroll() Q_DECL_OVERRIDE;
virtual int getLines();
virtual int getLineLen(int lineno);
virtual void getCells(int lineno, int colno, int count, Character res[]);
virtual bool isWrappedLine(int lineno);
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;
virtual void addCells(const Character a[], int count);
virtual void addCellsVector(const TextLine& cells);
virtual void addLine(bool previousWrapped = false);
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 setMaxNbLines(unsigned int nbLines);
......@@ -350,10 +350,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeNone : public HistoryType
public:
HistoryTypeNone();
virtual bool isEnabled() const;
virtual int maximumLineCount() const;
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
virtual HistoryScroll* scroll(HistoryScroll *) const;
HistoryScroll* scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
};
class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType
......@@ -361,10 +361,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType
public:
explicit HistoryTypeFile(const QString& fileName = QString());
virtual bool isEnabled() const;
virtual int maximumLineCount() const;
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
virtual HistoryScroll* scroll(HistoryScroll *) const;
HistoryScroll* scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
protected:
QString _fileName;
......@@ -375,10 +375,10 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryType : public HistoryType
public:
explicit CompactHistoryType(unsigned int size);
virtual bool isEnabled() const;
virtual int maximumLineCount() const;
bool isEnabled() const Q_DECL_OVERRIDE;
int maximumLineCount() const Q_DECL_OVERRIDE;
virtual HistoryScroll* scroll(HistoryScroll *) const;
HistoryScroll* scroll(HistoryScroll *) const Q_DECL_OVERRIDE;
protected:
unsigned int _maxLines;
......
......@@ -40,7 +40,7 @@ class HistorySizeDialog : public QDialog
public:
explicit HistorySizeDialog(QWidget* parent = 0);
~HistorySizeDialog();
~HistorySizeDialog() Q_DECL_OVERRIDE;
/** See HistorySizeWidget::setMode. */
void setMode(Enum::HistoryModeEnum aMode);
......
......@@ -45,7 +45,7 @@ class HistorySizeWidget : public QWidget
public:
explicit HistorySizeWidget(QWidget* parent);
virtual ~HistorySizeWidget();
~HistorySizeWidget() Q_DECL_OVERRIDE;
/** Specifies the history mode. */
void setMode(Enum::HistoryModeEnum aMode);
......
......@@ -102,7 +102,7 @@ public:
void setOptions();
// reimplemented
virtual void setVisible(bool visible);
void setVisible(bool visible) Q_DECL_OVERRIDE;
signals:
/** Emitted when the text entered in the search box is altered */
void searchChanged(const QString& text);
......@@ -137,8 +137,8 @@ signals:
void unhandledMovementKeyPressed(QKeyEvent *event);
protected:
virtual bool eventFilter(QObject* watched , QEvent* event);
virtual void keyPressEvent(QKeyEvent* event);
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
public slots:
void clearLineEdit();
......
......@@ -54,7 +54,7 @@ class KeyBindingEditor : public QWidget
public:
/** Constructs a new key bindings editor with the specified parent. */
explicit KeyBindingEditor(QWidget* parent = 0);
virtual ~KeyBindingEditor();
~KeyBindingEditor() Q_DECL_OVERRIDE;
/**
* Initializes the dialog with the bindings and other settings
......@@ -79,7 +79,7 @@ public:
QString description() const;
// reimplemented to handle test area input
virtual bool eventFilter(QObject* watched , QEvent* event);
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
private slots:
void setTranslatorDescription(const QString& description);
......
......@@ -132,17 +132,17 @@ signals:
protected:
// Reimplemented for internal reasons.
virtual void showEvent(QShowEvent* event);
void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
// reimplemented from KMainWindow
virtual bool queryClose();
virtual void saveProperties(KConfigGroup& group);
virtual void readProperties(const KConfigGroup& group);
virtual void saveGlobalProperties(KConfig* config);
virtual void readGlobalProperties(KConfig* config);
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;
// reimplemented from QWidget
virtual bool focusNextPrevChild(bool next);
bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
private slots:
void newTab();
......
......@@ -53,7 +53,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&);
virtual ~Part();
~Part() Q_DECL_OVERRIDE;
/** Reimplemented from TerminalInterface. */
void startProgram(const QString& program,
......@@ -178,8 +178,8 @@ signals:
protected:
/** Reimplemented from KParts::PartBase. */
virtual bool openFile() Q_DECL_OVERRIDE;
virtual bool openUrl(const QUrl& url) Q_DECL_OVERRIDE;
bool openFile() Q_DECL_OVERRIDE;
bool openUrl(const QUrl& url) Q_DECL_OVERRIDE;
private slots:
void activeViewChanged(SessionController* controller);
......
......@@ -31,7 +31,7 @@ class PrintOptions : public QWidget, private Ui::PrintOptions
public:
explicit PrintOptions(QWidget* parent = 0);
~PrintOptions();
~PrintOptions() Q_DECL_OVERRIDE;
public slots:
void saveSettings();
......
......@@ -402,7 +402,7 @@ public:
}
protected:
virtual bool readCurrentDir(int aPid) {
bool readCurrentDir(int aPid) Q_DECL_OVERRIDE {
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
QByteArray procCwd = QFile::encodeName(QStringLiteral("/proc/%1/cwd").arg(aPid));
......@@ -420,7 +420,7 @@ protected:
}
private:
virtual bool readProcInfo(int aPid) {
bool readProcInfo(int aPid) Q_DECL_OVERRIDE {
// indicies of various fields within the process status file which
// contain various information about the process
const int PARENT_PID_FIELD = 3;
......@@ -533,7 +533,7 @@ private:
return ok;
}
virtual bool readArguments(int aPid) {
bool readArguments(int aPid) Q_DECL_OVERRIDE {
// read command-line arguments file found at /proc/<pid>/cmdline
// the expected format is a list of strings delimited by null characters,
// and ending in a double null character pair.
......
......@@ -306,9 +306,9 @@ public:
*/
explicit NullProcessInfo(int pid, const QString& titleFormat);
protected:
virtual bool readProcessInfo(int pid);
virtual bool readCurrentDir(int pid);
virtual void readUserName(void);
bool readProcessInfo(int pid) Q_DECL_OVERRIDE;
bool readCurrentDir(int pid) Q_DECL_OVERRIDE;
void readUserName(void) Q_DECL_OVERRIDE;
};
#if !defined(Q_OS_WIN)
......@@ -330,9 +330,9 @@ protected:
* Implementation of ProcessInfo::readProcessInfo(); calls the
* four private methods below in turn.
*/
virtual bool readProcessInfo(int pid );
bool readProcessInfo(int pid ) Q_DECL_OVERRIDE;
virtual void readUserName(void);
void readUserName(void) Q_DECL_OVERRIDE;
private:
/**
......
......@@ -672,7 +672,7 @@ public:
/** Sets the value of @p property in each of the group's profiles to
* @p value.
*/
void setProperty(Property property, const QVariant& value);
void setProperty(Property property, const QVariant& value) Q_DECL_OVERRIDE;
private:
QList<Profile::Ptr> _profiles;
......
......@@ -59,7 +59,7 @@ public:
/**
* Destroys the ProfileManager.
*/
virtual ~ProfileManager();
~ProfileManager() Q_DECL_OVERRIDE;
/**
* Returns the profile manager instance.
......
......@@ -54,8 +54,8 @@ public:
class KDE4ProfileReader : public ProfileReader
{
public:
virtual QStringList findProfiles();
virtual bool readProfile(const QString& path , Profile::Ptr profile, QString& parentProfile);
QStringList findProfiles() Q_DECL_OVERRIDE;
bool readProfile(const QString& path , Profile::Ptr profile, QString& parentProfile) Q_DECL_OVERRIDE;
private:
void readProperties(const KConfig& config, Profile::Ptr profile,
const Profile::PropertyInfo* properties);
......
......@@ -50,8 +50,8 @@ public:
class KONSOLEPRIVATE_EXPORT KDE4ProfileWriter : public ProfileWriter
{
public:
virtual QString getPath(const Profile::Ptr profile);
virtual bool writeProfile(const QString& path , const Profile::Ptr profile);
QString getPath(const Profile::Ptr profile) Q_DECL_OVERRIDE;
bool writeProfile(const QString& path , const Profile::Ptr profile) Q_DECL_OVERRIDE;
private:
void writeProperties(KConfig& config, const Profile::Ptr profile,
......
......@@ -71,7 +71,7 @@ public:
*/
explicit Pty(int ptyMasterFd, QObject* parent = 0);
~Pty();
~Pty() Q_DECL_OVERRIDE;
/**
* Starts the terminal process.
......@@ -171,7 +171,7 @@ signals:
void receivedData(const char* buffer, int length);
protected:
void setupChildProcess();
void setupChildProcess() Q_DECL_OVERRIDE;
private slots:
// called when data is received from the terminal process
......
......@@ -36,7 +36,7 @@ class RenameTabDialog : public QDialog
public:
explicit RenameTabDialog(QWidget* parent = 0);
~RenameTabDialog();
~RenameTabDialog() Q_DECL_OVERRIDE;
QString tabTitleText() const;
QString remoteTabTitleText() const;
......
......@@ -36,7 +36,7 @@ class RenameTabWidget : public QWidget
public:
explicit RenameTabWidget(QWidget* parent = 0);
~RenameTabWidget();
~RenameTabWidget() Q_DECL_OVERRIDE;
QString tabTitleText() const;
QString remoteTabTitleText() const;
......
......@@ -64,7 +64,7 @@ public:
* between all views on a session.
*/
explicit ScreenWindow(Screen* screen, QObject* parent = 0);
virtual ~ScreenWindow();
~ScreenWindow() Q_DECL_OVERRIDE;
/** Sets the screen which this window looks onto */
void setScreen(Screen* screen);
......
......@@ -87,7 +87,7 @@ public:
* variable.
*/
explicit Session(QObject* parent = 0);
~Session();
~Session() Q_DECL_OVERRIDE;
/**
* Connect to an existing terminal. When a new Session() is constructed it
......@@ -792,7 +792,7 @@ public:
/** Constructs an empty session group. */
explicit SessionGroup(QObject* parent);
/** Destroys the session group and removes all connections between master and slave sessions. */
~SessionGroup();
~SessionGroup() Q_DECL_OVERRIDE;
/** Adds a session to the group. */
void addSession(Session* session);
......
......@@ -103,7 +103,7 @@ public:
* Constructs a new SessionController which operates on @p session and @p view.
*/
SessionController(Session* session , TerminalDisplay* view, QObject* parent);
~SessionController();
~SessionController() Q_DECL_OVERRIDE;
/** Returns the session associated with this controller */
QPointer<Session> session() {
......@@ -156,14 +156,14 @@ public:
EditProfileDialog* profileDialogPointer();
// reimplemented
virtual QUrl url() const;
virtual QString currentDir()