From b72fb598b225f5bff7bb65e0203316631aacddb4 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 30 Dec 2016 12:33:37 +1000 Subject: [PATCH] Remove some QT_VERSION >= 5 checks --- src/core/auth/qgsauthconfig.cpp | 8 -------- src/core/auth/qgsauthmethodregistry.cpp | 20 -------------------- src/core/auth/qgsauthmethodregistry.h | 12 ------------ 3 files changed, 40 deletions(-) diff --git a/src/core/auth/qgsauthconfig.cpp b/src/core/auth/qgsauthconfig.cpp index 6c7d2704ff99..b3ab2272db00 100644 --- a/src/core/auth/qgsauthconfig.cpp +++ b/src/core/auth/qgsauthconfig.cpp @@ -357,18 +357,10 @@ QgsAuthConfigSslServer::QgsAuthConfigSslServer() , mVersion( 1 ) { // TODO: figure out if Qt 5 has changed yet again, e.g. TLS-only -#if QT_VERSION >= 0x040800 mQtVersion = 480; // Qt 4.8 defaults to SecureProtocols, i.e. TlsV1SslV3 // http://qt-project.org/doc/qt-4.8/qssl.html#SslProtocol-enum mSslProtocol = QSsl::SecureProtocols; -#else - mQtVersion = 470; - // older Qt 4.7 defaults to now-vulnerable SSLv3 - // http://qt-project.org/doc/qt-4.7/qssl.html - // Default this to TlsV1 instead - mSslProtocol = QSsl::TlsV1; -#endif } const QList QgsAuthConfigSslServer::sslIgnoredErrors() const diff --git a/src/core/auth/qgsauthmethodregistry.cpp b/src/core/auth/qgsauthmethodregistry.cpp index 62bc0381ea46..2c80fa567260 100644 --- a/src/core/auth/qgsauthmethodregistry.cpp +++ b/src/core/auth/qgsauthmethodregistry.cpp @@ -324,7 +324,6 @@ QWidget *QgsAuthMethodRegistry::editWidget( const QString &authMethodKey, QWidge return editFactory( parent ); } -#if QT_VERSION >= 0x050000 QFunctionPointer QgsAuthMethodRegistry::function( QString const & authMethodKey, QString const & functionName ) { @@ -342,25 +341,6 @@ QFunctionPointer QgsAuthMethodRegistry::function( QString const & authMethodKey, return 0; } } -#else -void *QgsAuthMethodRegistry::function( QString const & authMethodKey, - QString const & functionName ) -{ - QLibrary myLib( library( authMethodKey ) ); - - QgsDebugMsg( "Library name is " + myLib.fileName() ); - - if ( myLib.load() ) - { - return myLib.resolve( functionName.toLatin1().data() ); - } - else - { - QgsDebugMsg( "Cannot load library: " + myLib.errorString() ); - return nullptr; - } -} -#endif QLibrary *QgsAuthMethodRegistry::authMethodLibrary( const QString &authMethodKey ) const { diff --git a/src/core/auth/qgsauthmethodregistry.h b/src/core/auth/qgsauthmethodregistry.h index 1b6054efdb49..08defa6dd75a 100644 --- a/src/core/auth/qgsauthmethodregistry.h +++ b/src/core/auth/qgsauthmethodregistry.h @@ -76,8 +76,6 @@ class CORE_EXPORT QgsAuthMethodRegistry */ QWidget *editWidget( const QString & authMethodKey, QWidget * parent = nullptr ); -#if QT_VERSION >= 0x050000 - /** Get pointer to auth method function @param authMethodKey identificator of the auth method @param functionName name of function @@ -85,16 +83,6 @@ class CORE_EXPORT QgsAuthMethodRegistry */ QFunctionPointer function( const QString & authMethodKey, const QString & functionName ); -#else - - /** Get pointer to auth method function - @param authMethodKey identificator of the auth method - @param functionName name of function - @return pointer to function or nullptr on error - */ - void *function( const QString & authMethodKey, - const QString & functionName ); -#endif //! Return the library object associated with an auth method key QLibrary *authMethodLibrary( const QString & authMethodKey ) const;