From 1c7fab56c3e44a645e82bc46480d3eee889402f9 Mon Sep 17 00:00:00 2001 From: Withalion Date: Tue, 19 Nov 2024 13:23:42 +0100 Subject: [PATCH] Fix code to best practices --- src/app/3d/qgs3ddebugwidget.cpp | 8 ++++---- src/ui/3d/3ddebugwidget.ui | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/app/3d/qgs3ddebugwidget.cpp b/src/app/3d/qgs3ddebugwidget.cpp index 6c94b0331359..12c24687d203 100644 --- a/src/app/3d/qgs3ddebugwidget.cpp +++ b/src/app/3d/qgs3ddebugwidget.cpp @@ -88,11 +88,11 @@ void Qgs3DDebugWidget::setMapSettings( Qgs3DMapSettings *mapSettings ) { mMap->setDebugShadowMapSettings( enabled && mMap->shadowSettings().renderShadows(), static_cast( mDebugShadowMapCornerComboBox->currentIndex() ), mDebugShadowMapSizeSpinBox->value() ); } ); - connect( mDebugShadowMapCornerComboBox, QOverload::of( &QComboBox::currentIndexChanged ), this, [ = ]( const int index ) + connect( mDebugShadowMapCornerComboBox, qOverload( &QComboBox::currentIndexChanged ), this, [ = ]( const int index ) { mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked() && mMap->shadowSettings().renderShadows(), static_cast( index ), mDebugShadowMapSizeSpinBox->value() ); } ); - connect( mDebugShadowMapSizeSpinBox, QOverload::of( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value ) + connect( mDebugShadowMapSizeSpinBox, qOverload( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value ) { mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked() && mMap->shadowSettings().renderShadows(), static_cast( mDebugShadowMapCornerComboBox->currentIndex() ), value ); } ); @@ -104,11 +104,11 @@ void Qgs3DDebugWidget::setMapSettings( Qgs3DMapSettings *mapSettings ) { mMap->setDebugDepthMapSettings( enabled, static_cast( mDebugDepthMapCornerComboBox->currentIndex() ), mDebugDepthMapSizeSpinBox->value() ); } ); - connect( mDebugDepthMapCornerComboBox, QOverload::of( &QComboBox::currentIndexChanged ), this, [ = ]( const int index ) + connect( mDebugDepthMapCornerComboBox, qOverload( &QComboBox::currentIndexChanged ), this, [ = ]( const int index ) { mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast( index ), mDebugDepthMapSizeSpinBox->value() ); } ); - connect( mDebugDepthMapSizeSpinBox, QOverload::of( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value ) + connect( mDebugDepthMapSizeSpinBox, qOverload( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value ) { mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast( mDebugDepthMapCornerComboBox->currentIndex() ), value ); } ); diff --git a/src/ui/3d/3ddebugwidget.ui b/src/ui/3d/3ddebugwidget.ui index 6cff85971522..345f9c05b108 100644 --- a/src/ui/3d/3ddebugwidget.ui +++ b/src/ui/3d/3ddebugwidget.ui @@ -24,7 +24,7 @@ QLayout::SetDefaultConstraint - + 0 @@ -44,7 +44,7 @@ 0 - -295 + 0 250 790 @@ -356,6 +356,12 @@ QDoubleSpinBox
qgsdoublespinbox.h
+ + QgsScrollArea + QScrollArea +
qgsscrollarea.h
+ 1 +