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

Fix crash moving project's custom folder

parent bd8b6cdf
......@@ -676,7 +676,6 @@ void KdenliveDoc::setProjectFolder(const QUrl &url)
void KdenliveDoc::moveProjectData(const QString & /*src*/, const QString &dest)
{
// Move proxies
QList<QUrl> cacheUrls;
auto binClips = pCore->projectItemModel()->getAllClipIds();
// First step: all clips referenced by the bin model exist and are inserted
......@@ -707,7 +706,7 @@ void KdenliveDoc::moveProjectData(const QString & /*src*/, const QString &dest)
if (proxyDir.mkpath(QStringLiteral("."))) {
KIO::CopyJob *job = KIO::move(cacheUrls, QUrl::fromLocalFile(proxyDir.absolutePath()));
KJobWidgets::setWindow(job, QApplication::activeWindow());
if (static_cast<int>(job->exec()) > 0) {
if (!job->exec()) {
KMessageBox::sorry(QApplication::activeWindow(), i18n("Moving proxy clips failed: %1", job->errorText()));
}
}
......
......@@ -848,10 +848,10 @@ void ProjectManager::saveZone(const QStringList &info, const QDir &dir)
void ProjectManager::moveProjectData(const QString &src, const QString &dest)
{
// Move tmp folder (thumbnails, timeline preview)
m_project->moveProjectData(src, dest);
KIO::CopyJob *copyJob = KIO::move(QUrl::fromLocalFile(src), QUrl::fromLocalFile(dest));
connect(copyJob, &KJob::result, this, &ProjectManager::slotMoveFinished);
connect(copyJob, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotMoveProgress(KJob*,ulong)));
m_project->moveProjectData(src, dest);
}
void ProjectManager::slotMoveProgress(KJob *, unsigned long progress)
......
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