Bug 434503

Summary: No autosave after the first one on master
Product: [Applications] krita Reporter: Tiar <tamtamy.tymona>
Component: GeneralAssignee: Tiar <tamtamy.tymona>
Status: RESOLVED FIXED    
Severity: critical CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tiar 2021-03-16 17:09:06 UTC
SUMMARY
Autosave is broken on master again. Thankfully the 4.4.2 and 4.4.3-beta1 are correct.

I've set the importance to "major" because it leads to dataloss in case of a crash.

Bug 433513 is probably related, but it talks about different things.

STEPS TO REPRODUCE
1. Set autosave to 1 min.
2. Create a new document, save to a known location.
3. Make changes.
4. Wait for the autosave to be triggered (check on the hard drive)
5. Make more changes.
6. Wait for the autosave to be triggered, then wait more, make more changes etc.

OBSERVED RESULT
Krita doesn't autosave anymore after the first one. It is confirmed in Krita log, too.

EXPECTED RESULT
Krita autosaves every 1 min.

SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-prealpha (git e1bbdf35c5)
 Languages: pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.11.1
  Version (loaded): 5.11.1
Comment 1 Tiar 2021-03-17 03:24:40 UTC
Looks like it has been caused by commit fe691e04fb.
Comment 2 Halla Rempt 2021-03-17 08:52:29 UTC
I though that had already been reverted...
Comment 3 Tiar 2021-03-18 15:04:52 UTC
Git commit f9a9ef808011ea4c1921bfe5b9275d41ab83d8a0 by Agata Cacko.
Committed on 18/03/2021 at 15:03.
Pushed by tymond into branch 'master'.

Fix autosave triggered only once per file

KisDocumentUndoStore's signal wasn't connected to the
KisImageSignalRouter, which caused the issue that
the autosave was only triggered once.
From the user point of view, it also resulted in the editing time
in File -> Document Information to be much lower than expected.
This commit connects the Document Undo Store to the SignalRouter
and ensures some more signals in KisDocumentUndoStore.
Those additional signals/emitions might not be needed.
Related: bug 433513

M  +4    -0    libs/image/kis_image.cc

https://invent.kde.org/graphics/krita/commit/f9a9ef808011ea4c1921bfe5b9275d41ab83d8a0