diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index a2dddf940576..2453cc51ed92 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -2379,7 +2379,11 @@ int QgisApp::chooseReasonableDefaultIconSize() const } else { +#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) double size = fontMetrics().width( QStringLiteral( "XXX" ) ); +#else + double size = fontMetrics().horizontalAdvance( 'X' ) * 3; +#endif if ( size < 24 ) return 16; else if ( size < 32 ) @@ -13625,7 +13629,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer ) mActionAddFeature->setToolTip( addFeatureText ); QgsGui::shortcutsManager()->unregisterAction( mActionAddFeature ); if ( !mActionAddFeature->text().isEmpty() ) // The text will be empty on unknown geometry type -> in this case do not create a shortcut - QgsGui::shortcutsManager()->registerAction( mActionAddFeature, mActionAddFeature->shortcut() ); + QgsGui::shortcutsManager()->registerAction( mActionAddFeature, mActionAddFeature->shortcut().toString() ); } else { diff --git a/src/core/auth/qgsauthmanager.cpp b/src/core/auth/qgsauthmanager.cpp index dc606387e071..d64049ead094 100644 --- a/src/core/auth/qgsauthmanager.cpp +++ b/src/core/auth/qgsauthmanager.cpp @@ -2567,7 +2567,10 @@ const QList QgsAuthManager::extraFileCAs() // only CAs or certs capable of signing other certs are allowed for ( const auto &cert : qgis::as_const( filecerts ) ) { - if ( !allowinvalid.toBool() && !cert.isValid() ) + if ( !allowinvalid.toBool() && ( cert.isBlacklisted() + || cert.isNull() + || cert.expiryDate() <= QDateTime::currentDateTime() + || cert.effectiveDate() > QDateTime::currentDateTime() ) ) { continue; } diff --git a/src/gui/auth/qgsauthauthoritieseditor.cpp b/src/gui/auth/qgsauthauthoritieseditor.cpp index 60f516a18109..c3b41179f7fd 100644 --- a/src/gui/auth/qgsauthauthoritieseditor.cpp +++ b/src/gui/auth/qgsauthauthoritieseditor.cpp @@ -287,7 +287,11 @@ void QgsAuthAuthoritiesEditor::appendCertsToItem( const QList & { policy = QgsAuthCertUtils::getCertTrustName( QgsAuthCertUtils::Trusted ); } - else if ( untrustedids.contains( id ) || !cert.isValid() ) + else if ( untrustedids.contains( id ) + || cert.isBlacklisted() + || cert.isNull() + || cert.expiryDate() <= QDateTime::currentDateTime() + || cert.effectiveDate() > QDateTime::currentDateTime() ) { policy = QgsAuthCertUtils::getCertTrustName( QgsAuthCertUtils::Untrusted ); } @@ -296,7 +300,10 @@ void QgsAuthAuthoritiesEditor::appendCertsToItem( const QList & QTreeWidgetItem *item( new QTreeWidgetItem( parent, coltxts, static_cast( catype ) ) ); item->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mIconCertificate.svg" ) ) ); - if ( !cert.isValid() ) + if ( cert.isBlacklisted() + || cert.isNull() + || cert.expiryDate() <= QDateTime::currentDateTime() + || cert.effectiveDate() > QDateTime::currentDateTime() ) { item->setForeground( 2, redb ); item->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mIconCertificateUntrusted.svg" ) ) ); @@ -305,7 +312,10 @@ void QgsAuthAuthoritiesEditor::appendCertsToItem( const QList & if ( trustedids.contains( id ) ) { item->setForeground( 3, greenb ); - if ( cert.isValid() ) + if ( !cert.isBlacklisted() + && !cert.isNull() + && cert.expiryDate() > QDateTime::currentDateTime() + && cert.effectiveDate() <= QDateTime::currentDateTime() ) { item->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mIconCertificateTrusted.svg" ) ) ); } diff --git a/src/plugins/geometry_checker/qgsgeometrycheckerfixsummarydialog.cpp b/src/plugins/geometry_checker/qgsgeometrycheckerfixsummarydialog.cpp index 05f49a5047de..cfb2791ff369 100644 --- a/src/plugins/geometry_checker/qgsgeometrycheckerfixsummarydialog.cpp +++ b/src/plugins/geometry_checker/qgsgeometrycheckerfixsummarydialog.cpp @@ -98,9 +98,9 @@ void QgsGeometryCheckerFixSummaryDialog::setupTable( QTableWidget *table ) { table->resizeColumnToContents( 0 ); table->resizeColumnToContents( 1 ); - table->horizontalHeader()->setResizeMode( 2, QHeaderView::Stretch ); - table->horizontalHeader()->setResizeMode( 3, QHeaderView::Stretch ); - table->horizontalHeader()->setResizeMode( 4, QHeaderView::Stretch ); + table->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::Stretch ); + table->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::Stretch ); + table->horizontalHeader()->setSectionResizeMode( 4, QHeaderView::Stretch ); table->setEditTriggers( QAbstractItemView::NoEditTriggers ); table->setSelectionBehavior( QAbstractItemView::SelectRows ); table->setSelectionMode( QAbstractItemView::SingleSelection );