mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Windows fix : When launch QElectrotech with in argument a .qet file, QElectroTech ask to user to open the restore file of the argument file.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5928 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1793,7 +1793,7 @@ void QETApp::checkBackupFiles()
|
|||||||
const QList<KAutoSaveFile *> sf = stale_files;
|
const QList<KAutoSaveFile *> sf = stale_files;
|
||||||
for (KAutoSaveFile *kasf : sf) {
|
for (KAutoSaveFile *kasf : sf) {
|
||||||
for (QETProject *project : registeredProjects().values()) {
|
for (QETProject *project : registeredProjects().values()) {
|
||||||
if (kasf->managedFile() == QUrl(project->filePath())) {
|
if (kasf->managedFile() == QUrl::fromLocalFile(project->filePath())) {
|
||||||
stale_files.removeOne(kasf);
|
stale_files.removeOne(kasf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,8 +263,8 @@ void QETProject::setFilePath(const QString &filepath)
|
|||||||
delete m_backup_file;
|
delete m_backup_file;
|
||||||
m_backup_file = nullptr;
|
m_backup_file = nullptr;
|
||||||
}
|
}
|
||||||
QUrl url_(filepath);
|
|
||||||
m_backup_file = new KAutoSaveFile(url_, this);
|
m_backup_file = new KAutoSaveFile(QUrl::fromLocalFile(filepath), this);
|
||||||
if (!m_backup_file->open(QIODevice::WriteOnly)) {
|
if (!m_backup_file->open(QIODevice::WriteOnly)) {
|
||||||
delete m_backup_file;
|
delete m_backup_file;
|
||||||
m_backup_file = nullptr;
|
m_backup_file = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user