changeset 26858:156bd21bf6bd

editor follows XDG_CONFIG_HOME for autocompletion files (bug ##55822) * file-editor-tab.cc (update_lexer_settings): use the path of the settings file as determined at start up (honoring XDG_CONFIG_HOME) instead og the standard location
author Torsten <mttl@mailbox.org>
date Wed, 06 Mar 2019 08:23:54 +0100
parents ab97008be411
children 65c036b78040
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Wed Mar 06 07:05:49 2019 +0000
+++ b/libgui/src/m-editor/file-editor-tab.cc	Wed Mar 06 08:23:54 2019 +0100
@@ -639,15 +639,9 @@
         bool update_apis = false;  // flag, whether update of apis files
 
         // get path to prepared api info
-#if defined (HAVE_QSTANDARDPATHS)
-        QString prep_apis_path
-          = QStandardPaths::writableLocation (QStandardPaths::HomeLocation)
-            + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/";
-#else
-        QString prep_apis_path
-          = QDesktopServices::storageLocation (QDesktopServices::HomeLocation)
-            + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/";
-#endif
+        QFileInfo settings_file = resource_manager::get_settings_file ();
+        QString prep_apis_path = settings_file.absolutePath () + "/"
+                                  + QString (OCTAVE_VERSION) + "/qsci/";
 
         // get settings which infos are used for octave
         bool octave_builtins = settings->value (