Commit db2f6211 authored by Laurent Montel's avatar Laurent Montel 😁

Port some deprecated methods

parent ba23f355
Pipeline #15245 passed with stage
in 14 minutes and 11 seconds
......@@ -164,7 +164,7 @@ void RenderJob::start()
if ((interface != nullptr) && m_usekuiserver) {
if (!interface->isServiceRegistered(QStringLiteral("org.kde.JobViewServer"))) {
qWarning() << "No org.kde.JobViewServer registered, trying to start kuiserver";
if (QProcess::startDetached(QStringLiteral("kuiserver"))) {
if (QProcess::startDetached(QStringLiteral("kuiserver"), QStringList())) {
// Give it a couple of seconds to start
QElapsedTimer t;
t.start();
......
......@@ -56,7 +56,11 @@ KeywordParamWidget::KeywordParamWidget(std::shared_ptr<AssetParameterModel> mode
connect(lineeditwidget, &QLineEdit::editingFinished, [this]() {
emit valueChanged(m_index, lineeditwidget->text(), true);
});
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(comboboxwidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
#else
connect(comboboxwidget, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) ,
#endif
[this](int ix) {
if (ix > 0) {
QString comboval = comboboxwidget->itemData(ix).toString();
......
......@@ -46,7 +46,11 @@ ListParamWidget::ListParamWidget(std::shared_ptr<AssetParameterModel> model, QMo
// emit the signal of the base class when appropriate
// The connection is ugly because the signal "currentIndexChanged" is overloaded in QComboBox
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(this->m_list, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
#else
connect(this->m_list, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) ,
#endif
[this](int) {
emit valueChanged(m_index, m_list->itemData(m_list->currentIndex()).toString(), true);
});
......
......@@ -323,7 +323,7 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
});
QVBoxLayout *lay = new QVBoxLayout;
setContentsMargins(0, 0, 0, 0);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
lay->addWidget(m_trackLabel);
QHBoxLayout *buttonslay = new QHBoxLayout;
buttonslay->setSpacing(0);
......
......@@ -46,7 +46,11 @@ EncodingProfilesDialog::EncodingProfilesDialog(int profileType, QWidget *parent)
m_configFile = new KConfig(QStringLiteral("encodingprofiles.rc"), KConfig::CascadeConfig, QStandardPaths::AppDataLocation);
profile_type->setCurrentIndex(profileType);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(profile_type, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &EncodingProfilesDialog::slotLoadProfiles);
#else
connect(profile_type, static_cast<void (KComboBox::*)(int, const QString &)>(&KComboBox::currentIndexChanged) , this, &EncodingProfilesDialog::slotLoadProfiles);
#endif
connect(profile_list, &QListWidget::currentRowChanged, this, &EncodingProfilesDialog::slotShowParams);
connect(button_delete, &QAbstractButton::clicked, this, &EncodingProfilesDialog::slotDeleteProfile);
connect(button_add, &QAbstractButton::clicked, this, &EncodingProfilesDialog::slotAddProfile);
......
......@@ -155,9 +155,17 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
}
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_detectedv4ldevices, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_detectedv4ldevices, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdatev4lDevice);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_v4l_format, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_v4l_format, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdatev4lCaptureProfile);
connect(m_configCapture.config_v4l, &QAbstractButton::clicked, this, &KdenliveSettingsDialog::slotEditVideo4LinuxProfile);
......@@ -247,12 +255,24 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
loadEncodingProfiles();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configSdl.kcfg_audio_driver, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configSdl.kcfg_audio_driver, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotCheckAlsaDriver);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configSdl.kcfg_audio_backend, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configSdl.kcfg_audio_backend, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotCheckAudioBackend);
initDevices();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_grab_capture_type, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_grab_capture_type, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateGrabRegionStatus);
slotUpdateGrabRegionStatus();
......@@ -267,7 +287,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_configCapture.decklink_parameters->setVisible(false);
m_configCapture.decklink_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
m_configCapture.decklink_parameters->setPlainText(KdenliveSettings::decklink_parameters());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_decklink_profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_decklink_profile, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateDecklinkProfile);
connect(m_configCapture.decklink_showprofileinfo, &QAbstractButton::clicked, m_configCapture.decklink_parameters, &QWidget::setVisible);
......@@ -281,7 +305,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
act->setData(2);
connect(act, &QAction::triggered, this, &KdenliveSettingsDialog::slotManageEncodingProfile);
m_configCapture.v4l_manageprofile->setDefaultAction(act);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_v4l_profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_v4l_profile, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateV4lProfile);
connect(m_configCapture.v4l_showprofileinfo, &QAbstractButton::clicked, m_configCapture.v4l_parameters, &QWidget::setVisible);
......@@ -294,7 +322,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
act->setData(3);
connect(act, &QAction::triggered, this, &KdenliveSettingsDialog::slotManageEncodingProfile);
m_configCapture.grab_manageprofile->setDefaultAction(act);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_grab_profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.kcfg_grab_profile, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateGrabProfile);
connect(m_configCapture.grab_showprofileinfo, &QAbstractButton::clicked, m_configCapture.grab_parameters, &QWidget::setVisible);
......@@ -305,7 +337,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
int channelsIndex = m_configCapture.audiocapturechannels->findData(KdenliveSettings::audiocapturechannels());
m_configCapture.audiocapturechannels->setCurrentIndex(qMax(channelsIndex, 0));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.audiocapturechannels, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.audiocapturechannels, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateAudioCaptureChannels);
// audio capture sample rate
......@@ -315,7 +351,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
int sampleRateIndex = m_configCapture.audiocapturesamplerate->findData(KdenliveSettings::audiocapturesamplerate());
m_configCapture.audiocapturesamplerate->setCurrentIndex(qMax(sampleRateIndex, 0));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.audiocapturesamplerate, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configCapture.audiocapturesamplerate, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateAudioCaptureSampleRate);
m_configCapture.labelNoAudioDevices->setVisible(false);
......@@ -325,7 +365,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
act->setData(1);
connect(act, &QAction::triggered, this, &KdenliveSettingsDialog::slotManageEncodingProfile);
m_configProject.preview_manageprofile->setDefaultAction(act);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configProject.kcfg_preview_profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configProject.kcfg_preview_profile, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdatePreviewProfile);
connect(m_configProject.preview_showprofileinfo, &QAbstractButton::clicked, m_configProject.previewparams, &QWidget::setVisible);
m_configProject.previewparams->setVisible(false);
......@@ -353,7 +397,11 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_configProxy.proxy_manageprofile->setDefaultAction(act);
connect(m_configProxy.proxy_showprofileinfo, &QAbstractButton::clicked, m_configProxy.proxyparams, &QWidget::setVisible);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configProxy.kcfg_proxy_profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
#else
connect(m_configProxy.kcfg_proxy_profile, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this,
#endif
&KdenliveSettingsDialog::slotUpdateProxyProfile);
slotUpdateProxyProfile(-1);
......@@ -425,7 +473,11 @@ bool KdenliveSettingsDialog::initAudioRecDevice()
m_configCapture.labelNoAudioDevices->setVisible(audioDevices.empty());
m_configCapture.kcfg_defaultaudiocapture->addItems(audioDevices);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_configCapture.kcfg_defaultaudiocapture, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [&]() {
#else
connect(m_configCapture.kcfg_defaultaudiocapture, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , [&]() {
#endif
QString currentDevice = m_configCapture.kcfg_defaultaudiocapture->currentText();
KdenliveSettings::setDefaultaudiocapture(currentDevice);
});
......
......@@ -361,7 +361,11 @@ RenderWidget::RenderWidget(bool enableProxy, QWidget *parent)
m_view.parallel_process->setEnabled(false);
}
m_view.field_order->setEnabled(false);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_view.scanning_list, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { m_view.field_order->setEnabled(index == 2); });
#else
connect(m_view.scanning_list, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), [this](int index) { m_view.field_order->setEnabled(index == 2); });
#endif
refreshView();
focusFirstVisibleItem();
adjustSize();
......
......@@ -63,7 +63,11 @@ TitleTemplateDialog::TitleTemplateDialog(const QString &folder, QWidget *parent)
}
const QStringList mimeTypeFilters = {QStringLiteral("application/x-kdenlivetitle")};
m_view.template_list->setMimeTypeFilters(mimeTypeFilters);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_view.template_list->comboBox(), static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this,
#else
connect(m_view.template_list->comboBox(), static_cast<void (KComboBox::*)(int, const QString &)>(&KComboBox::currentIndexChanged) , this,
#endif
&TitleTemplateDialog::updatePreview);
updatePreview();
}
......
......@@ -27,7 +27,11 @@ DvdWizardChapters::DvdWizardChapters(MonitorManager *manager, DVDFORMAT format,
{
m_view.setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_view.vob_list, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DvdWizardChapters::slotUpdateChaptersList);
#else
connect(m_view.vob_list, static_cast<void (KComboBox::*)(int, const QString &)>(&KComboBox::currentIndexChanged) , this, &DvdWizardChapters::slotUpdateChaptersList);
#endif
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);
......
......@@ -238,7 +238,11 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent)
connect(m_view.background_image, &KUrlRequester::textChanged, this, &DvdWizardMenu::buildImage);
connect(m_view.background_color, &KColorButton::changed, this, &DvdWizardMenu::buildColor);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_view.background_list, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DvdWizardMenu::checkBackgroundType);
#else
connect(m_view.background_list, static_cast<void (KComboBox::*)(int, const QString &)>(&KComboBox::currentIndexChanged) , this, &DvdWizardMenu::checkBackgroundType);
#endif
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);
......
......@@ -291,7 +291,11 @@ void MainWindow::init()
for (int ix = 0; ix < screens; ix++) {
screenCombo->addItem(i18n("Monitor %1", ix));
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(screenCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), m_clipMonitor, &Monitor::slotSetScreen);
#else
connect(screenCombo, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , m_clipMonitor, &Monitor::slotSetScreen);
#endif
recToolbar->addWidget(screenCombo);
// Update screen grab monitor choice in case we changed from fullscreen
screenCombo->setEnabled(KdenliveSettings::grab_capture_type() == 0);
......
......@@ -478,7 +478,11 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
auto *combo = new QComboBox(this);
combo->addItem(i18n("Interlaced"), 0);
combo->addItem(i18n("Progressive"), 1);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
#else
connect(combo, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this, &ClipPropertiesController::slotComboValueChanged);
#endif
combo->setObjectName(QStringLiteral("force_progressive_value"));
if (!force_prog.isEmpty()) {
combo->setCurrentIndex(force_prog.toInt());
......@@ -500,7 +504,11 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
combo = new QComboBox(this);
combo->addItem(i18n("Bottom first"), 0);
combo->addItem(i18n("Top first"), 1);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
#else
connect(combo, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this, &ClipPropertiesController::slotComboValueChanged);
#endif
combo->setObjectName(QStringLiteral("force_tff_value"));
if (!force_tff.isEmpty()) {
combo->setCurrentIndex(force_tff.toInt());
......@@ -583,7 +591,11 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
emit updateClipProperties(m_id, m_originalProperties, properties);
m_originalProperties = properties;
});
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QObject::connect(videoStream, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this, videoStream]() {
#else
QObject::connect(videoStream, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , [this, videoStream]() {
#endif
QMap<QString, QString> properties;
properties.insert(QStringLiteral("video_index"), QString::number(videoStream->currentData().toInt()));
emit updateClipProperties(m_id, m_originalProperties, properties);
......@@ -638,7 +650,11 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
emit updateClipProperties(m_id, m_originalProperties, properties);
m_originalProperties = properties;
});
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QObject::connect(audioStream, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this, audioStream]() {
#else
QObject::connect(audioStream, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , [this, audioStream]() {
#endif
QMap<QString, QString> properties;
properties.insert(QStringLiteral("audio_index"), QString::number(audioStream->currentData().toInt()));
emit updateClipProperties(m_id, m_originalProperties, properties);
......@@ -693,7 +709,11 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
combo->setEnabled(false);
}
connect(box, &QAbstractButton::toggled, combo, &QWidget::setEnabled);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ClipPropertiesController::slotComboValueChanged);
#else
connect(combo, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this, &ClipPropertiesController::slotComboValueChanged);
#endif
hlay->addWidget(box);
hlay->addWidget(combo);
vbox->addLayout(hlay);
......
......@@ -73,7 +73,11 @@ RecManager::RecManager(Monitor *parent)
m_audio_device = new QComboBox(parent);
QStringList audioDevices = pCore->getAudioCaptureDevices();
m_audio_device->addItems(audioDevices);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_audio_device, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &RecManager::slotAudioDeviceChanged);
#else
connect(m_audio_device, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this, &RecManager::slotAudioDeviceChanged);
#endif
QString selectedDevice = KdenliveSettings::defaultaudiocapture();
int selectedIndex = m_audio_device->findText(selectedDevice);
if (!selectedDevice.isNull() && selectedIndex > -1) {
......@@ -114,7 +118,11 @@ RecManager::RecManager(Monitor *parent)
if (selectedIndex > -1) {
m_device_selector->setCurrentIndex(selectedIndex);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_device_selector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &RecManager::slotVideoDeviceChanged);
#else
connect(m_device_selector, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , this, &RecManager::slotVideoDeviceChanged);
#endif
m_recToolbar->addWidget(m_device_selector);
QAction *configureRec = m_recToolbar->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure Recording"));
......
......@@ -111,7 +111,11 @@ ProfileWidget::ProfileWidget(QWidget *parent)
m_filter->setFilterFps(current > 0, current);
slotFilterChanged();
};
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_fpsFilt, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), updateFps);
#else
connect(m_fpsFilt, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , updateFps);
#endif
int ix = m_fpsFilt->findText(KdenliveSettings::profile_fps_filter());
if (ix > -1) {
m_fpsFilt->setCurrentIndex(ix);
......@@ -126,7 +130,11 @@ ProfileWidget::ProfileWidget(QWidget *parent)
m_filter->setFilterInterlaced(current != -1, current == 0);
slotFilterChanged();
};
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_scanningFilt, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), updateScanning);
#else
connect(m_scanningFilt, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , updateScanning);
#endif
ix = m_scanningFilt->findText(KdenliveSettings::profile_scanning_filter());
if (ix > -1) {
......
......@@ -153,7 +153,11 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
connect(proxy_manageprofile, &QAbstractButton::clicked, this, &ProjectSettings::slotManageEncodingProfile);
proxy_profile->setToolTip(i18n("Select default proxy profile"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(proxy_profile, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ProjectSettings::slotUpdateProxyParams);
#else
connect(proxy_profile, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &ProjectSettings::slotUpdateProxyParams);
#endif
proxyparams->setVisible(false);
proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
connect(proxy_showprofileinfo, &QAbstractButton::clicked, proxyparams, &QWidget::setVisible);
......@@ -169,7 +173,11 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
connect(preview_manageprofile, &QAbstractButton::clicked, this, &ProjectSettings::slotManagePreviewProfile);
preview_profile->setToolTip(i18n("Select default preview profile"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(preview_profile, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ProjectSettings::slotUpdatePreviewParams);
#else
connect(preview_profile, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &ProjectSettings::slotUpdatePreviewParams);
#endif
previewparams->setVisible(false);
previewparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
connect(preview_showprofileinfo, &QAbstractButton::clicked, previewparams, &QWidget::setVisible);
......
......@@ -490,7 +490,11 @@ TitleWidget::TitleWidget(const QUrl &url, const Timecode &tc, QString projectTit
graphicsView->scene()->addItem(m_frameImage);
bgBox->setCurrentIndex(KdenliveSettings::titlerbg());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(bgBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [&] (int ix) {
#else
connect(bgBox, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) , [&] (int ix) {
#endif
KdenliveSettings::setTitlerbg(ix);
displayBackgroundFrame();
});
......@@ -3118,7 +3122,7 @@ void TitleWidget::updateGuides(int)
for (int i = 0; i < max; i++) {
auto *line1 = new QGraphicsLineItem(0, (i + 1) * m_frameHeight / (max + 1), m_frameWidth, (i + 1) * m_frameHeight / (max + 1), m_frameBorder);
line1->setPen(framepen);
line1->setFlags(nullptr);
line1->setFlags({});
line1->setData(-1, -1);
line1->setVisible(guideVisible);
m_guides << line1;
......@@ -3127,7 +3131,7 @@ void TitleWidget::updateGuides(int)
for (int i = 0; i < max; i++) {
auto *line1 = new QGraphicsLineItem((i + 1) * m_frameWidth / (max + 1), 0, (i + 1) * m_frameWidth / (max + 1), m_frameHeight, m_frameBorder);
line1->setPen(framepen);
line1->setFlags(nullptr);
line1->setFlags({});
line1->setData(-1, -1);
line1->setVisible(guideVisible);
m_guides << line1;
......@@ -3138,14 +3142,14 @@ void TitleWidget::updateGuides(int)
auto *line6 = new QGraphicsLineItem(0, 0, m_frameWidth, m_frameHeight, m_frameBorder);
line6->setPen(framepen);
line6->setFlags(nullptr);
line6->setFlags({});
line6->setData(-1, -1);
line6->setVisible(guideVisible);
m_guides << line6;
auto *line7 = new QGraphicsLineItem(m_frameWidth, 0, 0, m_frameHeight, m_frameBorder);
line7->setPen(framepen);
line7->setFlags(nullptr);
line7->setFlags({});
line7->setData(-1, -1);
line7->setVisible(guideVisible);
m_guides << line7;
......
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