Fix Save writing a .qetz beside an opened .qet: keep the .qet

A project opened from a .qet was saved as a .qetz beside it, with a
notice, and the .qet left as it was: a project kept in git did not stay
a .qet. Save now writes the format the project was opened in; only Save
As changes it (scorpio810, discussion #1512). A .qetz is saved as a
.qetz as before.

The save-beside path goes: the flag set on opening, the .qetz path made
from the .qet's, write()'s switch to it and back on failure, and the
notice and replace question in ProjectView::doSave().

tst_resaveunchanged::qetSavedAsQetzBeside becomes qetSavedAsQet: Save of
an opened .qet writes no .qetz and the .qet holds what a plain save of
it holds (it fails without the fix: a .qetz is written beside).
tst_changedondisk makes its .qetz with Save As, as Save no longer does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-18 22:56:22 +13:00
parent 8c5a16d50e
commit 89c3979957
6 changed files with 23 additions and 96 deletions
+1 -1
View File
@@ -313,7 +313,7 @@ ProjectLock::Result ProjectLock::acquire(const QString &project_path, bool take_
/**
@brief ProjectLock::moveTo
The project is now @p project_path (Save As, .qet saved as .qetz): take
The project is now @p project_path (Save As): take
the new lock, then let the old one go. Nothing changes when the new one
cannot be had.
@return true when the lock is now on @p project_path