Commit 64eb2488 authored by Dmitry Shachnev's avatar Dmitry Shachnev Committed by Boudewijn Rempt

Remove sip.setapi calls, they are not needed with PyQt5

PyQt4 used to support two APIs for several Qt classes (QString,
QVariant, etc):

- API v2 (default for Python 3) automatically converted these Qt classes
  to native Python classes.

- API v1 (default for Python 2) did not do any conversion, and exposed
  the Qt classes to Python instead.

PyQt5 always uses API v2 for any version of Python. The only exception
is QVariant, where it is possible to get a behavior similar to API v1,
but v2 is still the default.
parent 228fdde4
......@@ -88,21 +88,6 @@ namespace PyKrita
Python py = Python();
// NOTE: This code is not needed on Python 3.
// This might also fail if private sip module for PyQt5 is used,
// as required by newer PyQt5. It's fine since any exceptions
// in this script will be ignored.
"import sip\n"
"sip.setapi('QDate', 2)\n"
"sip.setapi('QTime', 2)\n"
"sip.setapi('QDateTime', 2)\n"
"sip.setapi('QUrl', 2)\n"
"sip.setapi('QTextStream', 2)\n"
"sip.setapi('QString', 2)\n"
"sip.setapi('QVariant', 2)\n"
// Initialize 'plugins' dict of module 'pykrita'
PyObject* plugins = PyDict_New();
py.itemStringSet("plugins", plugins);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment