Commit d0171fa1 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 1110666f
......@@ -37,8 +37,8 @@ public:
~KDEConfigGroup();
void setValue(const QString& key, const QVariant& value,
const QVariant& defaultValue = QVariant());
QVariant value(const QString& key, const QVariant& defaultValue) const;
const QVariant& defaultValue = QVariant()) Q_DECL_OVERRIDE;
QVariant value(const QString& key, const QVariant& defaultValue) const Q_DECL_OVERRIDE;
private:
KDEConfigGroup(KConfigGroup*, bool);
......@@ -55,7 +55,7 @@ public:
private:
ConfigGroup* getGroup(const QString& group,
const QString& optSuffix);
const QString& optSuffix) Q_DECL_OVERRIDE;
KConfig* _kconfig;
};
......
......@@ -40,8 +40,8 @@ class CachegrindLoader: public Loader
public:
CachegrindLoader();
bool canLoad(QIODevice* file);
int load(TraceData*, QIODevice* file, const QString& filename);
bool canLoad(QIODevice* file) Q_DECL_OVERRIDE;
int load(TraceData*, QIODevice* file, const QString& filename) Q_DECL_OVERRIDE;
private:
void error(QString);
......
......@@ -155,9 +155,9 @@ public:
ProfileCostArray();
virtual ~ProfileCostArray();
virtual QString costString(EventTypeSet*);
QString costString(EventTypeSet*) Q_DECL_OVERRIDE;
virtual void clear();
void clear() Q_DECL_OVERRIDE;
// reserve space for cost
void reserve(int);
......@@ -178,7 +178,7 @@ public:
void maxCost(int index, SubCost value);
ProfileCostArray diff(ProfileCostArray* item);
virtual void invalidate();
void invalidate() Q_DECL_OVERRIDE;
/** Returns a sub cost. This automatically triggers
* a call to update() if needed.
......@@ -193,7 +193,7 @@ public:
QString prettySubCostPerCall(EventType* t, uint64 calls);
protected:
virtual void update();
void update() Q_DECL_OVERRIDE;
private:
// Only used by friend class EventType: return subcost by index
......
......@@ -47,7 +47,7 @@ public:
Coverage();
virtual int rtti() { return Rtti; }
int rtti() Q_DECL_OVERRIDE { return Rtti; }
void init();
TraceFunction* function() { return _function; }
......
This diff is collapsed.
......@@ -260,15 +260,15 @@ public:
StorableGraphOptions();
virtual ~StorableGraphOptions(){}
// implementation of getters
virtual double funcLimit() { return _funcLimit; }
virtual double callLimit() { return _callLimit; }
virtual int maxCallerDepth() { return _maxCallerDepth; }
virtual int maxCalleeDepth() { return _maxCalleeDepth; }
virtual bool showSkipped() { return _showSkipped; }
virtual bool expandCycles() { return _expandCycles; }
virtual bool clusterGroups() { return _clusterGroups; }
virtual int detailLevel() { return _detailLevel; }
virtual Layout layout() { return _layout; }
double funcLimit() Q_DECL_OVERRIDE { return _funcLimit; }
double callLimit() Q_DECL_OVERRIDE { return _callLimit; }
int maxCallerDepth() Q_DECL_OVERRIDE { return _maxCallerDepth; }
int maxCalleeDepth() Q_DECL_OVERRIDE { return _maxCalleeDepth; }
bool showSkipped() Q_DECL_OVERRIDE { return _showSkipped; }
bool expandCycles() Q_DECL_OVERRIDE { return _expandCycles; }
bool clusterGroups() Q_DECL_OVERRIDE { return _clusterGroups; }
int detailLevel() Q_DECL_OVERRIDE { return _detailLevel; }
Layout layout() Q_DECL_OVERRIDE { return _layout; }
// setters
void setMaxCallerDepth(int d) { _maxCallerDepth = d; }
......@@ -388,10 +388,10 @@ signals:
void zoomRectMoveFinished();
protected:
void mousePressEvent(QMouseEvent*);
void mouseMoveEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*);
void drawForeground(QPainter * p, const QRectF&);
void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void drawForeground(QPainter * p, const QRectF&) Q_DECL_OVERRIDE;
QRectF _zoomRect;
bool _movingZoomRect;
......@@ -421,14 +421,14 @@ public:
void updateGroup();
void setSelected(bool);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE;
GraphNode* node()
{
return _node;
}
int type() const
int type() const Q_DECL_OVERRIDE
{
return CANVAS_NODE;
}
......@@ -444,14 +444,14 @@ class CanvasEdgeLabel : public QGraphicsRectItem, public StoredDrawParams
public:
CanvasEdgeLabel(CallGraphView*, CanvasEdge*, int, int, int, int);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE;
CanvasEdge* canvasEdge()
{
return _ce;
}
int type() const
int type() const Q_DECL_OVERRIDE
{
return CANVAS_EDGELABEL;
}
......@@ -474,14 +474,14 @@ class CanvasEdgeArrow : public QGraphicsPolygonItem
public:
explicit CanvasEdgeArrow(CanvasEdge*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE;
CanvasEdge* canvasEdge()
{
return _ce;
}
int type() const
int type() const Q_DECL_OVERRIDE
{
return CANVAS_EDGEARROW;
}
......@@ -496,7 +496,7 @@ class CanvasEdge : public QGraphicsPathItem
public:
explicit CanvasEdge(GraphEdge*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE;
void setSelected(bool);
......@@ -526,7 +526,7 @@ public:
return _edge;
}
int type() const
int type() const Q_DECL_OVERRIDE
{
return CANVAS_EDGE;
}
......@@ -546,7 +546,7 @@ class CanvasFrame : public QGraphicsRectItem
public:
explicit CanvasFrame(CanvasNode*);
int type() const
int type() const Q_DECL_OVERRIDE
{
return CANVAS_FRAME;
}
......@@ -556,7 +556,7 @@ public:
return false;
}
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE;
private:
static QPixmap* _p;
......@@ -582,15 +582,15 @@ public:
const QString& name);
~CallGraphView();
void restoreOptions(const QString& prefix, const QString& postfix);
void saveOptions(const QString& prefix, const QString& postfix);
void restoreOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
void saveOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
QWidget* widget()
QWidget* widget() Q_DECL_OVERRIDE
{
return this;
}
QString whatsThis() const;
QString whatsThis() const Q_DECL_OVERRIDE;
ZoomPosition zoomPos() const
{
......@@ -620,21 +620,21 @@ public slots:
void layoutTriggered(QAction*);
protected:
void resizeEvent(QResizeEvent*);
void mousePressEvent(QMouseEvent*);
void mouseMoveEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent*);
void contextMenuEvent(QContextMenuEvent*);
void keyPressEvent(QKeyEvent*);
void focusInEvent(QFocusEvent*);
void focusOutEvent(QFocusEvent*);
void scrollContentsBy(int dx, int dy);
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void mouseDoubleClickEvent(QMouseEvent*) Q_DECL_OVERRIDE;
void contextMenuEvent(QContextMenuEvent*) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE;
void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE;
void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE;
private:
void updateSizes(QSize s = QSize(0,0));
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void refresh();
void makeFrame(CanvasNode*, bool active);
void clear();
......
......@@ -33,7 +33,7 @@ class CallItem: public QTreeWidgetItem
public:
CallItem(CallView*, QTreeWidget*, TraceCall* c);
bool operator<(const QTreeWidgetItem& other) const;
bool operator<(const QTreeWidgetItem& other) const Q_DECL_OVERRIDE;
TraceCall* call() { return _call; }
CallView* view() { return _view; }
void updateCost();
......
......@@ -41,16 +41,16 @@ public:
CallMapView(bool showCallers, TraceItemView* parentView,
QWidget* parent, const QString& name);
QWidget* widget() { return this; }
QString whatsThis() const;
void setData(TraceData*);
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
void setData(TraceData*) Q_DECL_OVERRIDE;
void restoreOptions(const QString& prefix, const QString& postfix);
void saveOptions(const QString& prefix, const QString& postfix);
void restoreOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
void saveOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
bool showCallers() const { return _showCallers; }
ProfileCostArray* totalCost();
QString tipString(TreeMapItem*) const;
QString tipString(TreeMapItem*) const Q_DECL_OVERRIDE;
QColor groupColor(TraceFunction*) const;
private slots:
......@@ -64,8 +64,8 @@ private slots:
void borderWidthTriggered(QAction*);
private:
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
// context menu builders
void addItemListMenu(QMenu*,TreeMapItem*);
......@@ -94,10 +94,10 @@ private:
class CallMapItemBase: public TreeMapItem
{
public:
int maxLines(int) const;
bool allowBreak(int) const;
bool allowTruncation(int) const;
Position position(int) const;
int maxLines(int) const Q_DECL_OVERRIDE;
bool allowBreak(int) const Q_DECL_OVERRIDE;
bool allowTruncation(int) const Q_DECL_OVERRIDE;
Position position(int) const Q_DECL_OVERRIDE;
};
class CallMapRootItem: public CallMapItemBase
......@@ -107,14 +107,14 @@ public:
void setFunction(TraceFunction* f);
TraceFunction* function() { return _f; }
int rtti() const { return 1; }
double sum() const;
double value() const;
bool isMarked(int) const;
QString text(int) const;
QPixmap pixmap(int) const;
TreeMapItemList* children();
QColor backColor() const;
int rtti() const Q_DECL_OVERRIDE { return 1; }
double sum() const Q_DECL_OVERRIDE;
double value() const Q_DECL_OVERRIDE;
bool isMarked(int) const Q_DECL_OVERRIDE;
QString text(int) const Q_DECL_OVERRIDE;
QPixmap pixmap(int) const Q_DECL_OVERRIDE;
TreeMapItemList* children() Q_DECL_OVERRIDE;
QColor backColor() const Q_DECL_OVERRIDE;
private:
TraceFunction* _f;
......@@ -126,16 +126,16 @@ class CallMapCallingItem: public CallMapItemBase
public:
CallMapCallingItem(double factor, TraceCall* c);
void init();
int rtti() const { return 2; }
int borderWidth() const { return widget()->borderWidth(); }
int rtti() const Q_DECL_OVERRIDE { return 2; }
int borderWidth() const Q_DECL_OVERRIDE { return widget()->borderWidth(); }
TraceFunction* function() { return _c->called(); }
double value() const;
double sum() const;
bool isMarked(int) const;
QString text(int) const;
QPixmap pixmap(int) const;
TreeMapItemList* children();
QColor backColor() const;
double value() const Q_DECL_OVERRIDE;
double sum() const Q_DECL_OVERRIDE;
bool isMarked(int) const Q_DECL_OVERRIDE;
QString text(int) const Q_DECL_OVERRIDE;
QPixmap pixmap(int) const Q_DECL_OVERRIDE;
TreeMapItemList* children() Q_DECL_OVERRIDE;
QColor backColor() const Q_DECL_OVERRIDE;
private:
TraceCall* _c;
......@@ -146,15 +146,15 @@ class CallMapCallerItem: public CallMapItemBase
{
public:
CallMapCallerItem(double factor, TraceCall* c);
int rtti() const { return 3; }
int borderWidth() const { return widget()->borderWidth(); }
int rtti() const Q_DECL_OVERRIDE { return 3; }
int borderWidth() const Q_DECL_OVERRIDE { return widget()->borderWidth(); }
TraceFunction* function() { return _c->caller(); }
double value() const;
bool isMarked(int) const;
QString text(int i) const;
QPixmap pixmap(int) const;
TreeMapItemList* children();
QColor backColor() const;
double value() const Q_DECL_OVERRIDE;
bool isMarked(int) const Q_DECL_OVERRIDE;
QString text(int i) const Q_DECL_OVERRIDE;
QPixmap pixmap(int) const Q_DECL_OVERRIDE;
TreeMapItemList* children() Q_DECL_OVERRIDE;
QColor backColor() const Q_DECL_OVERRIDE;
private:
TraceCall* _c;
......
......@@ -35,8 +35,8 @@ public:
CallView(bool showCallers, TraceItemView* parentView,
QWidget* parent=0);
virtual QWidget* widget() { return this; }
QString whatsThis() const;
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
bool showCallers() const { return _showCallers; }
protected slots:
......@@ -46,11 +46,11 @@ protected slots:
void headerClicked(int);
protected:
void keyPressEvent(QKeyEvent* event);
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
private:
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void refresh();
void setCostColumnWidths();
......
......@@ -32,7 +32,7 @@ public:
CostListItem(QTreeWidget* parent, int skipped, TraceCostItem* cost,
EventType* et);
bool operator< ( const QTreeWidgetItem & other ) const;
bool operator< ( const QTreeWidgetItem & other ) const Q_DECL_OVERRIDE;
TraceCostItem* costItem() { return (_skipped) ? 0 : _costItem; }
void setEventType(EventType* et);
void update();
......
......@@ -38,7 +38,7 @@ public:
TraceFunction* base,
EventType* ct, ProfileContext::Type gt);
bool operator< ( const QTreeWidgetItem & other ) const;
bool operator< ( const QTreeWidgetItem & other ) const Q_DECL_OVERRIDE;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(EventType* ct);
void setGroupType(ProfileContext::Type);
......@@ -66,7 +66,7 @@ public:
TraceFunction* base,
EventType* ct, ProfileContext::Type gt);
bool operator< ( const QTreeWidgetItem & other ) const;
bool operator< ( const QTreeWidgetItem & other ) const Q_DECL_OVERRIDE;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(EventType* ct);
void setGroupType(ProfileContext::Type);
......
......@@ -37,8 +37,8 @@ public:
CoverageView(bool showCallers, TraceItemView* parentView,
QWidget* parent = 0);
virtual QWidget* widget() { return this; }
QString whatsThis() const;
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
protected slots:
void context(const QPoint &);
......@@ -47,11 +47,11 @@ protected slots:
void headerClicked(int);
protected:
void keyPressEvent(QKeyEvent* event);
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
private:
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void refresh();
HighestCostList _hc;
......
......@@ -33,13 +33,13 @@ public:
EventTypeItem(TraceCostItem* costItem,
EventType* ct, ProfileContext::Type gt);
bool operator<(const QTreeWidgetItem &other) const;
bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE;
void setGroupType(ProfileContext::Type);
TraceCostItem* costItem() { return _costItem; }
EventType* eventType() { return _eventType; }
void update();
QVariant data(int column, int role) const;
QVariant data(int column, int role) const Q_DECL_OVERRIDE;
private:
SubCost _sum, _pure;
......
......@@ -36,8 +36,8 @@ public:
explicit EventTypeView(TraceItemView* parentView,
QWidget* parent, const QString& name);
virtual QWidget* widget() { return this; }
QString whatsThis() const;
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
private slots:
void context(const QPoint&);
......@@ -46,8 +46,8 @@ private slots:
void itemChanged(QTreeWidgetItem*, int);
private:
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void refresh();
};
......
......@@ -44,16 +44,16 @@ public:
EventType* eventType);
// reimplemented from QAbstractItemModel
QVariant data(const QModelIndex&, int) const;
Qt::ItemFlags flags(const QModelIndex&) const;
QVariant data(const QModelIndex&, int) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex&) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column = 0,
const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
void sort(int column, Qt::SortOrder order);
const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
void sort(int column, Qt::SortOrder order) Q_DECL_OVERRIDE;
void setFilter(QString filter);
void setEventType(EventType*);
......
......@@ -56,9 +56,9 @@ public:
void query(QString);
bool selectTopFunction();
QWidget* widget() { return this; }
QString whatsThis() const;
void setData(TraceData*);
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
void setData(TraceData*) Q_DECL_OVERRIDE;
void updateGroupingMenu(QMenu*);
......@@ -79,8 +79,8 @@ public slots:
void functionHeaderClicked(int);
private:
CostItem* canShow(CostItem* i);
void doUpdate(int, bool);
CostItem* canShow(CostItem* i) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void selectFunction();
void refresh();
void setCostColumnWidths();
......@@ -124,7 +124,7 @@ public:
public slots:
bool helpEvent( QHelpEvent* e, QAbstractItemView* view,
const QStyleOptionViewItem& option,
const QModelIndex& index );
const QModelIndex& index ) Q_DECL_OVERRIDE;
};
#endif
......@@ -79,8 +79,8 @@ public:
// gets the singleton instance
static GlobalGUIConfig* config();
void saveOptions();
void readOptions();
void saveOptions() Q_DECL_OVERRIDE;
void readOptions() Q_DECL_OVERRIDE;
// color for visualization of an object
static QColor functionColor(ProfileContext::Type gt, TraceFunction*);
......
......@@ -60,7 +60,7 @@ public:
TraceInstrJump* instrJump() const { return _instrJump; }
TraceInstrJump* jump(int i) const { return _jump[i]; }
int jumpCount() const { return _jump.size(); }
bool operator< ( const QTreeWidgetItem & other ) const;
bool operator< ( const QTreeWidgetItem & other ) const Q_DECL_OVERRIDE;
void updateGroup();
void updateCost();
......@@ -88,9 +88,9 @@ class InstrItemDelegate : public QItemDelegate
public:
explicit InstrItemDelegate(InstrView *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex & index ) const;
const QModelIndex & index ) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const;
const QModelIndex &index) const Q_DECL_OVERRIDE;
protected:
void paintArrows(QPainter *p,
......
......@@ -39,12 +39,12 @@ public:
explicit InstrView(TraceItemView* parentView,
QWidget* parent = 0);
virtual QWidget* widget() { return this; }
QString whatsThis() const;
QWidget* widget() Q_DECL_OVERRIDE { return this; }
QString whatsThis() const Q_DECL_OVERRIDE;
int arrowLevels() { return _arrowLevels; }
void restoreOptions(const QString& prefix, const QString& postfix);
void saveOptions(const QString& prefix, const QString& postfix);
void restoreOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
void saveOptions(const QString& prefix, const QString& postfix) Q_DECL_OVERRIDE;
protected slots:
void context(const QPoint &);
......@@ -53,11 +53,11 @@ protected slots:
void headerClicked(int);
protected:
void keyPressEvent(QKeyEvent* event);
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
private:
CostItem* canShow(CostItem*);
void doUpdate(int, bool);
CostItem* canShow(CostItem*) Q_DECL_OVERRIDE;
void doUpdate(int, bool) Q_DECL_OVERRIDE;
void refresh();
void setColumnWidths();
bool searchFile(QString&, TraceObject*);
......
......@@ -40,28 +40,28 @@ class MultiView : public QSplitter, public TraceItemView
public:
explicit MultiView(TopLevelBase* top, QWidget* parent = 0);
QWidget* widget() { return this; }