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
9ee93449
Commit
9ee93449
authored
Mar 20, 2021
by
Vincent Pinon
Browse files
clang-tidy -fix: modernize-pass-by-value
parent
7ca22b50
Changes
16
Hide whitespace changes
Inline
Side-by-side
src/audiomixer/mixerwidget.cpp
View file @
9ee93449
...
...
@@ -31,20 +31,21 @@
#include "audiolevelwidget.hpp"
#include "capture/mediacapture.h"
#include <klocalizedstring.h>
#include <KDualAction>
#include <QGridLayout>
#include <QToolButton>
#include <KSqueezedTextLabel>
#include <QCheckBox>
#include <QSlider>
#include <QDial>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QFontDatabase>
#include <QGridLayout>
#include <QLabel>
#include <QMouseEvent>
#include <QSlider>
#include <QSpinBox>
#include <QStyle>
#include <QFontDatabase>
#include <KSqueezedTextLabel>
#include <QToolButton>
#include <klocalizedstring.h>
#include <utility>
static
inline
double
IEC_Scale
(
double
dB
)
{
...
...
@@ -100,7 +101,7 @@ void MixerWidget::property_changed( mlt_service , MixerWidget *widget, char *nam
}
}
MixerWidget
::
MixerWidget
(
int
tid
,
std
::
shared_ptr
<
Mlt
::
Tractor
>
service
,
const
QString
&
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
)
MixerWidget
::
MixerWidget
(
int
tid
,
std
::
shared_ptr
<
Mlt
::
Tractor
>
service
,
QString
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
)
:
QWidget
(
parent
)
,
m_manager
(
parent
)
,
m_tid
(
tid
)
...
...
@@ -116,12 +117,12 @@ MixerWidget::MixerWidget(int tid, std::shared_ptr<Mlt::Tractor> service, const Q
,
m_lastVolume
(
0
)
,
m_listener
(
nullptr
)
,
m_recording
(
false
)
,
m_trackTag
(
trackTag
)
,
m_trackTag
(
std
::
move
(
trackTag
)
)
{
buildUI
(
service
.
get
(),
trackName
);
}
MixerWidget
::
MixerWidget
(
int
tid
,
Mlt
::
Tractor
*
service
,
const
QString
&
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
)
MixerWidget
::
MixerWidget
(
int
tid
,
Mlt
::
Tractor
*
service
,
QString
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
)
:
QWidget
(
parent
)
,
m_manager
(
parent
)
,
m_tid
(
tid
)
...
...
@@ -137,7 +138,7 @@ MixerWidget::MixerWidget(int tid, Mlt::Tractor *service, const QString &trackTag
,
m_lastVolume
(
0
)
,
m_listener
(
nullptr
)
,
m_recording
(
false
)
,
m_trackTag
(
trackTag
)
,
m_trackTag
(
std
::
move
(
trackTag
)
)
{
buildUI
(
service
,
trackName
);
}
...
...
src/audiomixer/mixerwidget.hpp
View file @
9ee93449
...
...
@@ -51,8 +51,8 @@ class MixerWidget : public QWidget
Q_OBJECT
public:
MixerWidget
(
int
tid
,
std
::
shared_ptr
<
Mlt
::
Tractor
>
service
,
const
QString
&
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
=
nullptr
);
MixerWidget
(
int
tid
,
Mlt
::
Tractor
*
service
,
const
QString
&
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
=
nullptr
);
MixerWidget
(
int
tid
,
std
::
shared_ptr
<
Mlt
::
Tractor
>
service
,
QString
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
=
nullptr
);
MixerWidget
(
int
tid
,
Mlt
::
Tractor
*
service
,
QString
trackTag
,
const
QString
&
trackName
,
MixerManager
*
parent
=
nullptr
);
~
MixerWidget
()
override
;
void
buildUI
(
Mlt
::
Tractor
*
service
,
const
QString
&
trackName
);
/** @brief discard stored audio values and reset vu-meter to 0 if requested */
...
...
src/bin/model/subtitlemodel.cpp
View file @
9ee93449
...
...
@@ -35,15 +35,16 @@
#include <KLocalizedString>
#include <KMessageBox>
#include <QApplication>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QTextCodec>
#include <
QApplication
>
#include <
utility
>
SubtitleModel
::
SubtitleModel
(
Mlt
::
Tractor
*
tractor
,
std
::
shared_ptr
<
TimelineItemModel
>
timeline
,
QObject
*
parent
)
:
QAbstractListModel
(
parent
)
,
m_timeline
(
timeline
)
,
m_timeline
(
std
::
move
(
timeline
)
)
,
m_lock
(
QReadWriteLock
::
Recursive
)
,
m_subtitleFilter
(
new
Mlt
::
Filter
(
pCore
->
getCurrentProfile
()
->
profile
(),
"avfilter.subtitles"
))
,
m_tractor
(
tractor
)
...
...
src/definitions.cpp
View file @
9ee93449
...
...
@@ -21,6 +21,7 @@
#include <klocalizedstring.h>
#include <QColor>
#include <utility>
#ifdef CRASH_AUTO_TEST
#pragma GCC diagnostic push
...
...
@@ -214,7 +215,7 @@ SubtitledTime::SubtitledTime()
SubtitledTime
::
SubtitledTime
(
const
GenTime
&
start
,
QString
sub
,
const
GenTime
&
end
)
:
m_starttime
(
start
)
,
m_subtitle
(
sub
)
,
m_subtitle
(
std
::
move
(
sub
)
)
,
m_endtime
(
end
)
{
}
...
...
src/dialogs/speechdialog.cpp
View file @
9ee93449
...
...
@@ -36,10 +36,11 @@
#include <QFontDatabase>
#include <QProcess>
#include <memory>
#include <utility>
SpeechDialog
::
SpeechDialog
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QPoint
zone
,
bool
activeTrackOnly
,
bool
selectionOnly
,
QWidget
*
parent
)
SpeechDialog
::
SpeechDialog
(
std
::
shared_ptr
<
TimelineItemModel
>
timeline
,
QPoint
zone
,
bool
activeTrackOnly
,
bool
selectionOnly
,
QWidget
*
parent
)
:
QDialog
(
parent
)
,
m_timeline
(
timeline
)
,
m_timeline
(
std
::
move
(
timeline
)
)
{
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
...
...
src/dialogs/speechdialog.h
View file @
9ee93449
...
...
@@ -40,7 +40,7 @@ class SpeechDialog : public QDialog, public Ui::SpeechDialog_UI
Q_OBJECT
public:
explicit
SpeechDialog
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QPoint
zone
,
bool
activeTrackOnly
=
false
,
bool
selectionOnly
=
false
,
QWidget
*
parent
=
nullptr
);
explicit
SpeechDialog
(
std
::
shared_ptr
<
TimelineItemModel
>
timeline
,
QPoint
zone
,
bool
activeTrackOnly
=
false
,
bool
selectionOnly
=
false
,
QWidget
*
parent
=
nullptr
);
~
SpeechDialog
()
override
;
private:
...
...
src/jobs/abstractclipjob.cpp
View file @
9ee93449
...
...
@@ -19,16 +19,18 @@
***************************************************************************/
#include "abstractclipjob.h"
#include "doc/kdenlivedoc.h"
#include "kdenlivesettings.h"
#include <utility>
AbstractClipJob
::
AbstractClipJob
(
JOBTYPE
type
,
QString
id
,
const
ObjectId
&
owner
,
QObject
*
parent
)
AbstractClipJob
::
AbstractClipJob
(
JOBTYPE
type
,
QString
id
,
ObjectId
owner
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_clipId
(
std
::
move
(
id
))
,
m_jobType
(
type
)
,
m_inPoint
(
-
1
)
,
m_outPoint
(
-
1
)
,
m_owner
(
owner
)
,
m_owner
(
std
::
move
(
owner
)
)
{
if
(
m_clipId
.
count
(
QStringLiteral
(
"/"
))
==
2
)
{
m_inPoint
=
m_clipId
.
section
(
QLatin1Char
(
'/'
),
1
,
1
).
toInt
();
...
...
src/jobs/abstractclipjob.h
View file @
9ee93449
...
...
@@ -53,7 +53,7 @@ public:
SPEEDJOB
=
10
,
CACHEJOB
=
11
};
AbstractClipJob
(
JOBTYPE
type
,
QString
id
,
const
ObjectId
&
owner
,
QObject
*
parent
=
nullptr
);
AbstractClipJob
(
JOBTYPE
type
,
QString
id
,
ObjectId
owner
,
QObject
*
parent
=
nullptr
);
~
AbstractClipJob
()
override
;
template
<
typename
T
,
typename
...
Args
>
static
std
::
shared_ptr
<
T
>
make
(
const
QString
&
binId
,
Args
&&
...
args
)
...
...
src/jobs/cutclipjob.cpp
View file @
9ee93449
...
...
@@ -39,6 +39,7 @@
#include <QApplication>
#include <QDialog>
#include <QPointer>
#include <utility>
CutClipJob
::
CutClipJob
(
const
QString
&
binId
,
const
QString
sourcePath
,
GenTime
inTime
,
GenTime
outTime
,
const
QString
destPath
,
QStringList
encodingParams
)
:
AbstractClipJob
(
CUTJOB
,
binId
,
{
ObjectType
::
BinClip
,
binId
.
toInt
()})
...
...
@@ -48,7 +49,7 @@ CutClipJob::CutClipJob(const QString &binId, const QString sourcePath, GenTime i
,
m_jobProcess
(
nullptr
)
,
m_in
(
inTime
)
,
m_out
(
outTime
)
,
m_encodingParams
(
encodingParams
)
,
m_encodingParams
(
std
::
move
(
encodingParams
)
)
,
m_jobDuration
((
int
)(
outTime
-
inTime
).
seconds
())
{
}
...
...
src/jobs/filterclipjob.cpp
View file @
9ee93449
...
...
@@ -28,14 +28,15 @@
#include "macros.hpp"
#include <QThread>
#include <utility>
#include <klocalizedstring.h>
FilterClipJob
::
FilterClipJob
(
const
QString
&
binId
,
const
ObjectId
&
owner
,
std
::
weak_ptr
<
AssetParameterModel
>
model
,
const
QString
&
assetId
,
int
in
,
int
out
,
const
QString
&
filterName
,
std
::
unordered_map
<
QString
,
QVariant
>
filterParams
,
std
::
unordered_map
<
QString
,
QString
>
filterData
,
const
QStringList
consumerArgs
)
FilterClipJob
::
FilterClipJob
(
const
QString
&
binId
,
const
ObjectId
&
owner
,
std
::
weak_ptr
<
AssetParameterModel
>
model
,
QString
assetId
,
int
in
,
int
out
,
QString
filterName
,
std
::
unordered_map
<
QString
,
QVariant
>
filterParams
,
std
::
unordered_map
<
QString
,
QString
>
filterData
,
const
QStringList
consumerArgs
)
:
MeltJob
(
binId
,
owner
,
FILTERCLIPJOB
,
false
,
in
,
out
)
,
m_model
(
model
)
,
m_filterName
(
filterName
)
,
m_assetId
(
assetId
)
,
m_model
(
std
::
move
(
model
)
)
,
m_filterName
(
std
::
move
(
filterName
)
)
,
m_assetId
(
std
::
move
(
assetId
)
)
,
m_filterParams
(
std
::
move
(
filterParams
))
,
m_filterData
(
std
::
move
(
filterData
))
,
m_consumerArgs
(
consumerArgs
)
...
...
src/jobs/filterclipjob.h
View file @
9ee93449
...
...
@@ -33,7 +33,7 @@ class FilterClipJob : public MeltJob
Q_OBJECT
public:
FilterClipJob
(
const
QString
&
binId
,
const
ObjectId
&
owner
,
std
::
weak_ptr
<
AssetParameterModel
>
model
,
const
QString
&
assetId
,
int
in
,
int
out
,
const
QString
&
filterName
,
std
::
unordered_map
<
QString
,
QVariant
>
filterParams
,
std
::
unordered_map
<
QString
,
QString
>
filterData
,
const
QStringList
consumerArgs
);
FilterClipJob
(
const
QString
&
binId
,
const
ObjectId
&
owner
,
std
::
weak_ptr
<
AssetParameterModel
>
model
,
QString
assetId
,
int
in
,
int
out
,
QString
filterName
,
std
::
unordered_map
<
QString
,
QVariant
>
filterParams
,
std
::
unordered_map
<
QString
,
QString
>
filterData
,
const
QStringList
consumerArgs
);
const
QString
getDescription
()
const
override
;
/** @brief This is to be called after the job finished.
By design, the job should store the result of the computation but not share it with the rest of the code. This happens when we call commitResult */
...
...
src/jobs/loadjob.cpp
View file @
9ee93449
...
...
@@ -41,11 +41,12 @@
#include <QWidget>
#include <mlt++/MltProducer.h>
#include <mlt++/MltProfile.h>
#include <utility>
LoadJob
::
LoadJob
(
const
QString
&
binId
,
const
QDomElement
&
xml
,
const
std
::
function
<
void
()
>
&
readyCallBack
)
LoadJob
::
LoadJob
(
const
QString
&
binId
,
const
QDomElement
&
xml
,
std
::
function
<
void
()
>
readyCallBack
)
:
AbstractClipJob
(
LOADJOB
,
binId
,
{
ObjectType
::
BinClip
,
binId
.
toInt
()})
,
m_xml
(
xml
)
,
m_readyCallBack
(
readyCallBack
)
,
m_readyCallBack
(
std
::
move
(
readyCallBack
)
)
{
}
...
...
src/jobs/loadjob.hpp
View file @
9ee93449
...
...
@@ -43,7 +43,7 @@ public:
@param frameNumber is the frame to extract. Leave to -1 for default
@param persistent: if true, we will use the persistent cache (for query and saving)
*/
LoadJob
(
const
QString
&
binId
,
const
QDomElement
&
xml
,
const
std
::
function
<
void
()
>
&
readyCallBack
=
[]()
{});
LoadJob
(
const
QString
&
binId
,
const
QDomElement
&
xml
,
std
::
function
<
void
()
>
readyCallBack
=
[]()
{});
const
QString
getDescription
()
const
override
;
...
...
src/jobs/transcodeclipjob.cpp
View file @
9ee93449
...
...
@@ -31,6 +31,7 @@
#include <QProcess>
#include <QThread>
#include <utility>
#include <klocalizedstring.h>
...
...
@@ -40,7 +41,7 @@ TranscodeJob::TranscodeJob(const QString &binId, QString params)
,
m_isFfmpegJob
(
true
)
,
m_jobProcess
(
nullptr
)
,
m_done
(
false
)
,
m_transcodeParams
(
params
)
,
m_transcodeParams
(
std
::
move
(
params
)
)
{
}
...
...
src/timeline2/view/dialogs/trackdialog.cpp
View file @
9ee93449
...
...
@@ -22,11 +22,12 @@
#include "kdenlivesettings.h"
#include <QIcon>
#include <utility>
TrackDialog
::
TrackDialog
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
model
,
int
trackIndex
,
QWidget
*
parent
,
bool
deleteMode
,
int
activeTrackId
)
TrackDialog
::
TrackDialog
(
std
::
shared_ptr
<
TimelineItemModel
>
model
,
int
trackIndex
,
QWidget
*
parent
,
bool
deleteMode
,
int
activeTrackId
)
:
QDialog
(
parent
)
,
m_trackIndex
(
trackIndex
)
,
m_model
(
model
)
,
m_model
(
std
::
move
(
model
)
)
,
m_deleteMode
(
deleteMode
)
,
m_activeTrack
(
activeTrackId
)
{
...
...
src/timeline2/view/dialogs/trackdialog.h
View file @
9ee93449
...
...
@@ -28,7 +28,7 @@ class TrackDialog : public QDialog, public Ui::AddTrack_UI
Q_OBJECT
public:
explicit
TrackDialog
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
model
,
int
trackIndex
=
-
1
,
QWidget
*
parent
=
nullptr
,
bool
deleteMode
=
false
,
int
activeTrack
=
-
1
);
explicit
TrackDialog
(
std
::
shared_ptr
<
TimelineItemModel
>
model
,
int
trackIndex
=
-
1
,
QWidget
*
parent
=
nullptr
,
bool
deleteMode
=
false
,
int
activeTrack
=
-
1
);
/** @brief: returns the selected position in MLT
*/
int
selectedTrackPosition
()
const
;
...
...
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