Preferences/__init__.py

branch
maintenance
changeset 6319
df201b9fbad4
parent 6273
0daf79d65080
parent 6305
7652b925c25e
child 6395
613e37fabd96
--- a/Preferences/__init__.py	Tue May 01 12:04:30 2018 +0200
+++ b/Preferences/__init__.py	Sat Jun 02 12:44:41 2018 +0200
@@ -379,7 +379,6 @@
         "TabWidth": 4,
         "IndentWidth": 4,
         "IndentationGuides": True,
-        "UnifiedMargins": False,
         "LinenoMargin": True,
         "FoldingMargin": True,
         "FoldingStyle": 1,
@@ -431,6 +430,8 @@
         "AutoCompletionCacheSize": 100,
         "AutoCompletionCacheTime": 300,     # 5 minutes
         "AutoCompletionWatchdogTime": 3000,     # ms
+        "AutoCompletionMaxLines": 6,
+        "AutoCompletionMaxChars": 40,
         
         "CallTipsEnabled": False,
         "CallTipsVisible": 0,
@@ -490,6 +491,8 @@
         
         "MouseClickHandlersEnabled": True,
         
+        "ShowMarkerMapOnRight": True,
+        
         # All (most) lexers
         "AllFoldCompact": True,
         
@@ -844,6 +847,21 @@
             InterfacesBrowserFlag |
             OthersBrowserFlag |
             ProtocolsBrowserFlag),
+        "PySide2": (
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag |
+            ProtocolsBrowserFlag),
+        "PySide2C": (
+            SourcesBrowserFlag |
+            ResourcesBrowserFlag |
+            TranslationsBrowserFlag |
+            InterfacesBrowserFlag |
+            OthersBrowserFlag |
+            ProtocolsBrowserFlag),
     }
     
     # defaults for the project browser colour settings
@@ -869,6 +887,7 @@
         "PyQt4DocDir": "",
         "PyQt5DocDir": "",
         "PySideDocDir": "",
+        "PySide2DocDir": "",
         "EricDocDir": "",
         "SingleHelpWindow": True,
         "SaveGeometry": True,
@@ -1091,7 +1110,9 @@
         "DiskCacheSize": 50,        # 50 MB
         "SslExceptionsDB": "{}",    # empty JSON dictionary
         "DoNotTrack": False,
-        "SendReferer": True,
+        "RefererSendReferer": 2,        # send always
+        "RefererDefaultPolicy": 3,      # don't send a referer when downgrading
+        "RefererTrimmingPolicy": 0,     # send full URL (no trimming)
         "SendRefererWhitelist": ["qt-apps.org", "kde-apps.org"],
         "AcceptCookies": 2,         # CookieJar.AcceptOnlyFromSitesNavigatedTo
         "KeepCookiesUntil": 0,      # CookieJar.KeepUntilExpire
@@ -1630,6 +1651,11 @@
         dn.mkdir(".eric6")
     QCoreApplication.setOrganizationName(settingsNameOrganization)
     QCoreApplication.setApplicationName(settingsNameGlobal)
+    try:
+        Prefs.settings.setAtomicSyncRequired(False)
+    except AttributeError:
+        # backward compatibility fot Qt < 5.10
+        pass
     
     # Avoid nasty behavior of QSettings in combination with Py2
     Prefs.settings.value("UI/SingleApplicationMode")
@@ -1983,13 +2009,13 @@
         else:
             return prefClass.uiDefaults[key]
     elif key in "ViewProfiles2":
-        profiles = prefClass.settings.value("UI/ViewProfiles2")
-        if profiles is None:
+        profilesStr = prefClass.settings.value("UI/ViewProfiles2")
+        if profilesStr is None:
             # use the defaults
             viewProfiles = prefClass.uiDefaults["ViewProfiles2"]
         else:
             viewProfiles = {}
-            profiles = json.loads(profiles)
+            profiles = json.loads(profilesStr)
             for name in ["edit", "debug"]:
                 viewProfiles[name] = [
                     QByteArray.fromBase64(profiles[name][0].encode("utf-8")),
@@ -2128,7 +2154,8 @@
                  "CaretWidth", "AutoCompletionSource",
                  "AutoCompletionThreshold", "AutoCompletionTimeout",
                  "AutoCompletionCacheSize", "AutoCompletionCacheTime",
-                 "AutoCompletionWatchdogTime", "CallTipsVisible",
+                 "AutoCompletionWatchdogTime", "AutoCompletionMaxLines",
+                 "AutoCompletionMaxChars", "CallTipsVisible",
                  "CallTipsStyle", "MarkOccurrencesTimeout",
                  "AutoSpellCheckChunkSize", "SpellCheckingMinWordSize",
                  "PostScriptLevel", "EOLMode", "ZoomFactor", "WhitespaceSize",
@@ -2992,6 +3019,8 @@
                  "DiskCacheSize", "AcceptCookies", "KeepCookiesUntil",
                  "AdBlockUpdatePeriod", "TabManagerGroupByType",
                  "SessionAutoSaveInterval", "NewTabBehavior",
+                 "RefererSendReferer", "RefererDefaultPolicy",
+                 "RefererTrimmingPolicy",
                  ]:
         return int(prefClass.settings.value(
             "WebBrowser/" + key, prefClass.webBrowserDefaults[key]))
@@ -3008,7 +3037,7 @@
                  "SyncPasswords", "SyncUserAgents", "SyncSpeedDial",
                  "SyncEncryptData", "SyncEncryptPasswordsOnly",
                  "ShowPreview", "WebInspectorEnabled", "DiskCacheEnabled",
-                 "DoNotTrack", "SendReferer", "FilterTrackingCookies",
+                 "DoNotTrack", "FilterTrackingCookies",
                  "AdBlockEnabled", "AdBlockUseLimitedEasyList",
                  "PluginsEnabled", "FullScreenSupportEnabled",
                  "AutoScrollEnabled", "ScreenCaptureEnabled",
@@ -3882,4 +3911,4 @@
 initRecentSettings()
 
 #
-# eflag: noqa = M613
+# eflag: noqa = M201, M613

eric ide

mercurial