Commit 7ba3ff0b authored by Vincent Pinon's avatar Vincent Pinon
Browse files

Fix clang-tidy / clazy warnings

parent bff5ba5b
......@@ -149,7 +149,7 @@ int main(int argc, char **argv)
LocaleHandling::resetAllLocale();
auto *rJob = new RenderJob(render, playlist, target, pid, in, out, qApp);
rJob->start();
QObject::connect(rJob, &RenderJob::renderingFinished, [&, rJob]() {
QObject::connect(rJob, &RenderJob::renderingFinished, rJob, [&, rJob]() {
rJob->deleteLater();
app.quit();
});
......
......@@ -247,9 +247,9 @@ bool KeyframeModelList::updateKeyframe(GenTime pos, const QVariant &value, const
auto *command = new AssetKeyframeCommand(ptr, index, value, pos, parentCommand);
if (parentCommand == nullptr) {
pCore->pushUndo(command);
} // clang-tidy: else "command" is leaked? no because is was pushed to parentCommand
}
}
return true;
return true; // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
bool KeyframeModelList::updateKeyframeType(GenTime pos, int type, const QPersistentModelIndex &index)
......
......@@ -52,7 +52,7 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
m_geom = new GeometryWidget(monitor, QPair<int, int>(start, end), rect, 100, frameSize, false,
m_model->data(m_index, AssetParameterModel::OpacityRole).toBool(), true, this);
m_geom->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred));
connect(m_geom, &GeometryWidget::updateMonitorGeometry, [this](const QRect r) {
connect(m_geom, &GeometryWidget::updateMonitorGeometry, this, [this](const QRect r) {
if (m_model->isActive()) {
pCore->getMonitor(m_model->monitorId)->setUpEffectGeometry(r);
}
......
......@@ -217,7 +217,7 @@ KeyframeWidget::KeyframeWidget(std::shared_ptr<AssetParameterModel> model, QMode
connect(m_buttonNext, &QAbstractButton::pressed, m_keyframeview, &KeyframeView::slotGoToNext);
connect(m_buttonCenter, &QAbstractButton::pressed, m_keyframeview, &KeyframeView::slotCenterKeyframe);
connect(m_buttonCopy, &QAbstractButton::pressed, m_keyframeview, &KeyframeView::slotDuplicateKeyframe);
connect(m_buttonApply, &QAbstractButton::pressed, [this]() {
connect(m_buttonApply, &QAbstractButton::pressed, this, [this]() {
QMultiMap<QPersistentModelIndex, QString> paramList;
QList<QPersistentModelIndex> rectParams;
for (const auto &w : m_parameters) {
......@@ -477,7 +477,7 @@ void KeyframeWidget::addParameter(const QPersistentModelIndex &index)
this, [this, index](const QString v) {
emit activateEffect();
m_keyframes->updateKeyframe(GenTime(getPosition(), pCore->getCurrentFps()), QVariant(v), index); });
connect(geomWidget, &GeometryWidget::updateMonitorGeometry, [this](const QRect r) {
connect(geomWidget, &GeometryWidget::updateMonitorGeometry, this, [this](const QRect r) {
if (m_model->isActive()) {
pCore->getMonitor(m_model->monitorId)->setUpEffectGeometry(r);
}
......
......@@ -218,7 +218,7 @@ QList<int> TimelineModel::getTracksIds(bool audio) const
int TimelineModel::getTrackIndexFromPosition(int pos) const
{
Q_ASSERT(pos >= 0 && pos < m_allTracks.size());
Q_ASSERT(pos >= 0 && pos < int(m_allTracks.size()));
READ_LOCK();
auto it = m_allTracks.cbegin();
while (pos > 0) {
......
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