Skip to content

Commit

Permalink
Remove some QT_VERSION >= 5 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 30, 2016
1 parent 78134ee commit b72fb59
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
8 changes: 0 additions & 8 deletions src/core/auth/qgsauthconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions src/core/auth/qgsauthmethodregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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
{
Expand Down
12 changes: 0 additions & 12 deletions src/core/auth/qgsauthmethodregistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b72fb59

Please sign in to comment.