Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
8371b055
Commit
8371b055
authored
May 16, 2019
by
Nicolas Carion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix resetView test
parent
787436dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
src/timeline2/model/clipmodel.cpp
src/timeline2/model/clipmodel.cpp
+0
-1
tests/modeltest.cpp
tests/modeltest.cpp
+8
-6
No files found.
src/timeline2/model/clipmodel.cpp
View file @
8371b055
...
...
@@ -374,7 +374,6 @@ void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state, double sp
QWriteLocker
locker
(
&
m_lock
);
int
in
=
getIn
();
int
out
=
getOut
();
qDebug
()
<<
"refresh "
<<
speed
<<
m_speed
<<
in
<<
out
;
if
(
!
qFuzzyCompare
(
speed
,
m_speed
)
&&
!
qFuzzyCompare
(
speed
,
0.
))
{
in
=
in
*
std
::
abs
(
m_speed
/
speed
);
out
=
in
+
getPlaytime
()
-
1
;
...
...
tests/modeltest.cpp
View file @
8371b055
...
...
@@ -31,7 +31,8 @@ TEST_CASE("Basic creation/deletion of a track", "[TrackModel]")
// This is faked to allow to count calls
Fake
(
Method
(
timMock
,
_resetView
));
int
id1
=
TrackModel
::
construct
(
timeline
);
int
id1
,
id2
,
id3
;
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
id1
));
REQUIRE
(
timeline
->
checkConsistency
());
REQUIRE
(
timeline
->
getTracksCount
()
==
1
);
REQUIRE
(
timeline
->
getTrackPosition
(
id1
)
==
0
);
...
...
@@ -39,14 +40,14 @@ TEST_CASE("Basic creation/deletion of a track", "[TrackModel]")
Verify
(
Method
(
timMock
,
_resetView
)).
Exactly
(
Once
);
RESET
(
timMock
);
int
id2
=
TrackModel
::
construct
(
timeline
);
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
id2
)
);
REQUIRE
(
timeline
->
checkConsistency
());
REQUIRE
(
timeline
->
getTracksCount
()
==
2
);
REQUIRE
(
timeline
->
getTrackPosition
(
id2
)
==
1
);
Verify
(
Method
(
timMock
,
_resetView
)).
Exactly
(
Once
);
RESET
(
timMock
);
int
id3
=
TrackModel
::
construct
(
timeline
);
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
id3
)
);
REQUIRE
(
timeline
->
checkConsistency
());
REQUIRE
(
timeline
->
getTracksCount
()
==
3
);
REQUIRE
(
timeline
->
getTrackPosition
(
id3
)
==
2
);
...
...
@@ -211,9 +212,10 @@ TEST_CASE("Clip manipulation", "[ClipModel]")
QString
binId3
=
createProducer
(
profile_model
,
"green"
,
binModel
);
int
cid1
=
ClipModel
::
construct
(
timeline
,
binId
,
-
1
,
PlaylistState
::
VideoOnly
);
int
tid1
=
TrackModel
::
construct
(
timeline
);
int
tid2
=
TrackModel
::
construct
(
timeline
);
int
tid3
=
TrackModel
::
construct
(
timeline
);
int
tid1
,
tid2
,
tid3
;
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
tid1
));
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
tid2
));
REQUIRE
(
timeline
->
requestTrackInsertion
(
-
1
,
tid3
));
int
cid2
=
ClipModel
::
construct
(
timeline
,
binId2
,
-
1
,
PlaylistState
::
VideoOnly
);
int
cid3
=
ClipModel
::
construct
(
timeline
,
binId3
,
-
1
,
PlaylistState
::
VideoOnly
);
int
cid4
=
ClipModel
::
construct
(
timeline
,
binId2
,
-
1
,
PlaylistState
::
VideoOnly
);
...
...
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