Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
05174118
Commit
05174118
authored
Oct 31, 2016
by
Jean-Baptiste Mardelle
Browse files
cleanup
parent
c5f07dfc
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/doc/kdenlivedoc.cpp
View file @
05174118
...
...
@@ -744,8 +744,14 @@ void KdenliveDoc::setProjectFolder(QUrl url)
updateProjectFolderPlacesEntry
();
}
void
KdenliveDoc
::
moveProjectData
(
const
Q
Url
&
url
)
void
KdenliveDoc
::
moveProjectData
(
const
Q
String
&
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
());
...
...
src/doc/kdenlivedoc.h
View file @
05174118
...
...
@@ -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
Q
Url
&
url
);
void
moveProjectData
(
const
Q
String
&
src
,
const
QString
&
dest
);
private:
QUrl
m_url
;
...
...
src/mainwindow.cpp
View file @
05174118
...
...
@@ -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
p
Core
->
projectManager
()
->
moveDataFolder
(
oldDir
.
absoluteFilePath
(
documentId
),
newDir
.
absolutePath
());
p
roject
->
moveProjectData
(
oldDir
.
absoluteFilePath
(
documentId
),
newDir
.
absolutePath
());
}
}
}
...
...
src/project/projectmanager.cpp
View file @
05174118
...
...
@@ -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
);
...
...
src/project/projectmanager.h
View file @
05174118
...
...
@@ -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
);
...
...
src/timeline/managers/guidemanager.cpp
View file @
05174118
...
...
@@ -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
;
...
...
src/timeline/managers/selectmanager.cpp
View file @
05174118
...
...
@@ -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
)
{
...
...
src/timeline/managers/spacermanager.cpp
View file @
05174118
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment