[qet] qet/qet: [5928] Windows fix : When launch QElectrotech with in argument a .qet file, QElectroTech ask to user to open the restore file of the argument file. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
- To: qet@xxxxxxxxxxxxxxxxxxx
- Subject: [qet] qet/qet: [5928] Windows fix : When launch QElectrotech with in argument a .qet file, QElectroTech ask to user to open the restore file of the argument file.
- From: subversion@xxxxxxxxxxxxx
- Date: Sat, 22 Jun 2019 13:25:00 +0200
Revision: 5928
Author: blacksun
Date: 2019-06-22 13:24:59 +0200 (Sat, 22 Jun 2019)
Log Message:
-----------
Windows fix : When launch QElectrotech with in argument a .qet file, QElectroTech ask to user to open the restore file of the argument file.
Modified Paths:
--------------
trunk/sources/qetapp.cpp
trunk/sources/qetproject.cpp
Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp 2019-06-21 18:56:04 UTC (rev 5927)
+++ trunk/sources/qetapp.cpp 2019-06-22 11:24:59 UTC (rev 5928)
@@ -1792,8 +1792,8 @@
//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())) {
+ for (QETProject *project : registeredProjects().values()) {
+ if (kasf->managedFile() == QUrl::fromLocalFile(project->filePath())) {
stale_files.removeOne(kasf);
}
}
Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp 2019-06-21 18:56:04 UTC (rev 5927)
+++ trunk/sources/qetproject.cpp 2019-06-22 11:24:59 UTC (rev 5928)
@@ -263,8 +263,8 @@
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;