https://bugs.kde.org/show_bug.cgi?id=409395

            Bug ID: 409395
           Summary: If Krita is closed while saving, the document is not
                    saved
           Product: krita
           Version: git master
          Platform: unspecified
                OS: All
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: krita-bugs-n...@kde.org
          Reporter: anna.medonos...@gmail.com
  Target Milestone: ---

If the user closes Krita while saving is in progress, there is a chance of
Krita closing before the saving process is finished, thus leading to data loss.

1, user makes a modification to the document
2, user initiates save; KisMainWindow::saveDocument() locks itself, so it can
not be entered twice
3, before the saving is finished, user generates an event to close Krita; this
event gets caught by one of QApplication::processEvents() function (several
occurences during save)
4, processEvents() reacts to close by triggering closeEvent(), which calls
KisView::queryClose()
5, in queryClose(), the code checks if document is still flagged as modified,
which it is; KisMainWindow::saveDocument() is called
6, KisMainWindow::saveDocument() is locked, because saving is already in
progress and so returns false
7, Krita closes; the document was not saved

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to