Fix build with QT < 5.13

This commit is contained in:
Alessandro Pasotti 2020-03-18 15:31:05 +01:00 committed by Nyall Dawson
parent e1044d87f1
commit 6b514e0cd2

View File

@ -274,7 +274,11 @@ bool QgsFieldMappingModel::moveUpOrDown( const QModelIndex &index, bool up )
return false;
}
beginMoveRows( QModelIndex( ), row, row, QModelIndex(), row + 2 );
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
mMapping.swap( row, row + 1 );
#else
mMapping.swapItemsAt( row, row + 1 );
#endif
endMoveRows();
return true;
}