Commit 71ef7b64 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

auto fix warnings

target_compile_options(kdenliveLib PRIVATE -Wall -Wextra -pedantic -Xclang -fixit)
parent 25082395
......@@ -48,7 +48,7 @@ SpeechDialog::SpeechDialog(std::shared_ptr<TimelineItemModel> timeline, QPoint z
buttonBox->button(QDialogButtonBox::Apply)->setText(i18n("Process"));
speech_info->hide();
m_voskConfig = new QAction(i18n("Configure"), this);
connect(m_voskConfig, &QAction::triggered, [this]() {
connect(m_voskConfig, &QAction::triggered, []() {
pCore->window()->slotPreferences(8);
});
m_modelsConnection = connect(pCore.get(), &Core::voskModelUpdate, [&](QStringList models) {
......
......@@ -133,13 +133,13 @@ SubtitleEdit::SubtitleEdit(QWidget *parent)
connect(buttonApply, &QToolButton::clicked, this, &SubtitleEdit::updateSubtitle);
connect(buttonPrev, &QToolButton::clicked, this, &SubtitleEdit::goToPrevious);
connect(buttonNext, &QToolButton::clicked, this, &SubtitleEdit::goToNext);
connect(buttonIn, &QToolButton::clicked, [this]() {
connect(buttonIn, &QToolButton::clicked, []() {
pCore->triggerAction(QStringLiteral("resize_timeline_clip_start"));
});
connect(buttonOut, &QToolButton::clicked, [this]() {
connect(buttonOut, &QToolButton::clicked, []() {
pCore->triggerAction(QStringLiteral("resize_timeline_clip_end"));
});
connect(buttonDelete, &QToolButton::clicked, [this]() {
connect(buttonDelete, &QToolButton::clicked, []() {
pCore->triggerAction(QStringLiteral("delete_timeline_clip"));
});
buttonNext->setToolTip(i18n("Go to next subtitle"));
......
......@@ -571,7 +571,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
setupUi(this);
setFocusPolicy(Qt::StrongFocus);
m_voskConfig = new QAction(i18n("Configure"), this);
connect(m_voskConfig, &QAction::triggered, [this]() {
connect(m_voskConfig, &QAction::triggered, []() {
pCore->window()->slotPreferences(8);
});
......@@ -630,7 +630,7 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
});
speech_zone->setChecked(KdenliveSettings::speech_zone());
connect(speech_zone, &QCheckBox::stateChanged, [this](int state) {
connect(speech_zone, &QCheckBox::stateChanged, [](int state) {
KdenliveSettings::setSpeech_zone(state == Qt::Checked);
});
button_delete->setDefaultAction(m_visualEditor->deleteAction);
......
......@@ -331,7 +331,7 @@ void LayoutManagement::slotManageLayouts()
QToolButton tb(&d);
tb.setIcon(QIcon::fromTheme(QStringLiteral("edit-delete")));
tb.setAutoRaise(true);
connect(&tb, &QToolButton::clicked, this, [this, &layouts, &list]() {
connect(&tb, &QToolButton::clicked, this, [ &layouts, &list]() {
if (list.currentItem()) {
layouts.deleteEntry(list.currentItem()->data(Qt::UserRole).toString());
delete list.currentItem();
......@@ -460,7 +460,7 @@ void LayoutManagement::slotManageLayouts()
tb6.setIcon(QIcon::fromTheme(QStringLiteral("document-export")));
tb6.setAutoRaise(true);
tb6.setToolTip(i18n("Export selected"));
connect(&tb6, &QToolButton::clicked, [this, &d, &list](){
connect(&tb6, &QToolButton::clicked, [ &d, &list](){
if (!list.currentItem()) {
// Error, no layout selected
......
......@@ -682,7 +682,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
if (mixGroupMove) {
// We are moving a group on another track, delete and re-add
bool isAudio = getTrackById_const(previous_track)->isAudioTrack();
simple_move_mix = [this, previous_track, trackId, clipId, finalMove, mixData, isAudio]() {
simple_move_mix = [this, previous_track, trackId, finalMove, mixData, isAudio]() {
getTrackById_const(previous_track)->syncronizeMixes(finalMove);
bool result = getTrackById_const(trackId)->createMix(mixData.first, isAudio);
return result;
......@@ -961,7 +961,7 @@ bool TimelineModel::requestClipMix(std::pair<int, int> clipIds, int trackId, int
QModelIndex modelIndex = makeClipIndexFromID(clipIds.second);
notifyChange(modelIndex, modelIndex, {StartRole,DurationRole});
QModelIndex modelIndex2 = makeClipIndexFromID(clipIds.first);
notifyChange(modelIndex2, modelIndex2, {DurationRole});
notifyChange(modelIndex2, modelIndex2, DurationRole);
if (invalidateTimeline && !getTrackById_const(trackId)->isAudioTrack()) {
emit invalidateZone(position - mixDuration / 2, position + mixDuration);
}
......@@ -2951,7 +2951,7 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
};
bool switchPlaylist = getTrackById_const(tid)->hasEndMix(itemId) == false && m_allClips[itemId]->getSubPlaylistIndex() == 1;
if (switchPlaylist) {
sync_end_mix = [this, tid, itemId, mixData]() {
sync_end_mix = [this, tid, mixData]() {
return getTrackById_const(tid)->switchPlaylist(mixData.first.secondClipId, m_allClips[mixData.first.secondClipId]->getPosition(), 1, 0);
};
sync_end_mix_undo = [this, tid, mixData]() {
......
......@@ -178,7 +178,7 @@ Fun TrackModel::requestClipInsertion_lambda(int clipId, int position, bool updat
int count = m_playlists[target_playlist].count();
// we create the function that has to be executed after the melt order. This is essentially book-keeping
auto end_function = [clipId, this, position, updateView, finalMove, target_playlist](int subPlaylist) {
auto end_function = [clipId, this, position, updateView, finalMove](int subPlaylist) {
if (auto ptr = m_parent.lock()) {
std::shared_ptr<ClipModel> clip = ptr->getClipPtr(clipId);
m_allClips[clip->getId()] = clip; // store clip
......@@ -602,7 +602,7 @@ Fun TrackModel::requestClipResize_lambda(int clipId, int in, int out, bool right
if (!isHidden() && !isAudioTrack()) {
checkRefresh = true;
}
auto update_snaps = [old_in, old_out, checkRefresh, right, clipId, this](int new_in, int new_out) {
auto update_snaps = [old_in, old_out, checkRefresh, right, this](int new_in, int new_out) {
if (auto ptr = m_parent.lock()) {
if (right) {
ptr->m_snaps->removePoint(old_out);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment