eric6/ViewManager/ViewManager.py

changeset 8143
2c730d5fd177
parent 8129
52c76e6cb35b
child 8150
fc1ae39af8c9
--- a/eric6/ViewManager/ViewManager.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/ViewManager/ViewManager.py	Tue Mar 02 17:17:09 2021 +0100
@@ -485,16 +485,17 @@
         """
         Public method to get the orientation of the split view.
         
-        @return orientation of the split (Qt.Horizontal or Qt.Vertical)
-        """
-        return Qt.Vertical
+        @return orientation of the split (Qt.Orientation.Horizontal or
+            Qt.Orientation.Vertical)
+        """
+        return Qt.Orientation.Vertical
         
     def setSplitOrientation(self, orientation):
         """
         Public method used to set the orientation of the split view.
         
         @param orientation orientation of the split
-            (Qt.Horizontal or Qt.Vertical)
+            (Qt.Orientation.Horizontal or Qt.Orientation.Vertical)
         """
         pass
         
@@ -3309,7 +3310,8 @@
         tb.addAction(self.gotoLastEditAct)
         
         tb.setAllowedAreas(
-            Qt.ToolBarAreas(Qt.TopToolBarArea | Qt.BottomToolBarArea))
+            Qt.ToolBarAreas(Qt.ToolBarArea.TopToolBarArea |
+                            Qt.ToolBarArea.BottomToolBarArea))
         
         toolbarManager.addToolBar(tb, tb.windowTitle())
         toolbarManager.addAction(self.gotoAct, tb.windowTitle())
@@ -5234,7 +5236,7 @@
         """
         from .BookmarkedFilesDialog import BookmarkedFilesDialog
         dlg = BookmarkedFilesDialog(self.bookmarked, self.ui)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             self.bookmarked = dlg.getBookmarkedFiles()
         
     def __clearBookmarked(self):
@@ -5622,7 +5624,7 @@
         lines = aw.lines()
         curLine = aw.getCursorPosition()[0] + 1
         dlg = GotoDialog(lines, curLine, self.ui, None, True)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             aw.gotoLine(dlg.getLinenumber(), expand=True)
         
     def __gotoBrace(self):
@@ -5726,7 +5728,7 @@
         if aw:
             from QScintilla.ZoomDialog import ZoomDialog
             dlg = ZoomDialog(aw.getZoom(), self.ui, None, True)
-            if dlg.exec() == QDialog.Accepted:
+            if dlg.exec() == QDialog.DialogCode.Accepted:
                 value = dlg.getZoomSize()
                 self.__zoomTo(value)
         
@@ -5824,7 +5826,7 @@
             (boolean). True means splitting horizontally.
         """
         if checked:
-            self.setSplitOrientation(Qt.Horizontal)
+            self.setSplitOrientation(Qt.Orientation.Horizontal)
             self.splitViewAct.setIcon(
                 UI.PixmapCache.getIcon("splitHorizontal"))
             self.splitRemoveAct.setIcon(
@@ -5832,7 +5834,7 @@
             self.newDocumentSplitViewAct.setIcon(
                 UI.PixmapCache.getIcon("splitHorizontal"))
         else:
-            self.setSplitOrientation(Qt.Vertical)
+            self.setSplitOrientation(Qt.Orientation.Vertical)
             self.splitViewAct.setIcon(
                 UI.PixmapCache.getIcon("splitVertical"))
             self.splitRemoveAct.setIcon(
@@ -6234,7 +6236,7 @@
                 QCoreApplication.translate('ViewManager', "Editing {0}")
                 .format(fileInfo),
                 self.ui)
-            if dlg.exec() == QDialog.Accepted:
+            if dlg.exec() == QDialog.DialogCode.Accepted:
                 data = dlg.getData()
                 try:
                     with open(dictionaryFile, "w", encoding="utf-8") as f:

eric ide

mercurial