Commit 0a7b17ab authored by Julius Künzel's avatar Julius Künzel
Browse files

Validate timecode in settings

BUG: 432580
(cherry picked from commit 431181a8)
parent e152455e
......@@ -93,6 +93,25 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
m_configMisc.kcfg_use_exiftool->setEnabled(!QStandardPaths::findExecutable(QStringLiteral("exiftool")).isEmpty());
QRegExp rx("(\\+|-)?\\d{2}:\\d{2}:\\d{2}:\\d{2}");
QValidator *validator = new QRegExpValidator(rx, this);
m_configMisc.kcfg_color_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_color_duration->setValidator(validator);
m_configMisc.kcfg_title_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_title_duration->setValidator(validator);
m_configMisc.kcfg_transition_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_transition_duration->setValidator(validator);
m_configMisc.kcfg_mix_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_mix_duration->setValidator(validator);
m_configMisc.kcfg_image_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_image_duration->setValidator(validator);
m_configMisc.kcfg_sequence_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_sequence_duration->setValidator(validator);
m_configMisc.kcfg_fade_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_fade_duration->setValidator(validator);
m_configMisc.kcfg_subtitle_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_subtitle_duration->setValidator(validator);
QWidget *p8 = new QWidget;
m_configProject.setupUi(p8);
m_page8 = addPage(p8, i18n("Project Defaults"));
......
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