Removed some functions dealing with migration from eric6 to eric7. eric7

Tue, 16 Jan 2024 14:35:26 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 16 Jan 2024 14:35:26 +0100
branch
eric7
changeset 10505
5d6bb914036e
parent 10504
28a61f7ed86a
child 10506
321555d0303b

Removed some functions dealing with migration from eric6 to eric7.

src/eric7/APIs/Python3/eric7.api file | annotate | diff | comparison | revisions
src/eric7/Documentation/Help/source.qch file | annotate | diff | comparison | revisions
src/eric7/Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
src/eric7/Documentation/Source/eric7.Preferences.__init__.html file | annotate | diff | comparison | revisions
src/eric7/Preferences/__init__.py file | annotate | diff | comparison | revisions
src/eric7/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/src/eric7/APIs/Python3/eric7.api	Tue Jan 16 14:24:21 2024 +0100
+++ b/src/eric7/APIs/Python3/eric7.api	Tue Jan 16 14:35:26 2024 +0100
@@ -7827,7 +7827,6 @@
 eric7.Preferences.ViewProfileDialog.ViewProfileDialog?1(layout, editVisibilities, debugVisibilities, parent=None)
 eric7.Preferences._Migrations?8
 eric7.Preferences.convertPasswords?4(oldPassword, newPassword)
-eric7.Preferences.eric6SettingsName?4()
 eric7.Preferences.exportPreferences?4()
 eric7.Preferences.getConda?4(key)
 eric7.Preferences.getCooperation?4(key)
@@ -7878,8 +7877,6 @@
 eric7.Preferences.getVarFilters?4()
 eric7.Preferences.getViewManager?4()
 eric7.Preferences.getWebBrowser?4(key)
-eric7.Preferences.hasEric6Configuration?4()
-eric7.Preferences.importEric6Configuration?4()
 eric7.Preferences.importPreferences?4()
 eric7.Preferences.initPreferences?4(withMigration=False)
 eric7.Preferences.initRecentSettings?4()
Binary file src/eric7/Documentation/Help/source.qch has changed
--- a/src/eric7/Documentation/Help/source.qhp	Tue Jan 16 14:24:21 2024 +0100
+++ b/src/eric7/Documentation/Help/source.qhp	Tue Jan 16 14:35:26 2024 +0100
@@ -19995,7 +19995,6 @@
       <keyword name="enum_key_to_value" id="enum_key_to_value" ref="eric7.PipInterface.piplicenses.html#enum_key_to_value" />
       <keyword name="eradicate (Module)" id="eradicate (Module)" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.eradicate.html" />
       <keyword name="eraseFlash" id="eraseFlash" ref="eric7.MicroPython.Devices.EspDevices.html#eraseFlash" />
-      <keyword name="eric6SettingsName" id="eric6SettingsName" ref="eric7.Preferences.__init__.html#eric6SettingsName" />
       <keyword name="eric7 (Package)" id="eric7 (Package)" ref="index-eric7.html" />
       <keyword name="eric7_api (Module)" id="eric7_api (Module)" ref="eric7.eric7_api.html" />
       <keyword name="eric7_browser (Module)" id="eric7_browser (Module)" ref="eric7.eric7_browser.html" />
@@ -20320,7 +20319,6 @@
       <keyword name="gpg (Module)" id="gpg (Module)" ref="eric7.Plugins.VcsPlugins.vcsMercurial.GpgExtension.gpg.html" />
       <keyword name="handleSingleApplication" id="handleSingleApplication" ref="eric7.eric7_ide.html#handleSingleApplication" />
       <keyword name="hasEnvironmentEntry" id="hasEnvironmentEntry" ref="eric7.SystemUtilities.OSUtilities.html#hasEnvironmentEntry" />
-      <keyword name="hasEric6Configuration" id="hasEric6Configuration" ref="eric7.Preferences.__init__.html#hasEric6Configuration" />
       <keyword name="hasPluginHeaderEntry" id="hasPluginHeaderEntry" ref="eric7.PluginManager.PluginUtilities.html#hasPluginHeaderEntry" />
       <keyword name="hasQtDesigner" id="hasQtDesigner" ref="eric7.SystemUtilities.QtUtilities.html#hasQtDesigner" />
       <keyword name="hasQtLinguist" id="hasQtLinguist" ref="eric7.SystemUtilities.QtUtilities.html#hasQtLinguist" />
@@ -20335,7 +20333,6 @@
       <keyword name="html_udecode" id="html_udecode" ref="eric7.Utilities.__init__.html#html_udecode" />
       <keyword name="html_uencode" id="html_uencode" ref="eric7.Utilities.__init__.html#html_uencode" />
       <keyword name="ignoreCode" id="ignoreCode" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleChecker.html#ignoreCode" />
-      <keyword name="importEric6Configuration" id="importEric6Configuration" ref="eric7.Preferences.__init__.html#importEric6Configuration" />
       <keyword name="importPreferences" id="importPreferences" ref="eric7.Preferences.__init__.html#importPreferences" />
       <keyword name="importShortcuts" id="importShortcuts" ref="eric7.Preferences.Shortcuts.html#importShortcuts" />
       <keyword name="imports_on_separate_lines" id="imports_on_separate_lines" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html#imports_on_separate_lines" />
--- a/src/eric7/Documentation/Source/eric7.Preferences.__init__.html	Tue Jan 16 14:24:21 2024 +0100
+++ b/src/eric7/Documentation/Source/eric7.Preferences.__init__.html	Tue Jan 16 14:35:26 2024 +0100
@@ -42,10 +42,6 @@
 <td>Module function to convert all passwords.</td>
 </tr>
 <tr>
-<td><a href="#eric6SettingsName">eric6SettingsName</a></td>
-<td>Function to generate the settings file name for eric6.</td>
-</tr>
-<tr>
 <td><a href="#exportPreferences">exportPreferences</a></td>
 <td>Module function to export the current preferences.</td>
 </tr>
@@ -246,14 +242,6 @@
 <td>Module function to retrieve the various web browser settings.</td>
 </tr>
 <tr>
-<td><a href="#hasEric6Configuration">hasEric6Configuration</a></td>
-<td>Function to check, if there is an old eric6 configuration.</td>
-</tr>
-<tr>
-<td><a href="#importEric6Configuration">importEric6Configuration</a></td>
-<td>Function to import an old eric6 configuration.</td>
-</tr>
-<tr>
 <td><a href="#importPreferences">importPreferences</a></td>
 <td>Module function to from eric7 import Preferences from a file previously saved by the export function.</td>
 </tr>
@@ -609,28 +597,6 @@
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />
-<a NAME="eric6SettingsName" ID="eric6SettingsName"></a>
-<h2>eric6SettingsName</h2>
-<b>eric6SettingsName</b>(<i></i>)
-<p>
-    Function to generate the settings file name for eric6.
-</p>
-
-<dl>
-<dt>Return:</dt>
-<dd>
-settings file name
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-str
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
 <a NAME="exportPreferences" ID="exportPreferences"></a>
 <h2>exportPreferences</h2>
 <b>exportPreferences</b>(<i></i>)
@@ -2026,38 +1992,6 @@
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />
-<a NAME="hasEric6Configuration" ID="hasEric6Configuration"></a>
-<h2>hasEric6Configuration</h2>
-<b>hasEric6Configuration</b>(<i></i>)
-<p>
-    Function to check, if there is an old eric6 configuration.
-</p>
-
-<dl>
-<dt>Return:</dt>
-<dd>
-flag indicating the existence of an eric6 configuration
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-bool
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
-<a NAME="importEric6Configuration" ID="importEric6Configuration"></a>
-<h2>importEric6Configuration</h2>
-<b>importEric6Configuration</b>(<i></i>)
-<p>
-    Function to import an old eric6 configuration.
-</p>
-
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
 <a NAME="importPreferences" ID="importPreferences"></a>
 <h2>importPreferences</h2>
 <b>importPreferences</b>(<i></i>)
--- a/src/eric7/Preferences/__init__.py	Tue Jan 16 14:24:21 2024 +0100
+++ b/src/eric7/Preferences/__init__.py	Tue Jan 16 14:35:26 2024 +0100
@@ -4352,67 +4352,5 @@
 initPreferences(withMigration=True)
 initRecentSettings()
 
-###########################################################################
-## Functions to deal with existing eric6 configuration
-###########################################################################
-
-
-# TODO: remove the function below dealing with eric6 settings
-def eric6SettingsName():
-    """
-    Function to generate the settings file name for eric6.
-
-    @return settings file name
-    @rtype str
-    """
-    settingsFileName = Prefs.settings.fileName()
-    return settingsFileName.replace("Eric7", "Eric6").replace("eric7", "eric6")
-
-
-def hasEric6Configuration():
-    """
-    Function to check, if there is an old eric6 configuration.
-
-    @return flag indicating the existence of an eric6 configuration
-    @rtype bool
-    """
-    return os.path.exists(eric6SettingsName())
-
-
-def importEric6Configuration():
-    """
-    Function to import an old eric6 configuration.
-    """
-    conversions = (
-        ("Editor/WrapLongLinesMode", QsciScintilla.WrapMode),
-        ("Editor/WrapVisualFlag", QsciScintilla.WrapVisualFlag),
-        ("Editor/WrapIndentMode", QsciScintilla.WrapIndentMode),
-        ("Editor/EdgeMode", QsciScintilla.EdgeMode),
-        ("Editor/AutoCompletionSource", QsciScintilla.AutoCompletionSource),
-        ("Editor/CallTipsStyle", QsciScintilla.CallTipsStyle),
-        ("Editor/CallTipsPosition", QsciScintilla.CallTipsPosition),
-        ("Editor/PythonBadIndentation", QsciLexerPython.IndentationWarning),
-        ("Editor/EOLMode", QsciScintilla.EolMode),
-        ("WebBrowser/SearchLanguage", QLocale.Language),
-        ("RefactoringRope/MouseClickGotoModifiers", Qt.KeyboardModifier),
-        ("RefactoringRope/MouseClickGotoButton", Qt.MouseButton),
-    )
-
-    filename = eric6SettingsName()
-    if filename:
-        settingsFile = Prefs.settings.fileName()
-        shutil.copy(filename, settingsFile)
-        initPreferences()
-
-        # convert enum related settings
-        for settingsKey, enumType in conversions:
-            if Prefs.settings.contains(settingsKey):
-                Prefs.settings.setValue(
-                    settingsKey, enumType(int(Prefs.settings.value(settingsKey)))
-                )
-
-        syncPreferences()
-
-
 #
 # eflag: noqa = M201, M613
--- a/src/eric7/UI/UserInterface.py	Tue Jan 16 14:24:21 2024 +0100
+++ b/src/eric7/UI/UserInterface.py	Tue Jan 16 14:35:26 2024 +0100
@@ -8389,29 +8389,14 @@
         if not Preferences.isConfigured():
             self.__initDebugToolbarsLayout()
 
-            if Preferences.hasEric6Configuration():
-                yes = EricMessageBox.yesNo(
-                    self,
-                    self.tr("First time usage"),
-                    self.tr(
-                        "eric7 has not been configured yet but an eric6"
-                        " configuration was found. Shall this be"
-                        " imported?"
-                    ),
-                    yesDefault=True,
-                )
-                if yes:
-                    Preferences.importEric6Configuration()
-            else:
-                EricMessageBox.information(
-                    self,
-                    self.tr("First time usage"),
-                    self.tr(
-                        """eric has not been configured yet. """
-                        """The configuration dialog will be started."""
-                    ),
-                )
-
+            EricMessageBox.information(
+                self,
+                self.tr("First time usage"),
+                self.tr(
+                    """eric has not been configured yet. """
+                    """The configuration dialog will be started."""
+                ),
+            )
             self.showPreferences()
             Preferences.setConfigured()
 

eric ide

mercurial