Commit 072d51ab authored by Laurent Montel's avatar Laurent Montel

Astyle kdelibs

parent ce495944
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/ ***************************************************************************/
#include "sampleplugin.h" #include "sampleplugin.h"
#include "ui_countdown_ui.h" #include "ui_countdown_ui.h"
...@@ -30,18 +29,23 @@ ...@@ -30,18 +29,23 @@
QStringList SamplePlugin::generators(const QStringList &producers) const QStringList SamplePlugin::generators(const QStringList &producers) const
{ {
QStringList result; QStringList result;
if (producers.contains(QLatin1String("pango"))) result << i18n("Countdown"); if (producers.contains(QLatin1String("pango"))) {
if (producers.contains(QLatin1String("noise"))) result << i18n("Noise"); result << i18n("Countdown");
}
if (producers.contains(QLatin1String("noise"))) {
result << i18n("Noise");
}
return result; return result;
} }
QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &/*lumaNames*/, const QStringList &/*lumaFiles*/, const double fps, const int /*width*/, const int height) QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &/*lumaNames*/, const QStringList &/*lumaFiles*/, const double fps, const int /*width*/, const int height)
{ {
QString prePath; QString prePath;
if (generator == i18n("Noise")) { if (generator == i18n("Noise")) {
prePath = projectFolder.path() + QLatin1String("/noise"); prePath = projectFolder.path() + QLatin1String("/noise");
} else prePath = projectFolder.path() + QLatin1String("/counter"); } else {
prePath = projectFolder.path() + QLatin1String("/counter");
}
int ct = 0; int ct = 0;
QString counter = QString::number(ct).rightJustified(5, QLatin1Char('0'), false); QString counter = QString::number(ct).rightJustified(5, QLatin1Char('0'), false);
while (QFile::exists(prePath + counter + QLatin1String(".mlt"))) { while (QFile::exists(prePath + counter + QLatin1String(".mlt"))) {
...@@ -66,7 +70,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat ...@@ -66,7 +70,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
QString clipFile = prePath + counter + QLatin1String(".mlt"); QString clipFile = prePath + counter + QLatin1String(".mlt");
view.path->setUrl(QUrl(clipFile)); view.path->setUrl(QUrl(clipFile));
QUrl result; QUrl result;
if (d->exec() == QDialog::Accepted) { if (d->exec() == QDialog::Accepted) {
QProcess generatorProcess; QProcess generatorProcess;
...@@ -77,8 +81,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat ...@@ -77,8 +81,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
QStringList args; QStringList args;
if (generator == i18n("Noise")) { if (generator == i18n("Noise")) {
args << QLatin1String("noise:") << QLatin1String("in=0") << QLatin1String("out=") + QString::number((int) fps * view.duration->value()); args << QLatin1String("noise:") << QLatin1String("in=0") << QLatin1String("out=") + QString::number((int) fps * view.duration->value());
} } else {
else {
// Countdown producer // Countdown producer
for (int i = 0; i < view.duration->value(); ++i) { for (int i = 0; i < view.duration->value(); ++i) {
// Create the producers // Create the producers
...@@ -88,15 +91,14 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat ...@@ -88,15 +91,14 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
} }
} }
args << QLatin1String("-consumer")<<QString::fromLatin1("xml:%1").arg(view.path->url().path()); args << QLatin1String("-consumer") << QString::fromLatin1("xml:%1").arg(view.path->url().path());
generatorProcess.start(renderer, args); generatorProcess.start(renderer, args);
if (generatorProcess.waitForFinished()) { if (generatorProcess.waitForFinished()) {
if (generatorProcess.exitStatus() == QProcess::CrashExit) { if (generatorProcess.exitStatus() == QProcess::CrashExit) {
//qDebug() << "/// Generator failed: "; //qDebug() << "/// Generator failed: ";
QString error = QString::fromLocal8Bit(generatorProcess.readAllStandardError()); QString error = QString::fromLocal8Bit(generatorProcess.readAllStandardError());
KMessageBox::sorry(QApplication::activeWindow(), i18n("Failed to generate clip:\n%1", error), i18n("Generator Failed")); KMessageBox::sorry(QApplication::activeWindow(), i18n("Failed to generate clip:\n%1", error), i18n("Generator Failed"));
} } else {
else {
result = view.path->url(); result = view.path->url();
} }
} else { } else {
...@@ -111,4 +113,3 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat ...@@ -111,4 +113,3 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
Q_EXPORT_PLUGIN2(kdenlive_sampleplugin, SamplePlugin) Q_EXPORT_PLUGIN2(kdenlive_sampleplugin, SamplePlugin)
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/ ***************************************************************************/
#ifndef SAMPLEPLUGIN_H #ifndef SAMPLEPLUGIN_H
#define SAMPLEPLUGIN_H #define SAMPLEPLUGIN_H
...@@ -38,6 +37,5 @@ public: ...@@ -38,6 +37,5 @@ public:
QUrl generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &lumaNames, const QStringList &lumaFiles, const double fps, const int width, const int height); QUrl generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &lumaNames, const QStringList &lumaFiles, const double fps, const int width, const int height);
}; };
#endif #endif
...@@ -373,14 +373,14 @@ Bin::Bin(QWidget *parent) : ...@@ -373,14 +373,14 @@ Bin::Bin(QWidget *parent) :
// Connect models // Connect models
m_proxyModel->setSourceModel(m_itemModel); m_proxyModel->setSourceModel(m_itemModel);
connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_proxyModel, SLOT(slotDataChanged(const QModelIndex &, const connect(m_itemModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), m_proxyModel, SLOT(slotDataChanged(const QModelIndex &, const
QModelIndex &))); QModelIndex &)));
connect(m_itemModel, &QAbstractItemModel::rowsInserted, this, &Bin::rowsInserted); connect(m_itemModel, &QAbstractItemModel::rowsInserted, this, &Bin::rowsInserted);
connect(m_itemModel, &QAbstractItemModel::rowsRemoved, this, &Bin::rowsRemoved); connect(m_itemModel, &QAbstractItemModel::rowsRemoved, this, &Bin::rowsRemoved);
connect(m_proxyModel, &ProjectSortProxyModel::selectModel, this, &Bin::selectProxyModel); connect(m_proxyModel, &ProjectSortProxyModel::selectModel, this, &Bin::selectProxyModel);
connect(m_itemModel, SIGNAL(itemDropped(QStringList,QModelIndex)), this, SLOT(slotItemDropped(QStringList,QModelIndex))); connect(m_itemModel, SIGNAL(itemDropped(QStringList, QModelIndex)), this, SLOT(slotItemDropped(QStringList, QModelIndex)));
connect(m_itemModel, SIGNAL(itemDropped(QList<QUrl>,QModelIndex)), this, SLOT(slotItemDropped(QList<QUrl>,QModelIndex))); connect(m_itemModel, SIGNAL(itemDropped(QList<QUrl>, QModelIndex)), this, SLOT(slotItemDropped(QList<QUrl>, QModelIndex)));
connect(m_itemModel, SIGNAL(effectDropped(QString,QModelIndex)), this, SLOT(slotEffectDropped(QString,QModelIndex))); connect(m_itemModel, SIGNAL(effectDropped(QString, QModelIndex)), this, SLOT(slotEffectDropped(QString, QModelIndex)));
connect(m_itemModel, &QAbstractItemModel::dataChanged, this, &Bin::slotItemEdited); connect(m_itemModel, &QAbstractItemModel::dataChanged, this, &Bin::slotItemEdited);
connect(m_itemModel, &ProjectItemModel::addClipCut, this, &Bin::slotAddClipCut); connect(m_itemModel, &ProjectItemModel::addClipCut, this, &Bin::slotAddClipCut);
connect(this, &Bin::refreshPanel, this, &Bin::doRefreshPanel); connect(this, &Bin::refreshPanel, this, &Bin::doRefreshPanel);
...@@ -427,7 +427,7 @@ Bin::Bin(QWidget *parent) : ...@@ -427,7 +427,7 @@ Bin::Bin(QWidget *parent) :
pCore->window()->actionCollection()->addAction(QStringLiteral("rename_folder"), m_renameFolderAction); pCore->window()->actionCollection()->addAction(QStringLiteral("rename_folder"), m_renameFolderAction);
listType->setToolBarMode(KSelectAction::MenuMode); listType->setToolBarMode(KSelectAction::MenuMode);
connect(listType, SIGNAL(triggered(QAction*)), this, SLOT(slotInitView(QAction*))); connect(listType, SIGNAL(triggered(QAction *)), this, SLOT(slotInitView(QAction *)));
// Settings menu // Settings menu
QMenu *settingsMenu = new QMenu(i18n("Settings"), this); QMenu *settingsMenu = new QMenu(i18n("Settings"), this);
...@@ -493,9 +493,9 @@ Bin::Bin(QWidget *parent) : ...@@ -493,9 +493,9 @@ Bin::Bin(QWidget *parent) :
connect(m_infoMessage, &BinMessageWidget::messageClosing, this, &Bin::slotResetInfoMessage); connect(m_infoMessage, &BinMessageWidget::messageClosing, this, &Bin::slotResetInfoMessage);
//m_infoMessage->setWordWrap(true); //m_infoMessage->setWordWrap(true);
m_infoMessage->hide(); m_infoMessage->hide();
connect(this, SIGNAL(requesteInvalidRemoval(QString,QUrl,QString)), this, SLOT(slotQueryRemoval(QString,QUrl,QString))); connect(this, SIGNAL(requesteInvalidRemoval(QString, QUrl, QString)), this, SLOT(slotQueryRemoval(QString, QUrl, QString)));
connect(this, &Bin::refreshAudioThumbs, this, &Bin::doRefreshAudioThumbs); connect(this, &Bin::refreshAudioThumbs, this, &Bin::doRefreshAudioThumbs);
connect(this, SIGNAL(displayBinMessage(QString,KMessageWidget::MessageType)), this, SLOT(doDisplayMessage(QString,KMessageWidget::MessageType))); connect(this, SIGNAL(displayBinMessage(QString, KMessageWidget::MessageType)), this, SLOT(doDisplayMessage(QString, KMessageWidget::MessageType)));
} }
Bin::~Bin() Bin::~Bin()
...@@ -1008,7 +1008,7 @@ void Bin::setMonitor(Monitor *monitor) ...@@ -1008,7 +1008,7 @@ void Bin::setMonitor(Monitor *monitor)
connect(m_monitor, SIGNAL(addClipToProject(QUrl)), this, SLOT(slotAddClipToProject(QUrl))); connect(m_monitor, SIGNAL(addClipToProject(QUrl)), this, SLOT(slotAddClipToProject(QUrl)));
connect(m_monitor, SIGNAL(requestAudioThumb(QString)), this, SLOT(slotSendAudioThumb(QString))); connect(m_monitor, SIGNAL(requestAudioThumb(QString)), this, SLOT(slotSendAudioThumb(QString)));
connect(m_monitor, &Monitor::refreshCurrentClip, this, &Bin::slotOpenCurrent); connect(m_monitor, &Monitor::refreshCurrentClip, this, &Bin::slotOpenCurrent);
connect(m_monitor, SIGNAL(updateClipMarker(QString,QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString,QList<CommentedTime>))); connect(m_monitor, SIGNAL(updateClipMarker(QString, QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString, QList<CommentedTime>)));
connect(this, &Bin::openClip, m_monitor, &Monitor::slotOpenClip); connect(this, &Bin::openClip, m_monitor, &Monitor::slotOpenClip);
} }
...@@ -1060,7 +1060,7 @@ void Bin::setDocument(KdenliveDoc *project) ...@@ -1060,7 +1060,7 @@ void Bin::setDocument(KdenliveDoc *project)
setEnabled(true); setEnabled(true);
blockSignals(false); blockSignals(false);
m_proxyModel->selectionModel()->blockSignals(false); m_proxyModel->selectionModel()->blockSignals(false);
connect(m_jobManager, SIGNAL(addClip(QString,int)), this, SLOT(slotAddUrl(QString,int))); connect(m_jobManager, SIGNAL(addClip(QString, int)), this, SLOT(slotAddUrl(QString, int)));
connect(m_proxyAction, SIGNAL(toggled(bool)), m_doc, SLOT(slotProxyCurrentItem(bool))); connect(m_proxyAction, SIGNAL(toggled(bool)), m_doc, SLOT(slotProxyCurrentItem(bool)));
connect(m_jobManager, &JobManager::jobCount, m_infoLabel, &SmallJobLabel::slotSetJobCount); connect(m_jobManager, &JobManager::jobCount, m_infoLabel, &SmallJobLabel::slotSetJobCount);
connect(m_discardCurrentClipJobs, &QAction::triggered, m_jobManager, &JobManager::slotDiscardClipJobs); connect(m_discardCurrentClipJobs, &QAction::triggered, m_jobManager, &JobManager::slotDiscardClipJobs);
...@@ -1068,7 +1068,7 @@ void Bin::setDocument(KdenliveDoc *project) ...@@ -1068,7 +1068,7 @@ void Bin::setDocument(KdenliveDoc *project)
connect(m_discardPendingJobs, &QAction::triggered, m_jobManager, &JobManager::slotCancelPendingJobs); connect(m_discardPendingJobs, &QAction::triggered, m_jobManager, &JobManager::slotCancelPendingJobs);
connect(m_jobManager, &JobManager::updateJobStatus, this, &Bin::slotUpdateJobStatus); connect(m_jobManager, &JobManager::updateJobStatus, this, &Bin::slotUpdateJobStatus);
connect(m_jobManager, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap)), this, SLOT(slotGotFilterJobResults(QString,int,int,stringMap,stringMap))); connect(m_jobManager, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)), this, SLOT(slotGotFilterJobResults(QString, int, int, stringMap, stringMap)));
//connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_itemView //connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_itemView
//connect(m_itemModel, SIGNAL(updateCurrentItem()), this, SLOT(autoSelect())); //connect(m_itemModel, SIGNAL(updateCurrentItem()), this, SLOT(autoSelect()));
...@@ -1863,11 +1863,11 @@ void Bin::showClipProperties(ProjectClip *clip, bool forceRefresh) ...@@ -1863,11 +1863,11 @@ void Bin::showClipProperties(ProjectClip *clip, bool forceRefresh)
ClipPropertiesController *panel = clip->buildProperties(m_propertiesPanel); ClipPropertiesController *panel = clip->buildProperties(m_propertiesPanel);
connect(this, &Bin::refreshTimeCode, panel, &ClipPropertiesController::slotRefreshTimeCode); connect(this, &Bin::refreshTimeCode, panel, &ClipPropertiesController::slotRefreshTimeCode);
connect(this, &Bin::refreshPanelMarkers, panel, &ClipPropertiesController::slotFillMarkers); connect(this, &Bin::refreshPanelMarkers, panel, &ClipPropertiesController::slotFillMarkers);
connect(panel, SIGNAL(updateClipProperties(QString,QMap<QString,QString>,QMap<QString,QString>)), this, SLOT(slotEditClipCommand(QString,QMap<QString,QString>,QMap<QString,QString>))); connect(panel, SIGNAL(updateClipProperties(QString, QMap<QString, QString>, QMap<QString, QString>)), this, SLOT(slotEditClipCommand(QString, QMap<QString, QString>, QMap<QString, QString>)));
connect(panel, SIGNAL(seekToFrame(int)), m_monitor, SLOT(slotSeek(int))); connect(panel, SIGNAL(seekToFrame(int)), m_monitor, SLOT(slotSeek(int)));
connect(panel, SIGNAL(addMarkers(QString,QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString,QList<CommentedTime>))); connect(panel, SIGNAL(addMarkers(QString, QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString, QList<CommentedTime>)));
connect(panel, &ClipPropertiesController::editClip, this, &Bin::slotEditClip); connect(panel, &ClipPropertiesController::editClip, this, &Bin::slotEditClip);
connect(panel, SIGNAL(editAnalysis(QString,QString,QString)), this, SLOT(slotAddClipExtraData(QString,QString,QString))); connect(panel, SIGNAL(editAnalysis(QString, QString, QString)), this, SLOT(slotAddClipExtraData(QString, QString, QString)));
connect(panel, &ClipPropertiesController::loadMarkers, this, &Bin::slotLoadClipMarkers); connect(panel, &ClipPropertiesController::loadMarkers, this, &Bin::slotLoadClipMarkers);
connect(panel, &ClipPropertiesController::saveMarkers, this, &Bin::slotSaveClipMarkers); connect(panel, &ClipPropertiesController::saveMarkers, this, &Bin::slotSaveClipMarkers);
......
...@@ -63,19 +63,19 @@ void Core::initialize() ...@@ -63,19 +63,19 @@ void Core::initialize()
m_library = new LibraryWidget(m_projectManager); m_library = new LibraryWidget(m_projectManager);
connect(m_library, SIGNAL(addProjectClips(QList<QUrl>)), m_binWidget, SLOT(droppedUrls(QList<QUrl>))); connect(m_library, SIGNAL(addProjectClips(QList<QUrl>)), m_binWidget, SLOT(droppedUrls(QList<QUrl>)));
connect(this, &Core::updateLibraryPath, m_library, &LibraryWidget::slotUpdateLibraryPath); connect(this, &Core::updateLibraryPath, m_library, &LibraryWidget::slotUpdateLibraryPath);
connect(m_binWidget, SIGNAL(storeFolder(QString,QString,QString,QString)), m_binController, SLOT(slotStoreFolder(QString,QString,QString,QString))); connect(m_binWidget, SIGNAL(storeFolder(QString, QString, QString, QString)), m_binController, SLOT(slotStoreFolder(QString, QString, QString, QString)));
connect(m_binController, SIGNAL(loadFolders(QMap<QString,QString>)), m_binWidget, SLOT(slotLoadFolders(QMap<QString,QString>))); connect(m_binController, SIGNAL(loadFolders(QMap<QString, QString>)), m_binWidget, SLOT(slotLoadFolders(QMap<QString, QString>)));
connect(m_binController, &BinController::requestAudioThumb, m_binWidget, &Bin::slotCreateAudioThumb); connect(m_binController, &BinController::requestAudioThumb, m_binWidget, &Bin::slotCreateAudioThumb);
connect(m_binController, &BinController::abortAudioThumbs, m_binWidget, &Bin::abortAudioThumbs); connect(m_binController, &BinController::abortAudioThumbs, m_binWidget, &Bin::abortAudioThumbs);
connect(m_binController, SIGNAL(loadThumb(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool))); connect(m_binController, SIGNAL(loadThumb(QString, QImage, bool)), m_binWidget, SLOT(slotThumbnailReady(QString, QImage, bool)));
m_monitorManager = new MonitorManager(this); m_monitorManager = new MonitorManager(this);
// Producer queue, creating MLT::Producers on request // Producer queue, creating MLT::Producers on request
m_producerQueue = new ProducerQueue(m_binController); m_producerQueue = new ProducerQueue(m_binController);
connect(m_producerQueue, SIGNAL(gotFileProperties(requestClipInfo,ClipController*)), m_binWidget, SLOT(slotProducerReady(requestClipInfo,ClipController*)), Qt::DirectConnection); connect(m_producerQueue, SIGNAL(gotFileProperties(requestClipInfo, ClipController *)), m_binWidget, SLOT(slotProducerReady(requestClipInfo, ClipController *)), Qt::DirectConnection);
connect(m_producerQueue, &ProducerQueue::replyGetImage, m_binWidget, &Bin::slotThumbnailReady); connect(m_producerQueue, &ProducerQueue::replyGetImage, m_binWidget, &Bin::slotThumbnailReady);
connect(m_producerQueue, &ProducerQueue::removeInvalidClip, m_binWidget, &Bin::slotRemoveInvalidClip, Qt::DirectConnection); connect(m_producerQueue, &ProducerQueue::removeInvalidClip, m_binWidget, &Bin::slotRemoveInvalidClip, Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(addClip(QString,QMap<QString,QString>)), m_binWidget, SLOT(slotAddUrl(QString,QMap<QString,QString>))); connect(m_producerQueue, SIGNAL(addClip(QString, QMap<QString, QString>)), m_binWidget, SLOT(slotAddUrl(QString, QMap<QString, QString>)));
connect(m_binController, SIGNAL(createThumb(QDomElement,QString,int)), m_producerQueue, SLOT(getFileProperties(QDomElement,QString,int))); connect(m_binController, SIGNAL(createThumb(QDomElement, QString, int)), m_producerQueue, SLOT(getFileProperties(QDomElement, QString, int)));
connect(m_binWidget, &Bin::producerReady, m_producerQueue, &ProducerQueue::slotProcessingDone, Qt::DirectConnection); connect(m_binWidget, &Bin::producerReady, m_producerQueue, &ProducerQueue::slotProcessingDone, Qt::DirectConnection);
//TODO //TODO
......
...@@ -106,7 +106,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro ...@@ -106,7 +106,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
m_profile.display_aspect_den = 0; m_profile.display_aspect_den = 0;
m_profile.colorspace = 0; m_profile.colorspace = 0;
m_clipManager = new ClipManager(this); m_clipManager = new ClipManager(this);
connect(m_clipManager, SIGNAL(displayMessage(QString,int)), parent, SLOT(slotGotProgressInfo(QString,int))); connect(m_clipManager, SIGNAL(displayMessage(QString, int)), parent, SLOT(slotGotProgressInfo(QString, int)));
connect(this, SIGNAL(updateCompositionMode(int)), parent, SLOT(slotUpdateCompositeAction(int))); connect(this, SIGNAL(updateCompositionMode(int)), parent, SLOT(slotUpdateCompositeAction(int)));
bool success = false; bool success = false;
connect(m_commandStack, &QUndoStack::indexChanged, this, &KdenliveDoc::slotModified); connect(m_commandStack, &QUndoStack::indexChanged, this, &KdenliveDoc::slotModified);
......
...@@ -246,7 +246,7 @@ void DvdWizard::generateDvd() ...@@ -246,7 +246,7 @@ void DvdWizard::generateDvd()
m_pageMenu->createButtonImages(m_selectedImage.fileName(), m_highlightedImage.fileName(), false); m_pageMenu->createButtonImages(m_selectedImage.fileName(), m_highlightedImage.fileName(), false);
m_pageMenu->createBackgroundImage(m_menuImageBackground.fileName(), false); m_pageMenu->createBackgroundImage(m_menuImageBackground.fileName(), false);
images->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok"))); images->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok")));
connect(&m_menuJob, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotProcessMenuStatus(int,QProcess::ExitStatus))); connect(&m_menuJob, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotProcessMenuStatus(int, QProcess::ExitStatus)));
////qCDebug(KDENLIVE_LOG) << "/// STARTING MLT VOB CREATION: "<<m_selectedImage.fileName()<<m_menuImageBackground.fileName(); ////qCDebug(KDENLIVE_LOG) << "/// STARTING MLT VOB CREATION: "<<m_selectedImage.fileName()<<m_menuImageBackground.fileName();
if (!m_pageMenu->menuMovie()) { if (!m_pageMenu->menuMovie()) {
// create menu vob file // create menu vob file
...@@ -689,7 +689,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString ...@@ -689,7 +689,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert(QStringLiteral("VIDEO_FORMAT"), m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC"); env.insert(QStringLiteral("VIDEO_FORMAT"), m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
m_dvdauthor->setProcessEnvironment(env); m_dvdauthor->setProcessEnvironment(env);
connect(m_dvdauthor, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int,QProcess::ExitStatus))); connect(m_dvdauthor, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int, QProcess::ExitStatus)));
connect(m_dvdauthor, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowRenderInfo); connect(m_dvdauthor, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowRenderInfo);
m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels); m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels);
m_dvdauthor->start(QStringLiteral("dvdauthor"), args); m_dvdauthor->start(QStringLiteral("dvdauthor"), args);
...@@ -795,7 +795,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status) ...@@ -795,7 +795,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
m_mkiso = Q_NULLPTR; m_mkiso = Q_NULLPTR;
} }
m_mkiso = new QProcess(this); m_mkiso = new QProcess(this);
connect(m_mkiso, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int,QProcess::ExitStatus))); connect(m_mkiso, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int, QProcess::ExitStatus)));
connect(m_mkiso, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowIsoInfo); connect(m_mkiso, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowIsoInfo);
m_mkiso->setProcessChannelMode(QProcess::MergedChannels); m_mkiso->setProcessChannelMode(QProcess::MergedChannels);
QListWidgetItem *isoitem = m_status.job_progress->item(4); QListWidgetItem *isoitem = m_status.job_progress->item(4);
......
...@@ -102,7 +102,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do ...@@ -102,7 +102,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
connect(m_doubleEdit, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double))); connect(m_doubleEdit, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double)));
connect(m_doubleEdit, &QAbstractSpinBox::editingFinished, this, &DragValue::slotEditingFinished); connect(m_doubleEdit, &QAbstractSpinBox::editingFinished, this, &DragValue::slotEditingFinished);
} }
connect(m_label, SIGNAL(valueChanged(double,bool)), this, SLOT(setValueFromProgress(double,bool))); connect(m_label, SIGNAL(valueChanged(double, bool)), this, SLOT(setValueFromProgress(double, bool)));
connect(m_label, &CustomLabel::resetValue, this, &DragValue::slotReset); connect(m_label, &CustomLabel::resetValue, this, &DragValue::slotReset);
setLayout(l); setLayout(l);
if (m_intEdit) { if (m_intEdit) {
......
...@@ -63,7 +63,7 @@ EffectStackView2::EffectStackView2(Monitor *projectMonitor, QWidget *parent) : ...@@ -63,7 +63,7 @@ EffectStackView2::EffectStackView2(Monitor *projectMonitor, QWidget *parent) :
m_effect = new EffectSettings(this); m_effect = new EffectSettings(this);
m_transition = new TransitionSettings(projectMonitor, this); m_transition = new TransitionSettings(projectMonitor, this);
connect(m_transition, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>))); connect(m_transition, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)));
connect(m_effect->checkAll, &QCheckBox::stateChanged, this, &EffectStackView2::slotCheckAll); connect(m_effect->checkAll, &QCheckBox::stateChanged, this, &EffectStackView2::slotCheckAll);
connect(m_effect->effectCompare, &QToolButton::toggled, this, &EffectStackView2::slotSwitchCompare); connect(m_effect->effectCompare, &QToolButton::toggled, this, &EffectStackView2::slotSwitchCompare);
...@@ -479,7 +479,7 @@ void EffectStackView2::connectEffect(CollapsibleEffect *currentEffect) ...@@ -479,7 +479,7 @@ void EffectStackView2::connectEffect(CollapsibleEffect *currentEffect)
connect(currentEffect, &AbstractCollapsibleWidget::addEffect, this, &EffectStackView2::slotAddEffect); connect(currentEffect, &AbstractCollapsibleWidget::addEffect, this, &EffectStackView2::slotAddEffect);
connect(currentEffect, &CollapsibleEffect::createRegion, this, &EffectStackView2::slotCreateRegion); connect(currentEffect, &CollapsibleEffect::createRegion, this, &EffectStackView2::slotCreateRegion);
connect(currentEffect, &CollapsibleEffect::deleteGroup, this, &EffectStackView2::slotDeleteGroup); connect(currentEffect, &CollapsibleEffect::deleteGroup, this, &EffectStackView2::slotDeleteGroup);
connect(currentEffect, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>))); connect(currentEffect, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)));
} }
void EffectStackView2::slotCheckWheelEventFilter() void EffectStackView2::slotCheckWheelEventFilter()
......
...@@ -74,8 +74,8 @@ MyTextItem::MyTextItem(const QString &txt, QGraphicsItem *parent) : ...@@ -74,8 +74,8 @@ MyTextItem::MyTextItem(const QString &txt, QGraphicsItem *parent) :
m_shadowEffect->setEnabled(false); m_shadowEffect->setEnabled(false);
setGraphicsEffect(m_shadowEffect); setGraphicsEffect(m_shadowEffect);
updateGeometry(); updateGeometry();
connect(document(), SIGNAL(contentsChange(int,int,int)), connect(document(), SIGNAL(contentsChange(int, int, int)),
this, SLOT(updateGeometry(int,int,int))); this, SLOT(updateGeometry(int, int, int)));
} }
Qt::Alignment MyTextItem::alignment() const Qt::Alignment MyTextItem::alignment() const
......
...@@ -495,7 +495,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo ...@@ -495,7 +495,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
} }
PositionEdit *posedit = new PositionEdit(paramName, pos, 0, m_out - m_in, m_metaInfo->monitor->timecode()); PositionEdit *posedit = new PositionEdit(paramName, pos, 0, m_out - m_in, m_metaInfo->monitor->timecode());
posedit->setToolTip(comment); posedit->setToolTip(comment);
connect(this, SIGNAL(updateRange(int,int)), posedit, SLOT(setRange(int,int))); connect(this, SIGNAL(updateRange(int, int)), posedit, SLOT(setRange(int, int)));
if (m_conditionParameter && pa.hasAttribute(QStringLiteral("conditional"))) { if (m_conditionParameter && pa.hasAttribute(QStringLiteral("conditional"))) {
posedit->setEnabled(false); posedit->setEnabled(false);
m_conditionalWidgets << posedit; m_conditionalWidgets << posedit;
......
...@@ -123,7 +123,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int ...@@ -123,7 +123,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int
curve->setCheckable(true); curve->setCheckable(true);
m_selectType->addAction(curve); m_selectType->addAction(curve);
m_selectType->setCurrentAction(linear); m_selectType->setCurrentAction(linear);
connect(m_selectType, SIGNAL(triggered(QAction*)), this, SLOT(slotEditKeyframeType(QAction*))); connect(m_selectType, SIGNAL(triggered(QAction *)), this, SLOT(slotEditKeyframeType(QAction *)));
KSelectAction *defaultInterp = new KSelectAction(KoIconUtils::themedIcon(QStringLiteral("keyframes")), i18n("Default interpolation"), this); KSelectAction *defaultInterp = new KSelectAction(KoIconUtils::themedIcon(QStringLiteral("keyframes")), i18n("Default interpolation"), this);
discrete = new QAction(KoIconUtils::themedIcon(QStringLiteral("discrete")), i18n("Discrete"), this); discrete = new QAction(KoIconUtils::themedIcon(QStringLiteral("discrete")), i18n("Discrete"), this);
...@@ -149,7 +149,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int ...@@ -149,7 +149,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int
defaultInterp->setCurrentAction(linear); defaultInterp->setCurrentAction(linear);
break; break;
} }
connect(defaultInterp, SIGNAL(triggered(QAction*)), this, SLOT(slotSetDefaultInterp(QAction*))); connect(defaultInterp, SIGNAL(triggered(QAction *)), this, SLOT(slotSetDefaultInterp(QAction *)));
m_selectType->setToolBarMode(KSelectAction::ComboBoxMode); m_selectType->setToolBarMode(KSelectAction::ComboBoxMode);
m_endAttach = new QAction(i18n("Attach keyframe to end"), this); m_endAttach = new QAction(i18n("Attach keyframe to end"), this);
...@@ -900,16 +900,16 @@ void AnimationWidget::slotAdjustKeyframeValue(double value) ...@@ -900,16 +900,16 @@ void AnimationWidget::slotAdjustKeyframeValue(double value)
// This is a keyframe // This is a keyframe
type = m_animController.keyframe_type(pos); type = m_animController.keyframe_type(pos);
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type); m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged(); emit parameterChanged();
} else if (m_animController.key_count() <= 1) { } else if (m_animController.key_count() <= 1) {
pos = m_animController.key_get_frame(0); pos = m_animController.key_get_frame(0);
if (pos >= 0) { if (pos >= 0) {
if (m_animController.is_key(pos)) { if (m_animController.is_key(pos)) {
type = m_animController.keyframe_type(pos); type = m_animController.keyframe_type(pos);
} }
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type); m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged(); emit parameterChanged();
} }
} }
} }
......
...@@ -37,7 +37,7 @@ LayoutManagement::LayoutManagement(QObject *parent) : ...@@ -37,7 +37,7 @@ LayoutManagement::LayoutManagement(QObject *parent) :
} }
// Required to enable user to add the load layout action to toolbar // Required to enable user to add the load layout action to toolbar
layoutActions->addAction(QStringLiteral("load_layouts"), m_loadLayout); layoutActions->addAction(QStringLiteral("load_layouts"), m_loadLayout);
connect(m_loadLayout, SIGNAL(triggered(QAction*)), SLOT(slotLoadLayout(QAction*))); connect(m_loadLayout, SIGNAL(triggered(QAction *)), SLOT(slotLoadLayout(QAction *)));
connect(pCore->window(), &MainWindow::GUISetupDone, this, &LayoutManagement::slotOnGUISetupDone); connect(pCore->window(), &MainWindow::GUISetupDone, this, &LayoutManagement::slotOnGUISetupDone);
} }
......
...@@ -214,7 +214,7 @@ LibraryWidget::LibraryWidget(ProjectManager *manager, QWidget *parent) : QWidget ...@@ -214,7 +214,7 @@ LibraryWidget::LibraryWidget(ProjectManager *manager, QWidget *parent) : QWidget
m_coreLister = new KCoreDirLister(this); m_coreLister = new KCoreDirLister(this);
m_coreLister->setDelayedMimeTypes(false); m_coreLister->setDelayedMimeTypes(false);
connect(m_coreLister, SIGNAL(itemsAdded(QUrl,KFileItemList)), this, SLOT(slotItemsAdded(QUrl,KFileItemList))); connect(m_coreLister, SIGNAL(itemsAdded(QUrl, KFileItemList)), this, SLOT(slotItemsAdded(QUrl, KFileItemList)));
connect(m_coreLister, &KCoreDirLister::itemsDeleted, this, &LibraryWidget::slotItemsDeleted); connect(m_coreLister, &KCoreDirLister::itemsDeleted, this, &LibraryWidget::slotItemsDeleted);
connect(m_coreLister, SIGNAL(clear()), this, SLOT(slotClearAll())); connect(m_coreLister, SIGNAL(clear()), this, SLOT(slotClearAll()));
m_coreLister->openUrl(QUrl::fromLocalFile(m_directory.absolutePath())); m_coreLister->openUrl(QUrl::fromLocalFile(m_directory.absolutePath()));
...@@ -415,7 +415,7 @@ void LibraryWidget::slotMoveData(const QList<QUrl> &urls, QString dest) ...@@ -415,7 +415,7 @@ void LibraryWidget::slotMoveData(const QList<QUrl> &urls, QString dest)
// Dropped an external file, attempt to copy it to library // Dropped an external file, attempt to copy it to library
KIO::FileCopyJob *copyJob = KIO::file_copy(url, QUrl::fromLocalFile(dir.absoluteFilePath(url.fileName()))); KIO::FileCopyJob *copyJob = KIO::file_copy(url, QUrl::fromLocalFile(dir.absoluteFilePath(url.fileName())));
connect(copyJob, &KJob::result, this, &LibraryWidget::slotDownloadFinished); connect(copyJob, &KJob::result, this, &LibraryWidget::slotDownloadFinished);
connect(copyJob, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotDownloadProgress(KJob*,ulong))); connect(copyJob, SIGNAL(percent(KJob *, ulong)), this, SLOT(slotDownloadProgress(KJob *, ulong)));
} else { } else {
// Internal drag/drop // Internal drag/drop
dir.rename(url.path(), url.fileName()); dir.rename(url.path(), url.fileName());
......
This diff is collapsed.
...@@ -48,10 +48,18 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath) ...@@ -48,10 +48,18 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
KdenliveSettings::setMltpath(basePath); KdenliveSettings::setMltpath(basePath);
QString meltPath = QDir::cleanPath(basePath).section('/', 0, -3) + "/bin/melt"; QString meltPath = QDir::cleanPath(basePath).section('/', 0, -3) + "/bin/melt";
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + "/bin/melt"; if (!QFile::exists(meltPath)) {
if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath(); meltPath = qgetenv("MLT_PREFIX") + "/bin/melt";
if (!QFile::exists(meltPath)) meltPath = QStringLiteral(MLT_MELTBIN); }
if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt"); if (!QFile::exists(meltPath)) {
meltPath = KdenliveSettings::rendererpath();
}
if (!QFile::exists(meltPath)) {
meltPath = QStringLiteral(MLT_MELTBIN);
}
if (!QFile::exists(meltPath)) {
meltPath = QStandardPaths::findExecutable("melt");
}
KdenliveSettings::setRendererpath(meltPath); KdenliveSettings::setRendererpath(meltPath);
if (KdenliveSettings::rendererpath().isEmpty()) { if (KdenliveSettings::rendererpath().isEmpty()) {
......
...@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ProducerQueue::ProducerQueue(BinController *controller) : QObject(controller) ProducerQueue::ProducerQueue(BinController *controller) : QObject(controller)
, m_binController(controller) , m_binController(controller)
{ {
connect(this, SIGNAL(multiStreamFound(QString,QList<int>,QList<int>,stringMap)), this, SLOT(slotMultiStreamProducerFound(QString,QList<int>,QList<int>,stringMap))); connect(this, SIGNAL(multiStreamFound(QString, QList<int>, QList<int>, stringMap)), this, SLOT(slotMultiStreamProducerFound(QString, QList<int>, QList<int>, stringMap)));
connect(this, &ProducerQueue::refreshTimelineProducer, m_binController, &BinController::replaceTimelineProducer); connect(this, &ProducerQueue::refreshTimelineProducer, m_binController, &BinController::replaceTimelineProducer);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -617,8 +617,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass) ...@@ -617,8 +617,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
QUrl startJobDst = i.value(); QUrl startJobDst = i.value();
m_duplicateFiles.remove(startJobSrc); m_duplicateFiles.remove(startJobSrc);
KIO::CopyJob *job = KIO::copyAs(startJobSrc, startJobDst, KIO::HideProgressInfo); KIO::CopyJob *job = KIO::copyAs(startJobSrc, startJobDst, KIO::HideProgressInfo);
connect(job, SIGNAL(result(KJob*)), this, SLOT(slotArchivingFinished(KJob*))); connect(job, SIGNAL(result(KJob *)), this, SLOT(slotArchivingFinished(KJob *)));
connect(job, SIGNAL(processedSize(KJob*,qulonglong)), this, SLOT(slotArchivingProgress(KJob*,qulonglong))); connect(job, SIGNAL(processedSize(KJob *, qulonglong)), this, SLOT(slotArchivingProgress(KJob *, qulonglong)));
} }
return true; return true;
} }
...@@ -637,8 +637,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass) ...@@ -637,8 +637,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
KMessageBox::sorry(this, i18n("Cannot create directory %1", destUrl.path())); KMessageBox::sorry(this, i18n("Cannot create directory %1", destUrl.path()));
} }
m_copyJob = KIO::copy(files, destUrl, KIO::HideProgressInfo); m_copyJob = KIO::copy(files, destUrl, KIO::HideProgressInfo);
connect(m_copyJob, SIGNAL(result(KJob*)), this, SLOT(slotArchivingFinished(KJob*))); connect(m_copyJob, SIGNAL(result(KJob *)), this, SLOT(slotArchivingFinished(KJob *)));
connect(m_copyJob, SIGNAL(processedSize(KJob*,qulonglong)), this, SLOT(slotArchivingProgress(KJob*,qulonglong))); connect(m_copyJob, SIGNAL(processedSize(KJob *, qulonglong)), this, SLOT(slotArchivingProgress(KJob *, qulonglong)));
} }
if (firstPass) { if (firstPass) {
progressBar->setValue(0); progressBar->setValue(0);
......
...@@ -209,11 +209,11 @@ void JobManager::slotProcessJobs() ...@@ -209,11 +209,11 @@ void JobManager::slotProcessJobs()
continue; continue;
} }
} }
connect(job, SIGNAL(jobProgress(QString,int,int)), this, SIGNAL(processLog(QString,int,int))); connect(job, SIGNAL(jobProgress(QString, int, int)), this, SIGNAL(processLog(QString, int, int)));
connect(job, &AbstractClipJob::cancelRunningJob, m_bin, &Bin::slotCancelRunningJob); connect(job, &AbstractClipJob::cancelRunningJob, m_bin, &Bin::slotCancelRunningJob);
if (job->jobType == AbstractClipJob::MLTJOB || job->jobType == AbstractClipJob::ANALYSECLIPJOB) { if (job->jobType == AbstractClipJob::MLTJOB || job->jobType == AbstractClipJob::ANALYSECLIPJOB) {
connect(job, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap)), this, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap))); connect(job, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)), this, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)));
} }
job->startJob(); job->startJob();
if (job->status() == JobDone) { if (job->status() == JobDone) {
......
...@@ -195,7 +195,7 @@ void ProjectManager::newFile(bool showProjectSettings, bool force) ...@@ -195,7 +195,7 @@ void ProjectManager::newFile(bool showProjectSettings, bool force)
// Set default target tracks to upper audio / lower video tracks // Set default target tracks to upper audio / lower video tracks
m_trackView->audioTarget = projectTracks.y() > 0 ? projectTracks.y() : -1;