Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 4, 2018
1 parent ded7978 commit 3014bbf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/qgslayercapabilitiesmodel.cpp
Expand Up @@ -58,7 +58,6 @@ void QgsLayerCapabilitiesModel::setFilterText( const QString &filterText )

void QgsLayerCapabilitiesModel::toggleSelectedItems( const QModelIndexList &checkedIndexes )
{
QVector<int> roles = QVector<int>() << Qt::CheckStateRole;
for ( const QModelIndex &index : checkedIndexes )
{
bool isChecked = data( index, Qt::CheckStateRole ) == Qt::Checked;
Expand Down Expand Up @@ -253,8 +252,8 @@ QVariant QgsLayerCapabilitiesModel::data( const QModelIndex &idx, int role ) con

if ( role == Qt::CheckStateRole || role == Qt::UserRole )
{
QVariant trueValue = role == Qt::CheckStateRole ? Qt::Checked : true;
QVariant falseValue = role == Qt::CheckStateRole ? Qt::Unchecked : false;
QVariant trueValue = role == Qt::CheckStateRole ? QVariant( Qt::Checked ) : QVariant( true );
QVariant falseValue = role == Qt::CheckStateRole ? QVariant( Qt::Unchecked ) : QVariant( false );
if ( idx.column() == IdentifiableColumn )
{
if ( layer->isSpatial() )
Expand Down

0 comments on commit 3014bbf

Please sign in to comment.