Skip to content

Commit

Permalink
switch bindings to pyqt wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 21, 2016
1 parent f413046 commit 271750f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
6 changes: 1 addition & 5 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

import sip

for api in ["QDate", "QDateTime", "QString", "QTextStream", "QTime", "QUrl", "QVariant"]:
sip.setapi(api, 2)

from PyQt import QtCore
from qgis.core import QgsFeature, QgsGeometry


Expand Down
2 changes: 2 additions & 0 deletions python/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from PyQt import QtCore

from qgis._analysis import *
7 changes: 1 addition & 6 deletions python/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

try:
import sip
sip.setapi("QVariant", 2)
except:
pass
from PyQt.QtCore import QCoreApplication, QPyNullVariant, NULL

import inspect
import string
from qgis._core import *
from PyQt.QtCore import QCoreApplication, QPyNullVariant, NULL


def register_function(function, arg_count, group, usesgeometry=False, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions python/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from PyQt import QtCore

from qgis._gui import *
2 changes: 2 additions & 0 deletions python/networkanalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from PyQt import QtCore

from qgis._networkanalysis import *
6 changes: 3 additions & 3 deletions python/qsci_apis/generate_console_pap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import sys
import os

from PyQt4.Qsci import QsciLexerPython, QsciAPIs
from PyQt4.QtGui import QApplication
from PyQt4.QtCore import QObject
from PyQt.Qsci import QsciLexerPython, QsciAPIs
from PyQt.QtWidgets import QApplication
from PyQt.QtCore import QObject


class PrepareAPIs(QObject):
Expand Down
4 changes: 3 additions & 1 deletion python/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from qgis._server import *
from PyQt import QtCore # NOQA

from qgis._server import * # NOQA
2 changes: 1 addition & 1 deletion python/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import glob
import traceback

from PyQt4.QtCore import QCoreApplication
from PyQt.QtCore import QCoreApplication
from qgis.core import QgsApplication, QgsMessageLog


Expand Down
4 changes: 2 additions & 2 deletions python/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"""

from PyQt4.QtCore import QCoreApplication, QLocale
from PyQt4.QtGui import QPushButton, QApplication
from PyQt.QtCore import QCoreApplication, QLocale
from PyQt.QtWidgets import QPushButton, QApplication
from qgis.core import QGis, QgsExpression, QgsMessageLog, qgsfunction, QgsMessageOutput
from qgis.gui import QgsMessageBar

Expand Down

0 comments on commit 271750f

Please sign in to comment.