Commit e513a722 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

QUrl::path to QUrl::toLocalFile

parent ee67f384
......@@ -225,8 +225,8 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
success = validator.isProject();
if (!success) {
// It is not a project file
parent->slotGotProgressInfo(i18n("File %1 is not a Kdenlive project file", m_url.path()), 100);
if (KMessageBox::warningContinueCancel(parent, i18n("File %1 is not a valid project file.\nDo you want to open a backup file?", m_url.path()), i18n("Error opening file"), KGuiItem(i18n("Open Backup"))) == KMessageBox::Continue) {
parent->slotGotProgressInfo(i18n("File %1 is not a Kdenlive project file", m_url.toLocalFile()), 100);
if (KMessageBox::warningContinueCancel(parent, i18n("File %1 is not a valid project file.\nDo you want to open a backup file?", m_url.toLocalFile()), i18n("Error opening file"), KGuiItem(i18n("Open Backup"))) == KMessageBox::Continue) {
*openBackup = true;
}
} else {
......@@ -562,7 +562,7 @@ void KdenliveDoc::slotAutoSave()
qDebug() << "ERROR; CANNOT CREATE AUTOSAVE FILE";
}
//qDebug() << "// AUTOSAVE FILE: " << m_autosave->fileName();
QDomDocument sceneList = xmlSceneList(m_render->sceneList(m_url.adjusted(QUrl::RemoveFilename).path()));
QDomDocument sceneList = xmlSceneList(m_render->sceneList(m_url.adjusted(QUrl::RemoveFilename).toLocalFile()));
if (sceneList.isNull()) {
//Make sure we don't save if scenelist is corrupted
KMessageBox::error(QApplication::activeWindow(), i18n("Cannot write to file %1, scene list is corrupted.", m_autosave->fileName()));
......@@ -746,7 +746,7 @@ void KdenliveDoc::setProjectFolder(QUrl url)
}
dir.mkdir(QStringLiteral("titles"));
/*if (KMessageBox::questionYesNo(QApplication::activeWindow(), i18n("You have changed the project folder. Do you want to copy the cached data from %1 to the new folder %2?", m_projectFolder, url.path())) == KMessageBox::Yes) moveProjectData(url);*/
m_projectFolder = url.path();
m_projectFolder = url.toLocalFile();
updateProjectFolderPlacesEntry();
}
......@@ -764,7 +764,7 @@ void KdenliveDoc::moveProjectData(const QString &/*src*/, const QString &dest)
if (!oldUrl.isEmpty()) {
QUrl newUrl = QUrl::fromLocalFile(dest + QStringLiteral("/titles/") + oldUrl.fileName());
KIO::Job *job = KIO::copy(oldUrl, newUrl);
if (job->exec()) clip->setProperty(QStringLiteral("resource"), newUrl.path());
if (job->exec()) clip->setProperty(QStringLiteral("resource"), newUrl.toLocalFile());
}
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment