Skip to content

Commit

Permalink
Remove setting PyQt API versions
Browse files Browse the repository at this point in the history
PyQt5 dropped multiple API support.
  • Loading branch information
cjmayo authored and nyalldawson committed Nov 10, 2021
1 parent 1bb212e commit bcab5f0
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -110,24 +110,6 @@ bool QgsPythonUtilsImpl::checkSystemImports()
return false;
}

// set PyQt api versions
for ( const QString &clsName :
{
QStringLiteral( "QDate" ),
QStringLiteral( "QDateTime" ),
QStringLiteral( "QString" ),
QStringLiteral( "QTextStream" ),
QStringLiteral( "QTime" ),
QStringLiteral( "QUrl" ),
QStringLiteral( "QVariant" )
} )
{
if ( !runString( QStringLiteral( "sip.setapi('%1', 2)" ).arg( clsName ),
QObject::tr( "Couldn't set SIP API versions." ) + '\n' + QObject::tr( "Python support will be disabled." ) ) )
{
return false;
}
}
// import Qt bindings
if ( !runString( QStringLiteral( "from PyQt5 import QtCore, QtGui" ),
QObject::tr( "Couldn't load PyQt." ) + '\n' + QObject::tr( "Python support will be disabled." ) ) )
Expand Down

0 comments on commit bcab5f0

Please sign in to comment.