Skip to content
Permalink
Browse files
Remove setting PyQt API versions
PyQt5 dropped multiple API support.
  • Loading branch information
cjmayo authored and nyalldawson committed Nov 10, 2021
1 parent 1bb212e commit bcab5f0ed822bd86fe4f0af1f26a51ddc691cd10
Showing with 0 additions and 18 deletions.
  1. +0 −18 src/python/qgspythonutilsimpl.cpp
@@ -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." ) ) )

0 comments on commit bcab5f0

Please sign in to comment.