Skip to content
Permalink
Browse files

Remove some QT_VERSION >= 5 checks

  • Loading branch information
nyalldawson committed Dec 30, 2016
1 parent 78134ee commit b72fb598b225f5bff7bb65e0203316631aacddb4
Showing with 0 additions and 40 deletions.
  1. +0 −8 src/core/auth/qgsauthconfig.cpp
  2. +0 −20 src/core/auth/qgsauthmethodregistry.cpp
  3. +0 −12 src/core/auth/qgsauthmethodregistry.h
@@ -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<QSslError> QgsAuthConfigSslServer::sslIgnoredErrors() const
@@ -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
{
@@ -76,25 +76,13 @@ 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
@return pointer to function or nullptr on error
*/
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;

0 comments on commit b72fb59

Please sign in to comment.
You can’t perform that action at this time.