diff -r e01ae92db699 -r 31965986ecd1 eric6/ViewManager/ViewManager.py --- a/eric6/ViewManager/ViewManager.py Sat Mar 06 10:00:52 2021 +0100 +++ b/eric6/ViewManager/ViewManager.py Sun Mar 28 15:00:11 2021 +0200 @@ -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 @@ -1445,7 +1446,11 @@ #################################################################### self.esm = QSignalMapper(self) - self.esm.mapped[int].connect(self.__editorCommand) + try: + self.alignMapper.mappedInt.connect(self.__editorCommand) + except AttributeError: + # pre Qt 5.15 + self.esm.mapped[int].connect(self.__editorCommand) self.editorActGrp = createActionGroup(self.editActGrp) @@ -3309,7 +3314,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 +5240,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 +5628,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 +5732,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 +5830,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 +5838,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 +6240,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: