X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=a18bfff242f55914062cbb31ec23935d497182b2;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=40288fc23668c5c1ac1f6a04aa57c7b3571ce16d;hpb=45adaf0e93ffa28bfeb3425a099ca95e70fd0d79;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 40288fc2..a18bfff2 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -113,6 +113,7 @@ #include #include #include +#include #include #include @@ -3208,14 +3209,14 @@ void MainWindow::slotEditItemDuration() m_activeTimeline->projectView()->editItemDuration(); } -void MainWindow::slotAddProjectClip(KUrl url, stringMap data) +void MainWindow::slotAddProjectClip(const KUrl &url, const stringMap &data) { if (m_activeDocument) { m_activeDocument->slotAddClipFile(url, data); } } -void MainWindow::slotAddProjectClipList(KUrl::List urls) +void MainWindow::slotAddProjectClipList(const KUrl::List &urls) { if (m_activeDocument) m_activeDocument->slotAddClipList(urls); @@ -3443,9 +3444,10 @@ void MainWindow::slotShowClipProperties(DocClipBase *clip) } -void MainWindow::slotApplyNewClipProperties(const QString id, QMap props, QMap newprops, bool refresh, bool reload) +void MainWindow::slotApplyNewClipProperties(const QString &id, const QMap &props, const QMap &newprops, bool refresh, bool reload) { - if (newprops.isEmpty()) return; + if (newprops.isEmpty()) + return; EditClipCommand *command = new EditClipCommand(m_projectList, id, props, newprops, true); m_activeDocument->commandStack()->push(command); m_activeDocument->setModified(); @@ -3502,7 +3504,7 @@ void MainWindow::slotTimelineClipSelected(ClipItem* item, bool raise) m_effectStack->raiseWindow(m_effectStackDock); } -void MainWindow::slotTrackSelected(int index, TrackInfo info, bool raise) +void MainWindow::slotTrackSelected(int index, const TrackInfo &info, bool raise) { m_effectStack->slotTrackItemSelected(index, info); if (raise) @@ -3811,8 +3813,9 @@ void MainWindow::slotSaveZone(Render *render, const QPoint &zone, DocClipBase *b QLabel *label1 = new QLabel(i18n("Save clip zone as:"), this); if (path.isEmpty()) { QString tmppath = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash); - if (baseClip == NULL) tmppath.append("untitled.mlt"); - else { + if (baseClip == NULL) { + tmppath.append("untitled.mlt"); + } else { tmppath.append((baseClip->name().isEmpty() ? baseClip->fileURL().fileName() : baseClip->name()) + '-' + QString::number(zone.x()).rightJustified(4, '0') + ".mlt"); } path = KUrl(tmppath); @@ -4114,8 +4117,10 @@ void MainWindow::slotTranscode(const KUrl::List &urls) QAction *action = qobject_cast(sender()); QStringList data = action->data().toStringList(); params = data.at(0); - if (data.count() > 1) desc = data.at(1); - if (data.count() > 3) condition = data.at(3); + if (data.count() > 1) + desc = data.at(1); + if (data.count() > 3) + condition = data.at(3); m_projectList->slotTranscodeClipJob(condition, params, desc); return; }