Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 24c0b5fd authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent bb556d8c
......@@ -54,9 +54,9 @@ class SensorShellAgent : public SensorAgent
~SensorShellAgent();
bool start( const QString &host, const QString &shell,
const QString &command = QLatin1String(QLatin1String("")), int port = -1 );
const QString &command = QLatin1String(QLatin1String("")), int port = -1 ) Q_DECL_OVERRIDE;
void hostInfo( QString &shell, QString &command, int &port) const;
void hostInfo( QString &shell, QString &command, int &port) const Q_DECL_OVERRIDE;
private Q_SLOTS:
void msgRcvd( );
......@@ -65,7 +65,7 @@ class SensorShellAgent : public SensorAgent
void daemonError( QProcess::ProcessError errorStatus );
private:
bool writeMsg( const char *msg, int len );
bool writeMsg( const char *msg, int len ) Q_DECL_OVERRIDE;
int mRetryCount;
QPointer<KProcess> mDaemon;
QString mShell;
......
......@@ -49,9 +49,9 @@ class SensorSocketAgent : public SensorAgent
~SensorSocketAgent();
bool start( const QString &host, const QString &shell,
const QString &command = QLatin1String(""), int port = -1 );
const QString &command = QLatin1String(""), int port = -1 ) Q_DECL_OVERRIDE;
void hostInfo( QString &shell, QString &command, int &port ) const;
void hostInfo( QString &shell, QString &command, int &port ) const Q_DECL_OVERRIDE;
private Q_SLOTS:
void connectionClosed();
......@@ -60,7 +60,7 @@ class SensorSocketAgent : public SensorAgent
void error( QAbstractSocket::SocketError );
private:
bool writeMsg( const char *msg, int len );
bool writeMsg( const char *msg, int len ) Q_DECL_OVERRIDE;
QTcpSocket mSocket;
int mPort;
......
......@@ -40,22 +40,22 @@ namespace KSysGuard
public:
explicit ProcessesATop(bool loadDefaultFile = true);
virtual ~ProcessesATop();
virtual QSet<long> getAllPids();
virtual long getParentPid(long pid);
virtual bool updateProcessInfo(long pid, Process *process);
virtual bool sendSignal(long pid, int sig);
virtual bool setNiceness(long pid, int priority);
virtual bool setScheduler(long pid, int priorityClass, int priority);
virtual long long totalPhysicalMemory();
virtual bool setIoNiceness(long pid, int priorityClass, int priority);
virtual bool supportsIoNiceness();
virtual long numberProcessorCores()
QSet<long> getAllPids() Q_DECL_OVERRIDE;
long getParentPid(long pid) Q_DECL_OVERRIDE;
bool updateProcessInfo(long pid, Process *process) Q_DECL_OVERRIDE;
bool sendSignal(long pid, int sig) Q_DECL_OVERRIDE;
bool setNiceness(long pid, int priority) Q_DECL_OVERRIDE;
bool setScheduler(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
long long totalPhysicalMemory() Q_DECL_OVERRIDE;
bool setIoNiceness(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
bool supportsIoNiceness() Q_DECL_OVERRIDE;
long numberProcessorCores() Q_DECL_OVERRIDE
#ifdef _SC_NPROCESSORS_ONLN
{ return sysconf(_SC_NPROCESSORS_ONLN); } // Should work on any recent posix system
#else
;
#endif
virtual void updateAllProcesses(Processes::UpdateFlags updateFlags) { mUpdateFlags = updateFlags; emit processesUpdated(); } //For local machine, there is no delay
void updateAllProcesses(Processes::UpdateFlags updateFlags) Q_DECL_OVERRIDE { mUpdateFlags = updateFlags; emit processesUpdated(); } //For local machine, there is no delay
bool isHistoryAvailable() const;
QDateTime viewingTime() const;
......
......@@ -39,22 +39,22 @@ namespace KSysGuard
public:
ProcessesLocal();
virtual ~ProcessesLocal();
virtual QSet<long> getAllPids();
virtual long getParentPid(long pid);
virtual bool updateProcessInfo(long pid, Process *process);
virtual bool sendSignal(long pid, int sig);
virtual bool setNiceness(long pid, int priority);
virtual bool setScheduler(long pid, int priorityClass, int priority);
virtual long long totalPhysicalMemory();
virtual bool setIoNiceness(long pid, int priorityClass, int priority);
virtual bool supportsIoNiceness();
virtual long numberProcessorCores()
QSet<long> getAllPids() Q_DECL_OVERRIDE;
long getParentPid(long pid) Q_DECL_OVERRIDE;
bool updateProcessInfo(long pid, Process *process) Q_DECL_OVERRIDE;
bool sendSignal(long pid, int sig) Q_DECL_OVERRIDE;
bool setNiceness(long pid, int priority) Q_DECL_OVERRIDE;
bool setScheduler(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
long long totalPhysicalMemory() Q_DECL_OVERRIDE;
bool setIoNiceness(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
bool supportsIoNiceness() Q_DECL_OVERRIDE;
long numberProcessorCores() Q_DECL_OVERRIDE
#ifdef _SC_NPROCESSORS_ONLN
{ return sysconf(_SC_NPROCESSORS_ONLN); } // Should work on any recent posix system
#else
;
#endif
virtual void updateAllProcesses(Processes::UpdateFlags updateFlags) { mUpdateFlags = updateFlags; emit processesUpdated(); } //For local machine, there is no delay
void updateAllProcesses(Processes::UpdateFlags updateFlags) Q_DECL_OVERRIDE { mUpdateFlags = updateFlags; emit processesUpdated(); } //For local machine, there is no delay
private:
/**
......
......@@ -34,17 +34,17 @@ namespace KSysGuard
public:
ProcessesRemote(const QString &hostname);
virtual ~ProcessesRemote();
virtual QSet<long> getAllPids();
virtual long getParentPid(long pid);
virtual bool updateProcessInfo(long pid, Process *process);
virtual bool sendSignal(long pid, int sig);
virtual bool setNiceness(long pid, int priority);
virtual bool setScheduler(long pid, int priorityClass, int priority);
virtual long long totalPhysicalMemory();
virtual bool setIoNiceness(long pid, int priorityClass, int priority);
virtual bool supportsIoNiceness();
virtual long numberProcessorCores();
virtual void updateAllProcesses( Processes::UpdateFlags updateFlags );
QSet<long> getAllPids() Q_DECL_OVERRIDE;
long getParentPid(long pid) Q_DECL_OVERRIDE;
bool updateProcessInfo(long pid, Process *process) Q_DECL_OVERRIDE;
bool sendSignal(long pid, int sig) Q_DECL_OVERRIDE;
bool setNiceness(long pid, int priority) Q_DECL_OVERRIDE;
bool setScheduler(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
long long totalPhysicalMemory() Q_DECL_OVERRIDE;
bool setIoNiceness(long pid, int priorityClass, int priority) Q_DECL_OVERRIDE;
bool supportsIoNiceness() Q_DECL_OVERRIDE;
long numberProcessorCores() Q_DECL_OVERRIDE;
void updateAllProcesses( Processes::UpdateFlags updateFlags ) Q_DECL_OVERRIDE;
Q_SIGNALS:
......
......@@ -46,7 +46,7 @@ class KSYSGUARD_EXPORT ProcessFilter : public QSortFilterProxyModel
enum State {AllProcesses=0,AllProcessesInTreeForm, SystemProcesses, UserProcesses, OwnProcesses, ProgramsOnly};
ProcessFilter(QObject *parent=0) : QSortFilterProxyModel(parent) {mFilter = AllProcesses;}
virtual ~ProcessFilter() {}
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
State filter() const {return mFilter; }
......@@ -54,7 +54,7 @@ class KSYSGUARD_EXPORT ProcessFilter : public QSortFilterProxyModel
void setFilter(State index);
protected:
virtual bool filterAcceptsRow( int source_row, const QModelIndex & source_parent ) const;
bool filterAcceptsRow( int source_row, const QModelIndex & source_parent ) const Q_DECL_OVERRIDE;
State mFilter;
};
......
......@@ -53,21 +53,21 @@ class KSYSGUARD_EXPORT ProcessModel : public QAbstractItemModel
virtual ~ProcessModel();
/* Functions for our Model for QAbstractItemModel*/
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
QModelIndex parent ( const QModelIndex & index ) const;
bool hasChildren ( const QModelIndex & parent) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount ( const QModelIndex & parent = QModelIndex() ) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const Q_DECL_OVERRIDE;
QModelIndex parent ( const QModelIndex & index ) const Q_DECL_OVERRIDE;
bool hasChildren ( const QModelIndex & parent) const Q_DECL_OVERRIDE;
/** Returns if (left < right), used by the sort-filter proxy model to sort the columns */
bool lessThan( const QModelIndex & left, const QModelIndex & right) const;
/* Functions for drag and drop and copying to clipboard, inherited from QAbstractItemModel */
QStringList mimeTypes() const;
QMimeData *mimeData(const QModelIndexList &indexes) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
/* Functions for setting the model */
......
......@@ -75,7 +75,7 @@ class ProgressBarItemDelegate : public QStyledItemDelegate
ProgressBarItemDelegate(QObject *parent) : QStyledItemDelegate(parent) {
}
virtual void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const
void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const Q_DECL_OVERRIDE
{
QStyleOptionViewItemV4 option = opt;
initStyleOption(&option,index);
......
......@@ -212,15 +212,15 @@ class Q_DECL_EXPORT KSysGuardProcessList : public QWidget
protected:
/** Inherit QWidget::showEvent(QShowEvent *) to enable the timer, for updates, when visible */
virtual void showEvent(QShowEvent*);
void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
/** Inherit QWidget::hideEvent(QShowEvent *) to disable the timer, for updates, when not visible */
virtual void hideEvent(QHideEvent*);
void hideEvent(QHideEvent*) Q_DECL_OVERRIDE;
/** Capture any change events sent to this widget. In particular QEvent::LanguageChange */
virtual void changeEvent ( QEvent * event );
void changeEvent ( QEvent * event ) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event);
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
/** Retranslate the Ui as needed */
void retranslateUi();
......
......@@ -447,11 +447,11 @@ class Q_DECL_EXPORT KGraphicsSignalPlotter : public QGraphicsWidget
protected:
/* Reimplemented */
virtual void resizeEvent( QGraphicsSceneResizeEvent* event );
virtual void paint( QPainter * p, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
virtual QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
virtual void changeEvent ( QEvent * event );
virtual QPainterPath opaqueArea() const;
void resizeEvent( QGraphicsSceneResizeEvent* event ) Q_DECL_OVERRIDE;
void paint( QPainter * p, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 ) Q_DECL_OVERRIDE;
QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const Q_DECL_OVERRIDE;
void changeEvent ( QEvent * event ) Q_DECL_OVERRIDE;
QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
private:
......
......@@ -449,10 +449,10 @@ class Q_DECL_EXPORT KSignalPlotter : public QWidget
protected:
/* Reimplemented */
virtual void resizeEvent( QResizeEvent* );
virtual void paintEvent( QPaintEvent* );
virtual QSize sizeHint() const;
virtual void changeEvent ( QEvent * event );
void resizeEvent( QResizeEvent* ) Q_DECL_OVERRIDE;
void paintEvent( QPaintEvent* ) Q_DECL_OVERRIDE;
QSize sizeHint() const Q_DECL_OVERRIDE;
void changeEvent ( QEvent * event ) Q_DECL_OVERRIDE;
private:
KSignalPlotterPrivate * const d;
......
......@@ -144,7 +144,7 @@ struct KSignalPlotterPrivate {
class GraphWidget : public QWidget {
public:
GraphWidget(QWidget *parent);
virtual void paintEvent ( QPaintEvent * event );
void paintEvent ( QPaintEvent * event ) Q_DECL_OVERRIDE;
KSignalPlotterPrivate *signalPlotterPrivate;
};
......
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