[pyzo] 48/68: Fix import errors for some Qt5 components.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Sep 28 09:47:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository pyzo.

commit 48b686dc018de70a8c470158f8a5599e24a78d01
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Sep 23 10:50:23 2016 +0100

    Fix import errors for some Qt5 components.
---
 pyzo/codeeditor/extensions/autocompletion.py | 6 +++---
 pyzo/core/assistant.py                       | 2 +-
 pyzo/tools/pyzoHistoryViewer.py              | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pyzo/codeeditor/extensions/autocompletion.py b/pyzo/codeeditor/extensions/autocompletion.py
index 37881a4..7e0a9b3 100644
--- a/pyzo/codeeditor/extensions/autocompletion.py
+++ b/pyzo/codeeditor/extensions/autocompletion.py
@@ -15,21 +15,21 @@ Qt = QtCore.Qt
 import keyword
 
 #TODO: use this CompletionListModel to style the completion suggestions (class names, method names, keywords etc)
-class CompletionListModel(QtWidgets.QStringListModel):
+class CompletionListModel(QtCore.QStringListModel):
     def data(self, index, role):
         if role == Qt.ForegroundRole:
             # data = str(QtWidgets.QStringListModel.data(self, index, QtCore.Qt.DisplayRole))
             # return QtGui.QBrush(Qt.red)
             return None
         else:
-            return QtWidgets.QStringListModel.data(self, index, role)
+            return QtCore.QStringListModel.data(self, index, role)
 
 # todo: use keywords from the parser
 class AutoCompletion(object):
     def __init__(self,*args, **kwds):
         super(AutoCompletion, self).__init__(*args, **kwds)
         # Autocompleter
-        self.__completerModel = QtWidgets.QStringListModel(keyword.kwlist)
+        self.__completerModel = QtCore.QStringListModel(keyword.kwlist)
         self.__completer = QtWidgets.QCompleter(self)
         self.__completer.setModel(self.__completerModel)
         self.__completer.setCaseSensitivity(Qt.CaseInsensitive)
diff --git a/pyzo/core/assistant.py b/pyzo/core/assistant.py
index 8a339ec..3f025fd 100644
--- a/pyzo/core/assistant.py
+++ b/pyzo/core/assistant.py
@@ -63,7 +63,7 @@ class Settings(QtWidgets.QWidget):
         layout2.addWidget(add_button)
         layout2.addWidget(del_button)
         layout.addLayout(layout2)
-        self._model = QtWidgets.QStringListModel()
+        self._model = QtCore.QStringListModel()
         self._view.setModel(self._model)
 
         self._model.setStringList(self._engine.registeredDocumentations())
diff --git a/pyzo/tools/pyzoHistoryViewer.py b/pyzo/tools/pyzoHistoryViewer.py
index 875f164..793afd9 100644
--- a/pyzo/tools/pyzoHistoryViewer.py
+++ b/pyzo/tools/pyzoHistoryViewer.py
@@ -98,7 +98,7 @@ class PyzoHistoryViewer(HistoryViewer):
         self.setModel(pyzo.shells.sharedHistory)
         
 
-class History(QtWidgets.QStringListModel):
+class History(QtCore.QStringListModel):
     markerPrefix = None # Text to prepend to the marker, or None for no marker
     maxLines = 100 # Only enforced upon loading
     def __init__(self, fname):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyzo.git



More information about the debian-science-commits mailing list