Tests: Fix Clang warnings about inconsistent override
tst_qsortfilterproxymodel.cpp:3997:14: warning: 'data' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] tst_qsortfilterproxymodel.cpp:4004:9: warning: 'rowCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] accessiblewidgets.h:101:11: warning: 'interface_cast' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] accessiblewidgets.h:115:13: warning: 'textBeforeOffset' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] accessiblewidgets.h:121:13: warning: 'textAtOffset' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] Change-Id: I75ba00a0109ff25a2a22554980b8e541e661f806 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>bb10
parent
08d1706be3
commit
c0ff4fad73
|
|
@ -3994,14 +3994,14 @@ class DropOnOddRows : public QAbstractListModel
|
|||
public:
|
||||
DropOnOddRows(QObject *parent = 0) : QAbstractListModel(parent) {}
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
|
||||
{
|
||||
if (role == Qt::DisplayRole)
|
||||
return (index.row() % 2 == 0) ? "A" : "B";
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return 10;
|
||||
|
|
@ -4026,7 +4026,7 @@ public:
|
|||
|
||||
}
|
||||
|
||||
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
|
||||
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
|
||||
{
|
||||
Q_ASSERT(sourceModel());
|
||||
return QSortFilterProxyModel::mapToSource(proxyIndex);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
CustomTextWidgetIface(CustomTextWidget *w): QAccessibleWidget(w) {}
|
||||
void *interface_cast(QAccessible::InterfaceType t) {
|
||||
void *interface_cast(QAccessible::InterfaceType t) override {
|
||||
if (t == QAccessible::TextInterface)
|
||||
return static_cast<QAccessibleTextInterface*>(this);
|
||||
return 0;
|
||||
|
|
@ -112,19 +112,19 @@ public:
|
|||
return QAccessibleWidget::text(t);
|
||||
}
|
||||
|
||||
QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
|
||||
QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const override
|
||||
{
|
||||
if (offset == -2)
|
||||
offset = textWidget()->cursorPosition;
|
||||
return QAccessibleTextInterface::textBeforeOffset(offset, boundaryType, startOffset, endOffset);
|
||||
}
|
||||
QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
|
||||
QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const override
|
||||
{
|
||||
if (offset == -2)
|
||||
offset = textWidget()->cursorPosition;
|
||||
return QAccessibleTextInterface::textAtOffset(offset, boundaryType, startOffset, endOffset);
|
||||
}
|
||||
QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
|
||||
QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const override
|
||||
{
|
||||
if (offset == -2)
|
||||
offset = textWidget()->cursorPosition;
|
||||
|
|
|
|||
Loading…
Reference in New Issue