# HG changeset patch # User John W. Eaton # Date 1669993652 18000 # Node ID 40b151abbb9bd87a66371d673444cacc9a57f497 # Parent 59c9da7c43d6367059bee64c7d31d4884afb7f27 don't attempt to restore settings from old qt-settings config file We changed the default settings file name in 2019. It's time to let the old name go. * resource-manager.cc (resource_manager::resource_manager): Don't attempt to copy settings from old qt-settings file used by Octave prior to March 2019. diff -r 59c9da7c43d6 -r 40b151abbb9b libgui/src/resource-manager.cc --- a/libgui/src/resource-manager.cc Fri Dec 02 08:58:41 2022 -0500 +++ b/libgui/src/resource-manager.cc Fri Dec 02 10:07:32 2022 -0500 @@ -76,45 +76,6 @@ QFileInfo sfile (m_settings_file); m_settings_directory = sfile.absolutePath (); - - QString xdg_config_home - = QString::fromLocal8Bit (qgetenv ("XDG_CONFIG_HOME")); - - if ((! sfile.exists ()) && xdg_config_home.isEmpty ()) - { - // File does not exist yet: Look for a settings file at the old - // location ($HOME/.config/octave/qt-settings) for impoting all - // available keys into the new settings file. - // Do not look for an old settings file if XDG_CONFIG_HOME is set, - // since then a nonexistent new settings file does not necessarily - // indicate a first run of octave with new config file locations. -#if defined (HAVE_QSTANDARDPATHS) - QString home_path - = QStandardPaths::writableLocation (QStandardPaths::HomeLocation); -#else - QString home_path - = QDesktopServices::storageLocation (QDesktopServices::HomeLocation); -#endif - - QString old_settings_directory = home_path + "/.config/octave"; - QString old_settings_file = old_settings_directory + "/qt-settings"; - - QFile ofile (old_settings_file); - - if (ofile.exists ()) - { - // Old settings file exists; create a gui_settings object related - // to it and copy all available keys to the new settings - gui_settings old_settings (old_settings_file, QSettings::IniFormat); - - QStringList keys = old_settings.allKeys (); - for (int i = 0; i < keys.count(); i++) - m_default_settings->setValue (keys.at(i), - old_settings.value(keys.at(i))); - - m_default_settings->sync (); // Done, make sure keys are written - } - } } resource_manager::~resource_manager (void)