Added the '--settings=' command line switch to store the settings files in a non-standard directory.

Sat, 01 Aug 2015 13:41:33 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Aug 2015 13:41:33 +0200
changeset 4343
afe0da217745
parent 4341
1ff0929aab09
child 4344
d096b2c767d8

Added the '--settings=' command line switch to store the settings files in a non-standard directory.

APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Globals.compatibility_fixes.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Tools.TrayStarter.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Utilities.compatibility_fixes.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.eric6_tray.html file | annotate | diff | comparison | revisions
Documentation/Source/index-eric6.Globals.html file | annotate | diff | comparison | revisions
Documentation/Source/index-eric6.Utilities.html file | annotate | diff | comparison | revisions
Globals/__init__.py file | annotate | diff | comparison | revisions
Globals/compatibility_fixes.py file | annotate | diff | comparison | revisions
Tools/TrayStarter.py file | annotate | diff | comparison | revisions
Utilities/compatibility_fixes.py file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
eric6.py file | annotate | diff | comparison | revisions
eric6_api.py file | annotate | diff | comparison | revisions
eric6_compare.py file | annotate | diff | comparison | revisions
eric6_configure.py file | annotate | diff | comparison | revisions
eric6_diff.py file | annotate | diff | comparison | revisions
eric6_doc.py file | annotate | diff | comparison | revisions
eric6_editor.py file | annotate | diff | comparison | revisions
eric6_iconeditor.py file | annotate | diff | comparison | revisions
eric6_plugininstall.py file | annotate | diff | comparison | revisions
eric6_pluginrepository.py file | annotate | diff | comparison | revisions
eric6_pluginuninstall.py file | annotate | diff | comparison | revisions
eric6_qregexp.py file | annotate | diff | comparison | revisions
eric6_qregularexpression.py file | annotate | diff | comparison | revisions
eric6_re.py file | annotate | diff | comparison | revisions
eric6_snap.py file | annotate | diff | comparison | revisions
eric6_sqlbrowser.py file | annotate | diff | comparison | revisions
eric6_tray.py file | annotate | diff | comparison | revisions
eric6_trpreviewer.py file | annotate | diff | comparison | revisions
eric6_uipreviewer.py file | annotate | diff | comparison | revisions
eric6_unittest.py file | annotate | diff | comparison | revisions
eric6_webbrowser.py file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric6.api	Tue Jul 28 19:19:23 2015 +0200
+++ b/APIs/Python3/eric6.api	Sat Aug 01 13:41:33 2015 +0200
@@ -1849,6 +1849,14 @@
 eric6.E5XML.XMLStreamWriterBase.XMLStreamWriterBase?1(device)
 eric6.Globals.AppInfo.makeAppInfo?4(argv, name, arg, description, options=[])
 eric6.Globals.checkBlacklistedVersions?4()
+eric6.Globals.compatibility_fixes.File.fp?7
+eric6.Globals.compatibility_fixes.File.next?4()
+eric6.Globals.compatibility_fixes.File.read?4(n=-1)
+eric6.Globals.compatibility_fixes.File.readline?4(limit=-1)
+eric6.Globals.compatibility_fixes.File.readlines?4(hint=-1)
+eric6.Globals.compatibility_fixes.File.write?4(txt)
+eric6.Globals.compatibility_fixes.File?1(filein, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
+eric6.Globals.compatibility_fixes.open?4(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
 eric6.Globals.configDir?7
 eric6.Globals.findPythonInterpreters?4(pyVersion)
 eric6.Globals.getConfigDir?4()
@@ -8096,7 +8104,7 @@
 eric6.Tools.TRSingleApplication.TRSingleApplicationServer.loadTranslation?7
 eric6.Tools.TRSingleApplication.TRSingleApplicationServer?1(parent)
 eric6.Tools.TrayStarter.TrayStarter.preferencesChanged?4()
-eric6.Tools.TrayStarter.TrayStarter?1(usePyQt4)
+eric6.Tools.TrayStarter.TrayStarter?1(usePyQt4, settingsDir)
 eric6.Tools.UIPreviewer.UIPreviewer.eventFilter?4(obj, ev)
 eric6.Tools.UIPreviewer.UIPreviewer.show?4()
 eric6.Tools.UIPreviewer.UIPreviewer?1(filename=None, parent=None, name=None)
@@ -8779,14 +8787,6 @@
 eric6.Utilities.codingBytes_regexps?7
 eric6.Utilities.coding_regexps?7
 eric6.Utilities.compactPath?4(path, width, measure=len)
-eric6.Utilities.compatibility_fixes.File.fp?7
-eric6.Utilities.compatibility_fixes.File.next?4()
-eric6.Utilities.compatibility_fixes.File.read?4(n=-1)
-eric6.Utilities.compatibility_fixes.File.readline?4(limit=-1)
-eric6.Utilities.compatibility_fixes.File.readlines?4(hint=-1)
-eric6.Utilities.compatibility_fixes.File.write?4(txt)
-eric6.Utilities.compatibility_fixes.File?1(filein, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
-eric6.Utilities.compatibility_fixes.open?4(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
 eric6.Utilities.configDir?7
 eric6.Utilities.convertLineEnds?4(text, eol)
 eric6.Utilities.crypto.CryptoMarker?7
@@ -9217,6 +9217,7 @@
 eric6.eric6_sqlbrowser.createMainWidget?4(argv)
 eric6.eric6_sqlbrowser.main?4()
 eric6.eric6_tray.PyQt4Option?7
+eric6.eric6_tray.SettingsDir?7
 eric6.eric6_tray.createMainWidget?4(argv)
 eric6.eric6_tray.main?4()
 eric6.eric6_trpreviewer.createMainWidget?4(argv)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Tue Jul 28 19:19:23 2015 +0200
+++ b/Documentation/Help/source.qhp	Sat Aug 01 13:41:33 2015 +0200
@@ -193,6 +193,7 @@
           <section title="eric6.Globals" ref="index-eric6.Globals.html">
             <section title="eric6.Globals.AppInfo" ref="eric6.Globals.AppInfo.html" />
             <section title="eric6.Globals.__init__" ref="eric6.Globals.__init__.html" />
+            <section title="eric6.Globals.compatibility_fixes" ref="eric6.Globals.compatibility_fixes.html" />
           </section>
           <section title="eric6.Graphics" ref="index-eric6.Graphics.html">
             <section title="eric6.Graphics.ApplicationDiagramBuilder" ref="eric6.Graphics.ApplicationDiagramBuilder.html" />
@@ -1017,7 +1018,6 @@
             <section title="eric6.Utilities.PySideImporter" ref="eric6.Utilities.PySideImporter.html" />
             <section title="eric6.Utilities.__init__" ref="eric6.Utilities.__init__.html" />
             <section title="eric6.Utilities.binplistlib" ref="eric6.Utilities.binplistlib.html" />
-            <section title="eric6.Utilities.compatibility_fixes" ref="eric6.Utilities.compatibility_fixes.html" />
             <section title="eric6.Utilities.uic" ref="eric6.Utilities.uic.html" />
           </section>
           <section title="eric6.VCS" ref="index-eric6.VCS.html">
@@ -4941,13 +4941,13 @@
       <keyword name="FetchProjectHelper.initActions" id="FetchProjectHelper.initActions" ref="eric6.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.initActions" />
       <keyword name="FetchProjectHelper.initMenu" id="FetchProjectHelper.initMenu" ref="eric6.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.initMenu" />
       <keyword name="FetchProjectHelper.menuTitle" id="FetchProjectHelper.menuTitle" ref="eric6.Plugins.VcsPlugins.vcsMercurial.FetchExtension.ProjectHelper.html#FetchProjectHelper.menuTitle" />
-      <keyword name="File" id="File" ref="eric6.Utilities.compatibility_fixes.html#File" />
-      <keyword name="File (Constructor)" id="File (Constructor)" ref="eric6.Utilities.compatibility_fixes.html#File.__init__" />
-      <keyword name="File.next" id="File.next" ref="eric6.Utilities.compatibility_fixes.html#File.next" />
-      <keyword name="File.read" id="File.read" ref="eric6.Utilities.compatibility_fixes.html#File.read" />
-      <keyword name="File.readline" id="File.readline" ref="eric6.Utilities.compatibility_fixes.html#File.readline" />
-      <keyword name="File.readlines" id="File.readlines" ref="eric6.Utilities.compatibility_fixes.html#File.readlines" />
-      <keyword name="File.write" id="File.write" ref="eric6.Utilities.compatibility_fixes.html#File.write" />
+      <keyword name="File" id="File" ref="eric6.Globals.compatibility_fixes.html#File" />
+      <keyword name="File (Constructor)" id="File (Constructor)" ref="eric6.Globals.compatibility_fixes.html#File.__init__" />
+      <keyword name="File.next" id="File.next" ref="eric6.Globals.compatibility_fixes.html#File.next" />
+      <keyword name="File.read" id="File.read" ref="eric6.Globals.compatibility_fixes.html#File.read" />
+      <keyword name="File.readline" id="File.readline" ref="eric6.Globals.compatibility_fixes.html#File.readline" />
+      <keyword name="File.readlines" id="File.readlines" ref="eric6.Globals.compatibility_fixes.html#File.readlines" />
+      <keyword name="File.write" id="File.write" ref="eric6.Globals.compatibility_fixes.html#File.write" />
       <keyword name="FileAccessHandler" id="FileAccessHandler" ref="eric6.Helpviewer.Network.FileAccessHandler.html#FileAccessHandler" />
       <keyword name="FileAccessHandler (Constructor)" id="FileAccessHandler (Constructor)" ref="eric6.Helpviewer.Network.FileAccessHandler.html#FileAccessHandler.__init__" />
       <keyword name="FileAccessHandler (Module)" id="FileAccessHandler (Module)" ref="eric6.Helpviewer.Network.FileAccessHandler.html" />
@@ -13202,7 +13202,7 @@
       <keyword name="comparison_negative" id="comparison_negative" ref="eric6.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#comparison_negative" />
       <keyword name="comparison_to_singleton" id="comparison_to_singleton" ref="eric6.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#comparison_to_singleton" />
       <keyword name="comparison_type" id="comparison_type" ref="eric6.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#comparison_type" />
-      <keyword name="compatibility_fixes (Module)" id="compatibility_fixes (Module)" ref="eric6.Utilities.compatibility_fixes.html" />
+      <keyword name="compatibility_fixes (Module)" id="compatibility_fixes (Module)" ref="eric6.Globals.compatibility_fixes.html" />
       <keyword name="compileUiDir" id="compileUiDir" ref="eric6.Utilities.uic.html#compileUiDir" />
       <keyword name="compileUiDir" id="compileUiDir" ref="eric6.compileUiFiles.html#compileUiDir" />
       <keyword name="compileUiDir" id="compileUiDir" ref="eric6.install.html#compileUiDir" />
@@ -13630,7 +13630,7 @@
       <keyword name="normcasepath" id="normcasepath" ref="eric6.Utilities.__init__.html#normcasepath" />
       <keyword name="normjoinpath" id="normjoinpath" ref="eric6.Utilities.__init__.html#normjoinpath" />
       <keyword name="okToClearData" id="okToClearData" ref="eric6.E5Gui.E5MessageBox.html#okToClearData" />
-      <keyword name="open" id="open" ref="eric6.Utilities.compatibility_fixes.html#open" />
+      <keyword name="open" id="open" ref="eric6.Globals.compatibility_fixes.html#open" />
       <keyword name="parseContentDisposition" id="parseContentDisposition" ref="eric6.Helpviewer.HelpUtilities.html#parseContentDisposition" />
       <keyword name="parseEnvironmentString" id="parseEnvironmentString" ref="eric6.Utilities.__init__.html#parseEnvironmentString" />
       <keyword name="parseOptionString" id="parseOptionString" ref="eric6.Utilities.__init__.html#parseOptionString" />
@@ -14011,6 +14011,7 @@
       <file>eric6.E5XML.XMLStreamWriterBase.html</file>
       <file>eric6.Globals.AppInfo.html</file>
       <file>eric6.Globals.__init__.html</file>
+      <file>eric6.Globals.compatibility_fixes.html</file>
       <file>eric6.Graphics.ApplicationDiagramBuilder.html</file>
       <file>eric6.Graphics.AssociationItem.html</file>
       <file>eric6.Graphics.ClassItem.html</file>
@@ -14656,7 +14657,6 @@
       <file>eric6.Utilities.PySideImporter.html</file>
       <file>eric6.Utilities.__init__.html</file>
       <file>eric6.Utilities.binplistlib.html</file>
-      <file>eric6.Utilities.compatibility_fixes.html</file>
       <file>eric6.Utilities.crypto.__init__.html</file>
       <file>eric6.Utilities.crypto.py3AES.html</file>
       <file>eric6.Utilities.crypto.py3PBKDF2.html</file>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric6.Globals.compatibility_fixes.html	Sat Aug 01 13:41:33 2015 +0200
@@ -0,0 +1,230 @@
+<!DOCTYPE html>
+<html><head>
+<title>eric6.Globals.compatibility_fixes</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric6.Globals.compatibility_fixes</h1>
+<p>
+Module implementing the open behavior of Python3 for use with Eric6.
+</p><p>
+The Eric6 used features are emulated only. The not emulated features
+should throw a NotImplementedError exception.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#File">File</a></td>
+<td></td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr>
+<td><a href="#open">open</a></td>
+<td>Replacement for the build in open function.</td>
+</tr>
+</table>
+<hr /><hr />
+<a NAME="File" ID="File"></a>
+<h2>File</h2>
+
+<h3>Derived from</h3>
+file
+<h3>Class Attributes</h3>
+<table>
+<tr><td>fp</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#File.__init__">File</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#File.next">next</a></td>
+<td>Public method used in an iterator.</td>
+</tr><tr>
+<td><a href="#File.read">read</a></td>
+<td>Public method to read n bytes or all if n=-1 from file.</td>
+</tr><tr>
+<td><a href="#File.readline">readline</a></td>
+<td>Public method to read one line from file.</td>
+</tr><tr>
+<td><a href="#File.readlines">readlines</a></td>
+<td>Public method to read all lines from file.</td>
+</tr><tr>
+<td><a href="#File.write">write</a></td>
+<td>Public method to write given data to file and encode if needed.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="File.__init__" ID="File.__init__"></a>
+<h4>File (Constructor)</h4>
+<b>File</b>(<i>filein, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True</i>)
+<p>
+        Constructor
+</p><p>
+        It checks for unimplemented parameters.
+</p><dl>
+<dt><i>filein</i></dt>
+<dd>
+filename or file descriptor (string)
+</dd><dt><i>mode=</i></dt>
+<dd>
+access mode (string)
+</dd><dt><i>buffering=</i></dt>
+<dd>
+size of the read buffer (string)
+</dd><dt><i>encoding=</i></dt>
+<dd>
+character encoding for reading/ writing (string)
+</dd><dt><i>errors=</i></dt>
+<dd>
+behavior for the character encoding ('strict',
+            'explicit', ...) (string)
+</dd><dt><i>newline=</i></dt>
+<dd>
+controls how universal newlines works (string)
+</dd><dt><i>closefd=</i></dt>
+<dd>
+close underlying file descriptor if given as file
+            parameter (boolean)
+</dd>
+</dl><dl>
+<dt>Raises <b>NotImplementedError</b>:</dt>
+<dd>
+for not implemented method parameters
+</dd>
+</dl><a NAME="File.next" ID="File.next"></a>
+<h4>File.next</h4>
+<b>next</b>(<i></i>)
+<p>
+        Public method used in an iterator.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+decoded data read
+</dd>
+</dl><a NAME="File.read" ID="File.read"></a>
+<h4>File.read</h4>
+<b>read</b>(<i>n=-1</i>)
+<p>
+        Public method to read n bytes or all if n=-1 from file.
+</p><dl>
+<dt><i>n=</i></dt>
+<dd>
+bytecount or all if n=-1 (int)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+decoded bytes read
+</dd>
+</dl><a NAME="File.readline" ID="File.readline"></a>
+<h4>File.readline</h4>
+<b>readline</b>(<i>limit=-1</i>)
+<p>
+        Public method to read one line from file.
+</p><dl>
+<dt><i>limit=</i></dt>
+<dd>
+maximum bytes to read or all if limit=-1 (int)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+decoded line read
+</dd>
+</dl><a NAME="File.readlines" ID="File.readlines"></a>
+<h4>File.readlines</h4>
+<b>readlines</b>(<i>hint=-1</i>)
+<p>
+        Public method to read all lines from file.
+</p><dl>
+<dt><i>hint=</i></dt>
+<dd>
+maximum bytes to read or all if hint=-1 (int)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+decoded lines read
+</dd>
+</dl><a NAME="File.write" ID="File.write"></a>
+<h4>File.write</h4>
+<b>write</b>(<i>txt</i>)
+<p>
+        Public method to write given data to file and encode if needed.
+</p><dl>
+<dt><i>txt</i></dt>
+<dd>
+data to write. (str, bytes)
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr /><hr />
+<a NAME="open" ID="open"></a>
+<h2>open</h2>
+<b>open</b>(<i>file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True</i>)
+<p>
+    Replacement for the build in open function.
+</p><dl>
+<dt><i>file</i></dt>
+<dd>
+filename or file descriptor (string)
+</dd><dt><i>mode=</i></dt>
+<dd>
+access mode (string)
+</dd><dt><i>buffering=</i></dt>
+<dd>
+size of the read buffer (string)
+</dd><dt><i>encoding=</i></dt>
+<dd>
+character encoding for reading/ writing (string)
+</dd><dt><i>errors=</i></dt>
+<dd>
+behavior for the character encoding ('strict',
+        'explicit', ...) (string)
+</dd><dt><i>newline=</i></dt>
+<dd>
+controls how universal newlines works (string)
+</dd><dt><i>closefd=</i></dt>
+<dd>
+close underlying file descriptor if given as file
+        parameter (boolean)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+Returns the new file object
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric6.Tools.TrayStarter.html	Tue Jul 28 19:19:23 2015 +0200
+++ b/Documentation/Source/eric6.Tools.TrayStarter.html	Sat Aug 01 13:41:33 2015 +0200
@@ -157,13 +157,16 @@
 </table>
 <a NAME="TrayStarter.__init__" ID="TrayStarter.__init__"></a>
 <h4>TrayStarter (Constructor)</h4>
-<b>TrayStarter</b>(<i>usePyQt4</i>)
+<b>TrayStarter</b>(<i>usePyQt4, settingsDir</i>)
 <p>
         Constructor
 </p><dl>
-<dt><i>usePyQt4</i></dt>
+<dt><i>usePyQt4</i> (bool)</dt>
 <dd>
-flag indicating to use PyQt4 (boolean)
+flag indicating to use PyQt4
+</dd><dt><i>settingsDir</i> (str)</dt>
+<dd>
+directory to be used for the settings files
 </dd>
 </dl><a NAME="TrayStarter.__about" ID="TrayStarter.__about"></a>
 <h4>TrayStarter.__about</h4>
--- a/Documentation/Source/eric6.Utilities.compatibility_fixes.html	Tue Jul 28 19:19:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<title>eric6.Utilities.compatibility_fixes</title>
-<meta charset="UTF-8">
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric6.Utilities.compatibility_fixes</h1>
-<p>
-Module implementing the open behavior of Python3 for use with Eric6.
-</p><p>
-The Eric6 used features are emulated only. The not emulated features
-should throw a NotImplementedError exception.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#File">File</a></td>
-<td></td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr>
-<td><a href="#open">open</a></td>
-<td>Replacement for the build in open function.</td>
-</tr>
-</table>
-<hr /><hr />
-<a NAME="File" ID="File"></a>
-<h2>File</h2>
-
-<h3>Derived from</h3>
-file
-<h3>Class Attributes</h3>
-<table>
-<tr><td>fp</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#File.__init__">File</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#File.next">next</a></td>
-<td>Public method used in an iterator.</td>
-</tr><tr>
-<td><a href="#File.read">read</a></td>
-<td>Public method to read n bytes or all if n=-1 from file.</td>
-</tr><tr>
-<td><a href="#File.readline">readline</a></td>
-<td>Public method to read one line from file.</td>
-</tr><tr>
-<td><a href="#File.readlines">readlines</a></td>
-<td>Public method to read all lines from file.</td>
-</tr><tr>
-<td><a href="#File.write">write</a></td>
-<td>Public method to write given data to file and encode if needed.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<a NAME="File.__init__" ID="File.__init__"></a>
-<h4>File (Constructor)</h4>
-<b>File</b>(<i>filein, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True</i>)
-<p>
-        Constructor
-</p><p>
-        It checks for unimplemented parameters.
-</p><dl>
-<dt><i>filein</i></dt>
-<dd>
-filename or file descriptor (string)
-</dd><dt><i>mode=</i></dt>
-<dd>
-access mode (string)
-</dd><dt><i>buffering=</i></dt>
-<dd>
-size of the read buffer (string)
-</dd><dt><i>encoding=</i></dt>
-<dd>
-character encoding for reading/ writing (string)
-</dd><dt><i>errors=</i></dt>
-<dd>
-behavior for the character encoding ('strict',
-            'explicit', ...) (string)
-</dd><dt><i>newline=</i></dt>
-<dd>
-controls how universal newlines works (string)
-</dd><dt><i>closefd=</i></dt>
-<dd>
-close underlying file descriptor if given as file
-            parameter (boolean)
-</dd>
-</dl><dl>
-<dt>Raises <b>NotImplementedError</b>:</dt>
-<dd>
-for not implemented method parameters
-</dd>
-</dl><a NAME="File.next" ID="File.next"></a>
-<h4>File.next</h4>
-<b>next</b>(<i></i>)
-<p>
-        Public method used in an iterator.
-</p><dl>
-<dt>Returns:</dt>
-<dd>
-decoded data read
-</dd>
-</dl><a NAME="File.read" ID="File.read"></a>
-<h4>File.read</h4>
-<b>read</b>(<i>n=-1</i>)
-<p>
-        Public method to read n bytes or all if n=-1 from file.
-</p><dl>
-<dt><i>n=</i></dt>
-<dd>
-bytecount or all if n=-1 (int)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-decoded bytes read
-</dd>
-</dl><a NAME="File.readline" ID="File.readline"></a>
-<h4>File.readline</h4>
-<b>readline</b>(<i>limit=-1</i>)
-<p>
-        Public method to read one line from file.
-</p><dl>
-<dt><i>limit=</i></dt>
-<dd>
-maximum bytes to read or all if limit=-1 (int)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-decoded line read
-</dd>
-</dl><a NAME="File.readlines" ID="File.readlines"></a>
-<h4>File.readlines</h4>
-<b>readlines</b>(<i>hint=-1</i>)
-<p>
-        Public method to read all lines from file.
-</p><dl>
-<dt><i>hint=</i></dt>
-<dd>
-maximum bytes to read or all if hint=-1 (int)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-decoded lines read
-</dd>
-</dl><a NAME="File.write" ID="File.write"></a>
-<h4>File.write</h4>
-<b>write</b>(<i>txt</i>)
-<p>
-        Public method to write given data to file and encode if needed.
-</p><dl>
-<dt><i>txt</i></dt>
-<dd>
-data to write. (str, bytes)
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr /><hr />
-<a NAME="open" ID="open"></a>
-<h2>open</h2>
-<b>open</b>(<i>file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True</i>)
-<p>
-    Replacement for the build in open function.
-</p><dl>
-<dt><i>file</i></dt>
-<dd>
-filename or file descriptor (string)
-</dd><dt><i>mode=</i></dt>
-<dd>
-access mode (string)
-</dd><dt><i>buffering=</i></dt>
-<dd>
-size of the read buffer (string)
-</dd><dt><i>encoding=</i></dt>
-<dd>
-character encoding for reading/ writing (string)
-</dd><dt><i>errors=</i></dt>
-<dd>
-behavior for the character encoding ('strict',
-        'explicit', ...) (string)
-</dd><dt><i>newline=</i></dt>
-<dd>
-controls how universal newlines works (string)
-</dd><dt><i>closefd=</i></dt>
-<dd>
-close underlying file descriptor if given as file
-        parameter (boolean)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-Returns the new file object
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric6.eric6_tray.html	Tue Jul 28 19:19:23 2015 +0200
+++ b/Documentation/Source/eric6.eric6_tray.html	Sat Aug 01 13:41:33 2015 +0200
@@ -29,7 +29,7 @@
 </p>
 <h3>Global Attributes</h3>
 <table>
-<tr><td>PyQt4Option</td></tr>
+<tr><td>PyQt4Option</td></tr><tr><td>SettingsDir</td></tr>
 </table>
 <h3>Classes</h3>
 <table>
--- a/Documentation/Source/index-eric6.Globals.html	Tue Jul 28 19:19:23 2015 +0200
+++ b/Documentation/Source/index-eric6.Globals.html	Sat Aug 01 13:41:33 2015 +0200
@@ -33,6 +33,9 @@
 </tr><tr>
 <td><a href="eric6.Globals.__init__.html">Globals</a></td>
 <td>Module defining common data to be used by all modules.</td>
+</tr><tr>
+<td><a href="eric6.Globals.compatibility_fixes.html">compatibility_fixes</a></td>
+<td>Module implementing the open behavior of Python3 for use with Eric6.</td>
 </tr>
 </table>
 </body></html>
\ No newline at end of file
--- a/Documentation/Source/index-eric6.Utilities.html	Tue Jul 28 19:19:23 2015 +0200
+++ b/Documentation/Source/index-eric6.Utilities.html	Sat Aug 01 13:41:33 2015 +0200
@@ -71,9 +71,6 @@
 <td><a href="eric6.Utilities.binplistlib.html">binplistlib</a></td>
 <td>Module implementing a library for reading and writing binary property list files.</td>
 </tr><tr>
-<td><a href="eric6.Utilities.compatibility_fixes.html">compatibility_fixes</a></td>
-<td>Module implementing the open behavior of Python3 for use with Eric6.</td>
-</tr><tr>
 <td><a href="eric6.Utilities.uic.html">uic</a></td>
 <td>Module implementing a function to compile all user interface files of a directory or directory tree.</td>
 </tr>
--- a/Globals/__init__.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/Globals/__init__.py	Sat Aug 01 13:41:33 2015 +0200
@@ -7,6 +7,10 @@
 Module defining common data to be used by all modules.
 """
 
+#
+# Note: Do not import any eric stuff in here!!!!!!!
+#
+
 from __future__ import unicode_literals
 
 import sys
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Globals/compatibility_fixes.py	Sat Aug 01 13:41:33 2015 +0200
@@ -0,0 +1,154 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2013 - 2013 Tobias Rzepka <tobias.rzepka@gmail.com>
+#
+
+"""
+Module implementing the open behavior of Python3 for use with Eric6.
+
+The Eric6 used features are emulated only. The not emulated features
+should throw a NotImplementedError exception.
+"""
+
+import __builtin__
+import codecs
+
+
+def open(file, mode='r', buffering=-1, encoding=None,
+         errors=None, newline=None, closefd=True):
+    """
+    Replacement for the build in open function.
+    
+    @param file filename or file descriptor (string)
+    @keyparam mode access mode (string)
+    @keyparam buffering size of the read buffer (string)
+    @keyparam encoding character encoding for reading/ writing (string)
+    @keyparam errors behavior for the character encoding ('strict',
+        'explicit', ...) (string)
+    @keyparam newline controls how universal newlines works (string)
+    @keyparam closefd close underlying file descriptor if given as file
+        parameter (boolean)
+    @return Returns the new file object
+    """
+    return File(file, mode, buffering, encoding, errors, newline, closefd)
+
+
+class File(file):   # __IGNORE_WARNING__
+    """
+    Facade for the original file class.
+    """
+    def __init__(self, filein, mode='r', buffering=-1,
+                 encoding=None, errors=None, newline=None, closefd=True):
+        """
+        Constructor
+        
+        It checks for unimplemented parameters.
+        
+        @param filein filename or file descriptor (string)
+        @keyparam mode access mode (string)
+        @keyparam buffering size of the read buffer (string)
+        @keyparam encoding character encoding for reading/ writing (string)
+        @keyparam errors behavior for the character encoding ('strict',
+            'explicit', ...) (string)
+        @keyparam newline controls how universal newlines works (string)
+        @keyparam closefd close underlying file descriptor if given as file
+            parameter (boolean)
+        @exception NotImplementedError for not implemented method parameters
+        """
+        self.__encoding = encoding
+        self.__newline = str(newline)
+        self.__closefd = closefd
+        if newline is not None:
+            if 'r' in mode:
+                raise NotImplementedError
+            else:
+                mode = mode.replace('t', 'b')
+                if 'b' not in mode:
+                    mode = mode + 'b'
+
+        if closefd is False:
+            raise NotImplementedError
+
+        if errors is None:
+            self.__errors = 'strict'
+        else:
+            self.__errors = errors
+
+        file.__init__(self, filein, mode, buffering)    # __IGNORE_WARNING__
+
+    def read(self, n=-1):
+        """
+        Public method to read n bytes or all if n=-1 from file.
+        
+        @keyparam n bytecount or all if n=-1 (int)
+        @return decoded bytes read
+        """
+        txt = super(File, self).read(n)
+        if self.__encoding is None:
+            return txt
+        else:
+            return codecs.decode(txt, self.__encoding)
+
+    def readline(self, limit=-1):
+        """
+        Public method to read one line from file.
+        
+        @keyparam limit maximum bytes to read or all if limit=-1 (int)
+        @return decoded line read
+        """
+        txt = super(File, self).readline(limit)
+        if self.__encoding is None:
+            return txt
+        else:
+            return codecs.decode(txt, self.__encoding)
+
+    def readlines(self, hint=-1):
+        """
+        Public method to read all lines from file.
+        
+        @keyparam hint maximum bytes to read or all if hint=-1 (int)
+        @return decoded lines read
+        """
+        if self.__encoding is None:
+            return super(File, self).readlines(hint)
+        else:
+            return [codecs.decode(txt, self.__encoding)
+                    for txt in super(File, self).readlines(hint)]
+
+    def write(self, txt):
+        """
+        Public method to write given data to file and encode if needed.
+        
+        @param txt data to write. (str, bytes)
+        """
+        if self.__encoding is not None:
+            txt = codecs.encode(txt, self.__encoding, self.__errors)
+
+        if self.__newline in ['\r\n', '\r']:
+            txt = txt.replace('\n', self.__newline)
+
+        super(File, self).write(txt)
+
+    def next(self):
+        """
+        Public method used in an iterator.
+        
+        @return decoded data read
+        """
+        txt = super(File, self).next()
+        if self.__encoding is None:
+            return txt
+        else:
+            return codecs.decode(txt, self.__encoding)
+
+# Inject into the __builtin__ dictionary
+__builtin__.open = open
+
+if __name__ == '__main__':
+    fp = open('compatibility_fixes.py', encoding='latin1')
+    print(fp.read())
+    fp.close()
+
+    with open('compatibility_fixes.py', encoding='UTF-8') as fp:
+        rlines = fp.readlines()
+        print(rlines[-1])
--- a/Tools/TrayStarter.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/Tools/TrayStarter.py	Sat Aug 01 13:41:33 2015 +0200
@@ -31,17 +31,21 @@
     """
     Class implementing a starter for the system tray.
     """
-    def __init__(self, usePyQt4):
+    def __init__(self, usePyQt4, settingsDir):
         """
         Constructor
         
-        @param usePyQt4 flag indicating to use PyQt4 (boolean)
+        @param usePyQt4 flag indicating to use PyQt4
+        @type bool
+        @param settingsDir directory to be used for the settings files
+        @type str
         """
         super(TrayStarter, self).__init__(
             UI.PixmapCache.getIcon(
                 Preferences.getTrayStarter("TrayStarterIcon")))
         
         self.usePyQt4 = usePyQt4
+        self.settingsDir = settingsDir
         
         self.maxMenuFilePathLen = 75
         
@@ -240,6 +244,9 @@
         args.append(applPath)
         if self.usePyQt4:
             args.append("--pyqt4")
+        args.append("--config={0}".format(Utilities.getConfigDir()))
+        if self.settingsDir:
+            args.append("--settings={0}".format(self.settingsDir))
         for arg in applArgs:
             args.append(arg)
         
@@ -258,120 +265,103 @@
         """
         Private slot to start the eric6 Mini Editor.
         """
-        self.__startProc("eric6_editor.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_editor.py")
     
     def __startEric(self):
         """
         Private slot to start the eric6 IDE.
         """
-        self.__startProc("eric6.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6.py")
 
     def __startPreferences(self):
         """
         Private slot to start the eric6 configuration dialog.
         """
-        self.__startProc("eric6_configure.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_configure.py")
 
     def __startPluginInstall(self):
         """
         Private slot to start the eric6 plugin installation dialog.
         """
-        self.__startProc("eric6_plugininstall.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_plugininstall.py")
 
     def __startPluginUninstall(self):
         """
         Private slot to start the eric6 plugin uninstallation dialog.
         """
-        self.__startProc("eric6_pluginuninstall.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_pluginuninstall.py")
 
     def __startPluginRepository(self):
         """
         Private slot to start the eric6 plugin repository dialog.
         """
-        self.__startProc("eric6_pluginrepository.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_pluginrepository.py")
 
     def __startHelpViewer(self):
         """
         Private slot to start the eric6 web browser.
         """
-        self.__startProc("eric6_webbrowser.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_webbrowser.py")
 
     def __startUIPreviewer(self):
         """
         Private slot to start the eric6 UI previewer.
         """
-        self.__startProc("eric6_uipreviewer.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_uipreviewer.py")
 
     def __startTRPreviewer(self):
         """
         Private slot to start the eric6 translations previewer.
         """
-        self.__startProc("eric6_trpreviewer.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_trpreviewer.py")
 
     def __startUnittest(self):
         """
         Private slot to start the eric6 unittest dialog.
         """
-        self.__startProc("eric6_unittest.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_unittest.py")
 
     def __startDiff(self):
         """
         Private slot to start the eric6 diff dialog.
         """
-        self.__startProc("eric6_diff.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_diff.py")
 
     def __startCompare(self):
         """
         Private slot to start the eric6 compare dialog.
         """
-        self.__startProc("eric6_compare.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_compare.py")
     
     def __startSqlBrowser(self):
         """
         Private slot to start the eric6 sql browser dialog.
         """
-        self.__startProc("eric6_sqlbrowser.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_sqlbrowser.py")
 
     def __startIconEditor(self):
         """
         Private slot to start the eric6 icon editor dialog.
         """
-        self.__startProc("eric6_iconeditor.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_iconeditor.py")
 
     def __startSnapshot(self):
         """
         Private slot to start the eric6 snapshot dialog.
         """
-        self.__startProc("eric6_snap.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_snap.py")
 
     def __startQRegExp(self):
         """
         Private slot to start the eric6 QRegExp editor dialog.
         """
-        self.__startProc("eric6_qregexp.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_qregexp.py")
 
     def __startPyRe(self):
         """
         Private slot to start the eric6 Python re editor dialog.
         """
-        self.__startProc("eric6_re.py", "--config={0}".format(
-            Utilities.getConfigDir()))
+        self.__startProc("eric6_re.py")
 
     def __showRecentProjectsMenu(self):
         """
@@ -450,7 +440,6 @@
         if filename:
             self.__startProc(
                 "eric6.py",
-                "--config={0}".format(Utilities.getConfigDir()),
                 filename)
     
     def __showPreferences(self):
--- a/Utilities/compatibility_fixes.py	Tue Jul 28 19:19:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2013 - 2013 Tobias Rzepka <tobias.rzepka@gmail.com>
-#
-
-"""
-Module implementing the open behavior of Python3 for use with Eric6.
-
-The Eric6 used features are emulated only. The not emulated features
-should throw a NotImplementedError exception.
-"""
-
-import __builtin__
-import codecs
-
-
-def open(file, mode='r', buffering=-1, encoding=None,
-         errors=None, newline=None, closefd=True):
-    """
-    Replacement for the build in open function.
-    
-    @param file filename or file descriptor (string)
-    @keyparam mode access mode (string)
-    @keyparam buffering size of the read buffer (string)
-    @keyparam encoding character encoding for reading/ writing (string)
-    @keyparam errors behavior for the character encoding ('strict',
-        'explicit', ...) (string)
-    @keyparam newline controls how universal newlines works (string)
-    @keyparam closefd close underlying file descriptor if given as file
-        parameter (boolean)
-    @return Returns the new file object
-    """
-    return File(file, mode, buffering, encoding, errors, newline, closefd)
-
-
-class File(file):   # __IGNORE_WARNING__
-    """
-    Facade for the original file class.
-    """
-    def __init__(self, filein, mode='r', buffering=-1,
-                 encoding=None, errors=None, newline=None, closefd=True):
-        """
-        Constructor
-        
-        It checks for unimplemented parameters.
-        
-        @param filein filename or file descriptor (string)
-        @keyparam mode access mode (string)
-        @keyparam buffering size of the read buffer (string)
-        @keyparam encoding character encoding for reading/ writing (string)
-        @keyparam errors behavior for the character encoding ('strict',
-            'explicit', ...) (string)
-        @keyparam newline controls how universal newlines works (string)
-        @keyparam closefd close underlying file descriptor if given as file
-            parameter (boolean)
-        @exception NotImplementedError for not implemented method parameters
-        """
-        self.__encoding = encoding
-        self.__newline = str(newline)
-        self.__closefd = closefd
-        if newline is not None:
-            if 'r' in mode:
-                raise NotImplementedError
-            else:
-                mode = mode.replace('t', 'b')
-                if 'b' not in mode:
-                    mode = mode + 'b'
-
-        if closefd is False:
-            raise NotImplementedError
-
-        if errors is None:
-            self.__errors = 'strict'
-        else:
-            self.__errors = errors
-
-        file.__init__(self, filein, mode, buffering)    # __IGNORE_WARNING__
-
-    def read(self, n=-1):
-        """
-        Public method to read n bytes or all if n=-1 from file.
-        
-        @keyparam n bytecount or all if n=-1 (int)
-        @return decoded bytes read
-        """
-        txt = super(File, self).read(n)
-        if self.__encoding is None:
-            return txt
-        else:
-            return codecs.decode(txt, self.__encoding)
-
-    def readline(self, limit=-1):
-        """
-        Public method to read one line from file.
-        
-        @keyparam limit maximum bytes to read or all if limit=-1 (int)
-        @return decoded line read
-        """
-        txt = super(File, self).readline(limit)
-        if self.__encoding is None:
-            return txt
-        else:
-            return codecs.decode(txt, self.__encoding)
-
-    def readlines(self, hint=-1):
-        """
-        Public method to read all lines from file.
-        
-        @keyparam hint maximum bytes to read or all if hint=-1 (int)
-        @return decoded lines read
-        """
-        if self.__encoding is None:
-            return super(File, self).readlines(hint)
-        else:
-            return [codecs.decode(txt, self.__encoding)
-                    for txt in super(File, self).readlines(hint)]
-
-    def write(self, txt):
-        """
-        Public method to write given data to file and encode if needed.
-        
-        @param txt data to write. (str, bytes)
-        """
-        if self.__encoding is not None:
-            txt = codecs.encode(txt, self.__encoding, self.__errors)
-
-        if self.__newline in ['\r\n', '\r']:
-            txt = txt.replace('\n', self.__newline)
-
-        super(File, self).write(txt)
-
-    def next(self):
-        """
-        Public method used in an iterator.
-        
-        @return decoded data read
-        """
-        txt = super(File, self).next()
-        if self.__encoding is None:
-            return txt
-        else:
-            return codecs.decode(txt, self.__encoding)
-
-# Inject into the __builtin__ dictionary
-__builtin__.open = open
-
-if __name__ == '__main__':
-    fp = open('compatibility_fixes.py', encoding='latin1')
-    print(fp.read())
-    fp.close()
-
-    with open('compatibility_fixes.py', encoding='UTF-8') as fp:
-        rlines = fp.readlines()
-        print(rlines[-1])
--- a/changelog	Tue Jul 28 19:19:23 2015 +0200
+++ b/changelog	Sat Aug 01 13:41:33 2015 +0200
@@ -5,6 +5,8 @@
 - General
   -- added a configuration page to edit the list of mime types to
      be opened in an eric editor
+  -- added the '--settings=' command line switch to store the
+     settings files in a non-standard directory
 - Checkers
   -- added a batch mode to the code style checker to make use of
      multiple CPUs/CPU-Cores
--- a/eric6.e4p	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6.e4p	Sat Aug 01 13:41:33 2015 +0200
@@ -234,6 +234,7 @@
     <Source>Examples/rhallo.py</Source>
     <Source>Globals/AppInfo.py</Source>
     <Source>Globals/__init__.py</Source>
+    <Source>Globals/compatibility_fixes.py</Source>
     <Source>Graphics/ApplicationDiagramBuilder.py</Source>
     <Source>Graphics/AssociationItem.py</Source>
     <Source>Graphics/ClassItem.py</Source>
@@ -1190,7 +1191,6 @@
     <Source>Utilities/PySideImporter.py</Source>
     <Source>Utilities/__init__.py</Source>
     <Source>Utilities/binplistlib.py</Source>
-    <Source>Utilities/compatibility_fixes.py</Source>
     <Source>Utilities/crypto/__init__.py</Source>
     <Source>Utilities/crypto/py3AES.py</Source>
     <Source>Utilities/crypto/py3PBKDF2.py</Source>
--- a/eric6.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,7 +16,8 @@
 import sys
 
 # generate list of arguments to be remembered for a restart
-restartArgsList = ["--nosplash", "--plugin", "--debug", "--config", "--pyqt4"]
+restartArgsList = ["--nosplash", "--plugin", "--debug", "--config", "--pyqt4"
+                   "--settings"]
 restartArgs = [arg for arg in sys.argv[1:]
                if arg.split("=", 1)[0] in restartArgsList]
 
@@ -24,7 +25,7 @@
 
 try:  # Only for Py2
     import StringIO as io   # __IGNORE_EXCEPTION__
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except ImportError:
     import io       # __IGNORE_WARNING__
     basestring = str
@@ -66,13 +67,20 @@
     del sys.argv[sys.argv.index("--debug")]
     logging.basicConfig(level=logging.DEBUG)
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 # make Third-Party package available as a packages repository
 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
@@ -211,6 +219,8 @@
          "don't open anything at startup except that given in command"),
         ("--plugin=plugin-file",
          "load the given plugin file (plugin development)"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
         ("--start-file", "load the most recently opened file"),
         ("--start-multi", "load the most recently opened multi-project"),
         ("--start-project", "load the most recently opened project"),
--- a/eric6_api.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_api.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,7 +17,7 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
--- a/eric6_compare.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_compare.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -60,6 +68,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Compare",
--- a/eric6_configure.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_configure.py	Sat Aug 01 13:41:33 2015 +0200
@@ -15,20 +15,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
 import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 # make ThirdParty package available as a packages repository
 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
@@ -60,6 +67,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Configure",
--- a/eric6_diff.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_diff.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -54,6 +62,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Diff",
--- a/eric6_doc.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_doc.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,7 +17,7 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
--- a/eric6_editor.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_editor.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,20 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
 import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 # make ThirdParty package available as a packages repository
 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
@@ -62,6 +69,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
         ("", "name of file to edit")
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
--- a/eric6_iconeditor.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_iconeditor.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,29 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+print(sys.argv)
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
+print(sys.argv)
 
 from Globals import AppInfo
 
@@ -61,6 +71,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
         ("", "name of file to edit")
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
--- a/eric6_plugininstall.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_plugininstall.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,19 +16,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -53,6 +61,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
         ("", "names of plugins to install")
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
--- a/eric6_pluginrepository.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_pluginrepository.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,19 +16,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -53,6 +61,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Plugin Repository",
--- a/eric6_pluginuninstall.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_pluginuninstall.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,19 +16,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -53,6 +61,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Plugin Uninstaller",
--- a/eric6_qregexp.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_qregexp.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -55,6 +63,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 QRegExp",
--- a/eric6_qregularexpression.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_qregularexpression.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -55,6 +63,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(
         sys.argv,
--- a/eric6_re.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_re.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -55,6 +63,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 RE",
--- a/eric6_snap.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_snap.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,19 +16,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -53,6 +61,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(
         sys.argv,
--- a/eric6_sqlbrowser.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_sqlbrowser.py	Sat Aug 01 13:41:33 2015 +0200
@@ -16,19 +16,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -60,6 +68,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 SQL Browser",
--- a/eric6_tray.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_tray.py	Sat Aug 01 13:41:33 2015 +0200
@@ -15,23 +15,32 @@
 from __future__ import unicode_literals
 
 import sys
+import os
 
 PyQt4Option = "--pyqt4" in sys.argv
+SettingsDir = None
 
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        SettingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(SettingsDir):
+            os.makedirs(SettingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          SettingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -48,7 +57,7 @@
     global PyQt4Option
     
     from Tools.TrayStarter import TrayStarter
-    return TrayStarter(PyQt4Option)
+    return TrayStarter(PyQt4Option, SettingsDir)
 
 
 def main():
@@ -58,6 +67,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Tray",
--- a/eric6_trpreviewer.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_trpreviewer.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from E5Gui.E5Application import E5Application
 
@@ -64,6 +72,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 TR Previewer",
--- a/eric6_uipreviewer.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_uipreviewer.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -61,6 +69,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 UI Previewer",
--- a/eric6_unittest.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_unittest.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,19 +17,27 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
 import sys
+import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 from Globals import AppInfo
 
@@ -58,6 +66,8 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "Eric6 Unittest",
--- a/eric6_webbrowser.py	Tue Jul 28 19:19:23 2015 +0200
+++ b/eric6_webbrowser.py	Sat Aug 01 13:41:33 2015 +0200
@@ -17,7 +17,7 @@
 import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
 
 try:  # Only for Py2
-    import Utilities.compatibility_fixes     # __IGNORE_WARNING__
+    import Globals.compatibility_fixes     # __IGNORE_WARNING__
 except (ImportError):
     pass
 
@@ -30,13 +30,20 @@
 import sys
 import os
 
-for arg in sys.argv:
+for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
         sys.argv.remove(arg)
-        break
+    elif arg.startswith("--settings="):
+        from PyQt5.QtCore import QSettings
+        settingsDir = os.path.expanduser(arg.replace("--settings=", ""))
+        if not os.path.isdir(settingsDir):
+            os.makedirs(settingsDir)
+        QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
+                          settingsDir)
+        sys.argv.remove(arg)
 
 # make ThirdParty package available as a packages repository
 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
@@ -81,7 +88,9 @@
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
-        ("--search=word", "search for the given word")
+        ("--search=word", "search for the given word"),
+        ("--settings=settingsDir",
+         "use the given directory to store the settings files"),
     ]
     appinfo = AppInfo.makeAppInfo(sys.argv,
                                   "eric6 Web Browser",

eric ide

mercurial