Fix 1700 override warnings [-Winconsistent-missing-override]
Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
b2595bd015
commit
ad2ea16550
@ -183,7 +183,7 @@ public:
|
||||
QUtcTimeZonePrivate(const QUtcTimeZonePrivate &other);
|
||||
virtual ~QUtcTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QLocale::Country country() const Q_DECL_OVERRIDE;
|
||||
QString comment() const Q_DECL_OVERRIDE;
|
||||
@ -228,7 +228,7 @@ public:
|
||||
QIcuTimeZonePrivate(const QIcuTimeZonePrivate &other);
|
||||
~QIcuTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QString displayName(QTimeZone::TimeType timeType, QTimeZone::NameType nameType,
|
||||
const QLocale &locale) const Q_DECL_OVERRIDE;
|
||||
@ -271,7 +271,7 @@ public:
|
||||
QTzTimeZonePrivate(const QTzTimeZonePrivate &other);
|
||||
~QTzTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QLocale::Country country() const Q_DECL_OVERRIDE;
|
||||
QString comment() const Q_DECL_OVERRIDE;
|
||||
@ -338,7 +338,7 @@ public:
|
||||
QMacTimeZonePrivate(const QMacTimeZonePrivate &other);
|
||||
~QMacTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QString comment() const Q_DECL_OVERRIDE;
|
||||
|
||||
@ -389,7 +389,7 @@ public:
|
||||
QWinTimeZonePrivate(const QWinTimeZonePrivate &other);
|
||||
~QWinTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QString comment() const Q_DECL_OVERRIDE;
|
||||
|
||||
@ -439,7 +439,7 @@ public:
|
||||
QAndroidTimeZonePrivate(const QAndroidTimeZonePrivate &other);
|
||||
~QAndroidTimeZonePrivate();
|
||||
|
||||
QTimeZonePrivate *clone();
|
||||
QTimeZonePrivate *clone() Q_DECL_OVERRIDE;
|
||||
|
||||
QString displayName(QTimeZone::TimeType timeType, QTimeZone::NameType nameType,
|
||||
const QLocale &locale) const Q_DECL_OVERRIDE;
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
inline int x() const { return geometry().x(); }
|
||||
inline int y() const { return geometry().y(); }
|
||||
|
||||
inline QSize size() const { return geometry().size(); }
|
||||
QSize size() const Q_DECL_OVERRIDE { return geometry().size(); }
|
||||
inline QPoint position() const { return geometry().topLeft(); }
|
||||
|
||||
void setPosition(const QPoint &pt);
|
||||
|
@ -115,11 +115,11 @@ public:
|
||||
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE;
|
||||
virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE;
|
||||
|
||||
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) = 0;
|
||||
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE = 0;
|
||||
virtual void drawPixmap(const QPointF &pos, const QPixmap &pm);
|
||||
|
||||
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
|
||||
Qt::ImageConversionFlags flags = Qt::AutoColor) = 0;
|
||||
Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE = 0;
|
||||
virtual void drawImage(const QPointF &pos, const QImage &image);
|
||||
|
||||
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) Q_DECL_OVERRIDE;
|
||||
|
@ -91,11 +91,11 @@ public:
|
||||
// from QAbstractSocketEngineReceiver
|
||||
void readNotification() Q_DECL_OVERRIDE;
|
||||
void closeNotification() Q_DECL_OVERRIDE { readNotification(); }
|
||||
inline void writeNotification() {}
|
||||
inline void exceptionNotification() {}
|
||||
inline void connectionNotification() {}
|
||||
void writeNotification() Q_DECL_OVERRIDE {}
|
||||
void exceptionNotification() Q_DECL_OVERRIDE {}
|
||||
void connectionNotification() Q_DECL_OVERRIDE {}
|
||||
#ifndef QT_NO_NETWORKPROXY
|
||||
inline void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *) {}
|
||||
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *) Q_DECL_OVERRIDE {}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
setCacheMode(DeviceCoordinateCache);
|
||||
}
|
||||
|
||||
inline QRectF boundingRect() const
|
||||
QRectF boundingRect() const Q_DECL_OVERRIDE
|
||||
{ return brect; }
|
||||
|
||||
inline int pageNumber() const
|
||||
|
@ -2268,8 +2268,8 @@ public:
|
||||
class QML_PARSER_EXPORT UiObjectMember: public Node
|
||||
{
|
||||
public:
|
||||
virtual SourceLocation firstSourceLocation() const = 0;
|
||||
virtual SourceLocation lastSourceLocation() const = 0;
|
||||
virtual SourceLocation firstSourceLocation() const Q_DECL_OVERRIDE = 0;
|
||||
virtual SourceLocation lastSourceLocation() const Q_DECL_OVERRIDE = 0;
|
||||
|
||||
virtual UiObjectMember *uiObjectMemberCast() Q_DECL_OVERRIDE;
|
||||
};
|
||||
|
@ -658,28 +658,28 @@ public:
|
||||
: QGraphicsEffectSourcePrivate(), item(i), info(0)
|
||||
{}
|
||||
|
||||
inline void detach()
|
||||
void detach() Q_DECL_OVERRIDE
|
||||
{
|
||||
item->d_ptr->graphicsEffect = 0;
|
||||
item->prepareGeometryChange();
|
||||
}
|
||||
|
||||
inline const QGraphicsItem *graphicsItem() const
|
||||
const QGraphicsItem *graphicsItem() const Q_DECL_OVERRIDE
|
||||
{ return item; }
|
||||
|
||||
inline const QWidget *widget() const
|
||||
const QWidget *widget() const Q_DECL_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
inline void update() {
|
||||
void update() Q_DECL_OVERRIDE {
|
||||
item->d_ptr->updateDueToGraphicsEffect = true;
|
||||
item->update();
|
||||
item->d_ptr->updateDueToGraphicsEffect = false;
|
||||
}
|
||||
|
||||
inline void effectBoundingRectChanged()
|
||||
void effectBoundingRectChanged() Q_DECL_OVERRIDE
|
||||
{ item->prepareGeometryChange(); }
|
||||
|
||||
inline bool isPixmap() const
|
||||
bool isPixmap() const Q_DECL_OVERRIDE
|
||||
{
|
||||
return item->type() == QGraphicsPixmapItem::Type
|
||||
&& !(item->flags() & QGraphicsItem::ItemIsSelectable)
|
||||
@ -687,10 +687,10 @@ public:
|
||||
//|| (item->d_ptr->isObject && qobject_cast<QDeclarativeImage *>(q_func()));
|
||||
}
|
||||
|
||||
inline const QStyleOption *styleOption() const
|
||||
const QStyleOption *styleOption() const Q_DECL_OVERRIDE
|
||||
{ return info ? info->option : 0; }
|
||||
|
||||
inline QRect deviceRect() const
|
||||
QRect deviceRect() const Q_DECL_OVERRIDE
|
||||
{
|
||||
if (!info || !info->widget) {
|
||||
qWarning("QGraphicsEffectSource::deviceRect: Not yet implemented, lacking device context");
|
||||
|
@ -876,26 +876,26 @@ public:
|
||||
: QGraphicsEffectSourcePrivate(), m_widget(widget), context(0), updateDueToGraphicsEffect(false)
|
||||
{}
|
||||
|
||||
inline void detach()
|
||||
void detach() Q_DECL_OVERRIDE
|
||||
{ m_widget->d_func()->graphicsEffect = 0; }
|
||||
|
||||
inline const QGraphicsItem *graphicsItem() const
|
||||
const QGraphicsItem *graphicsItem() const Q_DECL_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
inline const QWidget *widget() const
|
||||
const QWidget *widget() const Q_DECL_OVERRIDE
|
||||
{ return m_widget; }
|
||||
|
||||
inline void update()
|
||||
void update() Q_DECL_OVERRIDE
|
||||
{
|
||||
updateDueToGraphicsEffect = true;
|
||||
m_widget->update();
|
||||
updateDueToGraphicsEffect = false;
|
||||
}
|
||||
|
||||
inline bool isPixmap() const
|
||||
bool isPixmap() const Q_DECL_OVERRIDE
|
||||
{ return false; }
|
||||
|
||||
inline void effectBoundingRectChanged()
|
||||
void effectBoundingRectChanged() Q_DECL_OVERRIDE
|
||||
{
|
||||
// ### This function should take a rect parameter; then we can avoid
|
||||
// updating too much on the parent widget.
|
||||
@ -905,10 +905,10 @@ public:
|
||||
update();
|
||||
}
|
||||
|
||||
inline const QStyleOption *styleOption() const
|
||||
const QStyleOption *styleOption() const Q_DECL_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
inline QRect deviceRect() const
|
||||
QRect deviceRect() const Q_DECL_OVERRIDE
|
||||
{ return m_widget->window()->rect(); }
|
||||
|
||||
QRectF boundingRect(Qt::CoordinateSystem system) const Q_DECL_OVERRIDE;
|
||||
|
@ -117,7 +117,7 @@ Q_SIGNALS:
|
||||
void toggled(bool checked);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *e) = 0;
|
||||
void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE = 0;
|
||||
virtual bool hitButton(const QPoint &pos) const;
|
||||
virtual void checkStateSet();
|
||||
virtual void nextCheckState();
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
QDockWidgetTitleButton(QDockWidget *dockWidget);
|
||||
|
||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||
inline QSize minimumSizeHint() const
|
||||
QSize minimumSizeHint() const Q_DECL_OVERRIDE
|
||||
{ return sizeHint(); }
|
||||
|
||||
void enterEvent(QEvent *event) Q_DECL_OVERRIDE;
|
||||
|
@ -82,7 +82,7 @@ class RegularTiler : public Rearranger
|
||||
// covering the entire domain.
|
||||
// Both positions and sizes may change.
|
||||
void rearrange(QList<QWidget *> &widgets, const QRect &domain) const Q_DECL_OVERRIDE;
|
||||
inline Type type() const { return Rearranger::RegularTiler; }
|
||||
Type type() const Q_DECL_OVERRIDE { return Rearranger::RegularTiler; }
|
||||
};
|
||||
|
||||
class SimpleCascader : public Rearranger
|
||||
@ -91,7 +91,7 @@ class SimpleCascader : public Rearranger
|
||||
// Widgets are resized to minimumSize.
|
||||
// Both positions and sizes may change.
|
||||
void rearrange(QList<QWidget *> &widgets, const QRect &domain) const Q_DECL_OVERRIDE;
|
||||
inline Type type() const { return Rearranger::SimpleCascader; }
|
||||
Type type() const Q_DECL_OVERRIDE { return Rearranger::SimpleCascader; }
|
||||
};
|
||||
|
||||
class IconTiler : public Rearranger
|
||||
@ -100,7 +100,7 @@ class IconTiler : public Rearranger
|
||||
// tiling pattern filling up the domain from the bottom.
|
||||
// Only positions may change.
|
||||
void rearrange(QList<QWidget *> &widgets, const QRect &domain) const Q_DECL_OVERRIDE;
|
||||
inline Type type() const { return Rearranger::IconTiler; }
|
||||
Type type() const Q_DECL_OVERRIDE { return Rearranger::IconTiler; }
|
||||
};
|
||||
|
||||
class Placer
|
||||
|
@ -251,7 +251,7 @@ public:
|
||||
CloseButton(QWidget *parent = 0);
|
||||
|
||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||
inline QSize minimumSizeHint() const
|
||||
QSize minimumSizeHint() const Q_DECL_OVERRIDE
|
||||
{ return sizeHint(); }
|
||||
void enterEvent(QEvent *event) Q_DECL_OVERRIDE;
|
||||
void leaveEvent(QEvent *event) Q_DECL_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user