summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2016-10-31 17:40:03 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2016-10-31 17:40:03 (GMT)
commit051741183d2e6c54fa50693ab0eab9deff8af034 (patch)
tree620ba9c8082a86edd1d44467ea60c8c75fe52514
parentc5f07dfc6a9f1268b1c0b3e00dd75742a5bbd12f (diff)
cleanup
-rw-r--r--src/doc/kdenlivedoc.cpp12
-rw-r--r--src/doc/kdenlivedoc.h2
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/project/projectmanager.cpp10
-rw-r--r--src/project/projectmanager.h2
-rw-r--r--src/timeline/managers/guidemanager.cpp2
-rw-r--r--src/timeline/managers/selectmanager.cpp2
-rw-r--r--src/timeline/managers/spacermanager.cpp1
8 files changed, 14 insertions, 19 deletions
diff --git a/src/doc/kdenlivedoc.cpp b/src/doc/kdenlivedoc.cpp
index b2d825d..205cb4e 100644
--- a/src/doc/kdenlivedoc.cpp
+++ b/src/doc/kdenlivedoc.cpp
@@ -744,8 +744,14 @@ void KdenliveDoc::setProjectFolder(QUrl url)
updateProjectFolderPlacesEntry();
}
-void KdenliveDoc::moveProjectData(const QUrl &url)
+void KdenliveDoc::moveProjectData(const QString &src, const QString &dest)
{
+ // Move tmp folder (thumbnails, timeline preview)
+ KIO::CopyJob *copyJob = KIO::move(QUrl::fromLocalFile(src),QUrl::fromLocalFile(dest));
+ connect(copyJob, SIGNAL(result(KJob *)), this, SLOT(slotMoveFinished(KJob *)));
+ connect(copyJob, SIGNAL(percent(KJob *, unsigned long)), this, SLOT(slotMoveProgress(KJob *, unsigned long)));
+ // Move proxies
+
QList <ClipController*> list = pCore->binController()->getControllerList();
QList<QUrl> cacheUrls;
for (int i = 0; i < list.count(); ++i) {
@@ -754,7 +760,7 @@ void KdenliveDoc::moveProjectData(const QUrl &url)
// the image for title clip must be moved
QUrl oldUrl = clip->clipUrl();
if (!oldUrl.isEmpty()) {
- QUrl newUrl = QUrl::fromLocalFile(url.toLocalFile() + QStringLiteral("/titles/") + oldUrl.fileName());
+ 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());
}
@@ -769,7 +775,7 @@ void KdenliveDoc::moveProjectData(const QUrl &url)
}
}
if (!cacheUrls.isEmpty()) {
- QDir proxyDir(url.path() + "/proxy/");
+ QDir proxyDir(dest + "/proxy/");
if (proxyDir.mkpath(QStringLiteral("."))) {
KIO::CopyJob *job = KIO::move(cacheUrls, QUrl::fromLocalFile(proxyDir.absolutePath()));
KJobWidgets::setWindow(job, QApplication::activeWindow());
diff --git a/src/doc/kdenlivedoc.h b/src/doc/kdenlivedoc.h
index 8210332..d2cc87c 100644
--- a/src/doc/kdenlivedoc.h
+++ b/src/doc/kdenlivedoc.h
@@ -174,7 +174,7 @@ public:
/** @brief Returns true if advanced compositing is available */
static int compositingMode();
/** @brief Move project data files to new url */
- void moveProjectData(const QUrl &url);
+ void moveProjectData(const QString &src, const QString &dest);
private:
QUrl m_url;
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index db31b1f..10baf86 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1728,7 +1728,7 @@ void MainWindow::slotEditProjectSettings()
KMessageBox::sorry(this, i18n("Cannot perform operation, target directory already exists: %1", newDir.absoluteFilePath(documentId)));
} else {
// Proceed with the move
- pCore->projectManager()->moveDataFolder(oldDir.absoluteFilePath(documentId), newDir.absolutePath());
+ project->moveProjectData(oldDir.absoluteFilePath(documentId), newDir.absolutePath());
}
}
}
diff --git a/src/project/projectmanager.cpp b/src/project/projectmanager.cpp
index 3fffbf9..15f966b 100644
--- a/src/project/projectmanager.cpp
+++ b/src/project/projectmanager.cpp
@@ -796,16 +796,6 @@ void ProjectManager::saveZone(QStringList info, QDir dir)
pCore->bin()->saveZone(info, dir);
}
-void ProjectManager::moveDataFolder(const QString &src, const QString &dest)
-{
- // Move tmp folder (thumbnails, timeline preview)
- KIO::CopyJob *copyJob = KIO::move(QUrl::fromLocalFile(src),QUrl::fromLocalFile(dest));
- connect(copyJob, SIGNAL(result(KJob *)), this, SLOT(slotMoveFinished(KJob *)));
- connect(copyJob, SIGNAL(percent(KJob *, unsigned long)), this, SLOT(slotMoveProgress(KJob *, unsigned long)));
- // Move proxies
- m_project->moveProjectData(QUrl::fromLocalFile(dest));
-}
-
void ProjectManager::slotMoveProgress(KJob *, unsigned long progress)
{
pCore->window()->slotGotProgressInfo(i18n("Moving project folder"), progress, ProcessingJobMessage);
diff --git a/src/project/projectmanager.h b/src/project/projectmanager.h
index c6ed651..c54bb59 100644
--- a/src/project/projectmanager.h
+++ b/src/project/projectmanager.h
@@ -64,8 +64,6 @@ public:
/** @brief returns a default hd profile depending on timezone*/
static QString getDefaultProjectFormat();
void saveZone(QStringList info, QDir dir);
- /** @brief Move the current project's data folder */
- void moveDataFolder(const QString &src, const QString &dest);
public slots:
void newFile(bool showProjectSettings = true, bool force = false);
diff --git a/src/timeline/managers/guidemanager.cpp b/src/timeline/managers/guidemanager.cpp
index b144808..ebe4239 100644
--- a/src/timeline/managers/guidemanager.cpp
+++ b/src/timeline/managers/guidemanager.cpp
@@ -49,7 +49,7 @@ bool GuideManager::mousePress(QMouseEvent *, ItemInfo info, QList<QGraphicsItem
return false;
}
-bool GuideManager::mouseMove(QMouseEvent *event, int pos, int)
+bool GuideManager::mouseMove(QMouseEvent *event, int, int)
{
event->accept();
return false;
diff --git a/src/timeline/managers/selectmanager.cpp b/src/timeline/managers/selectmanager.cpp
index f4bb3c7..43be89a 100644
--- a/src/timeline/managers/selectmanager.cpp
+++ b/src/timeline/managers/selectmanager.cpp
@@ -77,7 +77,7 @@ bool SelectManager::mousePress(QMouseEvent *event, ItemInfo info, QList<QGraphic
return false;
}
-bool SelectManager::mouseMove(QMouseEvent *event, int pos, int)
+bool SelectManager::mouseMove(QMouseEvent *event, int, int)
{
OperationType mode = m_view->operationMode();
if (mode == Seek) {
diff --git a/src/timeline/managers/spacermanager.cpp b/src/timeline/managers/spacermanager.cpp
index 7eafa30..8f5aaee 100644
--- a/src/timeline/managers/spacermanager.cpp
+++ b/src/timeline/managers/spacermanager.cpp
@@ -87,6 +87,7 @@ bool SpacerManager::mouseMove(QMouseEvent *event, int pos, int )
void SpacerManager::mouseRelease(QMouseEvent *, GenTime pos)
{
//GenTime timeOffset = pos - m_startPos;
+ Q_UNUSED(pos);
if (!m_dragMoved || !m_view->selectionGroup()) {
m_view->clearSelection();
return;