From 21de9619335afa848e4a676e53d26c59ae622e99 Mon Sep 17 00:00:00 2001 From: blacksun Date: Sat, 22 Jun 2019 11:24:59 +0000 Subject: [PATCH] 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 --- sources/qetapp.cpp | 4 ++-- sources/qetproject.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 5412c0c76..897b2402d 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -1792,8 +1792,8 @@ void QETApp::checkBackupFiles() //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())) { + for (QETProject *project : registeredProjects().values()) { + if (kasf->managedFile() == QUrl::fromLocalFile(project->filePath())) { stale_files.removeOne(kasf); } } diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 6545a419a..0e5995100 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -263,8 +263,8 @@ void QETProject::setFilePath(const QString &filepath) delete m_backup_file; 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)) { delete m_backup_file; m_backup_file = nullptr;