--- a/eric6/WebBrowser/Session/SessionManager.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/WebBrowser/Session/SessionManager.py Tue Mar 02 17:17:09 2021 +0100 @@ -308,7 +308,7 @@ return sessionFilesInfoList = QDir(self.getSessionsDirectory()).entryInfoList( - ["*.json"], QDir.Files, QDir.Time) + ["*.json"], QDir.Filter.Files, QDir.SortFlag.Time) for sessionFileInfo in sessionFilesInfoList: sessionData = self.readSessionFromFile( @@ -495,7 +495,7 @@ WebBrowserWindow.getWindow(), title, self.tr("Please enter a new name:"), - QLineEdit.Normal, + QLineEdit.EchoMode.Normal, suggestedName) if not ok: @@ -543,7 +543,7 @@ WebBrowserWindow.getWindow(), self.tr("Save Session"), self.tr("Please enter a name for the session:"), - QLineEdit.Normal, + QLineEdit.EchoMode.Normal, self.tr("Saved Session ({0})").format( QDateTime.currentDateTime().toString("yyyy-MM-dd HH-mm-ss"))) @@ -632,7 +632,7 @@ WebBrowserWindow.getWindow(), self.tr("New Session"), self.tr("Please enter a name for the new session:"), - QLineEdit.Normal, + QLineEdit.EchoMode.Normal, self.tr("New Session ({0})").format( QDateTime.currentDateTime().toString("yyyy-MM-dd HH-mm-ss"))) @@ -687,11 +687,13 @@ if self.__sessionMetaData: # skip, if no session file available dlg = QDialog(WebBrowserWindow.getWindow(), - Qt.WindowStaysOnTopHint) + Qt.WindowType.WindowStaysOnTopHint) lbl = QLabel(self.tr("Please select the startup session:")) combo = QComboBox(dlg) buttonBox = QDialogButtonBox( - QDialogButtonBox.Ok | QDialogButtonBox.Cancel, dlg) + QDialogButtonBox.StandardButton.Ok | + QDialogButtonBox.StandardButton.Cancel, + dlg) buttonBox.accepted.connect(dlg.accept) buttonBox.rejected.connect(dlg.reject) @@ -714,7 +716,7 @@ ) combo.setCurrentIndex(0) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: session = combo.currentData() if session is None: self.__lastActiveSession = self.__sessionDefault