Fix some compile warnings

parent 05ad207e
Pipeline #16015 passed with stage
in 15 minutes and 38 seconds
......@@ -95,7 +95,7 @@ void KeyframeView::slotAddKeyframe(int pos)
pos = m_position;
}
int offset = pCore->getItemIn(m_model->getOwnerId());
m_model->addKeyframe(GenTime(size_t(pos + offset), pCore->getCurrentFps()), (KeyframeType)KdenliveSettings::defaultkeyframeinterp());
m_model->addKeyframe(GenTime(pos + offset, pCore->getCurrentFps()), (KeyframeType)KdenliveSettings::defaultkeyframeinterp());
}
void KeyframeView::slotAddRemove()
......@@ -113,7 +113,7 @@ void KeyframeView::slotEditType(int type, const QPersistentModelIndex &index)
{
int offset = pCore->getItemIn(m_model->getOwnerId());
if (m_model->hasKeyframe(m_position + offset)) {
m_model->updateKeyframeType(GenTime(size_t(m_position + offset), pCore->getCurrentFps()), type, index);
m_model->updateKeyframeType(GenTime(m_position + offset, pCore->getCurrentFps()), type, index);
}
}
......@@ -123,7 +123,7 @@ void KeyframeView::slotRemoveKeyframe(int pos)
pos = m_position;
}
int offset = pCore->getItemIn(m_model->getOwnerId());
m_model->removeKeyframe(GenTime(size_t(pos + offset), pCore->getCurrentFps()));
m_model->removeKeyframe(GenTime(pos + offset, pCore->getCurrentFps()));
}
void KeyframeView::setDuration(int dur)
......@@ -142,7 +142,7 @@ void KeyframeView::slotGoToNext()
bool ok;
int offset = pCore->getItemIn(m_model->getOwnerId());
auto next = m_model->getNextKeyframe(GenTime(size_t(m_position + offset), pCore->getCurrentFps()), &ok);
auto next = m_model->getNextKeyframe(GenTime(m_position + offset, pCore->getCurrentFps()), &ok);
if (ok) {
emit seekToPos(qMin((int)next.first.frames(pCore->getCurrentFps()) - offset, m_duration - 1));
......
......@@ -92,7 +92,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
connect(w, &AbstractParamWidget::valuesChanged, this, &AssetParameterView::commitMultipleChanges);
connect(w, &AbstractParamWidget::valueChanged, this, &AssetParameterView::commitChanges);
m_lay->addWidget(w);
connect(w, &AbstractParamWidget::updateHeight, [&, w](int h) {
connect(w, &AbstractParamWidget::updateHeight, [&](int h) {
setFixedHeight(h + m_lay->contentsMargins().bottom());
emit updateHeight();
});
......@@ -113,7 +113,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
connect(w, &AbstractParamWidget::valueChanged, this, &AssetParameterView::commitChanges);
connect(w, &AbstractParamWidget::seekToPos, this, &AssetParameterView::seekToPos);
connect(w, &AbstractParamWidget::activateEffect, this, &AssetParameterView::activateEffect);
connect(w, &AbstractParamWidget::updateHeight, [&, w]() {
connect(w, &AbstractParamWidget::updateHeight, [&]() {
setFixedHeight(contentHeight());
emit updateHeight();
});
......
......@@ -646,7 +646,6 @@ void KeyframeImport::importSelectedData()
Fun undo = []() { return true; };
Fun redo = []() { return true; };
// Geometry target
QPoint rectOffset;
int finalAlign = m_alignCombo->currentIndex();
QLocale locale;
locale.setNumberOptions(QLocale::OmitGroupSeparator);
......
......@@ -65,7 +65,7 @@ DragButton::DragButton(int ix, const QString tag, const QString description, QWi
ac->setCheckable(true);
setDefaultAction(ac);
pCore->window()->actionCollection()->addAction(QString("tag_%1").arg(ix), ac);
connect(ac, &QAction::triggered, [&, ac] (bool checked) {
connect(ac, &QAction::triggered, [&] (bool checked) {
emit switchTag(m_tag, checked);
});
}
......
......@@ -55,10 +55,10 @@ void FilterClipJob::configureProducer()
// We are on master or track, configure producer accordingly
if (m_owner.first == ObjectType::Master) {
m_profile.reset(&pCore->getCurrentProfile()->profile());
m_producer = std::move(pCore->getMasterProducerInstance());
m_producer = pCore->getMasterProducerInstance();
} else if (m_owner.first == ObjectType::TimelineTrack) {
m_profile.reset(&pCore->getCurrentProfile()->profile());
m_producer = std::move(pCore->getTrackProducerInstance(m_owner.second));
m_producer = pCore->getTrackProducerInstance(m_owner.second);
}
}
......
......@@ -321,11 +321,7 @@ void JobManager::slotManageFinishedJob(int id)
}
}
} else {
QString bid;
for (const auto &it : m_jobs.at(id)->m_indices) {
bid = it.first;
break;
}
const QString bid = m_jobs.at(id)->m_indices.cbegin()->first;
QPair<QString, QString> message = getJobMessageForClip(id, bid);
if (!message.first.isEmpty()) {
if (!message.second.isEmpty()) {
......@@ -347,11 +343,7 @@ void JobManager::slotManageFinishedJob(int id)
m_jobs[id]->m_processed = true;
if (!ok) {
m_jobs[id]->m_failed = true;
QString bid;
for (const auto &it : m_jobs.at(id)->m_indices) {
bid = it.first;
break;
}
const QString bid = m_jobs.at(id)->m_indices.cbegin()->first;
qDebug() << "ERROR: Job " << id << " failed, BID: " << bid<<", TYPE: "<<m_jobs.at(id)->m_type;
QPair<QString, QString> message = getJobMessageForClip(id, bid);
qDebug()<<"MESSAGE LOG: "<<message;
......
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