Skip to content

Commit

Permalink
Fix use of deprecated Qt API
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 25, 2021
1 parent eaacde8 commit 54e4597
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/gui/processing/qgsprocessingdxflayerswidgetwrapper.cpp
Expand Up @@ -179,7 +179,6 @@ QgsProcessingDxfLayersWidget::QgsProcessingDxfLayersWidget( QWidget *parent )
: QWidget( parent )
{
QHBoxLayout *hl = new QHBoxLayout();
hl->setMargin( 0 );
hl->setContentsMargins( 0, 0, 0, 0 );

mLineEdit = new QLineEdit();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgsbackgroundcachedfeatureiterator.cpp
Expand Up @@ -60,7 +60,7 @@ void QgsFeatureDownloaderProgressDialog::resizeEvent( QResizeEvent *ev )
QRect rect = geometry();
QRect cancelRect = mCancel->geometry();
QRect hideRect = mHide->geometry();
int mtb = style()->pixelMetric( QStyle::PM_DefaultTopLevelMargin );
int mtb = style()->pixelMetric( QStyle::PM_LayoutRightMargin );
int mlr = std::min( width() / 10, mtb );
if ( rect.width() - cancelRect.x() - cancelRect.width() > mlr )
{
Expand Down
5 changes: 5 additions & 0 deletions src/providers/wfs/qgswfscapabilities.cpp
Expand Up @@ -576,8 +576,13 @@ void QgsWfsCapabilities::capabilitiesReplyFinished()
QDomElement upperCorner = WGS84BoundingBox.firstChildElement( QStringLiteral( "UpperCorner" ) );
if ( !lowerCorner.isNull() && !upperCorner.isNull() )
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList lowerCornerList = lowerCorner.text().split( QStringLiteral( " " ), QString::SkipEmptyParts );
QStringList upperCornerList = upperCorner.text().split( QStringLiteral( " " ), QString::SkipEmptyParts );
#else
QStringList lowerCornerList = lowerCorner.text().split( QStringLiteral( " " ), Qt::SkipEmptyParts );
QStringList upperCornerList = upperCorner.text().split( QStringLiteral( " " ), Qt::SkipEmptyParts );
#endif
if ( lowerCornerList.size() == 2 && upperCornerList.size() == 2 )
{
featureType.bbox = QgsRectangle(
Expand Down

0 comments on commit 54e4597

Please sign in to comment.