Commit 8f68095d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QStringLiteral

parent 646fbd02
......@@ -1085,7 +1085,7 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
m_configCapture.kcfg_v4l_format->blockSignals(true);
m_configCapture.kcfg_v4l_format->clear();
QString vl4ProfilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
QString vl4ProfilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
if (QFile::exists(vl4ProfilePath)) {
m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
}
......@@ -1381,7 +1381,7 @@ void KdenliveSettingsDialog::slotUpdatePreviewProfile(int ix)
void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
{
QString vl4ProfilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
QString vl4ProfilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
QPointer<ProfilesDialog> w = new ProfilesDialog(vl4ProfilePath, true);
if (w->exec() == QDialog::Accepted) {
// save and update profile
......
......@@ -619,7 +619,7 @@ void ClipPropertiesController::slotEnableForce(int state)
// The force property was disable, remove it / reset default if necessary
if (param == QLatin1String("force_duration")) {
// special case, reset original duration
TimecodeDisplay *timePos = findChild<TimecodeDisplay *>(param + "_value");
TimecodeDisplay *timePos = findChild<TimecodeDisplay *>(param + QStringLiteral("_value"));
timePos->setValue(m_properties.get_int("kdenlive:original_length"));
slotDurationChanged(m_properties.get_int("kdenlive:original_length"));
m_properties.set("kdenlive:original_length", (char *) nullptr);
......@@ -644,19 +644,19 @@ void ClipPropertiesController::slotEnableForce(int state)
m_properties.set("kdenlive:original_length", kdenlive_duration > 0 ? kdenlive_duration : m_properties.get_int("length"));
}
} else if (param == QLatin1String("force_fps")) {
QDoubleSpinBox *spin = findChild<QDoubleSpinBox *>(param + "_value");
QDoubleSpinBox *spin = findChild<QDoubleSpinBox *>(param + QStringLiteral("_value"));
if (!spin) {
return;
}
properties.insert(param, locale.toString(spin->value()));
} else if (param == QLatin1String("threads")) {
QSpinBox *spin = findChild<QSpinBox *>(param + "_value");
QSpinBox *spin = findChild<QSpinBox *>(param + QStringLiteral("_value"));
if (!spin) {
return;
}
properties.insert(param, QString::number(spin->value()));
} else if (param == QLatin1String("force_colorspace") || param == QLatin1String("force_progressive") || param == QLatin1String("force_tff")) {
QComboBox *combo = findChild<QComboBox *>(param + "_value");
QComboBox *combo = findChild<QComboBox *>(param + QStringLiteral("_value"));
if (!combo) {
return;
}
......
......@@ -368,7 +368,7 @@ void RecManager::slotVideoDeviceChanged(int)
Mlt::Producer *RecManager::createV4lProducer()
{
QString profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
QString profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
Mlt::Profile *vidProfile = new Mlt::Profile(profilePath.toUtf8().constData());
Mlt::Producer *prod = nullptr;
if (m_recVideo->isChecked()) {
......
......@@ -545,7 +545,7 @@ void RecMonitor::slotStartPreview(bool play)
m_discAction->setEnabled(true);
break;
case Video4Linux:
path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
buildMltDevice(path);
profile = ProfilesDialog::getVideoProfile(path);
producer = getV4lXmlPlaylist(profile, &isXml);
......@@ -663,7 +663,7 @@ void RecMonitor::slotRecord()
if (rec_video->isChecked()) {
slotActivateMonitor();
}
path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
profile = ProfilesDialog::getVideoProfile(path);
buildMltDevice(path);
playlist = getV4lXmlPlaylist(profile, &isXml);
......
......@@ -307,7 +307,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, const QUrl &projectF
// Create MLT producer data
if (capture_device->itemData(capture_device->currentIndex()) == "v4l") {
// Capture using a video4linux device
profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
} else {
// Decklink capture
profilePath = KdenliveSettings::current_profile();
......@@ -473,7 +473,7 @@ void StopmotionWidget::slotLive(bool isOn)
// Create MLT producer data
if (capture_device->itemData(capture_device->currentIndex()) == "v4l") {
// Capture using a video4linux device
profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/video4linux";
profilePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/video4linux");
profile = ProfilesDialog::getVideoProfile(profilePath);
service = QStringLiteral("avformat-novalidate");
QString devicePath = capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString();
......
......@@ -304,7 +304,7 @@ void Track::lockTrack(bool locked)
void Track::replaceId(const QString &id)
{
QString idForAudioTrack = id + QLatin1Char('_') + m_playlist.get("id") + "_audio";
QString idForAudioTrack = id + QLatin1Char('_') + m_playlist.get("id") + QStringLiteral("_audio");
QString idForVideoTrack = id + QStringLiteral("_video");
QString idForTrack = id + QLatin1Char('_') + m_playlist.get("id");
//TODO: slowmotion
......@@ -349,7 +349,7 @@ QList<ItemInfo> Track::replaceAll(const QString &id, Mlt::Producer *original, Ml
int tkState = state();
if (needsDuplicate(service)) {
// We have to use the track clip duplication functions, because of audio glitches in MLT's multitrack
idForAudioTrack = idForTrack + QLatin1Char('_') + m_playlist.get("id") + "_audio";
idForAudioTrack = idForTrack + QLatin1Char('_') + m_playlist.get("id") + QStringLiteral("_audio");
idForVideoTrack = idForTrack + QStringLiteral("_video");
idForTrack.append(QLatin1Char('_') + m_playlist.get("id"));
}
......@@ -483,7 +483,7 @@ void Track::updateEffects(const QString &id, Mlt::Producer *original)
QString idForTrack = original->parent().get("id");
if (needsDuplicate(service)) {
// We have to use the track clip duplication functions, because of audio glitches in MLT's multitrack
idForAudioTrack = idForTrack + QLatin1Char('_') + m_playlist.get("id") + "_audio";
idForAudioTrack = idForTrack + QLatin1Char('_') + m_playlist.get("id") + QStringLiteral("_audio");
idForVideoTrack = idForTrack + QStringLiteral("_video");
idForTrack.append(QLatin1Char('_') + m_playlist.get("id"));
}
......@@ -637,7 +637,7 @@ void Track::updateClipProperties(const QString &id, const QMap<QString, QString>
{
QString idForTrack = id + QLatin1Char('_') + m_playlist.get("id");
QString idForVideoTrack = id + QStringLiteral("_video");
QString idForAudioTrack = idForTrack + "_audio";
QString idForAudioTrack = idForTrack + QStringLiteral("_audio");
// slowmotion producers are updated in renderer
for (int i = 0; i < m_playlist.count(); i++) {
......
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