Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
40f51140
Commit
40f51140
authored
Dec 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2012'
parents
d27eec9e
01f6e42d
Pipeline
#42775
passed with stage
in 10 minutes and 16 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
12 deletions
+14
-12
src/bin/projectclip.cpp
src/bin/projectclip.cpp
+4
-3
src/bin/projectclip.h
src/bin/projectclip.h
+1
-1
src/dialogs/renderwidget.cpp
src/dialogs/renderwidget.cpp
+1
-1
src/doc/documentchecker.cpp
src/doc/documentchecker.cpp
+5
-3
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+2
-3
src/project/projectmanager.cpp
src/project/projectmanager.cpp
+1
-1
No files found.
src/bin/projectclip.cpp
View file @
40f51140
...
...
@@ -986,9 +986,10 @@ const QString ProjectClip::hash()
return
getFileHash
();
}
const
QByteArray
ProjectClip
::
getFolderHash
(
QDir
dir
)
const
QByteArray
ProjectClip
::
getFolderHash
(
QDir
dir
,
QString
fileName
)
{
QByteArray
fileData
=
dir
.
entryList
(
QDir
::
Files
).
join
(
QLatin1Char
(
','
)).
toUtf8
();
fileName
.
append
(
dir
.
entryList
(
QDir
::
Files
).
join
(
QLatin1Char
(
','
)));
QByteArray
fileData
=
fileName
.
toUtf8
();
return
QCryptographicHash
::
hash
(
fileData
,
QCryptographicHash
::
Md5
);
}
...
...
@@ -998,7 +999,7 @@ const QString ProjectClip::getFileHash()
QByteArray
fileHash
;
switch
(
m_clipType
)
{
case
ClipType
::
SlideShow
:
fileHash
=
getFolderHash
(
QFileInfo
(
clipUrl
()).
absoluteDir
());
fileHash
=
getFolderHash
(
QFileInfo
(
clipUrl
()).
absoluteDir
()
,
QFileInfo
(
clipUrl
()).
fileName
()
);
break
;
case
ClipType
::
Text
:
fileData
=
getProducerProperty
(
QStringLiteral
(
"xmldata"
)).
toUtf8
();
...
...
src/bin/projectclip.h
View file @
40f51140
...
...
@@ -244,7 +244,7 @@ public:
/** @brief Get the list of audio stream effects for a defined stream. */
QStringList
getAudioStreamEffect
(
int
streamIndex
)
const
override
;
/** @brief Calculate the folder's hash (based on the files it contains). */
static
const
QByteArray
getFolderHash
(
QDir
dir
);
static
const
QByteArray
getFolderHash
(
QDir
dir
,
QString
fileName
);
/** @brief Check if the clip is included in timeline and reset its occurences on producer reload. */
void
updateTimelineOnReload
();
...
...
src/dialogs/renderwidget.cpp
View file @
40f51140
...
...
@@ -1294,7 +1294,7 @@ void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapte
}
// replace proxy clips with originals
QMap
<
QString
,
QString
>
proxies
=
pCore
->
projectItemModel
()
->
getProxies
(
pCore
->
currentDoc
()
->
documentRoot
()
);
QMap
<
QString
,
QString
>
proxies
=
pCore
->
projectItemModel
()
->
getProxies
(
root
);
QDomNodeList
producers
=
doc
.
elementsByTagName
(
QStringLiteral
(
"producer"
));
QString
producerResource
;
...
...
src/doc/documentchecker.cpp
View file @
40f51140
...
...
@@ -294,9 +294,11 @@ bool DocumentChecker::hasErrorInClips()
continue
;
}
// Check for slideshows
QString
slidePattern
;
bool
slideshow
=
resource
.
contains
(
QStringLiteral
(
"/.all."
))
||
resource
.
contains
(
QLatin1Char
(
'?'
))
||
resource
.
contains
(
QLatin1Char
(
'%'
));
if
(
slideshow
)
{
if
(
service
==
QLatin1String
(
"qimage"
)
||
service
==
QLatin1String
(
"pixbuf"
))
{
slidePattern
=
QFileInfo
(
resource
).
fileName
();
resource
=
QFileInfo
(
resource
).
absolutePath
();
}
else
if
(
service
.
startsWith
(
QLatin1String
(
"avformat"
))
&&
Xml
::
hasXmlProperty
(
e
,
QStringLiteral
(
"ttl"
)))
{
// Fix MLT 6.20 avformat slideshows
...
...
@@ -332,7 +334,7 @@ bool DocumentChecker::hasErrorInClips()
// Check if file changed
const
QByteArray
hash
=
Xml
::
getXmlProperty
(
e
,
"kdenlive:file_hash"
).
toLatin1
();
if
(
!
hash
.
isEmpty
())
{
const
QByteArray
fileData
=
slideshow
?
ProjectClip
::
getFolderHash
(
QDir
(
resource
)).
toHex
()
:
ProjectClip
::
calculateHash
(
resource
).
first
.
toHex
();
const
QByteArray
fileData
=
slideshow
?
ProjectClip
::
getFolderHash
(
QDir
(
resource
)
,
slidePattern
).
toHex
()
:
ProjectClip
::
calculateHash
(
resource
).
first
.
toHex
();
if
(
hash
!=
fileData
)
{
// For slideshow clips, silently upgrade hash
if
(
slideshow
)
{
...
...
@@ -1019,7 +1021,7 @@ QString DocumentChecker::searchDirRecursively(const QDir &dir, const QString &ma
QStringList
filesAndDirs
;
QString
fileName
=
QFileInfo
(
fullName
).
fileName
();
// Check main dir
QString
fileHash
=
ProjectClip
::
getFolderHash
(
dir
).
toHex
();
QString
fileHash
=
ProjectClip
::
getFolderHash
(
dir
,
fileName
).
toHex
();
if
(
fileHash
==
matchHash
)
{
return
dir
.
absoluteFilePath
(
fileName
);
}
...
...
@@ -1027,7 +1029,7 @@ QString DocumentChecker::searchDirRecursively(const QDir &dir, const QString &ma
const
QStringList
subDirs
=
dir
.
entryList
(
QDir
::
AllDirs
|
QDir
::
NoDot
|
QDir
::
NoDotDot
);
for
(
const
QString
&
sub
:
subDirs
)
{
QDir
subFolder
(
dir
.
absoluteFilePath
(
sub
));
fileHash
=
ProjectClip
::
getFolderHash
(
subFolder
).
toHex
();
fileHash
=
ProjectClip
::
getFolderHash
(
subFolder
,
fileName
).
toHex
();
if
(
fileHash
==
matchHash
)
{
return
subFolder
.
absoluteFilePath
(
fileName
);
}
...
...
src/doc/kdenlivedoc.cpp
View file @
40f51140
...
...
@@ -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
()));
}
}
...
...
@@ -1299,7 +1298,7 @@ void KdenliveDoc::loadDocumentProperties()
QDomElement
baseElement
=
m_document
.
documentElement
();
m_documentRoot
=
baseElement
.
attribute
(
QStringLiteral
(
"root"
));
if
(
!
m_documentRoot
.
isEmpty
())
{
m_documentRoot
=
QDir
::
cleanPath
(
m_documentRoot
)
+
Q
Dir
::
separator
(
);
m_documentRoot
=
QDir
::
cleanPath
(
m_documentRoot
)
+
Q
Latin1Char
(
'/'
);
}
if
(
!
list
.
isEmpty
())
{
QDomElement
pl
=
list
.
at
(
0
).
toElement
();
...
...
src/project/projectmanager.cpp
View file @
40f51140
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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