Skip to content
Permalink
Browse files
Misc qt6 build fixes
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent b4903ae commit b3283f63c7f75d69634723f915a6d5ef4797e883
@@ -186,8 +186,12 @@ void QgsAuthSslImportDialog::secureConnect()
this, &QgsAuthSslImportDialog::socketDisconnected );
connect( mSocket, &QSslSocket::encrypted,
this, &QgsAuthSslImportDialog::socketEncrypted );
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
connect( mSocket, static_cast<void ( QAbstractSocket::* )( QAbstractSocket::SocketError )>( &QAbstractSocket::error ),
this, &QgsAuthSslImportDialog::socketError );
#else
connect( mSocket, &QAbstractSocket::errorOccurred, this, &QgsAuthSslImportDialog::socketError );
#endif
connect( mSocket, static_cast<void ( QSslSocket::* )( const QList<QSslError> & )>( &QSslSocket::sslErrors ),
this, &QgsAuthSslImportDialog::sslErrors );
connect( mSocket, &QIODevice::readyRead,
@@ -108,7 +108,11 @@ void QgsDateTimeEdit::mousePressEvent( QMouseEvent *event )
if ( calendarPopup() )
{
QStyleOptionComboBox optCombo;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
optCombo.init( this );
#else
optCombo.initFrom( this );
#endif
optCombo.editable = true;
optCombo.subControls = QStyle::SC_All;
control = style()->hitTestComplexControl( QStyle::CC_ComboBox, &optCombo, event->pos(), this );
@@ -184,7 +188,9 @@ void QgsDateTimeEdit::wheelEvent( QWheelEvent *event )
// dateTime might have been set to minimum in calendar mode
if ( mAllowNull && mIsNull )
{
resetBeforeChange( -event->delta() );
// convert angleDelta to approximate wheel "steps" -- angleDelta is in 1/8 degrees, and according
// to Qt docs most mice step in 15 degree increments
resetBeforeChange( -event->angleDelta().y() / ( 15 * 8 ) );
}
QDateTimeEdit::wheelEvent( event );
}
@@ -75,7 +75,7 @@ QgsExternalResourceConfigDlg::QgsExternalResourceConfigDlg( QgsVectorLayer *vl,
connect( mUseLink, &QGroupBox::toggled, this, &QgsEditorConfigWidget::changed );
connect( mFullUrl, &QAbstractButton::toggled, this, &QgsEditorConfigWidget::changed );
connect( mRootPath, &QLineEdit::textChanged, this, &QgsEditorConfigWidget::changed );
connect( mStorageButtonGroup, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsEditorConfigWidget::changed );
connect( mStorageButtonGroup, qOverload<QAbstractButton *>( &QButtonGroup::buttonClicked ), this, &QgsEditorConfigWidget::changed );
connect( mRelativeGroupBox, &QGroupBox::toggled, this, &QgsEditorConfigWidget::changed );
connect( mDocumentViewerGroupBox, &QGroupBox::toggled, this, &QgsEditorConfigWidget::changed );
connect( mDocumentViewerContentComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, [ = ]( int idx )
@@ -312,7 +312,7 @@ void QgsJsonEditWidget::refreshTreeViewItem( QTreeWidgetItem *treeWidgetItem, co
mTreeWidget->setItemWidget( treeWidgetItem, static_cast<int>( TreeWidgetColumn::Value ), label );

mClickableLinkList.append( jsonValueString );
mCodeEditorJson->SendScintilla( QsciScintillaBase::SCI_SETINDICATORVALUE, mClickableLinkList.size() );
mCodeEditorJson->SendScintilla( QsciScintillaBase::SCI_SETINDICATORVALUE, static_cast< int >( mClickableLinkList.size() ) );
mCodeEditorJson->SendScintilla( QsciScintillaBase::SCI_INDICATORFILLRANGE,
mCodeEditorJson->text().indexOf( jsonValueString ),
jsonValueString.size() );
@@ -1252,7 +1252,11 @@ void QgsLayoutView::wheelZoom( QWheelEvent *event )
QgsRectangle visibleRect = QgsRectangle( mapToScene( viewportRect ).boundingRect() );

//transform the mouse pos to scene coordinates
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QPointF scenePoint = mapToScene( event->pos() );
#else
QPointF scenePoint = mapToScene( event->position().x(), event->position().y() );
#endif

//adjust view center
QgsPointXY oldCenter( visibleRect.center() );

0 comments on commit b3283f6

Please sign in to comment.