Skip to content
Permalink
Browse files

More qt deprecation warning fixes

  • Loading branch information
nyalldawson committed Jan 28, 2020
1 parent 08adb23 commit f5e173358e0ff0060053557dba5ee41bb9bf4d76
@@ -184,7 +184,11 @@ void QgsLayoutItemMapItemStack::moveItemUp( const QString &itemId )
{
return;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
mItems.swap( index, index + 1 );
#else
mItems.swapItemsAt( index, index + 1 );
#endif
}

void QgsLayoutItemMapItemStack::moveItemDown( const QString &itemId )
@@ -200,7 +204,11 @@ void QgsLayoutItemMapItemStack::moveItemDown( const QString &itemId )
{
return;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
mItems.swap( index, index - 1 );
#else
mItems.swapItemsAt( index, index - 1 );
#endif
}

QgsLayoutItemMapItem *QgsLayoutItemMapItemStack::item( const QString &itemId ) const
@@ -33,7 +33,7 @@ QgsValueMapConfigDlg::QgsValueMapConfigDlg( QgsVectorLayer *vl, int fieldIdx, QW

tableWidget->insertRow( 0 );

tableWidget->horizontalHeader()->setClickable( true );
tableWidget->horizontalHeader()->setSectionsClickable( true );
tableWidget->setSortingEnabled( true );

connect( addNullButton, &QAbstractButton::clicked, this, &QgsValueMapConfigDlg::addNullButtonPushed );
@@ -161,9 +161,9 @@ void QgsValueRelationWidgetWrapper::initWidget( QWidget *editor )
}
else if ( mTableWidget )
{
mTableWidget->horizontalHeader()->setResizeMode( QHeaderView::Stretch );
mTableWidget->horizontalHeader()->setSectionResizeMode( QHeaderView::Stretch );
mTableWidget->horizontalHeader()->setVisible( false );
mTableWidget->verticalHeader()->setResizeMode( QHeaderView::Stretch );
mTableWidget->verticalHeader()->setSectionResizeMode( QHeaderView::Stretch );
mTableWidget->verticalHeader()->setVisible( false );
mTableWidget->setShowGrid( false );
mTableWidget->setEditTriggers( QAbstractItemView::NoEditTriggers );
@@ -42,7 +42,7 @@ QgsFilterAlgorithmConfigurationWidget::QgsFilterAlgorithmConfigurationWidget( QW
mOutputExpressionWidget->setHorizontalHeaderItem( 0, new QTableWidgetItem( tr( "Output Name" ) ) );
mOutputExpressionWidget->setHorizontalHeaderItem( 1, new QTableWidgetItem( tr( "Filter Expression" ) ) );
mOutputExpressionWidget->setHorizontalHeaderItem( 2, new QTableWidgetItem( tr( "Final Output" ) ) );
mOutputExpressionWidget->horizontalHeader()->setResizeMode( 1, QHeaderView::Stretch );
mOutputExpressionWidget->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::Stretch );
QGridLayout *layout = new QGridLayout();
setLayout( layout );

0 comments on commit f5e1733

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