# HG changeset patch # User Torsten # Date 1551816411 -3600 # Node ID b6dfe7d192bc83392465a890a8635cc81b17b8eb # Parent b00bd9afbed3c5c790e31d4d62b3ed1d4fd1a41b fix creating keyword files for editor autocompletion (bug #55835) * file-editor-tab.cc (update_lexer_settings): for testing whether qscintilla can open the files, try to open it readonly and if not existing, create path and try to open it writeonly diff -r b00bd9afbed3 -r b6dfe7d192bc libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Tue Mar 05 09:31:20 2019 +0100 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Mar 05 21:06:51 2019 +0100 @@ -698,9 +698,16 @@ } - // make sure the apis file is usable + // Make sure the apis file is usable, otherwise the gui might crash, + // e.g., in case of max. number of opened files QFile f (_prep_apis_file); - bool apis_usable = f.open (QIODevice::ReadWrite); + + bool apis_usable = f.open (QIODevice::ReadOnly); + if (! apis_usable) + { + QDir ().mkpath (QFileInfo (f).absolutePath ()); + apis_usable = f.open (QIODevice::WriteOnly); + } if (apis_usable) f.close ();