Skip to content
Permalink
Browse files

Fix clazy skipped-base-method warnings

  • Loading branch information
nyalldawson committed Feb 2, 2018
1 parent 2dbda4f commit 0799835292d7503282d860e98c3bf951589c9827
@@ -261,7 +261,7 @@ bool QgsLayoutAttributeTableColumnModel::setData( const QModelIndex &index, cons

Qt::ItemFlags QgsLayoutAttributeTableColumnModel::flags( const QModelIndex &index ) const
{
Qt::ItemFlags flags = QAbstractItemModel::flags( index );
Qt::ItemFlags flags = QAbstractTableModel::flags( index );

if ( index.isValid() )
{
@@ -594,7 +594,7 @@ QVariant QgsLayoutTableSortColumnsProxyModel::headerData( int section, Qt::Orien

Qt::ItemFlags QgsLayoutTableSortColumnsProxyModel::flags( const QModelIndex &index ) const
{
Qt::ItemFlags flags = QAbstractItemModel::flags( index );
Qt::ItemFlags flags = QSortFilterProxyModel::flags( index );

if ( index.column() == 1 )
{
@@ -1605,7 +1605,7 @@ void QgsPluginManager::showEvent( QShowEvent *e )
QTimer::singleShot( 0, this, SLOT( warnAboutMissingObjects() ) );
}

QDialog::showEvent( e );
QgsOptionsDialogBase::showEvent( e );
}


@@ -173,13 +173,13 @@ void QgsMapToolIdentifyAction::handleChangedRasterResults( QList<IdentifyResult>
void QgsMapToolIdentifyAction::activate()
{
resultsDialog()->activate();
QgsMapTool::activate();
QgsMapToolIdentify::activate();
}

void QgsMapToolIdentifyAction::deactivate()
{
resultsDialog()->deactivate();
QgsMapTool::deactivate();
QgsMapToolIdentify::deactivate();
}

QgsUnitTypes::DistanceUnit QgsMapToolIdentifyAction::displayDistanceUnits() const
@@ -201,7 +201,7 @@ QVariant QgsWelcomePageItemsModel::data( const QModelIndex &index, int role ) co

Qt::ItemFlags QgsWelcomePageItemsModel::flags( const QModelIndex &index ) const
{
Qt::ItemFlags flags = QAbstractItemModel::flags( index );
Qt::ItemFlags flags = QAbstractListModel::flags( index );

const RecentProjectData &projectData = mRecentProjects.at( index.row() );

@@ -236,7 +236,7 @@ bool QgsVertexEditorModel::setData( const QModelIndex &index, const QVariant &va

Qt::ItemFlags QgsVertexEditorModel::flags( const QModelIndex &index ) const
{
Qt::ItemFlags flags = QAbstractItemModel::flags( index );
Qt::ItemFlags flags = QAbstractTableModel::flags( index );

if ( index.isValid() )
{
@@ -46,7 +46,7 @@ QgsMultiLineString *QgsMultiLineString::clone() const

void QgsMultiLineString::clear()
{
QgsGeometryCollection::clear();
QgsMultiCurve::clear();
mWkbType = QgsWkbTypes::MultiLineString;
}

@@ -136,7 +136,7 @@ bool QgsMultiLineString::addGeometry( QgsAbstractGeometry *g )
g->addMValue();
else if ( !isMeasure() && g->isMeasure() )
g->dropMValue();
return QgsGeometryCollection::addGeometry( g );
return QgsGeometryCollection::addGeometry( g ); // clazy:exclude=skipped-base-method
}

bool QgsMultiLineString::insertGeometry( QgsAbstractGeometry *g, int index )
@@ -147,7 +147,7 @@ bool QgsMultiLineString::insertGeometry( QgsAbstractGeometry *g, int index )
return false;
}

return QgsGeometryCollection::insertGeometry( g, index );
return QgsMultiCurve::insertGeometry( g, index ); // clazy:exclude=skipped-base-method
}

QgsMultiCurve *QgsMultiLineString::toCurveType() const
@@ -158,7 +158,7 @@ bool QgsMultiPolygon::addGeometry( QgsAbstractGeometry *g )
else if ( !isMeasure() && g->isMeasure() )
g->dropMValue();

return QgsGeometryCollection::addGeometry( g );
return QgsGeometryCollection::addGeometry( g ); // clazy:exclude=skipped-base-method
}

bool QgsMultiPolygon::insertGeometry( QgsAbstractGeometry *g, int index )
@@ -98,7 +98,7 @@ QgsTriangle *QgsTriangle::createEmptyWithSameType() const

void QgsTriangle::clear()
{
QgsCurvePolygon::clear();
QgsPolygon::clear();
mWkbType = QgsWkbTypes::Triangle;
}

@@ -745,7 +745,7 @@ Qt::ItemFlags QgsAttributeTableModel::flags( const QModelIndex &index ) const
if ( index.column() >= mFieldCount )
return Qt::NoItemFlags;

Qt::ItemFlags flags = QAbstractItemModel::flags( index );
Qt::ItemFlags flags = QAbstractTableModel::flags( index );

bool editable = false;
const int fieldIndex = mAttributes[index.column()];
@@ -316,7 +316,7 @@ void QgsAuthTrustedCAsDialog::showEvent( QShowEvent *e )
{
treeTrustedCAs->setFocus();
}
QWidget::showEvent( e );
QDialog::showEvent( e );
}

QgsMessageBar *QgsAuthTrustedCAsDialog::messageBar()
@@ -127,7 +127,7 @@ void QgsDateTimeEdit::focusOutEvent( QFocusEvent *event )
{
displayNull();
}
QWidget::focusOutEvent( event );
QAbstractSpinBox::focusOutEvent( event );
emit editingFinished();
}
else
@@ -76,7 +76,7 @@ void QgsCodeEditor::keyPressEvent( QKeyEvent *event )
if ( event->key() == Qt::Key_Escape && !isListActive() )
{
// Shortcut QScintilla and redirect the event to the QWidget handler
QWidget::keyPressEvent( event );
QWidget::keyPressEvent( event ); // clazy:exclude=skipped-base-method
}
else
{
@@ -756,7 +756,7 @@ void QgsCompoundColorWidget::keyPressEvent( QKeyEvent *e )
if ( !mPickingColor )
{
//if not picking a color, use default tool button behavior
QWidget::keyPressEvent( e );
QgsPanelWidget::keyPressEvent( e );
return;
}

@@ -173,5 +173,5 @@ void QgsDataSourceManagerDialog::makeConnections( QgsAbstractDataSourceWidget *d
void QgsDataSourceManagerDialog::showEvent( QShowEvent *e )
{
ui->mOptionsStackedWidget->currentWidget()->show();
QDialog::showEvent( e );
QgsOptionsDialogBase::showEvent( e );
}
@@ -34,7 +34,7 @@ QgsNewNameDialog::QgsNewNameDialog( const QString &source, const QString &initia
, mRegexp( regexp )
{
setWindowTitle( tr( "New Name" ) );
QDialog::layout()->setSizeConstraint( QLayout::SetMinimumSize );
QgsDialog::layout()->setSizeConstraint( QLayout::SetMinimumSize );
layout()->setSizeConstraint( QLayout::SetMinimumSize );
layout()->setSpacing( 6 );
mOkString = buttonBox()->button( QDialogButtonBox::Ok )->text();
@@ -180,7 +180,7 @@ bool QgsSQLComposerDialog::eventFilter( QObject *obj, QEvent *event )
}
}

return QObject::eventFilter( obj, event );
return QDialog::eventFilter( obj, event );
}

void QgsSQLComposerDialog::setTableSelectedCallback( TableSelectedCallback *tableSelectedCallback )
@@ -564,7 +564,7 @@ bool QgsCptCityColorRampDialog::eventFilter( QObject *obj, QEvent *event )
else
{
// standard event processing
return QObject::eventFilter( obj, event );
return QDialog::eventFilter( obj, event );
}
}

@@ -412,7 +412,7 @@ QIcon QgsGrassMapsetItem::icon()
return QgsApplication::getThemeIcon( "/grass_mapset_search.png" );
}
}
return QgsDataItem::icon();
return QgsDirectoryItem::icon();
}

void QgsGrassMapsetItem::setState( State state )
@@ -82,7 +82,7 @@ class QgsGrassLocationItem : public QgsDirectoryItem, public QgsGrassObjectItemB
public:
QgsGrassLocationItem( QgsDataItem *parent, QString dirPath, QString path );

QIcon icon() override { return QgsDataItem::icon(); }
QIcon icon() override { return QgsDirectoryItem::icon(); }

QVector<QgsDataItem *> createChildren() override;
#ifdef HAVE_GUI

0 comments on commit 0799835

Please sign in to comment.
You can’t perform that action at this time.