Commit 1d777185 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 1f45e05f
......@@ -42,17 +42,17 @@ signals:
protected slots:
void updateWidgets();
void updateWidgetsDefault();
void updateSettings();
void updateWidgets() Q_DECL_OVERRIDE;
void updateWidgetsDefault() Q_DECL_OVERRIDE;
void updateSettings() Q_DECL_OVERRIDE;
void updateButtons();
private slots:
void updateConfiguration();
private:
bool hasChanged();
bool isDefault();
bool hasChanged() Q_DECL_OVERRIDE;
bool isDefault() Q_DECL_OVERRIDE;
ConfigurationDialogPrivate *const d;
......
......@@ -50,9 +50,9 @@ public:
virtual ~FileAnalyzer();
virtual void watchLogFiles(bool enabled);
void watchLogFiles(bool enabled) Q_DECL_OVERRIDE;
virtual void setLogFiles(const QList<LogFile> &logFiles);
void setLogFiles(const QList<LogFile> &logFiles) Q_DECL_OVERRIDE;
protected:
virtual LogFileReader *createLogFileReader(const LogFile &logFile) = 0;
......
......@@ -40,7 +40,7 @@ public:
virtual ~LocalLogFileReader();
void watchFile(bool enable);
void watchFile(bool enable) Q_DECL_OVERRIDE;
void setPreviousFilePosition(long previousFilePosition);
......
......@@ -46,7 +46,7 @@ public:
: QStyledItemDelegate(parent)
{
}
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
{
QStyleOptionViewItem &refToNonConstOption = const_cast<QStyleOptionViewItem &>(option);
refToNonConstOption.showDecorationSelected = false;
......
......@@ -77,12 +77,12 @@ public:
using KTreeWidgetSearchLine::updateSearch;
// Reimplemented just to send a signal _AFTER_ the tree updating
void updateSearch(const QString &pattern = QString());
void updateSearch(const QString &pattern = QString()) Q_DECL_OVERRIDE;
void setPriorityEnabled(int priority, bool enabled);
protected:
virtual bool itemMatches(const QTreeWidgetItem *item, const QString &pattern) const;
bool itemMatches(const QTreeWidgetItem *item, const QString &pattern) const Q_DECL_OVERRIDE;
signals:
void treeWidgetUpdated();
......
......@@ -41,7 +41,7 @@ public:
LogViewWidget(QWidget *parent = NULL);
virtual ~LogViewWidget();
virtual void selectAll();
void selectAll() Q_DECL_OVERRIDE;
void setColumns(const LogViewColumns &columns);
int itemCount() const;
......
......@@ -39,7 +39,7 @@ public:
~LogViewWidgetItem();
bool operator<(const QTreeWidgetItem &other) const;
bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE;
LogLine *logLine() const;
......
......@@ -48,9 +48,9 @@ public:
virtual ~MultipleActions();
QList<QAction *> innerActions();
QList<QAction *> innerActions() Q_DECL_OVERRIDE;
QAction *actionMenu();
QAction *actionMenu() Q_DECL_OVERRIDE;
/**
* This method is not called addAction() to avoid name collision with
......
......@@ -43,7 +43,7 @@ public:
virtual ~ProcessOutputLogFileReader();
void watchFile(bool enable);
void watchFile(bool enable) Q_DECL_OVERRIDE;
void setPreviousFilePosition(long previousFilePosition);
......
......@@ -43,9 +43,9 @@ public:
virtual ~SimpleAction();
QList<QAction *> innerActions();
QList<QAction *> innerActions() Q_DECL_OVERRIDE;
QAction *actionMenu();
QAction *actionMenu() Q_DECL_OVERRIDE;
private:
QAction *action;
......
......@@ -55,7 +55,7 @@ public:
LogViewSearchWidget *logViewSearch() const;
QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
public slots:
void displayLoadingBar(bool display);
......@@ -67,12 +67,12 @@ protected:
/**
* Method which contains the action to do when receiving a drag and drop event
*/
void dragEnterEvent(QDragEnterEvent *event);
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
/**
* Method which accepts
*/
void dropEvent(QDropEvent *event);
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
private slots:
void unselectHiddenItems();
......
......@@ -70,19 +70,19 @@ protected:
* This function is called when it is time for the app to save its
* properties for session management purposes.
*/
void saveProperties(KConfigGroup &configuration);
void saveProperties(KConfigGroup &configuration) Q_DECL_OVERRIDE;
/**
* This function is called when this app is restored. The KConfig
* object points to the session management config file that was saved
* with @ref saveProperties
*/
void readProperties(const KConfigGroup &configuration);
void readProperties(const KConfigGroup &configuration) Q_DECL_OVERRIDE;
/**
* Reimplemented to save configuration when closing.
*/
void closeEvent(QCloseEvent *event);
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
public slots:
void changeStatusBar(const QString &text);
......
......@@ -42,7 +42,7 @@ public:
virtual ~AcpidAnalyzer() {}
LogViewColumns initColumns()
LogViewColumns initColumns() Q_DECL_OVERRIDE
{
LogViewColumns columns;
columns.addColumn(LogViewColumn(i18n("Date"), true, false));
......@@ -53,11 +53,11 @@ public:
}
protected:
LogFileReader *createLogFileReader(const LogFile &logFile) { return new LocalLogFileReader(logFile); }
LogFileReader *createLogFileReader(const LogFile &logFile) Q_DECL_OVERRIDE { return new LocalLogFileReader(logFile); }
Analyzer::LogFileSortMode logFileSortMode() { return Analyzer::AscendingSortedLogFile; }
Analyzer::LogFileSortMode logFileSortMode() Q_DECL_OVERRIDE { return Analyzer::AscendingSortedLogFile; }
LogLine *parseMessage(const QString &logLine, const LogFile &originalFile)
LogLine *parseMessage(const QString &logLine, const LogFile &originalFile) Q_DECL_OVERRIDE
{
QString line(logLine);
......
......@@ -58,7 +58,7 @@ public:
public slots:
void saveConfig()
void saveConfig() Q_DECL_OVERRIDE
{
AcpidConfiguration *acpidConfiguration = Globals::instance()
.findLogMode(QStringLiteral(ACPID_LOG_MODE_ID))
......@@ -67,7 +67,7 @@ public slots:
acpidConfiguration->setAcpidPaths(fileList->paths());
}
void readConfig()
void readConfig() Q_DECL_OVERRIDE
{
AcpidConfiguration *acpidConfiguration = Globals::instance()
.findLogMode(QStringLiteral(ACPID_LOG_MODE_ID))
......@@ -78,14 +78,14 @@ public slots:
fileList->addPaths(acpidConfiguration->acpidPaths());
}
void defaultConfig()
void defaultConfig() Q_DECL_OVERRIDE
{
// TODO Find a way to read the configuration per default
readConfig();
}
protected:
bool isValid() const
bool isValid() const Q_DECL_OVERRIDE
{
if (fileList->isEmpty() == false) {
return true;
......
......@@ -34,9 +34,9 @@ class AcpidLogModeFactory : public LogModeFactory
Q_OBJECT
public:
QList<LogMode *> createLogModes() const;
QList<LogMode *> createLogModes() const Q_DECL_OVERRIDE;
LogModeAction *createLogModeAction() const;
LogModeAction *createLogModeAction() const Q_DECL_OVERRIDE;
};
#endif // _ACPID_FACTORY_H_
......@@ -43,7 +43,7 @@ public:
virtual ~AcpidItemBuilder() {}
QString createFormattedText(LogLine *line) const
QString createFormattedText(LogLine *line) const Q_DECL_OVERRIDE
{
QString result;
......
......@@ -47,9 +47,9 @@ public:
~AcpidLogMode();
Analyzer *createAnalyzer(const QVariant &options = QVariant());
Analyzer *createAnalyzer(const QVariant &options = QVariant()) Q_DECL_OVERRIDE;
QList<LogFile> createLogFiles();
QList<LogFile> createLogFiles() Q_DECL_OVERRIDE;
};
#endif // _ACPID_LOG_MODE_H_
......@@ -44,7 +44,7 @@ public:
virtual ~ApacheAccessAnalyzer() {}
LogViewColumns initColumns()
LogViewColumns initColumns() Q_DECL_OVERRIDE
{
LogViewColumns columns;
......@@ -63,11 +63,11 @@ public:
}
protected:
LogFileReader *createLogFileReader(const LogFile &logFile) { return new LocalLogFileReader(logFile); }
LogFileReader *createLogFileReader(const LogFile &logFile) Q_DECL_OVERRIDE { return new LocalLogFileReader(logFile); }
Analyzer::LogFileSortMode logFileSortMode() { return Analyzer::AscendingSortedLogFile; }
Analyzer::LogFileSortMode logFileSortMode() Q_DECL_OVERRIDE { return Analyzer::AscendingSortedLogFile; }
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile)
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile) Q_DECL_OVERRIDE
{
QString line(logLine);
......
......@@ -41,7 +41,7 @@ public:
virtual ~ApacheAccessItemBuilder() {}
QString createFormattedText(LogLine *line) const
QString createFormattedText(LogLine *line) const Q_DECL_OVERRIDE
{
QString result;
......
......@@ -51,9 +51,9 @@ public:
~ApacheAccessLogMode();
Analyzer *createAnalyzer(const QVariant &options = QVariant());
Analyzer *createAnalyzer(const QVariant &options = QVariant()) Q_DECL_OVERRIDE;
QList<LogFile> createLogFiles();
QList<LogFile> createLogFiles() Q_DECL_OVERRIDE;
};
#endif // _APACHE_ACCESS_LOG_MODE_H_
......@@ -45,7 +45,7 @@ public:
virtual ~ApacheAnalyzer() {}
LogViewColumns initColumns()
LogViewColumns initColumns() Q_DECL_OVERRIDE
{
LogViewColumns columns;
columns.addColumn(LogViewColumn(i18n("Date"), true, false));
......@@ -56,9 +56,9 @@ public:
}
protected:
LogFileReader *createLogFileReader(const LogFile &logFile) { return new LocalLogFileReader(logFile); }
LogFileReader *createLogFileReader(const LogFile &logFile) Q_DECL_OVERRIDE { return new LocalLogFileReader(logFile); }
Analyzer::LogFileSortMode logFileSortMode() { return Analyzer::AscendingSortedLogFile; }
Analyzer::LogFileSortMode logFileSortMode() Q_DECL_OVERRIDE { return Analyzer::AscendingSortedLogFile; }
/*
* Log line examples :
......@@ -73,7 +73,7 @@ protected:
* [client 127.0.0.1] PHP Parse error: parse error, unexpected T_PRIVATE, expecting T_STRING in
* /mnt/boulot/web/annivernet/src/fonctions/formulaire.inc.php on line 25
*/
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile)
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile) Q_DECL_OVERRIDE
{
QString line(logLine);
......
......@@ -64,7 +64,7 @@ public:
public slots:
void saveConfig()
void saveConfig() Q_DECL_OVERRIDE
{
logDebug() << "Saving config from Apache Options...";
......@@ -75,13 +75,13 @@ public slots:
apacheConfiguration->setApacheAccessPaths(apacheFileList->paths(apacheAccessPathsId));
}
void defaultConfig()
void defaultConfig() Q_DECL_OVERRIDE
{
// TODO Find a way to read the configuration per default
readConfig();
}
void readConfig()
void readConfig() Q_DECL_OVERRIDE
{
ApacheConfiguration *apacheConfiguration = Globals::instance()
.findLogMode(QStringLiteral(APACHE_LOG_MODE_ID))
......@@ -94,7 +94,7 @@ public slots:
}
protected:
bool isValid() const
bool isValid() const Q_DECL_OVERRIDE
{
if (apacheFileList->isOneOfCategoryEmpty() == true) {
logDebug() << "Apache configuration not valid";
......
......@@ -31,9 +31,9 @@ class ApacheLogModeFactory : public LogModeFactory
Q_OBJECT
public:
QList<LogMode *> createLogModes() const;
QList<LogMode *> createLogModes() const Q_DECL_OVERRIDE;
LogModeAction *createLogModeAction() const;
LogModeAction *createLogModeAction() const Q_DECL_OVERRIDE;
};
#endif // _APACHE_LOG_MODE_FACTORY_H_
......@@ -41,7 +41,7 @@ public:
virtual ~ApacheItemBuilder() {}
QString createFormattedText(LogLine *line) const
QString createFormattedText(LogLine *line) const Q_DECL_OVERRIDE
{
QString result;
......
......@@ -51,9 +51,9 @@ public:
~ApacheLogMode();
Analyzer *createAnalyzer(const QVariant &options = QVariant());
Analyzer *createAnalyzer(const QVariant &options = QVariant()) Q_DECL_OVERRIDE;
QList<LogFile> createLogFiles();
QList<LogFile> createLogFiles() Q_DECL_OVERRIDE;
};
#endif // _APACHE_LOG_MODE_H_
......@@ -39,7 +39,7 @@ public:
virtual ~AuthenticationAnalyzer() {}
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile)
LogLine *parseMessage(const QString &logLine, const LogFile &originalLogFile) Q_DECL_OVERRIDE
{
LogLine *syslogLine = SyslogAnalyzer::parseMessage(logLine, originalLogFile);
......
......@@ -91,7 +91,7 @@ public:
public slots:
void saveConfig()
void saveConfig() Q_DECL_OVERRIDE
{
AuthenticationConfiguration *authenticationConfiguration
= Globals::instance()
......@@ -101,7 +101,7 @@ public slots:
authenticationConfiguration->setAuthenticationPath(authenticationUrlRequester->url().path());
}
void readConfig()
void readConfig() Q_DECL_OVERRIDE
{
AuthenticationConfiguration *authenticationConfiguration
= Globals::instance()
......@@ -115,14 +115,14 @@ public slots:
authenticationUrlRequester->setUrl(QUrl::fromLocalFile(path));
}
void defaultConfig()
void defaultConfig() Q_DECL_OVERRIDE
{
// TODO Find a way to read the configuration per default
readConfig();
}
protected:
bool isValid() const
bool isValid() const Q_DECL_OVERRIDE
{
if (authenticationUrlRequester->url().path().isEmpty() == false) {
return true;
......
......@@ -34,9 +34,9 @@ class AuthenticationLogModeFactory : public LogModeFactory
Q_OBJECT
public:
QList<LogMode *> createLogModes() const;
QList<LogMode *> createLogModes() const Q_DECL_OVERRIDE;
LogModeAction *createLogModeAction() const;
LogModeAction *createLogModeAction() const Q_DECL_OVERRIDE;
};
#endif // _AUTHENTICATION_FACTORY_H_
......@@ -47,9 +47,9 @@ public:
~AuthenticationLogMode();
Analyzer *createAnalyzer(const QVariant &options = QVariant());
Analyzer *createAnalyzer(const QVariant &options = QVariant()) Q_DECL_OVERRIDE;
QList<LogFile> createLogFiles();
QList<LogFile> createLogFiles() Q_DECL_OVERRIDE;
};
#endif // _AUTHENTICATION_LOG_MODE_H_
......@@ -50,7 +50,7 @@ private:
QPushButton *changeItem;
protected slots:
void addItem();
void addItem() Q_DECL_OVERRIDE;
private slots:
void updateSpecificButtons();
......
......@@ -42,12 +42,12 @@ public:
virtual ~SyslogAnalyzer();
virtual LogViewColumns initColumns();
LogViewColumns initColumns() Q_DECL_OVERRIDE;
protected:
virtual LogFileReader *createLogFileReader(const LogFile &logFile);
virtual Analyzer::LogFileSortMode logFileSortMode();
virtual LogLine *parseMessage(const QString &logLine, const LogFile &originalFile);
LogFileReader *createLogFileReader(const LogFile &logFile) Q_DECL_OVERRIDE;
Analyzer::LogFileSortMode logFileSortMode() Q_DECL_OVERRIDE;
LogLine *parseMessage(const QString &logLine, const LogFile &originalFile) Q_DECL_OVERRIDE;
private:
inline QString undefinedHostName();
......
......@@ -43,7 +43,7 @@ public:
virtual ~CronAnalyzer() {}
LogViewColumns initColumns()
LogViewColumns initColumns() Q_DECL_OVERRIDE
{
LogViewColumns columns;
columns.addColumn(LogViewColumn(i18n("Date"), true, false));
......@@ -54,7 +54,7 @@ public:
return columns;
}
Analyzer::LogFileSortMode logFileSortMode() { return Analyzer::FilteredLogFile; }
Analyzer::LogFileSortMode logFileSortMode() Q_DECL_OVERRIDE { return Analyzer::FilteredLogFile; }
/*
* Cron line example :
......@@ -64,7 +64,7 @@ public:
* Sep 16 18:39:05 localhost /usr/sbin/cron[5480]: (CRON) INFO (Running @reboot jobs)
*
*/
LogLine *parseMessage(const QString &logLine, const LogFile &originalFile)
LogLine *parseMessage(const QString &logLine, const LogFile &originalFile) Q_DECL_OVERRIDE
{
// Use the default parsing
LogLine *syslogLine = SyslogAnalyzer::parseMessage(logLine, originalFile);
......
......@@ -85,7 +85,7 @@ public:
virtual ~CronConfigurationWidget() {}
bool isValid() const
bool isValid() const Q_DECL_OVERRIDE
{
if (fileList->isEmpty() == true) {
logDebug() << "Cron configuration not valid";
......@@ -101,7 +101,7 @@ public:
return true;
}
void saveConfig()
void saveConfig() Q_DECL_OVERRIDE
{
logDebug() << "Saving config from Cron Options...";
......@@ -117,7 +117,7 @@ public:
}
}
void readConfig()
void readConfig() Q_DECL_OVERRIDE
{
CronConfiguration *cronConfiguration = Globals::instance()
.findLogMode(QStringLiteral(CRON_LOG_MODE_ID))
......@@ -135,7 +135,7 @@ public:
}
}
void defaultConfig()
void defaultConfig() Q_DECL_OVERRIDE
{
// TODO Find a way to read the configuration per default
readConfig();
......
......@@ -34,9 +34,9 @@ class CronLogModeFactory : public LogModeFactory
Q_OBJECT
public:
QList<LogMode *> createLogModes() const;
QList<LogMode *> createLogModes() const Q_DECL_OVERRIDE;
LogModeAction *createLogModeAction() const;
LogModeAction *createLogModeAction() const Q_DECL_OVERRIDE;
};
#endif // _CRON_FACTORY_H_
......@@ -41,7 +41,7 @@ public:
virtual ~CronItemBuilder() {}
QString createFormattedText(LogLine *line) const
QString createFormattedText(LogLine *line) const Q_DECL_OVERRIDE
{
QString result;
......
......@@ -46,9 +46,9 @@ public:
~CronLogMode();
Analyzer *createAnalyzer(const QVariant &options = QVariant());
Analyzer *createAnalyzer(const QVariant &options = QVariant()) Q_DECL_OVERRIDE;
QList<LogFile> createLogFiles();
QList<LogFile> createLogFiles() Q_DECL_OVERRIDE;
};
#endif // _CRON_LOG_MODE_H_
......@@ -46,7 +46,7 @@ public:
virtual ~CupsAccessAnalyzer() {}
LogViewColumns initColumns()
LogViewColumns initColumns() Q_DECL_OVERRIDE
{
LogViewColumns columns;
......@@ -66,9 +66,9 @@ public:
protected:
QRegExp cupsAccessRegex;