From 666f03dc23212f239ddd0d30568c1f9cddcb519e Mon Sep 17 00:00:00 2001 From: blacksun Date: Fri, 29 Mar 2019 21:11:09 +0000 Subject: [PATCH] Minor : When launch qet with a .qet as argument, the "restor backup" dialog ask user to restor the project freshly opened while this one wasn't crashed. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5814 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetapp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index e4155c8e6..8d0496ac7 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -1788,6 +1788,17 @@ void QETApp::buildSystemTrayMenu() { void QETApp::checkBackupFiles() { QList stale_files = KAutoSaveFile::allStaleFiles(); + + //Remove from the list @stale_files, the stales file of opened project + const QList sf = stale_files; + for (KAutoSaveFile *kasf : sf) { + for (QETProject *project : registeredProjects().values()) { + if (kasf->managedFile() == QUrl(project->filePath())) { + stale_files.removeOne(kasf); + } + } + } + if (stale_files.isEmpty()) { return; }