mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user