Skip to content
GitLab
Menu
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
735bf84b
Commit
735bf84b
authored
Oct 23, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix some compile warnings
parent
8f43cbb7
Pipeline
#38578
passed with stage
in 26 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/trackmodel.cpp
View file @
735bf84b
...
...
@@ -1066,7 +1066,7 @@ bool TrackModel::checkConsistency()
service
.
reset
(
service
->
producer
());
}
}
if
(
mixCount
!=
m_sameCompositions
.
size
()
||
m_sameCompositions
.
size
()
!=
m_mixList
.
count
())
{
if
(
mixCount
!=
static_cast
<
int
>
(
m_sameCompositions
.
size
()
)
||
static_cast
<
int
>
(
m_sameCompositions
.
size
()
)
!=
m_mixList
.
count
())
{
// incoherent mix count
qDebug
()
<<
"=== INCORRECT mix count. Existing: "
<<
mixCount
<<
"; REGISTERED: "
<<
m_mixList
.
count
();
return
false
;
...
...
@@ -1715,6 +1715,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
0
,
m_id
);
int
index
=
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
return
false
;
}
}
m_playlists
[
1
].
consolidate_blanks
();
}
...
...
@@ -1728,6 +1734,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
1
,
m_id
);
int
index
=
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
return
false
;
}
}
if
(
m_sameCompositions
.
count
(
i
.
key
())
>
0
)
{
// There is a mix at clip start, adjust direction
...
...
@@ -1764,6 +1776,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
1
,
m_id
);
int
index
=
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
return
false
;
}
}
m_playlists
[
0
].
consolidate_blanks
();
}
...
...
@@ -1777,6 +1795,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
0
,
m_id
);
int
index
=
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
return
false
;
}
}
if
(
m_sameCompositions
.
count
(
i
.
key
())
>
0
)
{
// There is a mix at clip start, adjust direction
...
...
@@ -1847,9 +1871,9 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
if
(
auto
ptr
=
m_parent
.
lock
())
{
ptr
->
getClipPtr
(
clipIds
.
second
)
->
setSubPlaylistIndex
(
dest_track
,
m_id
);
}
rearrange_playlists
();
bool
result
=
rearrange_playlists
();
auto
op
=
requestClipInsertion_lambda
(
clipIds
.
second
,
secondClipPos
,
updateView
,
finalMove
,
groupMove
);
bool
result
=
op
();
result
=
result
&&
op
();
if
(
result
)
{
build_mix
();
std
::
function
<
bool
(
void
)
>
local_undo
=
[]()
{
return
true
;
};
...
...
@@ -1872,14 +1896,14 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
ptr
->
getClipPtr
(
clipIds
.
second
)
->
requestResize
(
secondClipDuration
,
false
,
local_undo
,
local_redo
,
false
);
ptr
->
getClipPtr
(
clipIds
.
first
)
->
requestResize
(
firstClipDuration
,
true
,
local_undo
,
local_redo
,
false
);
}
operation
();
bool
result
=
operation
();
if
(
auto
ptr
=
m_parent
.
lock
())
{
ptr
->
getClipPtr
(
clipIds
.
second
)
->
setSubPlaylistIndex
(
source_track
,
m_id
);
}
rearrange_playlists_undo
();
result
=
result
&&
rearrange_playlists_undo
();
auto
op
=
requestClipInsertion_lambda
(
clipIds
.
second
,
secondClipPos
,
updateView
,
finalMove
,
groupMove
);
op
();
return
true
;
result
=
result
&&
op
();
return
result
;
};
res
=
res
&&
replay
();
if
(
res
)
{
...
...
@@ -1920,6 +1944,7 @@ std::pair<MixInfo, MixInfo> TrackModel::getMixInfo(int clipId) const
}
}
else
{
startMix
.
firstClipId
=
-
1
;
startMix
.
secondClipId
=
-
1
;
}
int
secondClip
=
m_mixList
.
value
(
clipId
,
-
1
);
if
(
secondClip
>
-
1
)
{
...
...
@@ -1941,6 +1966,7 @@ std::pair<MixInfo, MixInfo> TrackModel::getMixInfo(int clipId) const
}
}
else
{
endMix
.
firstClipId
=
-
1
;
endMix
.
secondClipId
=
-
1
;
}
result
=
{
startMix
,
endMix
};
return
result
;
...
...
Write
Preview
Supports
Markdown
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