X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=517e321e7f60acc6826d87f3f36ce113e23256ca;hb=5d4e8497fc4b3681f3024bf8fc8bf4e338fbbdc4;hp=ddc55892dd329600975fe2fe353ba021dc3895a7;hpb=2fa08bb33bee0d29cfc87f207e72584268acb4ee;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ddc55892..517e321e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -69,7 +69,7 @@ #include #include -#include +#include #include #include #include @@ -113,6 +113,7 @@ #include #include #include +#include #include #include @@ -2263,7 +2264,7 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) if (openBackup) slotOpenBackupDialog(url); } -void MainWindow::recoverFiles(QList staleFiles, const KUrl &originUrl) +void MainWindow::recoverFiles(const QList &staleFiles, const KUrl &originUrl) { foreach(KAutoSaveFile * stale, staleFiles) { /*if (!stale->open(QIODevice::QIODevice::ReadOnly)) { @@ -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(); @@ -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); @@ -3894,8 +3897,7 @@ int MainWindow::getNewStuff(const QString &configFile) KNS3::Entry::List entries; #if KDE_IS_VERSION(4,3,80) QPointer dialog = new KNS3::DownloadDialog(configFile); - dialog->exec(); - if (dialog) entries = dialog->changedEntries(); + if (dialog->exec()) entries = dialog->changedEntries(); foreach(const KNS3::Entry & entry, entries) { if (entry.status() == KNS3::Entry::Installed) kDebug() << "// Installed files: " << entry.installedFiles(); @@ -4114,8 +4116,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; } @@ -4605,7 +4609,9 @@ void MainWindow::slotArchiveProject() QList list = m_projectList->documentClipList(); QDomDocument doc = m_activeDocument->xmlSceneList(m_projectMonitor->sceneList(), m_projectList->expandedFolders()); ArchiveWidget *d = new ArchiveWidget(m_activeDocument->url().fileName(), doc, list, m_activeTimeline->projectView()->extractTransitionsLumas(), this); - d->exec(); + if (d->exec()) { + m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage); + } }