Commit 67890f6e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more QStringLiteral

parent 5becbfc2
......@@ -1018,7 +1018,7 @@ void Bin::slotDeleteClip()
QString subId = item->clipId();
sub = static_cast<ProjectSubClip *>(item);
zone = sub->zone();
subId.append(":" + QString::number(zone.x()) + QLatin1Char(':') + QString::number(zone.y()));
subId.append(QLatin1Char(':') + QString::number(zone.x()) + QLatin1Char(':') + QString::number(zone.y()));
subClipIds << subId;
continue;
}
......
......@@ -990,7 +990,7 @@ void KdenliveSettingsDialog::slotUpdateTranscodingProfile()
data.append(m_configTranscode.profile_description->text());
}
if (m_configTranscode.profile_audioonly->isChecked()) {
data.append(";audio");
data.append(QStringLiteral(";audio"));
}
item->setData(Qt::UserRole, data);
slotDialogModified();
......
......@@ -1204,14 +1204,14 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
// Adjust scanning
if (m_view.scanning_list->currentIndex() == 1) {
renderArgs.append(" progressive=1");
renderArgs.append(QStringLiteral(" progressive=1"));
} else if (m_view.scanning_list->currentIndex() == 2) {
renderArgs.append(" progressive=0");
renderArgs.append(QStringLiteral(" progressive=0"));
}
// disable audio if requested
if (!exportAudio) {
renderArgs.append(" an=1 ");
renderArgs.append(QStringLiteral(" an=1 "));
}
// Set the thread counts
......
......@@ -398,7 +398,7 @@ void DvdWizard::processSpumux()
//qCDebug(KDENLIVE_LOG) << "/// RENDERING SPUMUX MENU timed out";
errorMessage(i18n("Rendering job timed out"));
spuitem->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
m_status.error_log->append("<a name=\"result\" /><br /><strong>" + i18n("Menu job timed out"));
m_status.error_log->append(QStringLiteral("<a name=\"result\" /><br /><strong>") + i18n("Menu job timed out"));
m_status.error_log->scrollToAnchor(QStringLiteral("result"));
m_status.error_box->setHidden(false);
m_status.menu_file->setPlainText(m_menuFile.readAll());
......@@ -489,7 +489,7 @@ void DvdWizard::processSpumux()
//qCDebug(KDENLIVE_LOG) << "/// RENDERING SPUMUX MENU timed out";
errorMessage(i18n("Rendering job timed out"));
spuitem->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
m_status.error_log->append("<a name=\"result\" /><br /><strong>" + i18n("Menu job timed out"));
m_status.error_log->append(QStringLiteral("<a name=\"result\" /><br /><strong>") + i18n("Menu job timed out"));
m_status.error_log->scrollToAnchor(QStringLiteral("result"));
m_status.error_box->setHidden(false);
m_status.menu_file->setPlainText(m_menuFile.readAll());
......@@ -745,7 +745,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
if (status == QProcess::CrashExit || exitCode != 0) {
errorMessage(i18n("DVDAuthor process crashed"));
QString result(m_dvdauthor->readAllStandardError());
result.append("<a name=\"result\" /><br /><strong>");
result.append(QStringLiteral("<a name=\"result\" /><br /><strong>"));
result.append(i18n("DVDAuthor process crashed.</strong><br />"));
m_status.error_log->append(result);
m_status.error_log->scrollToAnchor(QStringLiteral("result"));
......@@ -823,7 +823,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
if (status == QProcess::CrashExit || exitCode != 0) {
errorMessage(i18n("ISO creation process crashed."));
QString result(m_mkiso->readAllStandardError());
result.append("<a name=\"result\" /><br /><strong>");
result.append(QStringLiteral("<a name=\"result\" /><br /><strong>"));
result.append(i18n("ISO creation process crashed."));
m_status.error_log->append(result);
m_status.error_log->scrollToAnchor(QStringLiteral("result"));
......
......@@ -229,7 +229,7 @@ QStringList DvdWizardChapters::selectedTargets() const
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
// rightJustified: fill with 0s to make menus with more than 9 buttons work (now up to 99 buttons possible)
result.append("jump title " + QString::number(i + 1).rightJustified(2, '0'));
result.append(QStringLiteral("jump title ") + QString::number(i + 1).rightJustified(2, '0'));
if (!m_view.chapters_box->isChecked()) {
continue;
}
......
......@@ -932,13 +932,13 @@ void ParameterContainer::slotCollectAllParameters()
QString type = pa.attribute(QStringLiteral("type"));
QString paramName = na.isNull() ? pa.attribute(QStringLiteral("name")) : i18n(na.text().toUtf8().data());
if (type == QLatin1String("complex")) {
paramName.append("complex");
paramName.append(QStringLiteral("complex"));
} else if (type == QLatin1String("position")) {
paramName.append("position");
paramName.append(QStringLiteral("position"));
} else if (type == QLatin1String("geometry")) {
paramName.append("geometry");
paramName.append(QStringLiteral("geometry"));
} else if (type == QLatin1String("keyframe")) {
paramName.append("keyframe");
paramName.append(QStringLiteral("keyframe"));
} else if (type == QLatin1String("animated")) {
continue;
}
......
......@@ -1002,13 +1002,13 @@ const QMap<QString, QString> AnimationWidget::getAnimation()
key = QString::number(pos);
switch (type) {
case mlt_keyframe_discrete:
key.append("|=");
key.append(QStringLiteral("|="));
break;
case mlt_keyframe_smooth:
key.append("~=");
key.append(QStringLiteral("~="));
break;
default:
key.append("=");
key.append(QStringLiteral("="));
break;
}
key.append(locale.toString(val));
......
......@@ -297,9 +297,9 @@ Mlt::Producer *ClipController::getTrackProducer(const QString &trackName, Playli
//TODO handle audio / video only producers and framebuffer
if (clipState == PlaylistState::AudioOnly) {
clipWithTrackId.append("_audio");
clipWithTrackId.append(QStringLiteral("_audio"));
} else if (clipState == PlaylistState::VideoOnly) {
clipWithTrackId.append("_video");
clipWithTrackId.append(QStringLiteral("_video"));
}
Mlt::Producer *clone = m_binController->cloneProducer(*m_masterProducer);
......
......@@ -278,11 +278,11 @@ void RecManager::slotRecord(bool record)
// fps
captureArgs << QStringLiteral("-r") << QString::number(KdenliveSettings::grab_fps());
if (KdenliveSettings::grab_hide_mouse()) {
captureSize.append("+nomouse");
captureSize.append(QStringLiteral("+nomouse"));
}
captureArgs << QStringLiteral("-i") << captureSize;
if (!KdenliveSettings::grab_parameters().simplified().isEmpty()) {
captureArgs << KdenliveSettings::grab_parameters().simplified().split(' ');
captureArgs << KdenliveSettings::grab_parameters().simplified().split(QLatin1Char(' '));
}
captureArgs << path;
......
......@@ -292,7 +292,7 @@ void RecMonitor::slotVideoDeviceChanged(int ix)
capturefile.append(QLatin1Char('/'));
}
capturename = KdenliveSettings::decklink_filename();
capturename.append("xxx.");
capturename.append(QStringLiteral("xxx."));
capturename.append(KdenliveSettings::decklink_extension());
capturefile.append(capturename);
video_frame->setPixmap(mergeSideBySide(QIcon::fromTheme(QStringLiteral("camera-photo")).pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress play button\nto start preview.\nFiles will be saved in:\n%1", capturefile)));
......@@ -335,7 +335,7 @@ void RecMonitor::slotVideoDeviceChanged(int ix)
extension = QStringLiteral(".m2t");
break;
}
capturename.append("xxx" + extension);
capturename.append(QStringLiteral("xxx") + extension);
capturefile.append(capturename);
video_frame->setPixmap(mergeSideBySide(QIcon::fromTheme(QStringLiteral("network-connect")).pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress connect button\nto initialize connection\nFiles will be saved in:\n%1", capturefile)));
}
......@@ -765,7 +765,7 @@ void RecMonitor::slotRecord()
// fps
m_captureArgs << QStringLiteral("-r") << QString::number(KdenliveSettings::grab_fps());
if (KdenliveSettings::grab_hide_mouse()) {
captureSize.append("+nomouse");
captureSize.append(QStringLiteral("+nomouse"));
}
m_captureArgs << QStringLiteral("-i") << captureSize;
if (!KdenliveSettings::grab_parameters().simplified().isEmpty()) {
......@@ -846,9 +846,9 @@ const QString RecMonitor::getV4lXmlPlaylist(const MltVideoProfile &profile, bool
playlist.append(QStringLiteral("<producer id=\"producer1\" in=\"0\" out=\"999999\"><property name=\"mlt_type\">producer</property><property name=\"length\">1000000</property><property name=\"resource\">alsa:%1?channels=%2</property><property name=\"audio_index\">0</property><property name=\"video_index\">-1</property><property name=\"mlt_service\">avformat-novalidate</property></producer><playlist id=\"playlist1\"><entry producer=\"producer1\" in=\"0\" out=\"999999\"/></playlist>").arg(KdenliveSettings::v4l_alsadevicename()).arg(KdenliveSettings::alsachannels()));
playlist.append("<tractor id=\"tractor0\" title=\"video0\" global_feed=\"1\" in=\"0\" out=\"999999\">");
playlist.append("<track producer=\"playlist0\"/><track producer=\"playlist1\"/>");
playlist.append("</tractor></mlt>");
playlist.append(QStringLiteral("<tractor id=\"tractor0\" title=\"video0\" global_feed=\"1\" in=\"0\" out=\"999999\">"));
playlist.append(QStringLiteral("<track producer=\"playlist0\"/><track producer=\"playlist1\"/>"));
playlist.append(QStringLiteral("</tractor></mlt>"));
} else if (rec_audio->isChecked()) {
// Audio only recording
*isXml = false;
......
......@@ -228,8 +228,8 @@ void SmallRuler::mouseMoveEvent(QMouseEvent *event)
// We are on a marker
QString markerxt = m_monitor->getMarkerThumb(m_markers.at(i).time());
if (!markerxt.isEmpty()) {
markerxt.prepend("<img src=\"");
markerxt.append("\"><p align=\"center\">");
markerxt.prepend(QStringLiteral("<img src=\""));
markerxt.append(QStringLiteral("\"><p align=\"center\">"));
}
markerxt.append(m_markers.at(i).comment());
setToolTip(markerxt);
......
......@@ -1453,7 +1453,7 @@ void Render::fillSlowMotionProducers()
QString url = QString::fromUtf8(nprod->get("resource"));
int strobe = nprod->get_int("strobe");
if (strobe > 1) {
url.append("&strobe=" + QString::number(strobe));
url.append(QStringLiteral("&strobe=") + QString::number(strobe));
}
if (!m_slowmotionProducers.contains(url)) {
m_slowmotionProducers.insert(url, nprod);
......
......@@ -486,7 +486,7 @@ QImage Vectorscope::renderBackground(uint)
// Draw realtime factor (number of skipped pixels)
if (m_aRealtime->isChecked()) {
davinci.setPen(penThin);
davinci.drawText(QPoint(m_scopeRect.width() - 40, m_scopeRect.height() - 15), QVariant(m_accelFactorScope).toString().append("x"));
davinci.drawText(QPoint(m_scopeRect.width() - 40, m_scopeRect.height() - 15), QVariant(m_accelFactorScope).toString().append(QStringLiteral("x")));
}
emit signalBackgroundRenderingFinished(start.elapsed(), 1);
......
......@@ -529,7 +529,7 @@ Mlt::Producer *Track::clipProducer(Mlt::Producer *parent, PlaylistState::ClipSta
originalId = originalId.section(QLatin1Char('_'), 0, 0);
QString idForTrack = originalId + QLatin1Char('_') + m_playlist.get("id");
if (state == PlaylistState::AudioOnly) {
idForTrack.append("_audio");
idForTrack.append(QStringLiteral("_audio"));
}
if (!forceCreation) {
for (int i = 0; i < m_playlist.count(); i++) {
......
......@@ -738,7 +738,7 @@ void TitleWidget::slotImageTool()
QString allExtensions = i18n("All Images") + QStringLiteral(" (");
foreach (const QByteArray &mimeType, supported) {
mimeTypeFilters.append(i18n("%1 Image", QString(mimeType)) + QStringLiteral("( *.") + QString(mimeType) + QLatin1Char(')'));
allExtensions.append("*." + mimeType + QLatin1Char(' '));
allExtensions.append(QStringLiteral("*.") + mimeType + QLatin1Char(' '));
}
mimeTypeFilters.sort();
allExtensions.append(QLatin1Char(')'));
......
......@@ -59,16 +59,16 @@ void ArchiveOrg::slotStartSearch(const QString &searchText, int page)
m_listWidget->clear();
QString uri = QStringLiteral("https://www.archive.org/advancedsearch.php?q=%28");
uri.append(searchText);
uri.append("%29+AND+mediatype%3A%28movies%29");
uri.append("&fl%5B%5D=creator&fl%5B%5D=description&fl%5B%5D=identifier&fl%5B%5D=licenseurl&fl%5B%5D=title&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=30");//&callback=callback&save=yes"
uri.append(QStringLiteral("%29+AND+mediatype%3A%28movies%29"));
uri.append(QStringLiteral("&fl%5B%5D=creator&fl%5B%5D=description&fl%5B%5D=identifier&fl%5B%5D=licenseurl&fl%5B%5D=title&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=30"));//&callback=callback&save=yes"
uri.append("&mediatype=movies");//MovingImage");
uri.append(QStringLiteral("&mediatype=movies"));//MovingImage");
if (page > 1) {
uri.append("&page=" + QString::number(page));
uri.append(QStringLiteral("&page=") + QString::number(page));
}
uri.append("&output=json");
uri.append(QStringLiteral("&output=json"));
// qCDebug(KDENLIVE_LOG)<<"ArchiveOrg URL: "<< uri;
KJob *resolveJob = KIO::storedGet(QUrl(uri), KIO::NoReload, KIO::HideProgressInfo);
......
......@@ -67,10 +67,10 @@ void FreeSound::slotStartSearch(const QString &searchText, int page)
QString uri = QStringLiteral("https://www.freesound.org/apiv2/search/text/?format=json&query=");
uri.append(searchText);
if (page > 1) {
uri.append("&page=" + QString::number(page));
uri.append(QStringLiteral("&page=") + QString::number(page));
}
uri.append("&token=" + OAuth2_strClientSecret);
uri.append(QStringLiteral("&token=") + OAuth2_strClientSecret);
// qCDebug(KDENLIVE_LOG)<<uri;
KIO::StoredTransferJob *resolveJob = KIO::storedGet(QUrl(uri), KIO::NoReload, KIO::HideProgressInfo);
connect(resolveJob, &KIO::StoredTransferJob::result, this, &FreeSound::slotShowResults);
......
......@@ -46,7 +46,7 @@ void OpenClipArt::slotStartSearch(const QString &searchText, int page)
QString uri = QStringLiteral("http://openclipart.org/api/search/?query=");
uri.append(searchText);
if (page > 1) {
uri.append("&page=" + QString::number(page));
uri.append(QStringLiteral("&page=") + QString::number(page));
}
KJob *resolveJob = KIO::storedGet(QUrl(uri), KIO::NoReload, KIO::HideProgressInfo);
......
......@@ -205,7 +205,7 @@ void ResourceWidget::slotUpdateCurrentSound()
if (!m_currentInfo.infoUrl.isEmpty()) {
title += QStringLiteral(" (<a href=\"%1\">%2</a>)").arg(m_currentInfo.infoUrl, i18nc("the url link pointing to a web page", "link"));
}
title.append("</h3>");
title.append(QStringLiteral("</h3>"));
if (!m_currentInfo.authorUrl.isEmpty()) {
title += QStringLiteral("<a href=\"%1\">").arg(m_currentInfo.authorUrl);
......@@ -813,7 +813,7 @@ QString ResourceWidget::GetSaveFileNameAndPathS(const QString &path, const QStri
*/
void ResourceWidget::slotReadyRead()
{
m_desc.append(".");
m_desc.append(QLatin1Char('.'));
updateLayout();
}
/**
......
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