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
This commit is contained in:
blacksun
2019-03-29 21:11:09 +00:00
parent a912bfb380
commit 666f03dc23

View File

@@ -1788,6 +1788,17 @@ void QETApp::buildSystemTrayMenu() {
void QETApp::checkBackupFiles()
{
QList<KAutoSaveFile *> stale_files = KAutoSaveFile::allStaleFiles();
//Remove from the list @stale_files, the stales file of opened project
const QList<KAutoSaveFile *> 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;
}