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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
a5e5af96
Commit
a5e5af96
authored
Jul 12, 2020
by
Jean-Baptiste Mardelle
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clip url not correctly updated when opening project with missing clips.
Related to
#536
parent
fdaa4321
Pipeline
#26841
passed with stage
in 10 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/bin/clipcreator.cpp
src/bin/clipcreator.cpp
+1
-1
src/doc/documentchecker.cpp
src/doc/documentchecker.cpp
+6
-6
No files found.
src/bin/clipcreator.cpp
View file @
a5e5af96
...
...
@@ -313,7 +313,7 @@ const QString ClipCreator::createClipsFromList(const QList<QUrl> &list, bool che
if
(
checkRemovable
&&
isOnRemovableDevice
(
file
)
&&
!
isOnRemovableDevice
(
pCore
->
currentDoc
()
->
projectDataFolder
()))
{
int
answer
=
KMessageBox
::
warningContinueCancel
(
QApplication
::
activeWindow
(),
i18n
(
"Clip <b>%1</b><br /> is on a removable device, will not be available when device is unplugged or mounted at a different position.
You "
i18n
(
"Clip <b>%1</b><br /> is on a removable device, will not be available when device is unplugged or mounted at a different position.
\n
You "
"may want to copy it first to your hard-drive. Would you like to add it anyways?"
,
file
.
path
()),
i18n
(
"Removable device"
),
KStandardGuiItem
::
cont
(),
KStandardGuiItem
::
cancel
(),
QStringLiteral
(
"confirm_removable_device"
));
...
...
src/doc/documentchecker.cpp
View file @
a5e5af96
...
...
@@ -478,7 +478,7 @@ bool DocumentChecker::hasErrorInClips()
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
m_ui
.
treeWidget
,
QStringList
()
<<
clipType
);
item
->
setData
(
0
,
statusRole
,
CLIPMISSING
);
item
->
setData
(
0
,
clipTypeRole
,
(
int
)
type
);
item
->
setData
(
0
,
idRole
,
e
.
attribute
(
QStringLiteral
(
"
id"
)));
item
->
setData
(
0
,
idRole
,
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:
id"
)));
item
->
setToolTip
(
0
,
i18n
(
"Missing item"
));
if
(
status
==
TITLE_IMAGE_ELEMENT
)
{
...
...
@@ -644,7 +644,6 @@ bool DocumentChecker::hasErrorInClips()
for
(
int
i
=
0
;
i
<
max
;
++
i
)
{
QDomElement
e
=
missingSources
.
at
(
i
).
toElement
();
QString
realPath
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:originalurl"
));
QString
id
=
e
.
attribute
(
QStringLiteral
(
"id"
));
// Tell Kdenlive the source is missing
e
.
setAttribute
(
QStringLiteral
(
"_missingsource"
),
QStringLiteral
(
"1"
));
QTreeWidgetItem
*
subitem
=
new
QTreeWidgetItem
(
item
,
QStringList
()
<<
i18n
(
"Source clip"
));
...
...
@@ -656,7 +655,7 @@ bool DocumentChecker::hasErrorInClips()
subitem
->
setData
(
0
,
statusRole
,
CLIPMISSING
);
// int t = e.attribute("type").toInt();
subitem
->
setData
(
0
,
typeRole
,
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"mlt_service"
)));
subitem
->
setData
(
0
,
idRole
,
id
);
subitem
->
setData
(
0
,
idRole
,
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:id"
))
);
}
}
if
(
max
>
0
)
{
...
...
@@ -1067,6 +1066,7 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
QDomNodeList
properties
;
int
t
=
child
->
data
(
0
,
typeRole
).
toInt
();
QString
id
=
child
->
data
(
0
,
idRole
).
toString
();
qDebug
()
<<
"==== FIXING PRODUCER WITH ID: "
<<
id
;
if
(
child
->
data
(
0
,
statusRole
).
toInt
()
==
CLIPOK
)
{
QString
fixedResource
=
child
->
text
(
1
);
if
(
t
==
TITLE_IMAGE_ELEMENT
)
{
...
...
@@ -1110,12 +1110,12 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
}*/
for
(
int
i
=
0
;
i
<
producers
.
count
();
++
i
)
{
e
=
producers
.
item
(
i
).
toElement
();
if
(
e
.
attribute
(
QStringLiteral
(
"id"
)).
section
(
QLatin1Char
(
'_'
),
0
,
0
)
==
id
||
e
.
attribute
(
QStringLiteral
(
"id"
)).
section
(
QLatin1Char
(
':'
),
1
,
1
)
==
id
||
e
.
attribute
(
QStringLiteral
(
"id"
))
==
id
)
{
if
(
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:id"
))
==
id
)
{
// Fix clip
QString
resource
=
getProperty
(
e
,
QStringLiteral
(
"resource"
));
QString
service
=
getProperty
(
e
,
QStringLiteral
(
"mlt_service"
));
QString
updatedResource
=
fixedResource
;
qDebug
()
<<
"===== UPDATING RESOURCE FOR: "
<<
id
<<
": "
<<
resource
<<
" > "
<<
fixedResource
;
if
(
resource
.
contains
(
QRegExp
(
QStringLiteral
(
"
\\
?[0-9]+
\\
.[0-9]+(&strobe=[0-9]+)?$"
))))
{
updatedResource
.
append
(
QLatin1Char
(
'?'
)
+
resource
.
section
(
QLatin1Char
(
'?'
),
-
1
));
}
...
...
@@ -1131,7 +1131,7 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
// QString id = child->data(0, idRole).toString();
for
(
int
i
=
0
;
i
<
producers
.
count
();
++
i
)
{
e
=
producers
.
item
(
i
).
toElement
();
if
(
e
.
attribute
(
"id"
)
==
id
)
{
if
(
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:id"
)
)
==
id
)
{
// Fix clip
setProperty
(
e
,
QStringLiteral
(
"_placeholder"
),
QStringLiteral
(
"1"
));
setProperty
(
e
,
QStringLiteral
(
"kdenlive:orig_service"
),
getProperty
(
e
,
QStringLiteral
(
"mlt_service"
)));
...
...
Jean-Baptiste Mardelle
@mardelle
mentioned in issue
#753
·
Jul 12, 2020
mentioned in issue
#753
mentioned in issue #753
Toggle commit list
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