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
52b16a74
Commit
52b16a74
authored
Apr 01, 2022
by
Jean-Baptiste Mardelle
Browse files
Code quality fixes
parent
185e9b9d
Pipeline
#157980
passed with stage
in 5 minutes and 54 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/timeremap.cpp
View file @
52b16a74
...
...
@@ -651,7 +651,7 @@ void RemapView::centerCurrentKeyframe()
QMap
<
int
,
int
>
nextKeyframes
;
if
(
m_moveNext
)
{
QMap
<
int
,
int
>::
iterator
it
=
m_keyframes
.
find
(
m_currentKeyframe
.
first
);
if
(
*
it
!=
m_keyframes
.
last
()
&&
it
!=
m_keyframes
.
end
())
{
if
(
it
!=
m_keyframes
.
end
()
&&
*
it
!=
m_keyframes
.
last
())
{
it
++
;
while
(
it
!=
m_keyframes
.
end
())
{
nextKeyframes
.
insert
(
it
.
key
(),
it
.
value
());
...
...
@@ -697,7 +697,7 @@ void RemapView::centerCurrentTopKeyframe()
int
offset
=
m_position
+
m_inFrame
-
m_currentKeyframe
.
second
;
if
(
m_moveNext
)
{
QMap
<
int
,
int
>::
iterator
it
=
m_keyframes
.
find
(
m_currentKeyframe
.
first
);
if
(
*
it
!=
m_keyframes
.
last
()
&&
it
!=
m_keyframes
.
end
())
{
if
(
it
!=
m_keyframes
.
end
()
&&
*
it
!=
m_keyframes
.
last
())
{
it
++
;
while
(
it
!=
m_keyframes
.
end
())
{
nextKeyframes
.
insert
(
it
.
key
(),
it
.
value
());
...
...
src/jobs/cachetask.cpp
View file @
52b16a74
...
...
@@ -86,16 +86,16 @@ void CacheTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip)
}
thumbProd
->
seek
(
i
);
QScopedPointer
<
Mlt
::
Frame
>
frame
(
thumbProd
->
get_frame
());
if
(
frame
!=
nullptr
&&
frame
->
is_valid
())
{
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
frame
->
set
(
"deinterlace_method"
,
"onefield"
);
frame
->
set
(
"top_field_first"
,
-
1
);
frame
->
set
(
"rescale.interp"
,
"nearest"
);
frame
->
set
(
"deinterlace_method"
,
"onefield"
);
frame
->
set
(
"top_field_first"
,
-
1
);
frame
->
set
(
"rescale.interp"
,
"nearest"
);
#else
frame
->
set
(
"consumer.deinterlacer"
,
"onefield"
);
frame
->
set
(
"consumer.top_field_first"
,
-
1
);
frame
->
set
(
"consumer.rescale"
,
"nearest"
);
frame
->
set
(
"consumer.deinterlacer"
,
"onefield"
);
frame
->
set
(
"consumer.top_field_first"
,
-
1
);
frame
->
set
(
"consumer.rescale"
,
"nearest"
);
#endif
if
(
frame
!=
nullptr
&&
frame
->
is_valid
())
{
QImage
result
=
KThumb
::
getFrame
(
frame
.
data
(),
0
,
0
,
m_fullWidth
);
if
(
!
result
.
isNull
())
{
qDebug
()
<<
"==== CACHING FRAME: "
<<
i
;
...
...
src/jobs/cliploadtask.cpp
View file @
52b16a74
...
...
@@ -273,16 +273,16 @@ void ClipLoadTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip, std::s
thumbProd
->
seek
(
frameNumber
);
}
QScopedPointer
<
Mlt
::
Frame
>
frame
(
thumbProd
->
get_frame
());
if
((
frame
!=
nullptr
)
&&
frame
->
is_valid
())
{
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
frame
->
set
(
"deinterlace_method"
,
"onefield"
);
frame
->
set
(
"top_field_first"
,
-
1
);
frame
->
set
(
"rescale.interp"
,
"nearest"
);
frame
->
set
(
"deinterlace_method"
,
"onefield"
);
frame
->
set
(
"top_field_first"
,
-
1
);
frame
->
set
(
"rescale.interp"
,
"nearest"
);
#else
frame
->
set
(
"consumer.deinterlacer"
,
"onefield"
);
frame
->
set
(
"consumer.top_field_first"
,
-
1
);
frame
->
set
(
"consumer.rescale"
,
"nearest"
);
frame
->
set
(
"consumer.deinterlacer"
,
"onefield"
);
frame
->
set
(
"consumer.top_field_first"
,
-
1
);
frame
->
set
(
"consumer.rescale"
,
"nearest"
);
#endif
if
((
frame
!=
nullptr
)
&&
frame
->
is_valid
())
{
int
imageHeight
(
pCore
->
thumbProfile
()
->
height
());
int
imageWidth
(
pCore
->
thumbProfile
()
->
width
());
int
fullWidth
(
qRound
(
imageHeight
*
pCore
->
getCurrentDar
()));
...
...
src/jobs/taskmanager.cpp
View file @
52b16a74
...
...
@@ -143,7 +143,7 @@ void TaskManager::startTask(int ownerId, AbstractTask *task)
// First task for this clip
m_taskList
[
ownerId
]
=
{
task
};
}
else
{
m_taskList
[
ownerId
].
emplace_back
(
std
::
move
(
task
)
)
;
m_taskList
[
ownerId
].
emplace_back
(
task
);
}
if
(
task
->
m_type
==
AbstractTask
::
TRANSCODEJOB
||
task
->
m_type
==
AbstractTask
::
PROXYJOB
)
{
// We only want a limited concurrent jobs for those as for example GPU usually only accept 2 concurrent encoding jobs
...
...
src/mainwindow.cpp
View file @
52b16a74
...
...
@@ -142,6 +142,7 @@ MainWindow::MainWindow(QWidget *parent)
:
KXmlGuiWindow
(
parent
)
,
m_activeTool
(
ToolType
::
SelectTool
)
,
m_mousePosition
(
0
)
,
m_effectBasket
(
nullptr
)
{
// Init all action categories that are used by other parts of the software
// before we call MainWindow::init and therefore can't be initilized there
...
...
src/onlineresources/providermodel.hpp
View file @
52b16a74
...
...
@@ -35,7 +35,7 @@ struct ResourceItemInfo
QStringList
downloadLabels
;
QString
imageUrl
;
QString
previewUrl
;
int
filesize
;
//
int filesize;
};
class
ProviderModel
:
public
QObject
...
...
src/timeline2/model/timelinemodel.cpp
View file @
52b16a74
...
...
@@ -6246,7 +6246,7 @@ void TimelineModel::requestResizeMix(int cid, int duration, MixAlignment align,
emit
selectedMixChanged
(
cid
,
getTrackById_const
(
tid
)
->
mixModel
(
cid
),
true
);
return
;
}
if
(
qAbs
(
deltaLeft
-
deltaRight
>
2
)
)
{
if
(
qAbs
(
deltaLeft
-
deltaRight
)
>
2
)
{
// Mix not exactly centered
emit
selectedMixChanged
(
cid
,
getTrackById_const
(
tid
)
->
mixModel
(
cid
),
true
);
return
;
...
...
src/timeline2/model/trackmodel.cpp
View file @
52b16a74
...
...
@@ -1138,6 +1138,7 @@ std::pair<int, int> TrackModel::getClipIndexAt(int position, int playlist)
return
{
j
,
m_playlists
[
j
].
get_clip_index_at
(
position
)};
}
}
return
{
-
1
,
-
1
};
}
if
(
!
m_playlists
[
playlist
].
is_blank_at
(
position
))
{
return
{
playlist
,
m_playlists
[
playlist
].
get_clip_index_at
(
position
)};
...
...
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