diff -r c4b5f3393d63 -r c1af2e327675 eric6/Preferences/ConfigurationDialog.py --- a/eric6/Preferences/ConfigurationDialog.py Tue Sep 24 18:45:33 2019 +0200 +++ b/eric6/Preferences/ConfigurationDialog.py Tue Sep 24 18:46:24 2019 +0200 @@ -13,9 +13,11 @@ from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect from PyQt5.QtGui import QPixmap -from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \ - QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \ - QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel +from PyQt5.QtWidgets import ( + QSizePolicy, QSpacerItem, QWidget, QTreeWidget, QStackedWidget, QDialog, + QSplitter, QScrollArea, QApplication, QDialogButtonBox, QFrame, + QVBoxLayout, QTreeWidgetItem, QLabel +) from E5Gui.E5Application import e5App from E5Gui.E5LineEdit import E5ClearableLineEdit @@ -575,8 +577,10 @@ QDialogButtonBox.Apply | QDialogButtonBox.Cancel | QDialogButtonBox.Ok | QDialogButtonBox.Reset) self.buttonBox.setObjectName("buttonBox") - if not self.fromEric and \ - self.displayMode == ConfigurationWidget.DefaultMode: + if ( + not self.fromEric and + self.displayMode == ConfigurationWidget.DefaultMode + ): self.buttonBox.button(QDialogButtonBox.Apply).hide() self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False) @@ -619,8 +623,11 @@ for index in range(parent.childCount()): itm = parent.child(index) if itm.childCount() > 0: - enable = self.__searchChildItems(itm, text) or \ - text == "" or text in itm.text(0).lower() + enable = ( + self.__searchChildItems(itm, text) or + text == "" or + text in itm.text(0).lower() + ) else: enable = text == "" or text in itm.text(0).lower() if enable: @@ -634,8 +641,9 @@ Private method to initialize the dictionary of preferences lexers. """ import QScintilla.Lexers - from .PreferencesLexer import PreferencesLexer, \ - PreferencesLexerLanguageError + from .PreferencesLexer import ( + PreferencesLexer, PreferencesLexerLanguageError + ) self.lexers = {} for language in QScintilla.Lexers.getSupportedLanguages(): @@ -880,8 +888,10 @@ @return flag indicating the use of QtWebEngine @rtype bool """ - return self.__webEngine or \ + return ( + self.__webEngine or self.displayMode == ConfigurationWidget.WebBrowserMode + ) class ConfigurationDialog(QDialog):