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
a4a3e1a2
Commit
a4a3e1a2
authored
Aug 09, 2021
by
Julius Künzel
Browse files
Fix more clang-tidy/clazy warnings
parent
2e040676
Pipeline
#74028
passed with stage
in 9 minutes and 8 seconds
Changes
33
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/assets/assetpanel.cpp
View file @
a4a3e1a2
...
...
@@ -504,9 +504,9 @@ void AssetPanel::slotAddRemoveKeyframe()
if
(
m_effectStackWidget
->
isVisible
())
{
m_effectStackWidget
->
addRemoveKeyframe
();
}
else
if
(
m_transitionWidget
->
isVisible
())
{
m_transitionWidget
->
addRemoveKeyframe
();
emit
m_transitionWidget
->
addRemoveKeyframe
();
}
else
if
(
m_mixWidget
->
isVisible
())
{
m_mixWidget
->
addRemoveKeyframe
();
emit
m_mixWidget
->
addRemoveKeyframe
();
}
}
...
...
@@ -515,9 +515,9 @@ void AssetPanel::slotNextKeyframe()
if
(
m_effectStackWidget
->
isVisible
())
{
m_effectStackWidget
->
slotGoToKeyframe
(
true
);
}
else
if
(
m_transitionWidget
->
isVisible
())
{
m_transitionWidget
->
nextKeyframe
();
emit
m_transitionWidget
->
nextKeyframe
();
}
else
if
(
m_mixWidget
->
isVisible
())
{
m_mixWidget
->
nextKeyframe
();
emit
m_mixWidget
->
nextKeyframe
();
}
}
...
...
@@ -526,8 +526,8 @@ void AssetPanel::slotPreviousKeyframe()
if
(
m_effectStackWidget
->
isVisible
())
{
m_effectStackWidget
->
slotGoToKeyframe
(
false
);
}
else
if
(
m_transitionWidget
->
isVisible
())
{
m_transitionWidget
->
previousKeyframe
();
emit
m_transitionWidget
->
previousKeyframe
();
}
else
if
(
m_mixWidget
->
isVisible
())
{
m_mixWidget
->
previousKeyframe
();
emit
m_mixWidget
->
previousKeyframe
();
}
}
src/assets/model/assetparametermodel.cpp
View file @
a4a3e1a2
...
...
@@ -222,7 +222,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
}
qDebug
()
<<
"END parsing of "
<<
assetId
<<
". Number of found parameters"
<<
m_rows
.
size
();
modelChanged
();
emit
modelChanged
();
}
void
AssetParameterModel
::
prepareKeyframes
()
...
...
src/assets/view/widgets/curves/cubic/kis_curve_widget.cpp
View file @
a4a3e1a2
...
...
@@ -263,7 +263,7 @@ int KisCurveWidget::sp2io(double x) const
bool
KisCurveWidget
::
jumpOverExistingPoints
(
QPointF
&
pt
,
int
skipIndex
)
{
for
(
const
QPointF
&
it
:
m_curve
.
points
())
{
for
(
QPointF
&
it
:
m_curve
.
points
())
{
if
(
m_curve
.
points
().
indexOf
(
it
)
==
skipIndex
)
{
continue
;
}
...
...
@@ -278,7 +278,7 @@ int KisCurveWidget::nearestPointInRange(QPointF pt, int wWidth, int wHeight) con
int
nearestIndex
=
-
1
;
int
i
=
0
;
for
(
const
QPointF
&
point
:
m_curve
.
points
())
{
for
(
QPointF
&
point
:
m_curve
.
points
())
{
double
distanceSquared
=
(
pt
.
x
()
-
point
.
x
())
*
(
pt
.
x
()
-
point
.
x
())
+
(
pt
.
y
()
-
point
.
y
())
*
(
pt
.
y
()
-
point
.
y
());
if
(
distanceSquared
<
nearestDistanceSquared
)
{
...
...
src/audiomixer/mixerwidget.cpp
View file @
a4a3e1a2
...
...
@@ -423,7 +423,7 @@ void MixerWidget::setTrackName(const QString &name) {
if
(
name
.
isEmpty
()
||
m_tid
==
-
1
)
{
m_trackLabel
->
setText
(
m_trackTag
);
}
else
{
m_trackLabel
->
setText
(
QString
(
"%1 - %2"
).
arg
(
m_trackTag
).
arg
(
name
));
m_trackLabel
->
setText
(
QString
(
"%1 - %2"
).
arg
(
m_trackTag
,
name
));
}
}
...
...
src/bin/bin.cpp
View file @
a4a3e1a2
...
...
@@ -919,7 +919,7 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
// m_searchLine->setClearButtonEnabled(true);
m_searchLine
->
setPlaceholderText
(
i18n
(
"Search..."
));
m_searchLine
->
setFocusPolicy
(
Qt
::
ClickFocus
);
connect
(
m_searchLine
,
&
QLineEdit
::
textChanged
,
[
this
]
(
const
QString
&
str
)
{
connect
(
m_searchLine
,
&
QLineEdit
::
textChanged
,
this
,
[
this
]
(
const
QString
&
str
)
{
m_proxyModel
->
slotSetSearchString
(
str
);
if
(
str
.
isEmpty
())
{
// focus last selected item when clearing search line
...
...
@@ -2169,7 +2169,7 @@ void Bin::slotInitView(QAction *action)
// Connect models
m_proxyModel
->
setSourceModel
(
m_itemModel
.
get
());
connect
(
m_itemModel
.
get
(),
&
QAbstractItemModel
::
dataChanged
,
m_proxyModel
.
get
(),
&
ProjectSortProxyModel
::
slotDataChanged
);
connect
(
m_proxyModel
.
get
(),
&
ProjectSortProxyModel
::
updateRating
,
[
&
]
(
const
QModelIndex
&
ix
,
uint
rating
)
{
connect
(
m_proxyModel
.
get
(),
&
ProjectSortProxyModel
::
updateRating
,
this
,
[
&
]
(
const
QModelIndex
&
ix
,
uint
rating
)
{
const
QModelIndex
index
=
m_proxyModel
->
mapToSource
(
ix
);
std
::
shared_ptr
<
AbstractProjectItem
>
item
=
m_itemModel
->
getBinItemByIndex
(
index
);
if
(
item
)
{
...
...
@@ -2239,7 +2239,7 @@ void Bin::slotInitView(QAction *action)
}
connect
(
view
->
header
(),
&
QHeaderView
::
sectionResized
,
this
,
&
Bin
::
slotSaveHeaders
);
connect
(
view
->
header
(),
&
QHeaderView
::
sectionClicked
,
this
,
&
Bin
::
slotSaveHeaders
);
connect
(
view
->
header
(),
&
QHeaderView
::
sortIndicatorChanged
,
[
this
]
(
int
ix
,
Qt
::
SortOrder
order
)
{
connect
(
view
->
header
(),
&
QHeaderView
::
sortIndicatorChanged
,
this
,
[
this
]
(
int
ix
,
Qt
::
SortOrder
order
)
{
QSignalBlocker
bk
(
m_sortDescend
);
QSignalBlocker
bk2
(
m_sortGroup
);
m_sortDescend
->
setChecked
(
order
==
Qt
::
DescendingOrder
);
...
...
@@ -3021,7 +3021,7 @@ void Bin::doDisplayMessage(const QString &text, KMessageWidget::MessageType type
m_infoMessage
->
setWordWrap
(
text
.
length
()
>
35
);
QAction
*
ac
=
new
QAction
(
i18n
(
"Show log"
),
this
);
m_infoMessage
->
addAction
(
ac
);
connect
(
ac
,
&
QAction
::
triggered
,
[
this
,
logInfo
](
bool
)
{
connect
(
ac
,
&
QAction
::
triggered
,
this
,
[
this
,
logInfo
](
bool
)
{
KMessageBox
::
sorry
(
this
,
logInfo
,
i18n
(
"Detailed log"
));
slotMessageActionTriggered
();
});
...
...
@@ -3151,7 +3151,7 @@ void Bin::slotEffectDropped(const QStringList &effectData, const QModelIndex &pa
std
::
shared_ptr
<
AbstractProjectItem
>
parentItem
=
m_itemModel
->
getBinItemByIndex
(
parent
);
if
(
parentItem
->
itemType
()
==
AbstractProjectItem
::
FolderItem
)
{
// effect not supported on folder items
displayBinMessage
(
i18n
(
"Cannot apply effects on folders"
),
KMessageWidget
::
Information
);
emit
displayBinMessage
(
i18n
(
"Cannot apply effects on folders"
),
KMessageWidget
::
Information
);
return
;
}
int
row
=
0
;
...
...
@@ -4011,7 +4011,7 @@ void Bin::refreshProxySettings()
masterCommand
->
setText
(
m_doc
->
useProxy
()
?
i18n
(
"Enable proxies"
)
:
i18n
(
"Disable proxies"
));
// en/disable proxy option in clip properties
for
(
QWidget
*
w
:
m_propertiesPanel
->
findChildren
<
ClipPropertiesController
*>
())
{
static_cast
<
ClipPropertiesController
*>
(
w
)
->
enableProxy
(
m_doc
->
useProxy
());
emit
static_cast
<
ClipPropertiesController
*>
(
w
)
->
enableProxy
(
m_doc
->
useProxy
());
}
if
(
!
m_doc
->
useProxy
())
{
// Disable all proxies
...
...
@@ -4535,7 +4535,7 @@ void Bin::requestTranscoding(const QString &url, const QString &id)
qDebug
()
<<
"==== STARTING TCODE JOB: "
<<
m_transcodingDialog
->
ids
().
front
()
<<
" = "
<<
m_transcodingDialog
->
params
();
//pCore->jobManager()->startJob<TranscodeJob>(m_transcodingDialog->ids(), -1, QString(), m_transcodingDialog->params(), true);
std
::
vector
<
QString
>
ids
=
m_transcodingDialog
->
ids
();
for
(
QString
id
:
ids
)
{
for
(
const
QString
&
id
:
ids
)
{
std
::
shared_ptr
<
ProjectClip
>
clip
=
m_itemModel
->
getClipByBinID
(
id
);
TranscodeTask
::
start
({
ObjectType
::
BinClip
,
id
.
toInt
()},
m_transcodingDialog
->
params
(),
-
1
,
-
1
,
true
,
clip
.
get
());
}
...
...
@@ -4594,10 +4594,10 @@ void Bin::remapCurrent()
QString
fName
=
info
.
fileName
().
section
(
QLatin1Char
(
'.'
),
0
,
-
2
);
fName
.
append
(
"-remap"
);
int
ix
=
1
;
QString
renderName
=
QString
(
"%1%2.mlt"
).
arg
(
fName
).
arg
(
QString
::
number
(
ix
).
rightJustified
(
4
,
'0'
));
QString
renderName
=
QString
(
"%1%2.mlt"
).
arg
(
fName
,
QString
::
number
(
ix
).
rightJustified
(
4
,
'0'
));
while
(
dir
.
exists
(
renderName
))
{
ix
++
;
renderName
=
QString
(
"%1%2.mlt"
).
arg
(
fName
).
arg
(
QString
::
number
(
ix
).
rightJustified
(
4
,
'0'
));
renderName
=
QString
(
"%1%2.mlt"
).
arg
(
fName
,
QString
::
number
(
ix
).
rightJustified
(
4
,
'0'
));
}
Mlt
::
Consumer
consumer
(
pCore
->
getCurrentProfile
()
->
profile
(),
"xml"
,
dir
.
absoluteFilePath
(
renderName
).
toUtf8
().
constData
());
consumer
.
set
(
"terminate_on_pause"
,
1
);
...
...
src/dialogs/clipcreationdialog.cpp
View file @
a4a3e1a2
...
...
@@ -478,7 +478,7 @@ void ClipCreationDialog::clipWidget(QDockWidget* m_DockClipWidget)
fileWidget
->
setFilter
(
dialogFilter
);
QObject
::
connect
(
importseq
,
&
QPushButton
::
clicked
,
fileWidget
,
[
=
]{
fileWidget
->
slotOk
();
fileWidget
->
accepted
();
emit
fileWidget
->
accepted
();
fileWidget
->
accept
();
QUrl
url
=
fileWidget
->
selectedUrl
();
QStringList
patternlist
;
...
...
src/dialogs/kdenlivesettingsdialog.cpp
View file @
a4a3e1a2
...
...
@@ -1819,7 +1819,7 @@ void KdenliveSettingsDialog::initSpeechPage()
m_configSpeech
.
speech_info
->
setWordWrap
(
true
);
m_configSpeech
.
check_vosk
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"view-refresh"
)));
m_configSpeech
.
check_vosk
->
setToolTip
(
i18n
(
"Check VOSK installation"
));
connect
(
m_configSpeech
.
check_vosk
,
&
QPushButton
::
clicked
,
[
this
]()
{
connect
(
m_configSpeech
.
check_vosk
,
&
QPushButton
::
clicked
,
this
,
[
this
]()
{
m_configSpeech
.
check_vosk
->
setEnabled
(
false
);
KdenliveSettings
::
setVosk_found
(
false
);
KdenliveSettings
::
setVosk_srt_found
(
false
);
...
...
@@ -1827,7 +1827,7 @@ void KdenliveSettingsDialog::initSpeechPage()
m_configSpeech
.
check_vosk
->
setEnabled
(
true
);
});
connect
(
this
,
&
KdenliveSettingsDialog
::
showSpeechMessage
,
this
,
&
KdenliveSettingsDialog
::
doShowSpeechMessage
);
connect
(
m_voskAction
,
&
QAction
::
triggered
,
[
this
]()
{
connect
(
m_voskAction
,
&
QAction
::
triggered
,
this
,
[
this
]()
{
#ifdef Q_OS_WIN
QString
pyExec
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"python"
));
#else
...
...
@@ -1954,7 +1954,7 @@ void KdenliveSettingsDialog::checkVoskDependencies()
QtConcurrent
::
run
(
this
,
&
KdenliveSettingsDialog
::
checkVoskVersion
,
pyExec
);
}
}
pCore
->
updateVoskAvailability
();
emit
pCore
->
updateVoskAvailability
();
}
}
else
{
if
(
m_speechListWidget
->
count
()
==
0
)
{
...
...
@@ -2127,7 +2127,7 @@ void KdenliveSettingsDialog::slotParseVoskDictionaries()
dir
=
QDir
(
modelDirectory
);
if
(
!
dir
.
cd
(
QStringLiteral
(
"speechmodels"
)))
{
qDebug
()
<<
"=== /// CANNOT ACCESS SPEECH DICTIONARIES FOLDER"
;
pCore
->
voskModelUpdate
({});
emit
pCore
->
voskModelUpdate
({});
return
;
}
}
else
{
...
...
@@ -2151,6 +2151,6 @@ void KdenliveSettingsDialog::slotParseVoskDictionaries()
}
else
if
(
final
.
isEmpty
())
{
doShowSpeechMessage
(
i18n
(
"Please add a speech model."
),
KMessageWidget
::
Information
);
}
pCore
->
voskModelUpdate
(
final
);
emit
pCore
->
voskModelUpdate
(
final
);
}
src/dialogs/speechdialog.cpp
View file @
a4a3e1a2
...
...
@@ -228,7 +228,7 @@ void SpeechDialog::parseVoskDictionaries()
dir
=
QDir
(
modelDirectory
);
if
(
!
dir
.
cd
(
QStringLiteral
(
"speechmodels"
)))
{
qDebug
()
<<
"=== /// CANNOT ACCESS SPEECH DICTIONARIES FOLDER"
;
pCore
->
voskModelUpdate
({});
emit
pCore
->
voskModelUpdate
({});
return
;
}
}
else
{
...
...
@@ -242,5 +242,5 @@ void SpeechDialog::parseVoskDictionaries()
final
<<
d
;
}
}
pCore
->
voskModelUpdate
(
final
);
emit
pCore
->
voskModelUpdate
(
final
);
}
src/dialogs/textbasededit.cpp
View file @
a4a3e1a2
...
...
@@ -583,12 +583,12 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
l
->
addWidget
(
m_visualEditor
);
text_frame
->
setLayout
(
l
);
m_visualEditor
->
setDocument
(
&
m_document
);
connect
(
&
m_document
,
&
QTextDocument
::
blockCountChanged
,
[
this
](
int
ct
)
{
connect
(
&
m_document
,
&
QTextDocument
::
blockCountChanged
,
this
,
[
this
](
int
ct
)
{
m_visualEditor
->
repaintLines
();
qDebug
()
<<
"++++++++++++++++++++
\n\n
GOT BLOCKS: "
<<
ct
<<
"
\n\n
+++++++++++++++++++++"
;
});
connect
(
m_visualEditor
,
&
VideoTextEdit
::
selectionChanged
,
[
this
]()
{
connect
(
m_visualEditor
,
&
VideoTextEdit
::
selectionChanged
,
this
,
[
this
]()
{
bool
hasSelection
=
m_visualEditor
->
textCursor
().
selectedText
().
simplified
().
isEmpty
()
==
false
;
m_visualEditor
->
bookmarkAction
->
setEnabled
(
hasSelection
);
m_visualEditor
->
deleteAction
->
setEnabled
(
hasSelection
);
...
...
@@ -598,14 +598,14 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
connect
(
button_start
,
&
QPushButton
::
clicked
,
this
,
&
TextBasedEdit
::
startRecognition
);
frame_progress
->
setVisible
(
false
);
button_abort
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"process-stop"
)));
connect
(
button_abort
,
&
QToolButton
::
clicked
,
[
this
]()
{
connect
(
button_abort
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
if
(
m_speechJob
&&
m_speechJob
->
state
()
==
QProcess
::
Running
)
{
m_speechJob
->
kill
();
}
else
if
(
m_tCodeJob
&&
m_tCodeJob
->
state
()
==
QProcess
::
Running
)
{
m_tCodeJob
->
kill
();
}
});
connect
(
pCore
.
get
(),
&
Core
::
voskModelUpdate
,
[
&
](
QStringList
models
)
{
connect
(
pCore
.
get
(),
&
Core
::
voskModelUpdate
,
this
,
[
&
](
QStringList
models
)
{
language_box
->
clear
();
language_box
->
addItems
(
models
);
if
(
models
.
isEmpty
())
{
...
...
@@ -619,13 +619,13 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
}
}
});
connect
(
language_box
,
static_cast
<
void
(
QComboBox
::*
)(
int
)
>
(
&
QComboBox
::
activated
),
[
this
]()
{
connect
(
language_box
,
static_cast
<
void
(
QComboBox
::*
)(
int
)
>
(
&
QComboBox
::
activated
),
this
,
[
this
]()
{
KdenliveSettings
::
setVosk_text_model
(
language_box
->
currentText
());
});
info_message
->
hide
();
m_logAction
=
new
QAction
(
i18n
(
"Show log"
),
this
);
connect
(
m_logAction
,
&
QAction
::
triggered
,
[
this
]()
{
connect
(
m_logAction
,
&
QAction
::
triggered
,
this
,
[
this
]()
{
KMessageBox
::
sorry
(
this
,
m_errorString
,
i18n
(
"Detailed log"
));
});
...
...
@@ -640,7 +640,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
button_add
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-save-as"
)));
button_add
->
setToolTip
(
i18n
(
"Save edited text in a new playlist"
));
button_add
->
setEnabled
(
false
);
connect
(
button_add
,
&
QToolButton
::
clicked
,
[
this
]()
{
connect
(
button_add
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
previewPlaylist
();
});
...
...
@@ -667,7 +667,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
search_frame
->
setVisible
(
toggled
);
search_line
->
setFocus
();
});
connect
(
search_line
,
&
QLineEdit
::
textChanged
,
[
this
](
const
QString
&
searchText
)
{
connect
(
search_line
,
&
QLineEdit
::
textChanged
,
this
,
[
this
](
const
QString
&
searchText
)
{
QPalette
palette
=
this
->
palette
();
QColor
col
=
palette
.
color
(
QPalette
::
Base
);
if
(
searchText
.
length
()
>
2
)
{
...
...
@@ -686,7 +686,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
}
search_line
->
setPalette
(
palette
);
});
connect
(
search_next
,
&
QToolButton
::
clicked
,
[
this
]()
{
connect
(
search_next
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
const
QString
searchText
=
search_line
->
text
();
QPalette
palette
=
this
->
palette
();
QColor
col
=
palette
.
color
(
QPalette
::
Base
);
...
...
@@ -706,7 +706,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
}
search_line
->
setPalette
(
palette
);
});
connect
(
search_prev
,
&
QToolButton
::
clicked
,
[
this
]()
{
connect
(
search_prev
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
const
QString
searchText
=
search_line
->
text
();
QPalette
palette
=
this
->
palette
();
QColor
col
=
palette
.
color
(
QPalette
::
Base
);
...
...
@@ -862,7 +862,7 @@ void TextBasedEdit::startRecognition()
m_tCodeJob
=
std
::
make_unique
<
QProcess
>
(
this
);
m_tCodeJob
->
setProcessChannelMode
(
QProcess
::
MergedChannels
);
connect
(
m_tCodeJob
.
get
(),
static_cast
<
void
(
QProcess
::*
)(
int
,
QProcess
::
ExitStatus
)
>
(
&
QProcess
::
finished
),
[
this
,
language
,
pyExec
,
speechScript
,
clipName
,
modelDirectory
,
endPos
](
int
code
,
QProcess
::
ExitStatus
status
)
{
this
,
[
this
,
language
,
pyExec
,
speechScript
,
clipName
,
modelDirectory
,
endPos
](
int
code
,
QProcess
::
ExitStatus
status
)
{
Q_UNUSED
(
code
)
qDebug
()
<<
"++++++++++++++++++++++ TCODE JOB FINISHED
\n
"
;
if
(
status
==
QProcess
::
CrashExit
)
{
...
...
@@ -876,7 +876,7 @@ void TextBasedEdit::startRecognition()
qApp
->
processEvents
();
connect
(
m_speechJob
.
get
(),
&
QProcess
::
readyReadStandardError
,
this
,
&
TextBasedEdit
::
slotProcessSpeechError
);
connect
(
m_speechJob
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
&
TextBasedEdit
::
slotProcessSpeech
);
connect
(
m_speechJob
.
get
(),
static_cast
<
void
(
QProcess
::*
)(
int
,
QProcess
::
ExitStatus
)
>
(
&
QProcess
::
finished
),
[
this
](
int
code
,
QProcess
::
ExitStatus
status
)
{
connect
(
m_speechJob
.
get
(),
static_cast
<
void
(
QProcess
::*
)(
int
,
QProcess
::
ExitStatus
)
>
(
&
QProcess
::
finished
),
this
,
[
this
](
int
code
,
QProcess
::
ExitStatus
status
)
{
m_playlistWav
.
remove
();
slotProcessSpeechStatus
(
code
,
status
);
});
...
...
@@ -884,7 +884,7 @@ void TextBasedEdit::startRecognition()
speech_progress
->
setValue
(
0
);
frame_progress
->
setVisible
(
true
);
});
connect
(
m_tCodeJob
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
[
this
]()
{
connect
(
m_tCodeJob
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
[
this
]()
{
QString
saveData
=
QString
::
fromUtf8
(
m_tCodeJob
->
readAllStandardOutput
());
qDebug
()
<<
"+GOT OUTPUT: "
<<
saveData
;
saveData
=
saveData
.
section
(
QStringLiteral
(
"percentage:"
),
1
).
simplified
();
...
...
@@ -1025,7 +1025,7 @@ void TextBasedEdit::parseVoskDictionaries()
dir
=
QDir
(
modelDirectory
);
if
(
!
dir
.
cd
(
QStringLiteral
(
"speechmodels"
)))
{
qDebug
()
<<
"=== /// CANNOT ACCESS SPEECH DICTIONARIES FOLDER"
;
pCore
->
voskModelUpdate
({});
emit
pCore
->
voskModelUpdate
({});
return
;
}
}
else
{
...
...
@@ -1039,7 +1039,7 @@ void TextBasedEdit::parseVoskDictionaries()
final
<<
d
;
}
}
pCore
->
voskModelUpdate
(
final
);
emit
pCore
->
voskModelUpdate
(
final
);
}
void
TextBasedEdit
::
deleteItem
()
...
...
src/dialogs/timeremap.cpp
View file @
a4a3e1a2
...
...
@@ -106,7 +106,7 @@ void RemapView::updateInPos(int pos)
slotSetPosition
(
pos
);
std
::
pair
<
double
,
double
>
speeds
=
getSpeed
(
m_currentKeyframe
);
emit
updateSpeeds
(
speeds
);
updateKeyframes
(
true
);
emit
updateKeyframes
(
true
);
update
();
}
}
...
...
@@ -148,7 +148,7 @@ void RemapView::updateOutPos(int pos)
m_bottomPosition
=
pos
-
m_inFrame
;
std
::
pair
<
double
,
double
>
speeds
=
getSpeed
(
m_currentKeyframe
);
emit
updateSpeeds
(
speeds
);
updateKeyframes
(
true
);
emit
updateKeyframes
(
true
);
update
();
}
}
...
...
@@ -271,7 +271,7 @@ void RemapView::setDuration(std::shared_ptr<Mlt::Producer> service, int duration
}
}
if
(
m_keyframes
!=
m_keyframesOrigin
)
{
updateKeyframesWithUndo
(
m_keyframes
,
m_keyframesOrigin
);
emit
updateKeyframesWithUndo
(
m_keyframes
,
m_keyframesOrigin
);
}
}
if
(
service
==
nullptr
)
{
...
...
@@ -291,7 +291,7 @@ void RemapView::setDuration(std::shared_ptr<Mlt::Producer> service, int duration
update
();
}
if
(
keyframeAdded
)
{
updateKeyframes
(
false
);
emit
updateKeyframes
(
false
);
}
}
...
...
@@ -310,7 +310,7 @@ void RemapView::loadKeyframes(const QString &mapData)
std
::
pair
<
bool
,
bool
>
atEnd
=
{
m_currentKeyframe
.
first
==
m_inFrame
,
m_currentKeyframe
.
first
==
m_keyframes
.
lastKey
()};
emit
selectedKf
(
m_currentKeyframe
,
speeds
,
atEnd
);
emit
atKeyframe
(
true
,
true
);
updateKeyframes
(
false
);
emit
updateKeyframes
(
false
);
}
else
{
QStringList
str
=
mapData
.
split
(
QLatin1Char
(
';'
));
for
(
auto
&
s
:
str
)
{
...
...
@@ -485,7 +485,7 @@ void RemapView::mouseMoveEvent(QMouseEvent *event)
m_selectedKeyframes
=
updated
;
emit
seekToPos
(
-
1
,
pos
);
updateKeyframes
(
false
);
emit
updateKeyframes
(
false
);
if
(
remapMax
()
>
m_lastMaxDuration
)
{
m_lastMaxDuration
=
remapMax
();
int
maxWidth
=
width
()
-
(
2
*
m_offset
);
...
...
@@ -670,7 +670,7 @@ void RemapView::centerCurrentKeyframe()
emit
selectedKf
(
m_currentKeyframe
,
speeds
,
atEnd
);
bool
isLast
=
m_currentKeyframe
.
first
==
m_keyframes
.
firstKey
()
||
m_currentKeyframe
.
first
==
m_keyframes
.
lastKey
();
emit
atKeyframe
(
true
,
isLast
);
updateKeyframes
(
true
);
emit
updateKeyframes
(
true
);
update
();
}
...
...
@@ -705,7 +705,7 @@ void RemapView::centerCurrentTopKeyframe()
emit
selectedKf
(
m_currentKeyframe
,
speeds
,
atEnd
);
bool
isLast
=
m_currentKeyframe
.
first
==
m_keyframes
.
firstKey
()
||
m_currentKeyframe
.
first
==
m_keyframes
.
lastKey
();
emit
atKeyframe
(
true
,
isLast
);
updateKeyframes
(
true
);
emit
updateKeyframes
(
true
);
update
();
}
...
...
@@ -744,7 +744,7 @@ void RemapView::mouseReleaseEvent(QMouseEvent *event)
}
m_moveKeyframeMode
=
NoMove
;
if
(
keyframesEdited
)
{
updateKeyframesWithUndo
(
m_keyframes
,
m_keyframesOrigin
);
emit
updateKeyframesWithUndo
(
m_keyframes
,
m_keyframesOrigin
);
}
qDebug
()
<<
"=== MOUSE RELEASE!!!!!!!!!!!!!"
;
}
...
...
@@ -1127,7 +1127,7 @@ void RemapView::updateBeforeSpeed(double speed)
updatedKfrs
.
insert
(
it
.
key
()
+
offset
,
it
.
value
());
it
++
;
}
for
(
int
p
:
toDelete
)
{
for
(
int
p
:
qAsConst
(
toDelete
)
)
{
m_keyframes
.
remove
(
p
);
}
QMapIterator
<
int
,
int
>
i
(
updatedKfrs
);
...
...
@@ -1135,7 +1135,7 @@ void RemapView::updateBeforeSpeed(double speed)
i
.
next
();
m_keyframes
.
insert
(
i
.
key
(),
i
.
value
());
}
updateKeyframes
(
true
);
emit
updateKeyframes
(
true
);
update
();
}
}
...
...
@@ -1160,7 +1160,7 @@ void RemapView::updateAfterSpeed(double speed)
m_keyframes
.
remove
(
it
.
key
());
}
// Update all keyframes after that so that we don't alter the speeds
for
(
int
p
:
toDelete
)
{
for
(
int
p
:
qAsConst
(
toDelete
)
)
{
m_keyframes
.
remove
(
p
);
}
QMapIterator
<
int
,
int
>
i
(
updatedKfrs
);
...
...
@@ -1543,7 +1543,7 @@ TimeRemap::TimeRemap(QWidget *parent)
speedBefore
->
setKeyboardTracking
(
false
);
speedAfter
->
setKeyboardTracking
(
false
);
remapLayout
->
addWidget
(
m_view
);
connect
(
m_view
,
&
RemapView
::
selectedKf
,
[
this
](
std
::
pair
<
int
,
int
>
selection
,
std
::
pair
<
double
,
double
>
speeds
,
std
::
pair
<
bool
,
bool
>
atEnd
)
{
connect
(
m_view
,
&
RemapView
::
selectedKf
,
this
,
[
this
](
std
::
pair
<
int
,
int
>
selection
,
std
::
pair
<
double
,
double
>
speeds
,
std
::
pair
<
bool
,
bool
>
atEnd
)
{
info_frame
->
setEnabled
(
selection
.
first
>
-
1
);
QSignalBlocker
bk
(
m_in
);
QSignalBlocker
bk2
(
m_out
);
...
...
@@ -1556,7 +1556,7 @@ TimeRemap::TimeRemap(QWidget *parent)
speedAfter
->
setEnabled
(
!
atEnd
.
second
);
speedAfter
->
setValue
(
100.
*
speeds
.
second
);
});
connect
(
m_view
,
&
RemapView
::
updateSpeeds
,
[
this
](
std
::
pair
<
double
,
double
>
speeds
)
{
connect
(
m_view
,
&
RemapView
::
updateSpeeds
,
this
,
[
this
](
std
::
pair
<
double
,
double
>
speeds
)
{
QSignalBlocker
bk3
(
speedBefore
);
QSignalBlocker
bk4
(
speedAfter
);
speedBefore
->
setEnabled
(
speeds
.
first
>
0
);
...
...
@@ -1572,12 +1572,12 @@ TimeRemap::TimeRemap(QWidget *parent)
button_prev
->
setToolTip
(
i18n
(
"Go to previous keyframe"
));
connect
(
m_view
,
&
RemapView
::
updateKeyframes
,
this
,
&
TimeRemap
::
updateKeyframes
);
connect
(
m_view
,
&
RemapView
::
updateKeyframesWithUndo
,
this
,
&
TimeRemap
::
updateKeyframesWithUndo
);
connect
(
m_in
,
&
TimecodeDisplay
::
timeCodeUpdated
,
[
this
]()
{
connect
(
m_in
,
&
TimecodeDisplay
::
timeCodeUpdated
,
this
,
[
this
]()
{
m_view
->
updateInPos
(
m_in
->
getValue
()
+
m_view
->
m_inFrame
);
});
button_center
->
setToolTip
(
i18n
(
"Move selected keyframe to cursor"
));
button_center_top
->
setToolTip
(
i18n
(
"Move selected keyframe to cursor"
));
connect
(
m_out
,
&
TimecodeDisplay
::
timeCodeUpdated
,
[
this
]()
{
connect
(
m_out
,
&
TimecodeDisplay
::
timeCodeUpdated
,
this
,
[
this
]()
{
m_view
->
updateOutPos
(
m_out
->
getValue
()
+
m_view
->
m_inFrame
);
});
connect
(
button_center
,
&
QToolButton
::
clicked
,
m_view
,
&
RemapView
::
centerCurrentKeyframe
);
...
...
@@ -1598,7 +1598,7 @@ TimeRemap::TimeRemap(QWidget *parent)
connect
(
speedAfter
,
QOverload
<
double
>::
of
(
&
QDoubleSpinBox
::
valueChanged
),
this
,
[
&
](
double
speed
)
{
m_view
->
updateAfterSpeed
(
speed
);
});
connect
(
button_del
,
&
QToolButton
::
clicked
,
[
this
]()
{
connect
(
button_del
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
if
(
m_cid
>
-
1
)
{
std
::
shared_ptr
<
TimelineItemModel
>
model
=
pCore
->
window
()
->
getCurrentTimeline
()
->
controller
()
->
getModel
();
model
->
requestClipTimeRemap
(
m_cid
,
false
);
...
...
@@ -1611,7 +1611,7 @@ TimeRemap::TimeRemap(QWidget *parent)
connect
(
move_next
,
&
QCheckBox
::
toggled
,
m_view
,
&
RemapView
::
toggleMoveNext
);
connect
(
pitch_compensate
,
&
QCheckBox
::
toggled
,
this
,
&
TimeRemap
::
switchRemapParam
);
connect
(
frame_blending
,
&
QCheckBox
::
toggled
,
this
,
&
TimeRemap
::
switchRemapParam
);
connect
(
m_view
,
&
RemapView
::
updateMaxDuration
,
[
this
](
int
duration
)
{
connect
(
m_view
,
&
RemapView
::
updateMaxDuration
,
this
,
[
this
](
int
duration
)
{
m_out
->
setRange
(
0
,
INT_MAX
);
//m_in->setRange(0, duration - 1);
});
...
...
@@ -1730,7 +1730,7 @@ void TimeRemap::selectedClip(int cid)
if
(
!
m_binId
.
isEmpty
()
&&
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
)
->
activeClipId
()
==
m_binId
)
{
connect
(
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
),
&
Monitor
::
seekPosition
,
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
),
&
Monitor
::
seekRemap
,
Qt
::
UniqueConnection
);
}
m_seekConnection1
=
connect
(
m_view
,
&
RemapView
::
seekToPos
,
[
this
](
int
topPos
,
int
bottomPos
)
{
m_seekConnection1
=
connect
(
m_view
,
&
RemapView
::
seekToPos
,
this
,
[
this
](
int
topPos
,
int
bottomPos
)
{
if
(
topPos
>
-
1
)
{
if
(
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
)
->
activeClipId
()
!=
m_binId
)
{
int
min
=
pCore
->
getItemIn
({
ObjectType
::
TimelineClip
,
m_cid
});
...
...
@@ -1744,7 +1744,7 @@ void TimeRemap::selectedClip(int cid)
pCore
->
getMonitor
(
Kdenlive
::
ProjectMonitor
)
->
requestSeek
(
bottomPos
+
m_view
->
m_startPos
);
}
});
m_seekConnection2
=
connect
(
pCore
->
getMonitor
(
Kdenlive
::
ProjectMonitor
),
&
Monitor
::
seekPosition
,
[
this
](
int
pos
)
{
m_seekConnection2
=
connect
(
pCore
->
getMonitor
(
Kdenlive
::
ProjectMonitor
),
&
Monitor
::
seekPosition
,
this
,
[
this
](
int
pos
)
{
m_view
->
slotSetBottomPosition
(
pos
-
m_view
->
m_startPos
);
});
}
...
...
@@ -1839,7 +1839,7 @@ void TimeRemap::setClip(std::shared_ptr<ProjectClip> clip, int in, int out)
m_view
->
loadKeyframes
(
QString
());
}
m_seekConnection1
=
connect
(
m_view
,
&
RemapView
::
seekToPos
,
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
),
&
Monitor
::
requestSeek
,
Qt
::
UniqueConnection
);
m_seekConnection2
=
connect
(
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
),
&
Monitor
::
seekPosition
,
[
&
](
int
pos
)
{
m_seekConnection2
=
connect
(
pCore
->
getMonitor
(
Kdenlive
::
ClipMonitor
),
&
Monitor
::
seekPosition
,
this
,
[
&
](
int
pos
)
{
m_view
->
slotSetPosition
(
pos
);
});
setEnabled
(
m_view
->
m_remapLink
!=
nullptr
);
...
...
src/doc/documentchecker.cpp
View file @
a4a3e1a2
...
...
@@ -388,7 +388,7 @@ bool DocumentChecker::hasErrorInClips()
// MLT 7 now generates lumas on the fly for files named luma01.pgm to luma22.pgm, so don't detect these as missing
if
(
lumaName
.
length
()
==
10
&&
lumaName
.
startsWith
(
QLatin1String
(
"luma"
))
&&
lumaName
.
endsWith
(
QLatin1String
(
".pgm"
)))
{
bool
ok
;
int
lumaNumber
=
lumaName
.
mid
(
4
,
2
).
toInt
(
&
ok
);
int
lumaNumber
=
lumaName
.
mid
Ref
(
4
,
2
).
toInt
(
&
ok
);
if
(
ok
&&
lumaNumber
>
0
&&
lumaNumber
<
23
)
{
continue
;
}
...
...
@@ -765,7 +765,7 @@ bool DocumentChecker::hasErrorInClips()
connect
(
m_ui
.
removeSelected
,
&
QAbstractButton
::
pressed
,
this
,
&
DocumentChecker
::
slotDeleteSelected
);
connect
(
m_ui
.
treeWidget
,
&
QTreeWidget
::
itemDoubleClicked
,
this
,
&
DocumentChecker
::
slotEditItem
);
connect
(
m_ui
.
treeWidget
,
&
QTreeWidget
::
itemSelectionChanged
,
this
,
&
DocumentChecker
::
slotCheckButtons
);
connect
(
m_ui
.
manualSearch
,
&
QAbstractButton
::
clicked
,
[
this
]
()
{
connect
(
m_ui
.
manualSearch
,
&
QAbstractButton
::
clicked
,
this
,
[
this
]
()
{
slotEditItem
(
m_ui
.
treeWidget
->
currentItem
(),
0
);
});
// adjustSize();
...
...
@@ -1420,7 +1420,7 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
QString
xml
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"xmldata"
));
QStringList
fonts
=
TitleWidget
::
extractFontList
(
xml
);
bool
updated
=
false
;
for
(
const
auto
&
f
:
fonts
)
{
for
(
const
auto
&
f
:
qAsConst
(
fonts
)
)
{
if
(
m_missingFonts
.
contains
(
f
))
{
updated
=
true
;
QString
replacementFont
=
QFontInfo
(
QFont
(
f
)).
family
();
...
...
src/doc/documentvalidator.cpp
View file @
a4a3e1a2
...
...
@@ -860,14 +860,14 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
profileWidth
=
profile
.
attribute
(
QStringLiteral
(
"width"
)).
toInt
();
profileHeight
=
profile
.
attribute
(
QStringLiteral
(
"height"
)).
toInt
();
}
QDomNodeList
transitions
=
m_doc
.
elementsByTagName
(
QStringLiteral
(
"transition"
));
//TODO MLT7: port?
/*QDomNodeList transitions = m_doc.elementsByTagName(QStringLiteral("transition"));
max = transitions.count();
for (int i = 0; i < max; ++i) {
QDomElement trans = transitions.at(i).toElement();
int out = trans.attribute(QStringLiteral("out")).toInt() - trans.attribute(QStringLiteral("in")).toInt();
QString geom = Xml::getXmlProperty(trans, QStringLiteral("geometry"));
//TODO MLT7: port?
/*
Mlt::Geometry *g = new Mlt::Geometry(geom.toUtf8().data(), out, profileWidth, profileHeight);
Mlt::GeometryItem item;
if (g->next_key(&item, out) == 0) {
...
...
@@ -880,8 +880,8 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
}
delete g;
*/
}
}
*/
}
if
(
version
<=
0.87
)
{
...
...
src/effects/effectstack/view/collapsibleeffectview.cpp
View file @
a4a3e1a2
...
...
@@ -948,16 +948,16 @@ void CollapsibleEffectView::updateEffectZone()
void
CollapsibleEffectView
::
slotNextKeyframe
()
{
m_view
->
nextKeyframe
();
emit
m_view
->
nextKeyframe
();
}
void
CollapsibleEffectView
::
slotPreviousKeyframe
()
{
m_view
->
previousKeyframe
();