Commit 87788bb8 authored by Vincent Pinon's avatar Vincent Pinon

More upgrades to Qt5 connect

parent c4952955
......@@ -70,7 +70,7 @@ ProfilesDialog::ProfilesDialog(const QString &profileDescription, QWidget *paren
fillList(profileDescription);
slotUpdateDisplay();
connect(m_view.profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
connect(m_view.profiles_list, static_cast<void (KComboBox::*)(const QString&)>(&KComboBox::currentIndexChanged), this, &ProfilesDialog::slotUpdateDisplay);
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);
......
......@@ -299,8 +299,8 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, QWidg
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.out_file, &KUrlRequester::textChanged, this, static_cast<void(RenderWidget::*)()>(&RenderWidget::slotUpdateButtons));
connect(m_view.out_file, &KUrlRequester::urlSelected, this, static_cast<void(RenderWidget::*)(const QUrl&)>(&RenderWidget::slotUpdateButtons));
connect(m_view.formats, &QTreeWidget::currentItemChanged, this, &RenderWidget::refreshParams);
connect(m_view.formats, &QTreeWidget::itemDoubleClicked, this, &RenderWidget::slotEditItem);
......@@ -309,8 +309,8 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, QWidg
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.guide_end, static_cast<void(KComboBox::*)(int)>(&KComboBox::activated), this, &RenderWidget::slotCheckStartGuidePosition);
connect(m_view.guide_start, static_cast<void(KComboBox::*)(int)>(&KComboBox::activated), this, &RenderWidget::slotCheckEndGuidePosition);
connect(m_view.tc_overlay, &QAbstractButton::toggled, m_view.tc_type, &QWidget::setEnabled);
......
......@@ -247,7 +247,7 @@ void DvdWizard::generateDvd()
m_pageMenu->createButtonImages(m_selectedImage.fileName(), m_highlightedImage.fileName(), false);
m_pageMenu->createBackgroundImage(m_menuImageBackground.fileName(), false);
images->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok")));
connect(&m_menuJob, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotProcessMenuStatus(int, QProcess::ExitStatus)));
connect(&m_menuJob, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &DvdWizard::slotProcessMenuStatus);
// qCDebug(KDENLIVE_LOG) << "/// STARTING MLT VOB CREATION: "<<m_selectedImage.fileName()<<m_menuImageBackground.fileName();
if (!m_pageMenu->menuMovie()) {
// create menu vob file
......@@ -690,7 +690,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
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, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &DvdWizard::slotRenderFinished);
connect(m_dvdauthor, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowRenderInfo);
m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels);
m_dvdauthor->start(QStringLiteral("dvdauthor"), args);
......@@ -797,7 +797,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
m_mkiso = nullptr;
}
m_mkiso = new QProcess(this);
connect(m_mkiso, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int, QProcess::ExitStatus)));
connect(m_mkiso, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &DvdWizard::slotIsoFinished);
connect(m_mkiso, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowIsoInfo);
m_mkiso->setProcessChannelMode(QProcess::MergedChannels);
QListWidgetItem *isoitem = m_status.job_progress->item(4);
......
......@@ -235,15 +235,15 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent)
// m_view.menu_preview->resizefitInView(0, 0, m_width, m_height);
connect(m_view.play_text, &QLineEdit::textChanged, this, &DvdWizardMenu::buildButton);
connect(m_view.text_color, SIGNAL(changed(QColor)), this, SLOT(updateColor()));
connect(m_view.text_color, &KColorButton::changed, this, static_cast<void (DvdWizardMenu::*)(const QColor&)>(&DvdWizardMenu::updateColor));
connect(m_view.font_size, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DvdWizardMenu::buildButton);
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.background_list, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DvdWizardMenu::checkBackgroundType);
connect(m_view.target_list, SIGNAL(activated(int)), this, SLOT(setButtonTarget(int)));
connect(m_view.target_list, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &DvdWizardMenu::setButtonTarget);
connect(m_view.back_to_menu, &QAbstractButton::toggled, this, &DvdWizardMenu::setBackToMenu);
connect(m_view.add_button, &QAbstractButton::pressed, this, &DvdWizardMenu::addButton);
......
......@@ -118,7 +118,7 @@ DvdWizardVob::DvdWizardVob(QWidget *parent)
m_view.dvd_profile->addItems(QStringList() << i18n("PAL 4:3") << i18n("PAL 16:9") << i18n("NTSC 4:3") << i18n("NTSC 16:9"));
connect(m_view.dvd_profile, SIGNAL(activated(int)), this, SLOT(slotCheckProfiles()));
connect(m_view.dvd_profile, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &DvdWizardVob::slotCheckProfiles);
m_vobList->header()->setStretchLastSection(false);
m_vobList->header()->setSectionResizeMode(0, QHeaderView::Stretch);
m_vobList->header()->setSectionResizeMode(1, QHeaderView::Custom);
......
......@@ -272,6 +272,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
connect(timePos, &TimecodeDisplay::timeCodeEditingFinished, this, &ClipPropertiesController::slotDurationChanged);
connect(this, &ClipPropertiesController::updateTimeCodeFormat, timePos, &TimecodeDisplay::slotUpdateTimeCodeFormat);
connect(this, SIGNAL(modified(int)), timePos, SLOT(setValue(int)));
//connect(this, static_cast<void(ClipPropertiesController::*)(int)>(&ClipPropertiesController::modified), timePos, &TimecodeDisplay::setValue);
}
if (m_type == ClipType::TextTemplate) {
// Edit text widget
......@@ -293,7 +294,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
vbox->addWidget(choosecolor);
// connect(choosecolor, SIGNAL(displayMessage(QString,int)), this, SIGNAL(displayMessage(QString,int)));
connect(choosecolor, &ChooseColorWidget::modified, this, &ClipPropertiesController::slotColorModified);
connect(this, SIGNAL(modified(QColor)), choosecolor, SLOT(slotColorModified(QColor)));
connect(this, static_cast<void(ClipPropertiesController::*)(const QColor&)>(&ClipPropertiesController::modified), choosecolor, &ChooseColorWidget::slotColorModified);
} else if (m_type == ClipType::Image) {
int transparency = m_properties.get_int("kdenlive:transparency");
m_originalProperties.insert(QStringLiteral("kdenlive:transparency"), QString::number(transparency));
......@@ -365,6 +366,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
auto *spin = new QDoubleSpinBox(this);
spin->setMaximum(1000);
connect(spin, SIGNAL(valueChanged(double)), this, SLOT(slotValueChanged(double)));
//connect(spin, static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, &ClipPropertiesController::slotValueChanged);
spin->setObjectName(QStringLiteral("force_fps_value"));
if (force_fps.isEmpty()) {
spin->setValue(controller->originalFps());
......@@ -388,7 +390,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
auto *combo = new QComboBox(this);
combo->addItem(i18n("Interlaced"), 0);
combo->addItem(i18n("Progressive"), 1);
connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotComboValueChanged()));
connect(combo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
combo->setObjectName(QStringLiteral("force_progressive_value"));
if (!force_prog.isEmpty()) {
combo->setCurrentIndex(force_prog.toInt());
......@@ -410,7 +412,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
combo = new QComboBox(this);
combo->addItem(i18n("Bottom first"), 0);
combo->addItem(i18n("Top first"), 1);
connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotComboValueChanged()));
connect(combo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
combo->setObjectName(QStringLiteral("force_tff_value"));
if (!force_tff.isEmpty()) {
combo->setCurrentIndex(force_tff.toInt());
......@@ -511,7 +513,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
combo->setEnabled(false);
}
connect(box, &QAbstractButton::toggled, combo, &QWidget::setEnabled);
connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotComboValueChanged()));
connect(combo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
hlay->addWidget(box);
hlay->addWidget(combo);
vbox->addLayout(hlay);
......
......@@ -187,9 +187,9 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
connect(m_verticalScroll, &QAbstractSlider::valueChanged, this, &Monitor::setOffsetY);
connect(m_glMonitor, &GLWidget::frameDisplayed, this, &Monitor::onFrameDisplayed);
connect(m_glMonitor, &GLWidget::mouseSeek, this, &Monitor::slotMouseSeek);
connect(m_glMonitor, SIGNAL(monitorPlay()), this, SLOT(slotPlay()));
connect(m_glMonitor, &GLWidget::monitorPlay, this, &Monitor::slotPlay);
connect(m_glMonitor, &GLWidget::startDrag, this, &Monitor::slotStartDrag);
connect(m_glMonitor, SIGNAL(switchFullScreen(bool)), this, SLOT(slotSwitchFullScreen(bool)));
connect(m_glMonitor, &GLWidget::switchFullScreen, this, &Monitor::slotSwitchFullScreen);
connect(m_glMonitor, &GLWidget::zoomChanged, this, &Monitor::setZoom);
connect(m_glMonitor, SIGNAL(lockMonitor(bool)), this, SLOT(slotLockMonitor(bool)), Qt::DirectConnection);
connect(m_glMonitor, &GLWidget::showContextMenu, this, &Monitor::slotShowMenu);
......
......@@ -85,7 +85,8 @@ RecManager::RecManager(Monitor *parent)
if (selectedCapture > -1) {
m_device_selector->setCurrentIndex(selectedCapture);
}
connect(m_device_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(slotVideoDeviceChanged(int)));
connect(m_device_selector, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &RecManager::slotVideoDeviceChanged);
m_recToolbar->addWidget(m_device_selector);
QAction *configureRec = m_recToolbar->addAction(KoIconUtils::themedIcon(QStringLiteral("configure")), i18n("Configure Recording"));
connect(configureRec, &QAction::triggered, this, &RecManager::showRecConfig);
......
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