Commit d12d3daa authored by Laurent Montel's avatar Laurent Montel

Use new connect api

parent e5fc13f6
......@@ -118,7 +118,7 @@ int main(int argc, char **argv)
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")),QStringLiteral("vpre=%1").arg(vprelist.at(1)));
args.replace(args.indexOf(QStringLiteral("pass=1")), QStringLiteral("pass=2"));
dualjob = new RenderJob(erase, usekuiserver, pid, render, profile, rendermodule, player, src, dest, preargs, args, in, out);
QObject::connect(job, SIGNAL(renderingFinished()), dualjob, SLOT(start()));
QObject::connect(job, &RenderJob::renderingFinished, dualjob, &RenderJob::start);
}
app.exec();
if (dualjob) delete dualjob;
......
......@@ -55,7 +55,7 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, int pid, const QString& rend
{
m_renderProcess = new QProcess;
m_renderProcess->setReadChannel(QProcess::StandardError);
connect(m_renderProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotCheckProcess(QProcess::ProcessState)));
connect(m_renderProcess, &QProcess::stateChanged, this, &RenderJob::slotCheckProcess);
// Disable VDPAU so that rendering will work even if there is a Kdenlive instance using VDPAU
qputenv("MLT_NO_VDPAU", "1");
......@@ -195,7 +195,7 @@ void RenderJob::start()
}
// Because of the logging, we connect to stderr in all cases.
connect(m_renderProcess, SIGNAL(readyReadStandardError()), this, SLOT(receivedStderr()));
connect(m_renderProcess, &QProcess::readyReadStandardError, this, &RenderJob::receivedStderr);
m_renderProcess->start(m_prog, m_args);
m_logstream << "Started render process: " << m_prog << ' ' << m_args.join(QStringLiteral(" ")) << endl;
}
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent) :
hlay->addWidget(new QLabel(i18n("Duration")));
m_timePos = new TimecodeDisplay(monitor->timecode(), this);
if (base.hasAttribute(QStringLiteral("updateonduration"))) {
connect(m_timePos, SIGNAL(timeCodeEditingFinished(int)), this, SLOT(updateDuration(int)));
connect(m_timePos, &TimecodeDisplay::timeCodeEditingFinished, this, &Generators::updateDuration);
}
hlay->addWidget(m_timePos);
lay->addLayout(hlay);
......@@ -74,8 +74,8 @@ Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent) :
connect(m_container, &ParameterContainer::parameterChanged, this, &Generators::updateProducer);
lay->addStretch(10);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
lay->addWidget(buttonBox);
m_timePos->setValue(KdenliveSettings::color_duration());
}
......
......@@ -690,8 +690,8 @@ void ProjectClip::setJobStatus(int jobType, int status, int progress, const QStr
ClipPropertiesController *ProjectClip::buildProperties(QWidget *parent)
{
ClipPropertiesController *panel = new ClipPropertiesController(bin()->projectTimecode(), m_controller, parent);
connect(this, SIGNAL(refreshPropertiesPanel()), panel, SLOT(slotReloadProperties()));
connect(this, SIGNAL(refreshAnalysisPanel()), panel, SLOT(slotFillAnalysisData()));
connect(this, &ProjectClip::refreshPropertiesPanel, panel, &ClipPropertiesController::slotReloadProperties);
connect(this, &ProjectClip::refreshAnalysisPanel, panel, &ClipPropertiesController::slotFillAnalysisData);
return panel;
}
......@@ -1044,7 +1044,7 @@ void ProjectClip::slotCreateAudioThumbs()
}
}
QProcess audioThumbsProcess;
connect(this, SIGNAL(doAbortAudioThumbs()), &audioThumbsProcess, SLOT(kill()), Qt::DirectConnection);
connect(this, &ProjectClip::doAbortAudioThumbs, &audioThumbsProcess, &QProcess::kill, Qt::DirectConnection);
connect(&audioThumbsProcess, &QProcess::readyReadStandardOutput, this, &ProjectClip::updateFfmpegProgress);
audioThumbsProcess.start(KdenliveSettings::ffmpegpath(), args);
bool ffmpegError = false;
......
......@@ -39,7 +39,7 @@ ProjectItemModel::ProjectItemModel(Bin *bin) :
QAbstractItemModel(bin)
, m_bin(bin)
{
connect(m_bin, SIGNAL(itemUpdated(AbstractProjectItem*)), this, SLOT(onItemUpdated(AbstractProjectItem*)));
connect(m_bin, &Bin::itemUpdated, this, &ProjectItemModel::onItemUpdated);
}
ProjectItemModel::~ProjectItemModel()
......
......@@ -30,7 +30,7 @@ ProjectSortProxyModel::ProjectSortProxyModel(QObject *parent)
{
m_collator.setNumericMode(true);
m_selection = new QItemSelectionModel(this);
connect(m_selection, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(onCurrentRowChanged(QItemSelection,QItemSelection)));
connect(m_selection, &QItemSelectionModel::selectionChanged, this, &ProjectSortProxyModel::onCurrentRowChanged);
setDynamicSortFilter(true);
}
......
......@@ -53,13 +53,13 @@ ManageCapturesDialog::ManageCapturesDialog(const QList<QUrl> &files, QWidget * p
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable | Qt::ItemIsEnabled);
item->setCheckState(0, Qt::Checked);
}
connect(m_view.treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotRefreshButtons()));
connect(m_view.deleteButton, SIGNAL(pressed()), this, SLOT(slotDeleteCurrent()));
connect(m_view.toggleButton, SIGNAL(pressed()), this, SLOT(slotToggle()));
connect(m_view.treeWidget, &QTreeWidget::itemChanged, this, &ManageCapturesDialog::slotRefreshButtons);
connect(m_view.deleteButton, &QAbstractButton::pressed, this, &ManageCapturesDialog::slotDeleteCurrent);
connect(m_view.toggleButton, &QAbstractButton::pressed, this, &ManageCapturesDialog::slotToggle);
QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(0);
if (item) m_view.treeWidget->setCurrentItem(item);
connect(m_view.treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckItemIcon()));
QTimer::singleShot(500, this, SLOT(slotCheckItemIcon()));
connect(m_view.treeWidget, &QTreeWidget::itemSelectionChanged, this, &ManageCapturesDialog::slotCheckItemIcon);
QTimer::singleShot(500, this, &ManageCapturesDialog::slotCheckItemIcon);
m_view.treeWidget->resizeColumnToContents(0);
m_view.treeWidget->setEnabled(false);
adjustSize();
......
......@@ -643,7 +643,7 @@ void MltDeviceCapture::uyvy2rgb(unsigned char *yuv_buffer, int width, int height
void MltDeviceCapture::slotPreparePreview()
{
QTimer::singleShot(1000, this, SLOT(slotAllowPreview()));
QTimer::singleShot(1000, this, &MltDeviceCapture::slotAllowPreview);
}
void MltDeviceCapture::slotAllowPreview()
......
......@@ -36,7 +36,7 @@ Core::Core(MainWindow *mainWindow) :
, m_binWidget(Q_NULLPTR)
, m_library(Q_NULLPTR)
{
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(deleteLater()));
connect(qApp, &QCoreApplication::aboutToQuit, this, &QObject::deleteLater);
}
Core::~Core()
......@@ -66,18 +66,18 @@ void Core::initialize()
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_binController, SIGNAL(loadFolders(QMap<QString,QString>)), m_binWidget, SLOT(slotLoadFolders(QMap<QString,QString>)));
connect(m_binController, SIGNAL(requestAudioThumb(QString)), m_binWidget, SLOT(slotCreateAudioThumb(QString)));
connect(m_binController, SIGNAL(abortAudioThumbs()), m_binWidget, SLOT(abortAudioThumbs()));
connect(m_binController, &BinController::requestAudioThumb, m_binWidget, &Bin::slotCreateAudioThumb);
connect(m_binController, &BinController::abortAudioThumbs, m_binWidget, &Bin::abortAudioThumbs);
connect(m_binController, SIGNAL(loadThumb(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool)));
m_monitorManager = new MonitorManager(this);
// Producer queue, creating MLT::Producers on request
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(replyGetImage(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool)));
connect(m_producerQueue, SIGNAL(removeInvalidClip(QString,bool,QString)), m_binWidget, SLOT(slotRemoveInvalidClip(QString,bool,QString)), Qt::DirectConnection);
connect(m_producerQueue, &ProducerQueue::replyGetImage, m_binWidget, &Bin::slotThumbnailReady);
connect(m_producerQueue, &ProducerQueue::removeInvalidClip, m_binWidget, &Bin::slotRemoveInvalidClip, Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(addClip(const QString&,const QMap<QString,QString>&)), m_binWidget, SLOT(slotAddUrl(const QString&,const QMap<QString,QString>&)));
connect(m_binController, SIGNAL(createThumb(QDomElement,QString,int)), m_producerQueue, SLOT(getFileProperties(QDomElement,QString,int)));
connect(m_binWidget, SIGNAL(producerReady(QString)), m_producerQueue, SLOT(slotProcessingDone(QString)), Qt::DirectConnection);
connect(m_binWidget, &Bin::producerReady, m_producerQueue, &ProducerQueue::slotProcessingDone, Qt::DirectConnection);
//TODO
/*connect(m_producerQueue, SIGNAL(removeInvalidProxy(QString,bool)), m_binWidget, SLOT(slotRemoveInvalidProxy(QString,bool)));*/
......
......@@ -266,7 +266,7 @@ void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, const QStringList &gr
QDir dir(doc->projectDataFolder() + QStringLiteral("/titles"));
dir.mkpath(QStringLiteral("."));
QPointer<TitleWidget> dia_ui = new TitleWidget(QUrl::fromLocalFile(templatePath), doc->timecode(), dir.absolutePath(), doc->renderer(), bin);
QObject::connect(dia_ui, SIGNAL(requestBackgroundFrame(bool)), bin, SLOT(slotGetCurrentProjectImage(bool)));
QObject::connect(dia_ui.data(), &TitleWidget::requestBackgroundFrame, bin, &Bin::slotGetCurrentProjectImage);
if (dia_ui->exec() == QDialog::Accepted) {
// Ready, create clip xml
QDomDocument xml;
......
......@@ -49,10 +49,10 @@ EncodingProfilesDialog::EncodingProfilesDialog(int profileType, QWidget * parent
m_configFile = new KConfig(QStringLiteral("encodingprofiles.rc"), KConfig::CascadeConfig, QStandardPaths::DataLocation);
profile_type->setCurrentIndex(profileType);
connect(profile_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotLoadProfiles()));
connect(profile_list, SIGNAL(currentRowChanged(int)), this, SLOT(slotShowParams()));
connect(button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
connect(button_add, SIGNAL(clicked()), this, SLOT(slotAddProfile()));
connect(button_edit, SIGNAL(clicked()), this, SLOT(slotEditProfile()));
connect(profile_list, &QListWidget::currentRowChanged, this, &EncodingProfilesDialog::slotShowParams);
connect(button_delete, &QAbstractButton::clicked, this, &EncodingProfilesDialog::slotDeleteProfile);
connect(button_add, &QAbstractButton::clicked, this, &EncodingProfilesDialog::slotAddProfile);
connect(button_edit, &QAbstractButton::clicked, this, &EncodingProfilesDialog::slotEditProfile);
profile_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
slotLoadProfiles();
}
......
This diff is collapsed.
......@@ -65,19 +65,19 @@ ProfilesDialog::ProfilesDialog(const QString &profileDescription, QWidget * pare
fillList(profileDescription);
slotUpdateDisplay();
connect(m_view.profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
connect(m_view.button_create, SIGNAL(clicked()), this, SLOT(slotCreateProfile()));
connect(m_view.button_save, SIGNAL(clicked()), this, SLOT(slotSaveProfile()));
connect(m_view.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
connect(m_view.button_default, SIGNAL(clicked()), this, SLOT(slotSetDefaultProfile()));
connect(m_view.button_create, &QAbstractButton::clicked, this, &ProfilesDialog::slotCreateProfile);
connect(m_view.button_save, &QAbstractButton::clicked, this, &ProfilesDialog::slotSaveProfile);
connect(m_view.button_delete, &QAbstractButton::clicked, this, &ProfilesDialog::slotDeleteProfile);
connect(m_view.button_default, &QAbstractButton::clicked, this, &ProfilesDialog::slotSetDefaultProfile);
connect(m_view.description, SIGNAL(textChanged(QString)), this, SLOT(slotProfileEdited()));
connect(m_view.description, &QLineEdit::textChanged, this, &ProfilesDialog::slotProfileEdited);
connect(m_view.frame_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.frame_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.aspect_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.aspect_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.display_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.display_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.progressive, SIGNAL(stateChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.progressive, &QCheckBox::stateChanged, this, &ProfilesDialog::slotProfileEdited);
connect(m_view.size_h, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.size_w, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.size_w, &QAbstractSpinBox::editingFinished, this, &ProfilesDialog::slotAdjustWidth);
......@@ -118,16 +118,16 @@ ProfilesDialog::ProfilesDialog(const QString &profilePath, bool, QWidget * paren
m_view.description->setEnabled(false);
slotUpdateDisplay(profilePath);
connect(m_view.button_save, SIGNAL(clicked()), this, SLOT(slotSaveProfile()));
connect(m_view.button_save, &QAbstractButton::clicked, this, &ProfilesDialog::slotSaveProfile);
connect(m_view.description, SIGNAL(textChanged(QString)), this, SLOT(slotProfileEdited()));
connect(m_view.description, &QLineEdit::textChanged, this, &ProfilesDialog::slotProfileEdited);
connect(m_view.frame_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.frame_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.aspect_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.aspect_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.display_num, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.display_den, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.progressive, SIGNAL(stateChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.progressive, &QCheckBox::stateChanged, this, &ProfilesDialog::slotProfileEdited);
connect(m_view.size_h, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.size_w, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
connect(m_view.size_w, &QAbstractSpinBox::editingFinished, this, &ProfilesDialog::slotAdjustWidth);
......
......@@ -185,18 +185,18 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, const
m_view.advanced_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
m_view.optionsGroup->setVisible(m_view.options->isChecked());
connect(m_view.options, SIGNAL(toggled(bool)), m_view.optionsGroup, SLOT(setVisible(bool)));
connect(m_view.options, &QAbstractButton::toggled, m_view.optionsGroup, &QWidget::setVisible);
m_view.videoLabel->setVisible(m_view.options->isChecked());
connect(m_view.options, SIGNAL(toggled(bool)), m_view.videoLabel, SLOT(setVisible(bool)));
connect(m_view.options, &QAbstractButton::toggled, m_view.videoLabel, &QWidget::setVisible);
m_view.video->setVisible(m_view.options->isChecked());
connect(m_view.options, SIGNAL(toggled(bool)), m_view.video, SLOT(setVisible(bool)));
connect(m_view.options, &QAbstractButton::toggled, m_view.video, &QWidget::setVisible);
m_view.audioLabel->setVisible(m_view.options->isChecked());
connect(m_view.options, SIGNAL(toggled(bool)), m_view.audioLabel, SLOT(setVisible(bool)));
connect(m_view.options, &QAbstractButton::toggled, m_view.audioLabel, &QWidget::setVisible);
m_view.audio->setVisible(m_view.options->isChecked());
connect(m_view.options, SIGNAL(toggled(bool)), m_view.audio, SLOT(setVisible(bool)));
connect(m_view.quality, SIGNAL(valueChanged(int)), this, SLOT(adjustAVQualities(int)));
connect(m_view.options, &QAbstractButton::toggled, m_view.audio, &QWidget::setVisible);
connect(m_view.quality, &QAbstractSlider::valueChanged, this, &RenderWidget::adjustAVQualities);
connect(m_view.video, SIGNAL(valueChanged(int)), this, SLOT(adjustQuality(int)));
connect(m_view.speed, SIGNAL(valueChanged(int)), this, SLOT(adjustSpeed(int)));
connect(m_view.speed, &QAbstractSlider::valueChanged, this, &RenderWidget::adjustSpeed);
m_view.buttonRender->setEnabled(false);
m_view.buttonGenerateScript->setEnabled(false);
......@@ -231,56 +231,56 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, const
connect(m_view.rescale_height, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRescaleHeight(int)));
m_view.rescale_keep->setIcon(KoIconUtils::themedIcon(QStringLiteral("edit-link")));
m_view.rescale_keep->setToolTip(i18n("Preserve aspect ratio"));
connect(m_view.rescale_keep, SIGNAL(clicked()), this, SLOT(slotSwitchAspectRatio()));
connect(m_view.rescale_keep, &QAbstractButton::clicked, this, &RenderWidget::slotSwitchAspectRatio);
connect(m_view.buttonRender, SIGNAL(clicked()), this, SLOT(slotPrepareExport()));
connect(m_view.buttonGenerateScript, SIGNAL(clicked()), this, SLOT(slotGenerateScript()));
connect(m_view.buttonGenerateScript, &QAbstractButton::clicked, this, &RenderWidget::slotGenerateScript);
m_view.abort_job->setEnabled(false);
m_view.start_script->setEnabled(false);
m_view.delete_script->setEnabled(false);
connect(m_view.export_audio, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateAudioLabel(int)));
connect(m_view.export_audio, &QCheckBox::stateChanged, this, &RenderWidget::slotUpdateAudioLabel);
m_view.export_audio->setCheckState(Qt::PartiallyChecked);
parseProfiles();
parseScriptFiles();
m_view.running_jobs->setUniformRowHeights(false);
m_view.scripts_list->setUniformRowHeights(false);
connect(m_view.start_script, SIGNAL(clicked()), this, SLOT(slotStartScript()));
connect(m_view.delete_script, SIGNAL(clicked()), this, SLOT(slotDeleteScript()));
connect(m_view.scripts_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckScript()));
connect(m_view.running_jobs, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckJob()));
connect(m_view.running_jobs, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotPlayRendering(QTreeWidgetItem*,int)));
connect(m_view.buttonSave, SIGNAL(clicked()), this, SLOT(slotSaveProfile()));
connect(m_view.buttonEdit, SIGNAL(clicked()), this, SLOT(slotEditProfile()));
connect(m_view.buttonDelete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
connect(m_view.buttonFavorite, SIGNAL(clicked()), this, SLOT(slotCopyToFavorites()));
connect(m_view.abort_job, SIGNAL(clicked()), this, SLOT(slotAbortCurrentJob()));
connect(m_view.start_job, SIGNAL(clicked()), this, SLOT(slotStartCurrentJob()));
connect(m_view.clean_up, SIGNAL(clicked()), this, SLOT(slotCLeanUpJobs()));
connect(m_view.hide_log, SIGNAL(clicked()), this, SLOT(slotHideLog()));
connect(m_view.buttonClose, SIGNAL(clicked()), this, SLOT(hide()));
connect(m_view.buttonClose2, SIGNAL(clicked()), this, SLOT(hide()));
connect(m_view.buttonClose3, SIGNAL(clicked()), this, SLOT(hide()));
connect(m_view.rescale, SIGNAL(toggled(bool)), this, SLOT(setRescaleEnabled(bool)));
connect(m_view.start_script, &QAbstractButton::clicked, this, &RenderWidget::slotStartScript);
connect(m_view.delete_script, &QAbstractButton::clicked, this, &RenderWidget::slotDeleteScript);
connect(m_view.scripts_list, &QTreeWidget::itemSelectionChanged, this, &RenderWidget::slotCheckScript);
connect(m_view.running_jobs, &QTreeWidget::itemSelectionChanged, this, &RenderWidget::slotCheckJob);
connect(m_view.running_jobs, &QTreeWidget::itemDoubleClicked, this, &RenderWidget::slotPlayRendering);
connect(m_view.buttonSave, &QAbstractButton::clicked, this, &RenderWidget::slotSaveProfile);
connect(m_view.buttonEdit, &QAbstractButton::clicked, this, &RenderWidget::slotEditProfile);
connect(m_view.buttonDelete, &QAbstractButton::clicked, this, &RenderWidget::slotDeleteProfile);
connect(m_view.buttonFavorite, &QAbstractButton::clicked, this, &RenderWidget::slotCopyToFavorites);
connect(m_view.abort_job, &QAbstractButton::clicked, this, &RenderWidget::slotAbortCurrentJob);
connect(m_view.start_job, &QAbstractButton::clicked, this, &RenderWidget::slotStartCurrentJob);
connect(m_view.clean_up, &QAbstractButton::clicked, this, &RenderWidget::slotCLeanUpJobs);
connect(m_view.hide_log, &QAbstractButton::clicked, this, &RenderWidget::slotHideLog);
connect(m_view.buttonClose, &QAbstractButton::clicked, this, &QWidget::hide);
connect(m_view.buttonClose2, &QAbstractButton::clicked, this, &QWidget::hide);
connect(m_view.buttonClose3, &QAbstractButton::clicked, this, &QWidget::hide);
connect(m_view.rescale, &QAbstractButton::toggled, this, &RenderWidget::setRescaleEnabled);
connect(m_view.out_file, SIGNAL(textChanged(QString)), this, SLOT(slotUpdateButtons()));
connect(m_view.out_file, SIGNAL(urlSelected(QUrl)), this, SLOT(slotUpdateButtons(QUrl)));
connect(m_view.formats, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(refreshParams()));
connect(m_view.formats, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotEditItem(QTreeWidgetItem*)));
connect(m_view.formats, &QTreeWidget::currentItemChanged, this, &RenderWidget::refreshParams);
connect(m_view.formats, &QTreeWidget::itemDoubleClicked, this, &RenderWidget::slotEditItem);
connect(m_view.render_guide, SIGNAL(clicked(bool)), this, SLOT(slotUpdateGuideBox()));
connect(m_view.render_zone, SIGNAL(clicked(bool)), this, SLOT(slotUpdateGuideBox()));
connect(m_view.render_full, SIGNAL(clicked(bool)), this, SLOT(slotUpdateGuideBox()));
connect(m_view.render_guide, &QAbstractButton::clicked, this, &RenderWidget::slotUpdateGuideBox);
connect(m_view.render_zone, &QAbstractButton::clicked, this, &RenderWidget::slotUpdateGuideBox);
connect(m_view.render_full, &QAbstractButton::clicked, this, &RenderWidget::slotUpdateGuideBox);
connect(m_view.guide_end, SIGNAL(activated(int)), this, SLOT(slotCheckStartGuidePosition()));
connect(m_view.guide_start, SIGNAL(activated(int)), this, SLOT(slotCheckEndGuidePosition()));
connect(m_view.tc_overlay, SIGNAL(toggled(bool)), m_view.tc_type, SLOT(setEnabled(bool)));
connect(m_view.tc_overlay, &QAbstractButton::toggled, m_view.tc_type, &QWidget::setEnabled);
//m_view.splitter->setStretchFactor(1, 5);
//m_view.splitter->setStretchFactor(0, 2);
......@@ -1249,7 +1249,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
QFile::setPermissions(scriptPath,
file.permissions() | QFile::ExeUser);
QTimer::singleShot(400, this, SLOT(parseScriptFiles()));
QTimer::singleShot(400, this, &RenderWidget::parseScriptFiles);
m_view.tabWidget->setCurrentIndex(2);
return;
......
......@@ -112,7 +112,7 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
// Everything is ok, auto close the wizard
m_page->setComplete(true);
if (autoClose) {
QTimer::singleShot(0, this, SLOT(accept()));
QTimer::singleShot(0, this, &QDialog::accept);
return;
} else {
KMessageWidget *lab = new KMessageWidget(this);
......
......@@ -463,11 +463,11 @@ bool DocumentChecker::hasErrorInClips()
m_doc.documentElement().setAttribute(QStringLiteral("modified"), QStringLiteral("1"));
}
m_ui.treeWidget->resizeColumnToContents(0);
connect(m_ui.recursiveSearch, SIGNAL(pressed()), this, SLOT(slotSearchClips()));
connect(m_ui.usePlaceholders, SIGNAL(pressed()), this, SLOT(slotPlaceholders()));
connect(m_ui.removeSelected, SIGNAL(pressed()), this, SLOT(slotDeleteSelected()));
connect(m_ui.treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotEditItem(QTreeWidgetItem*,int)));
connect(m_ui.treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckButtons()));
connect(m_ui.recursiveSearch, &QAbstractButton::pressed, this, &DocumentChecker::slotSearchClips);
connect(m_ui.usePlaceholders, &QAbstractButton::pressed, this, &DocumentChecker::slotPlaceholders);
connect(m_ui.removeSelected, &QAbstractButton::pressed, this, &DocumentChecker::slotDeleteSelected);
connect(m_ui.treeWidget, &QTreeWidget::itemDoubleClicked, this, &DocumentChecker::slotEditItem);
connect(m_ui.treeWidget, &QTreeWidget::itemSelectionChanged, this, &DocumentChecker::slotCheckButtons);
//adjustSize();
if (m_ui.treeWidget->topLevelItem(0)) m_ui.treeWidget->setCurrentItem(m_ui.treeWidget->topLevelItem(0));
checkStatus();
......
......@@ -112,9 +112,9 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
connect(m_clipManager, SIGNAL(displayMessage(QString,int)), parent, SLOT(slotGotProgressInfo(QString,int)));
connect(this, SIGNAL(updateCompositionMode(int)), parent, SLOT(slotUpdateCompositeAction(int)));
bool success = false;
connect(m_commandStack, SIGNAL(indexChanged(int)), this, SLOT(slotModified()));
connect(m_commandStack, SIGNAL(invalidate()), this, SLOT(checkPreviewStack()));
connect(m_render, SIGNAL(setDocumentNotes(QString)), this, SLOT(slotSetDocumentNotes(QString)));
connect(m_commandStack, &QUndoStack::indexChanged, this, &KdenliveDoc::slotModified);
connect(m_commandStack, &DocUndoStack::invalidate, this, &KdenliveDoc::checkPreviewStack);
connect(m_render, &Render::setDocumentNotes, this, &KdenliveDoc::slotSetDocumentNotes);
connect(pCore->producerQueue(), &ProducerQueue::switchProfile, this, &KdenliveDoc::switchProfile);
//connect(m_commandStack, SIGNAL(cleanChanged(bool)), this, SLOT(setModified(bool)));
......@@ -1538,14 +1538,14 @@ void KdenliveDoc::switchProfile(MltVideoProfile profile, const QString &id, cons
QList <QAction*> list;
QAction *ac = new QAction(KoIconUtils::themedIcon(QStringLiteral("dialog-ok")), i18n("Switch"), this);
QVariantList params;
connect(ac, SIGNAL(triggered(bool)), this, SLOT(slotSwitchProfile()));
connect(ac, &QAction::triggered, this, &KdenliveDoc::slotSwitchProfile);
params << id << profile.toList();
ac->setData(params);
QAction *ac2 = new QAction(KoIconUtils::themedIcon(QStringLiteral("dialog-cancel")), i18n("Cancel"), this);
QVariantList params2;
params2 << id;
ac2->setData(params2);
connect(ac2, SIGNAL(triggered(bool)), this, SLOT(slotSwitchProfile()));
connect(ac2, &QAction::triggered, this, &KdenliveDoc::slotSwitchProfile);
list << ac << ac2;
pCore->bin()->doDisplayMessage(i18n("Switch to clip profile %1?", profile.descriptiveString()), KMessageWidget::Information, list);
} else {
......
......@@ -94,10 +94,10 @@ DvdWizard::DvdWizard(MonitorManager *manager, const QString &url, QWidget *paren
addPage(page4);
connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotPageChanged(int)));
connect(m_status.button_start, SIGNAL(clicked()), this, SLOT(slotGenerate()));
connect(m_status.button_abort, SIGNAL(clicked()), this, SLOT(slotAbort()));
connect(m_status.button_preview, SIGNAL(clicked()), this, SLOT(slotPreview()));
connect(this, &QWizard::currentIdChanged, this, &DvdWizard::slotPageChanged);
connect(m_status.button_start, &QAbstractButton::clicked, this, &DvdWizard::slotGenerate);
connect(m_status.button_abort, &QAbstractButton::clicked, this, &DvdWizard::slotAbort);
connect(m_status.button_preview, &QAbstractButton::clicked, this, &DvdWizard::slotPreview);
QString programName(QStringLiteral("k3b"));
QString exec = QStandardPaths::findExecutable(programName);
......@@ -123,8 +123,8 @@ DvdWizard::DvdWizard(MonitorManager *manager, const QString &url, QWidget *paren
setButtonText(QWizard::CustomButton2, i18n("Save"));
button(QWizard::CustomButton1)->setIcon(QIcon::fromTheme(QStringLiteral("document-open")));
button(QWizard::CustomButton2)->setIcon(QIcon::fromTheme(QStringLiteral("document-save")));
connect(button(QWizard::CustomButton1), SIGNAL(clicked()), this, SLOT(slotLoad()));
connect(button(QWizard::CustomButton2), SIGNAL(clicked()), this, SLOT(slotSave()));
connect(button(QWizard::CustomButton1), &QAbstractButton::clicked, this, &DvdWizard::slotLoad);
connect(button(QWizard::CustomButton2), &QAbstractButton::clicked, this, &DvdWizard::slotSave);
setOption(QWizard::HaveCustomButton1, true);
setOption(QWizard::HaveCustomButton2, true);
QList<QWizard::WizardButton> layout;
......@@ -661,7 +661,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap <QStrin
env.insert(QStringLiteral("VIDEO_FORMAT"), m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
m_dvdauthor->setProcessEnvironment(env);
connect(m_dvdauthor, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int,QProcess::ExitStatus)));
connect(m_dvdauthor, SIGNAL(readyReadStandardOutput()), this, SLOT(slotShowRenderInfo()));
connect(m_dvdauthor, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowRenderInfo);
m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels);
m_dvdauthor->start(QStringLiteral("dvdauthor"), args);
m_status.button_abort->setEnabled(true);
......@@ -761,7 +761,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
}
m_mkiso = new QProcess(this);
connect(m_mkiso, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int,QProcess::ExitStatus)));
connect(m_mkiso, SIGNAL(readyReadStandardOutput()), this, SLOT(slotShowIsoInfo()));
connect(m_mkiso, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowIsoInfo);
m_mkiso->setProcessChannelMode(QProcess::MergedChannels);
QListWidgetItem *isoitem = m_status.job_progress->item(4);
m_status.job_progress->setCurrentRow(4);
......@@ -892,7 +892,7 @@ void DvdWizard::slotGenerate()
if (warnMessage.isEmpty() || KMessageBox::questionYesNo(this, warnMessage) == KMessageBox::Yes) {
cleanup();
QTimer::singleShot(300, this, SLOT(generateDvd()));
QTimer::singleShot(300, this, &DvdWizard::generateDvd);
m_status.button_preview->setEnabled(false);
m_status.button_burn->setEnabled(false);
m_status.job_progress->setEnabled(true);
......
......@@ -31,9 +31,9 @@ DvdWizardChapters::DvdWizardChapters(MonitorManager *manager, DVDFORMAT format,
{
m_view.setupUi(this);
connect(m_view.vob_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateChaptersList()));
connect(m_view.button_add, SIGNAL(clicked()), this, SLOT(slotAddChapter()));
connect(m_view.button_delete, SIGNAL(clicked()), this, SLOT(slotRemoveChapter()));
connect(m_view.chapters_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotGoToChapter()));
connect(m_view.button_add, &QAbstractButton::clicked, this, &DvdWizardChapters::slotAddChapter);
connect(m_view.button_delete, &QAbstractButton::clicked, this, &DvdWizardChapters::slotRemoveChapter);
connect(m_view.chapters_list, &QListWidget::itemSelectionChanged, this, &DvdWizardChapters::slotGoToChapter);
connect(m_view.chapters_box, &QCheckBox::stateChanged, this, &DvdWizardChapters::slotEnableChapters);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
......
......@@ -150,8 +150,8 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
m_scene = new DvdScene(this);
m_view.menu_preview->setScene(m_scene);
m_view.menu_preview->setMouseTracking(true);
connect(m_view.create_menu, SIGNAL(toggled(bool)), m_view.menu_box, SLOT(setEnabled(bool)));
connect(m_view.create_menu, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
connect(m_view.create_menu, &QAbstractButton::toggled, m_view.menu_box, &QWidget::setEnabled);
connect(m_view.create_menu, &QAbstractButton::toggled, this, &QWizardPage::completeChanged);
m_view.add_button->setIcon(KoIconUtils::themedIcon(QStringLiteral("document-new")));
m_view.delete_button->setIcon(KoIconUtils::themedIcon(QStringLiteral("trash-empty")));
......@@ -199,7 +199,7 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
shadow->setOffset(4, 4);
button->setGraphicsEffect(shadow);
}
connect(m_view.use_shadow, SIGNAL(stateChanged(int)), this, SLOT(slotEnableShadows(int)));
connect(m_view.use_shadow, &QCheckBox::stateChanged, this, &DvdWizardMenu::slotEnableShadows);
button->setFont(font);
button->setDefaultTextColor(m_view.text_color->color());
button->setZValue(4);
......@@ -211,28 +211,28 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
if (m_view.use_grid->isChecked()) {
m_scene->setGridSize(10);
}
connect(m_view.use_grid, SIGNAL(toggled(bool)), this, SLOT(slotUseGrid(bool)));
connect(m_view.use_grid, &QAbstractButton::toggled, this, &DvdWizardMenu::slotUseGrid);
//m_view.menu_preview->resizefitInView(0, 0, m_width, m_height);
connect(m_view.play_text, SIGNAL(textChanged(QString)), this, SLOT(buildButton()));
connect(m_view.play_text, &QLineEdit::textChanged, this, &DvdWizardMenu::buildButton);
connect(m_view.text_color, SIGNAL(changed(QColor)), this, SLOT(updateColor()));
connect(m_view.font_size, SIGNAL(valueChanged(int)), this, SLOT(buildButton()));
connect(m_view.font_family, SIGNAL(currentFontChanged(QFont)), this, SLOT(buildButton()));
connect(m_view.background_image, SIGNAL(textChanged(QString)), this, SLOT(buildImage()));
connect(m_view.background_color, SIGNAL(changed(QColor)), this, SLOT(buildColor()));
connect(m_view.font_family, &QFontComboBox::currentFontChanged, this, &DvdWizardMenu::buildButton);
connect(m_view.background_image, &KUrlRequester::textChanged, this, &DvdWizardMenu::buildImage);
connect(m_view.background_color, &KColorButton::changed, this, &DvdWizardMenu::buildColor);
connect(m_view.background_list, SIGNAL(currentIndexChanged(int)), this, SLOT(checkBackgroundType(int)));
connect(m_view.target_list, SIGNAL(activated(int)), this, SLOT(setButtonTarget(int)));
connect(m_view.back_to_menu, SIGNAL(toggled(bool)), this, SLOT(setBackToMenu(bool)));
connect(m_view.add_button, SIGNAL(pressed()), this, SLOT(addButton()));
connect(m_view.delete_button, SIGNAL(pressed()), this, SLOT(deleteButton()));
connect(m_view.zoom_button, SIGNAL(pressed()), this, SLOT(slotZoom()));
connect(m_view.unzoom_button, SIGNAL(pressed()), this, SLOT(slotUnZoom()));
connect(m_scene, SIGNAL(selectionChanged()), this, SLOT(buttonChanged()));
connect(m_scene, SIGNAL(sceneChanged()), this, SIGNAL(completeChanged()));
connect(m_view.back_to_menu, &QAbstractButton::toggled, this, &DvdWizardMenu::setBackToMenu);
connect(m_view.add_button, &QAbstractButton::pressed, this, &DvdWizardMenu::addButton);
connect(m_view.delete_button, &QAbstractButton::pressed, this, &DvdWizardMenu::deleteButton);
connect(m_view.zoom_button, &QAbstractButton::pressed, this, &DvdWizardMenu::slotZoom);
connect(m_view.unzoom_button, &QAbstractButton::pressed, this, &DvdWizardMenu::slotUnZoom);
connect(m_scene, &QGraphicsScene::selectionChanged, this, &DvdWizardMenu::buttonChanged);
connect(m_scene, &DvdScene::sceneChanged, this, &QWizardPage::completeChanged);
// red background for error message
KColorScheme scheme(palette().currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
......
......@@ -93,11 +93,11 @@ DvdWizardVob::DvdWizardVob(QWidget *parent) :
connect(m_vobList, SIGNAL(addClips(QList<QUrl>)), this, SLOT(slotAddVobList(QList<QUrl>)));
connect(m_vobList, SIGNAL(addNewClip()), this, SLOT(slotAddVobList()));
connect(m_view.button_add, SIGNAL(clicked()), this, SLOT(slotAddVobList()));
connect(m_view.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteVobFile()));
connect(m_view.button_up, SIGNAL(clicked()), this, SLOT(slotItemUp()));
connect(m_view.button_down, SIGNAL(clicked()), this, SLOT(slotItemDown()));
connect(m_view.convert_abort, SIGNAL(clicked()), this, SLOT(slotAbortTranscode()));
connect(m_vobList, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckVobList()));
connect(m_view.button_delete, &QAbstractButton::clicked, this, &DvdWizardVob::slotDeleteVobFile);
connect(m_view.button_up, &QAbstractButton::clicked, this, &DvdWizardVob::slotItemUp);
connect(m_view.button_down, &QAbstractButton::clicked, this, &DvdWizardVob::slotItemDown);
connect(m_view.convert_abort, &QAbstractButton::clicked, this, &DvdWizardVob::slotAbortTranscode);
connect(m_vobList, &QTreeWidget::itemSelectionChanged, this, &DvdWizardVob::slotCheckVobList);
m_vobList->setIconSize(QSize(60, 45));
......@@ -124,7 +124,7 @@ DvdWizardVob::DvdWizardVob(QWidget *parent) :
m_vobList->setItemDelegate(new DvdViewDelegate(m_vobList));
m_transcodeAction =