changeset 31047:c55c6b91447f

fix error on saving an editor file * file-editor-tab.cc (do_save_file): The use of QSaveFile in the default branch only allows to open a file in write only mode which was overwritten by previous merge from stable branch
author Torsten Lilge <ttl-octave@mailbox.org>
date Tue, 31 May 2022 21:41:51 +0200
parents 6d9ff512a08a
children d5997bbdb641
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Mon May 30 18:24:27 2022 -0700
+++ b/libgui/src/m-editor/file-editor-tab.cc	Tue May 31 21:41:51 2022 +0200
@@ -2218,7 +2218,7 @@
 
     // open the file for writing (use QIODevice::ReadWrite for avoiding
     // truncating the previous file contents)
-    if (! file.open (QIODevice::ReadWrite))
+    if (! file.open (QIODevice::WriteOnly))
       {
         // Unsuccessful, begin watching file again if it was being
         // watched previously.