@@ -774,7 +774,7 @@ const QString QgsAuthManager::uniqueConfigId() const
774774 QTimer::singleShot ( 3 , &loop, SLOT ( quit () ) );
775775 loop.exec ();
776776
777- uint seed = ( uint ) QTime::currentTime ().msec ();
777+ uint seed = static_cast < uint >( QTime::currentTime ().msec () );
778778 qsrand ( seed );
779779
780780 while ( true )
@@ -2463,7 +2463,7 @@ bool QgsAuthManager::storeCertTrustPolicy( const QSslCertificate &cert, QgsAuthC
24632463 " VALUES (:id, :policy)" ).arg ( authDbTrustTable () ) );
24642464
24652465 query.bindValue ( " :id" , id );
2466- query.bindValue ( " :policy" , ( int ) policy );
2466+ query.bindValue ( " :policy" , static_cast < int >( policy ) );
24672467
24682468 if ( !authDbStartTransaction () )
24692469 return false ;
@@ -2502,7 +2502,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::getCertTrustPolicy( const QSsl
25022502 {
25032503 if ( query.first () )
25042504 {
2505- policy = ( QgsAuthCertUtils::CertTrustPolicy ) query.value ( 0 ).toInt ();
2505+ policy = static_cast < QgsAuthCertUtils::CertTrustPolicy >( query.value ( 0 ).toInt () );
25062506 QgsDebugMsg ( QString ( " Authentication cert trust policy retrieved for id: %1" ).arg ( id ) );
25072507 }
25082508 if ( query.next () )
@@ -2591,7 +2591,7 @@ bool QgsAuthManager::setDefaultCertTrustPolicy( QgsAuthCertUtils::CertTrustPolic
25912591 // set default trust policy to Trusted by removing setting
25922592 return removeAuthSetting ( " certdefaulttrust" );
25932593 }
2594- return storeAuthSetting ( " certdefaulttrust" , ( int ) policy );
2594+ return storeAuthSetting ( " certdefaulttrust" , static_cast < int >( policy ) );
25952595}
25962596
25972597QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy ()
@@ -2601,7 +2601,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy()
26012601 {
26022602 return QgsAuthCertUtils::Trusted;
26032603 }
2604- return ( QgsAuthCertUtils::CertTrustPolicy ) policy.toInt ();
2604+ return static_cast < QgsAuthCertUtils::CertTrustPolicy >( policy.toInt () );
26052605}
26062606
26072607bool QgsAuthManager::rebuildCertTrustCache ()
@@ -2622,7 +2622,7 @@ bool QgsAuthManager::rebuildCertTrustCache()
26222622 while ( query.next () )
26232623 {
26242624 QString id = query.value ( 0 ).toString ();
2625- QgsAuthCertUtils::CertTrustPolicy policy = ( QgsAuthCertUtils::CertTrustPolicy ) query.value ( 1 ).toInt ();
2625+ QgsAuthCertUtils::CertTrustPolicy policy = static_cast < QgsAuthCertUtils::CertTrustPolicy >( query.value ( 1 ).toInt () );
26262626
26272627 QStringList ids;
26282628 if ( mCertTrustCache .contains ( policy ) )
0 commit comments