Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6091033f authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1Char(...) when possible

parent ca6df84e
......@@ -214,7 +214,7 @@ void RenderJob::start()
// Because of the logging, we connect to stderr in all cases.
connect(m_renderProcess, &QProcess::readyReadStandardError, this, &RenderJob::receivedStderr);
m_renderProcess->start(m_prog, m_args);
m_logstream << "Started render process: " << m_prog << ' ' << m_args.join(QStringLiteral(" ")) << endl;
m_logstream << "Started render process: " << m_prog << ' ' << m_args.join(QLatin1Char(' ')) << endl;
}
void RenderJob::initKdenliveDbusInterface()
......
......@@ -2948,7 +2948,7 @@ void Bin::addClipCut(const QString &id, int in, int out)
}
sub = new ProjectSubClip(clip, in, out, m_doc->timecode().getDisplayTimecodeFromFrames(in, KdenliveSettings::frametimecode()));
QStringList markersComment = clip->markersText(GenTime(in, m_doc->fps()), GenTime(out, m_doc->fps()));
sub->setDescription(markersComment.join(QStringLiteral(";")));
sub->setDescription(markersComment.join(QLatin1Char(';')));
QList<int> missingThumbs;
missingThumbs << in;
clip->slotExtractImage(missingThumbs);
......
......@@ -280,7 +280,7 @@ QMimeData *ProjectItemModel::mimeData(const QModelIndexList &indices) const
}
if (!list.isEmpty()) {
QByteArray data;
data.append(list.join(QStringLiteral(";")).toUtf8());
data.append(list.join(QLatin1Char(';')).toUtf8());
mimeData->setData(QStringLiteral("kdenlive/producerslist"), data);
}
return mimeData;
......
......@@ -492,7 +492,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl>
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QStringList &groupInfo, Bin *bin)
{
QList<QUrl> list;
QString allExtensions = getExtensions().join(QStringLiteral(" "));
QString allExtensions = getExtensions().join(QLatin1Char(' '));
QString dialogFilter = allExtensions + "|" + i18n("All Supported Files") + "\n*|" + i18n("All Files");
QCheckBox *b = new QCheckBox(i18n("Import image sequence"));
b->setChecked(KdenliveSettings::autoimagesequence());
......
......@@ -469,7 +469,7 @@ void RenderWidget::slotSaveProfile()
QString customGroup;
QStringList arguments = m_view.advanced_params->toPlainText().split(' ', QString::SkipEmptyParts);
if (!arguments.isEmpty()) {
ui.parameters->setText(arguments.join(QStringLiteral(" ")));
ui.parameters->setText(arguments.join(QLatin1Char(' ')));
}
ui.profile_name->setFocus();
QTreeWidgetItem *item = m_view.formats->currentItem();
......@@ -487,7 +487,7 @@ void RenderWidget::slotSaveProfile()
}
if (item->data(0, BitratesRole).canConvert(QVariant::StringList) && item->data(0, BitratesRole).toStringList().count()) {
QStringList bitrates = item->data(0, BitratesRole).toStringList();
ui.vbitrates_list->setText(bitrates.join(QStringLiteral(",")));
ui.vbitrates_list->setText(bitrates.join(QLatin1Char(',')));
if (item->data(0, DefaultBitrateRole).canConvert(QVariant::String)) {
ui.default_vbitrate->setValue(item->data(0, DefaultBitrateRole).toInt());
}
......@@ -505,7 +505,7 @@ void RenderWidget::slotSaveProfile()
}
if (item && item->data(0, AudioBitratesRole).canConvert(QVariant::StringList) && item->data(0, AudioBitratesRole).toStringList().count()) {
QStringList bitrates = item->data(0, AudioBitratesRole).toStringList();
ui.abitrates_list->setText(bitrates.join(QStringLiteral(",")));
ui.abitrates_list->setText(bitrates.join(QLatin1Char(',')));
if (item->data(0, DefaultAudioBitrateRole).canConvert(QVariant::String)) {
ui.default_abitrate->setValue(item->data(0, DefaultAudioBitrateRole).toInt());
}
......@@ -662,23 +662,23 @@ void RenderWidget::slotCopyToFavorites()
if (params.contains(QStringLiteral("%bitrate"))) {
// profile has a variable bitrate
profileElement.setAttribute(QStringLiteral("defaultbitrate"), item->data(0, DefaultBitrateRole).toString());
profileElement.setAttribute(QStringLiteral("bitrates"), item->data(0, BitratesRole).toStringList().join(QStringLiteral(",")));
profileElement.setAttribute(QStringLiteral("bitrates"), item->data(0, BitratesRole).toStringList().join(QLatin1Char(',')));
} else if (params.contains(QStringLiteral("%quality"))) {
profileElement.setAttribute(QStringLiteral("defaultquality"), item->data(0, DefaultBitrateRole).toString());
profileElement.setAttribute(QStringLiteral("qualities"), item->data(0, BitratesRole).toStringList().join(QStringLiteral(",")));
profileElement.setAttribute(QStringLiteral("qualities"), item->data(0, BitratesRole).toStringList().join(QLatin1Char(',')));
}
if (params.contains(QStringLiteral("%audiobitrate"))) {
// profile has a variable bitrate
profileElement.setAttribute(QStringLiteral("defaultaudiobitrate"), item->data(0, DefaultAudioBitrateRole).toString());
profileElement.setAttribute(QStringLiteral("audiobitrates"), item->data(0, AudioBitratesRole).toStringList().join(QStringLiteral(",")));
profileElement.setAttribute(QStringLiteral("audiobitrates"), item->data(0, AudioBitratesRole).toStringList().join(QLatin1Char(',')));
} else if (params.contains(QStringLiteral("%audioquality"))) {
// profile has a variable bitrate
profileElement.setAttribute(QStringLiteral("defaultaudioquality"), item->data(0, DefaultAudioBitrateRole).toString());
profileElement.setAttribute(QStringLiteral("audioqualities"), item->data(0, AudioBitratesRole).toStringList().join(QStringLiteral(",")));
profileElement.setAttribute(QStringLiteral("audioqualities"), item->data(0, AudioBitratesRole).toStringList().join(QLatin1Char(',')));
}
if (item->data(0, SpeedsRole).canConvert(QVariant::StringList) && item->data(0, SpeedsRole).toStringList().count()) {
// profile has a variable speed
profileElement.setAttribute(QStringLiteral("speeds"), item->data(0, SpeedsRole).toStringList().join(QStringLiteral(";")));
profileElement.setAttribute(QStringLiteral("speeds"), item->data(0, SpeedsRole).toStringList().join(QLatin1Char(';')));
}
doc.appendChild(profileElement);
if (saveProfile(doc.documentElement())) {
......@@ -718,7 +718,7 @@ void RenderWidget::slotEditProfile()
}
if (item->data(0, BitratesRole).canConvert(QVariant::StringList) && item->data(0, BitratesRole).toStringList().count()) {
QStringList bitrates = item->data(0, BitratesRole).toStringList();
ui.vbitrates_list->setText(bitrates.join(QStringLiteral(",")));
ui.vbitrates_list->setText(bitrates.join(QLatin1Char(',')));
if (item->data(0, DefaultBitrateRole).canConvert(QVariant::String)) {
ui.default_vbitrate->setValue(item->data(0, DefaultBitrateRole).toInt());
}
......@@ -737,7 +737,7 @@ void RenderWidget::slotEditProfile()
}
if (item->data(0, AudioBitratesRole).canConvert(QVariant::StringList) && item->data(0, AudioBitratesRole).toStringList().count()) {
QStringList bitrates = item->data(0, AudioBitratesRole).toStringList();
ui.abitrates_list->setText(bitrates.join(QStringLiteral(",")));
ui.abitrates_list->setText(bitrates.join(QLatin1Char(',')));
if (item->data(0, DefaultAudioBitrateRole).canConvert(QVariant::String)) {
ui.default_abitrate->setValue(item->data(0, DefaultAudioBitrateRole).toInt());
}
......@@ -1154,7 +1154,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
}
if (!overlayargs.isEmpty()) {
render_process_args << "preargs=" + overlayargs.join(QStringLiteral(" "));
render_process_args << "preargs=" + overlayargs.join(QLatin1Char(' '));
}
if (scriptExport) {
......@@ -1169,7 +1169,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
QMimeType mime = db.mimeTypeForFile(dest);
KService::Ptr serv = KMimeTypeTrader::self()->preferredService(mime.name());
KIO::DesktopExecParser parser(*serv, QList<QUrl>() << QUrl::fromLocalFile(QUrl::toPercentEncoding(dest)));
render_process_args << parser.resultingArguments().join(QStringLiteral(" "));
render_process_args << parser.resultingArguments().join(QLatin1Char(' '));
} else {
render_process_args << QStringLiteral("-");
}
......@@ -1279,7 +1279,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
outStream << "SOURCE_" << stemIdxStr << "=" << '\"' + QUrl::fromLocalFile(playlistPaths.at(stemIdx)).toEncoded() + '\"' << '\n';
outStream << "TARGET_" << stemIdxStr << "=" << '\"' + QUrl::fromLocalFile(dest).toEncoded() + '\"' << '\n';
outStream << "PARAMETERS_" << stemIdxStr << "=" << '\"' + render_process_args.join(QStringLiteral(" ")) + '\"' << '\n';
outStream << "PARAMETERS_" << stemIdxStr << "=" << '\"' + render_process_args.join(QLatin1Char(' ')) + '\"' << '\n';
outStream << "$RENDERER $PARAMETERS_" << stemIdxStr << "\n\n";
if (stemIdx == (stemCount - 1)) {
......@@ -2489,7 +2489,7 @@ bool RenderWidget::startWaitingRenderJobs()
if (item->status() == WAITINGJOB) {
if (item->type() == DirectRenderType) {
// Add render process for item
const QString params = item->data(1, ParametersRole).toStringList().join(QStringLiteral(" "));
const QString params = item->data(1, ParametersRole).toStringList().join(QLatin1Char(' '));
outStream << m_renderer << ' ' << params << '\n';
} else if (item->type() == ScriptRenderType) {
// Script item
......
......@@ -524,11 +524,11 @@ void Wizard::checkMissingCodecs()
requiredVCodecs.removeAll(vcodecsList.at(i));
}
if (!requiredACodecs.isEmpty() || !requiredVCodecs.isEmpty()) {
QString missing = requiredACodecs.join(QStringLiteral(","));
QString missing = requiredACodecs.join(QLatin1Char(','));
if (!missing.isEmpty() && !requiredVCodecs.isEmpty()) {
missing.append(',');
}
missing.append(requiredVCodecs.join(QStringLiteral(",")));
missing.append(requiredVCodecs.join(QLatin1Char(',')));
missing.prepend(i18n("The following codecs were not found on your system. Check our <a href=''>online manual</a> if you need them: "));
m_infos.append(QString("<li>%1</li>").arg(missing));
}
......
......@@ -1530,7 +1530,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
parsedValues << QString::number(l.key()) + "=" + locale.toString(l.value());
}
}
EffectsList::setProperty(eff, conversionParams.at(2), parsedValues.join(QStringLiteral(";")));
EffectsList::setProperty(eff, conversionParams.at(2), parsedValues.join(QLatin1Char(';')));
//EffectsList::setProperty(eff, QStringLiteral("kdenlive:sync_in_out"), QStringLiteral("1"));
eff.setAttribute(QStringLiteral("out"), out);
}
......@@ -1631,7 +1631,7 @@ void DocumentValidator::updateProducerInfo(const QDomElement &prod, const QDomEl
}
if (source.hasAttribute(QStringLiteral("cutzones"))) {
QString zoneData = source.attribute(QStringLiteral("cutzones"));
QStringList zoneList = zoneData.split(QStringLiteral(";"));
QStringList zoneList = zoneData.split(QLatin1Char(';'));
int ct = 1;
foreach (const QString &data, zoneList) {
QString zoneName = data.section(QStringLiteral("-"), 2);
......@@ -1970,7 +1970,7 @@ bool DocumentValidator::checkMovit()
QString DocumentValidator::factorizeGeomValue(const QString &value, double factor)
{
QStringList vals = value.split(QStringLiteral(";"));
QStringList vals = value.split(QLatin1Char(';'));
QString result;
QLocale locale;
for (int i = 0; i < vals.count(); i++) {
......
......@@ -190,7 +190,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
line--;
col = col - 2;
for (int j = 0; j < line && errorPos < playlist.length(); ++j) {
errorPos = playlist.indexOf(QStringLiteral("\n"), errorPos);
errorPos = playlist.indexOf(QLatin1Char('\n'), errorPos);
errorPos++;
}
errorPos += col;
......@@ -1665,10 +1665,10 @@ void KdenliveDoc::selectPreviewProfile()
i.next();
// Check for frame rate
QString params = i.value();
QStringList data = i.value().split(QStringLiteral(" "));
QStringList data = i.value().split(QLatin1Char(' '));
// Check for size mismatch
if (params.contains(QStringLiteral("s="))) {
QString paramSize = params.section(QStringLiteral("s="), 1).section(QStringLiteral(" "), 0, 0);
QString paramSize = params.section(QStringLiteral("s="), 1).section(QLatin1Char(' '), 0, 0);
if (paramSize != profileSize) {
continue;
}
......
......@@ -647,7 +647,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
// Add chapters
QStringList chaptersList = m_pageChapters->chapters(i);
if (!chaptersList.isEmpty()) {
vob.setAttribute(QStringLiteral("chapters"), chaptersList.join(QStringLiteral(",")));
vob.setAttribute(QStringLiteral("chapters"), chaptersList.join(QLatin1Char(',')));
}
pgc2.appendChild(vob);
......
......@@ -189,7 +189,7 @@ QMap<QString, QString> DvdWizardChapters::chaptersData() const
QMap<QString, QString> result;
int max = m_view.vob_list->count();
for (int i = 0; i < max; ++i) {
QString chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QStringLiteral(";"));
QString chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QLatin1Char(';'));
result.insert(m_view.vob_list->itemText(i), chapters);
}
return result;
......@@ -251,7 +251,7 @@ QDomElement DvdWizardChapters::toXml() const
for (int i = 0; i < m_view.vob_list->count(); ++i) {
QDomElement vob = doc.createElement(QStringLiteral("vob"));
vob.setAttribute(QStringLiteral("file"), m_view.vob_list->itemText(i));
vob.setAttribute(QStringLiteral("chapters"), m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QStringLiteral(";")));
vob.setAttribute(QStringLiteral("chapters"), m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList().join(QLatin1Char(';')));
xml.appendChild(vob);
}
return doc.documentElement();
......
......@@ -263,7 +263,7 @@ void DvdWizardVob::slotCheckProfiles()
void DvdWizardVob::slotAddVobList(QList<QUrl> list)
{
if (list.isEmpty()) {
QString allExtensions = ClipCreationDialog::getExtensions().join(QStringLiteral(" "));
QString allExtensions = ClipCreationDialog::getExtensions().join(QLatin1Char(' '));
QString dialogFilter = i18n("All Supported Files") + " (" + allExtensions + ");; " + i18n("MPEG Files") + " (*.mpeg *.mpg *.vob);; " + i18n("All Files") + " (*.*)";
list = QFileDialog::getOpenFileUrls(this, i18n("Add new video file"), QUrl::fromLocalFile(KRecentDirs::dir(QStringLiteral(":KdenliveDvdFolder"))), dialogFilter);
if (!list.isEmpty()) {
......@@ -384,7 +384,7 @@ void DvdWizardVob::slotAddVobFile(const QUrl &url, const QString &chapters, bool
for (int j = 0; j < chapters.count(); ++j) {
chaptersList.append(QString::number(chapters.at(j).toElement().attribute(QStringLiteral("time")).toInt()));
}
item->setData(1, Qt::UserRole + 1, chaptersList.join(QStringLiteral(";")));
item->setData(1, Qt::UserRole + 1, chaptersList.join(QLatin1Char(';')));
}
} else { // Explicitly add a chapter at 00:00:00:00
item->setData(1, Qt::UserRole + 1, "0");
......
......@@ -91,8 +91,8 @@ void initEffects::refreshLumas()
for (int i = 0; i < params.count(); ++i) {
QDomElement e = params.item(i).toElement();
if (e.attribute(QStringLiteral("tag")) == QLatin1String("resource")) {
e.setAttribute(QStringLiteral("paramlistdisplay"), imagenamelist.join(QStringLiteral(",")));
e.setAttribute(QStringLiteral("paramlist"), imagefiles.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("paramlistdisplay"), imagenamelist.join(QLatin1Char(',')));
e.setAttribute(QStringLiteral("paramlist"), imagefiles.join(QLatin1Char(';')));
break;
}
}
......@@ -102,8 +102,8 @@ void initEffects::refreshLumas()
for (int i = 0; i < params.count(); ++i) {
QDomElement e = params.item(i).toElement();
if (e.attribute(QStringLiteral("tag")) == QLatin1String("luma")) {
e.setAttribute(QStringLiteral("paramlistdisplay"), imagenamelist.join(QStringLiteral(",")));
e.setAttribute(QStringLiteral("paramlist"), imagefiles.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("paramlistdisplay"), imagenamelist.join(QLatin1Char(',')));
e.setAttribute(QStringLiteral("paramlist"), imagefiles.join(QLatin1Char(';')));
break;
}
}*/
......
......@@ -212,7 +212,7 @@ void CollapsibleEffect::slotCreateGroup()
void CollapsibleEffect::slotCreateRegion()
{
QString allExtensions = ClipCreationDialog::getExtensions().join(QStringLiteral(" "));
QString allExtensions = ClipCreationDialog::getExtensions().join(QLatin1Char(' '));
const QString dialogFilter = allExtensions + ' ' + QLatin1Char('|') + i18n("All Supported Files") + "\n* " + QLatin1Char('|') + i18n("All Files");
QString clipFolder = KRecentDirs::dir(QStringLiteral(":KdenliveClipFolder"));
if (clipFolder.isEmpty()) {
......
......@@ -1012,7 +1012,7 @@ const QMap<QString, QString> AnimationWidget::getAnimation()
key.append(locale.toString(val));
result << key;
}
animationResults.insert(i.key(), result.join(QStringLiteral(";")));
animationResults.insert(i.key(), result.join(QLatin1Char(';')));
}
}
// restore original controller
......
......@@ -79,7 +79,7 @@ QString CubicBezierSpline::toString() const
locale.toString(p.p.x()), locale.toString(p.p.y()),
locale.toString(p.h2.x()), locale.toString(p.h2.y()));
}
return spline.join(QStringLiteral("|"));
return spline.join(QLatin1Char('|'));
}
int CubicBezierSpline::setPoint(int ix, const BPoint &point)
......
......@@ -86,7 +86,7 @@ void SelectiveColor::updateValues()
spin_yell->setValue(0);
spin_mag->setValue(0);
spin_cyan->setValue(0);
QStringList vals = values.at(1).split(QStringLiteral(" "));
QStringList vals = values.at(1).split(QLatin1Char(' '));
switch (vals.count()) {
case 4 :
spin_black->setValue(vals.at(3).toDouble() * 100);
......
......@@ -3355,7 +3355,7 @@ void MainWindow::slotTranscode(const QStringList &urls)
void MainWindow::slotTranscodeClip()
{
QString allExtensions = ClipCreationDialog::getExtensions().join(QStringLiteral(" "));
QString allExtensions = ClipCreationDialog::getExtensions().join(QLatin1Char(' '));
const QString dialogFilter = i18n("All Supported Files") + '(' + allExtensions + ");;" + i18n("All Files") + "(*)";
QString clipFolder = KRecentDirs::dir(QStringLiteral(":KdenliveClipFolder"));
QStringList urls = QFileDialog::getOpenFileNames(this, i18n("Files to transcode"), clipFolder, dialogFilter);
......
......@@ -129,7 +129,7 @@ public:
int val = value.toInt();
if (property == KFileMetaData::Property::BitRate) {
// Adjust unit for bitrate
new QTreeWidgetItem(m_tree, QStringList() << info.displayName() << QString::number(val / 1000) + QStringLiteral(" ") + i18nc("Kilobytes per seconds", "kb/s"));
new QTreeWidgetItem(m_tree, QStringList() << info.displayName() << QString::number(val / 1000) + QLatin1Char(' ') + i18nc("Kilobytes per seconds", "kb/s"));
} else {
new QTreeWidgetItem(m_tree, QStringList() << info.displayName() << QString::number(val));
}
......@@ -814,7 +814,7 @@ void ClipPropertiesController::fillProperties()
snprintf(property, sizeof(property), "meta.media.%d.codec.bit_rate", vindex);
int bitrate = m_controller->int_property(property) / 1000;
if (bitrate > 0) {
propertyMap.append(QStringList() << i18n("Video bitrate") << QString::number(bitrate) + QStringLiteral(" ") + i18nc("Kilobytes per seconds", "kb/s"));
propertyMap.append(QStringList() << i18n("Video bitrate") << QString::number(bitrate) + QLatin1Char(' ') + i18nc("Kilobytes per seconds", "kb/s"));
}
int scan = m_controller->int_property(QStringLiteral("meta.media.progressive"));
......@@ -843,12 +843,12 @@ void ClipPropertiesController::fillProperties()
snprintf(property, sizeof(property), "meta.media.%d.codec.sample_rate", default_audio);
int srate = m_controller->int_property(property);
propertyMap.append(QStringList() << i18n("Audio frequency") << QString::number(srate) + QStringLiteral(" ") + i18nc("Herz", "Hz"));
propertyMap.append(QStringList() << i18n("Audio frequency") << QString::number(srate) + QLatin1Char(' ') + i18nc("Herz", "Hz"));
snprintf(property, sizeof(property), "meta.media.%d.codec.bit_rate", default_audio);
int bitrate = m_controller->int_property(property) / 1000;
if (bitrate > 0) {
propertyMap.append(QStringList() << i18n("Audio bitrate") << QString::number(bitrate) + QStringLiteral(" ") + i18nc("Kilobytes per seconds", "kb/s"));
propertyMap.append(QStringList() << i18n("Audio bitrate") << QString::number(bitrate) + QLatin1Char(' ') + i18nc("Kilobytes per seconds", "kb/s"));
}
}
}
......
......@@ -44,7 +44,7 @@ QString EffectInfo::toString() const
collapsedState += 2;
}
data << QString::number(collapsedState) << QString::number(groupIndex) << groupName;
return data.join(QStringLiteral("/"));
return data.join(QLatin1Char('/'));
}
void EffectInfo::fromString(const QString &value)
......@@ -52,7 +52,7 @@ void EffectInfo::fromString(const QString &value)
if (value.isEmpty()) {
return;
}
QStringList data = value.split(QStringLiteral("/"));
QStringList data = value.split(QLatin1Char('/'));
isCollapsed = data.at(0).toInt() == 1 || data.at(0).toInt() == 3;
groupIsCollapsed = data.at(0).toInt() >= 2;
if (data.count() > 1) {
......@@ -179,7 +179,7 @@ void EffectsController::adjustEffectParameters(EffectsParameterList &parameters,
values[j] = pos + '=' + locale.toString(val);
}
// //qCDebug(KDENLIVE_LOG) << "/ / / /SENDING KEYFR:" << values;
parameters.addParam(paramname, values.join(QStringLiteral(";")));
parameters.addParam(paramname, values.join(QLatin1Char(';')));
/*parameters.addParam(e.attribute("name"), e.attribute("keyframes").replace(":", "="));
parameters.addParam("max", e.attribute("max"));
parameters.addParam("min", e.attribute("min"));
......@@ -445,7 +445,7 @@ const QString EffectsController::adjustKeyframes(const QString &keyframes, int o
}
result.append(newKey);
}
return result.join(QStringLiteral(";"));
return result.join(QLatin1Char(';'));
}
EffectsParameterList EffectsController::addEffect(const ProfileInfo &info, const QDomElement &effect)
......@@ -483,7 +483,7 @@ EffectsParameterList EffectsController::addEffect(const ProfileInfo &info, const
values[j] = pos + '=' + locale.toString(val);
}
}
parameters.addParam(e.attribute(QStringLiteral("name")), values.join(QStringLiteral(";")));
parameters.addParam(e.attribute(QStringLiteral("name")), values.join(QLatin1Char(';')));
/*parameters.addParam("max", e.attribute("max"));
parameters.addParam("min", e.attribute("min"));
parameters.addParam("factor", );*/
......@@ -524,7 +524,7 @@ void EffectsController::offsetKeyframes(int in, const QDomElement &effect)
int pos = values.at(j).section('=', 0, 0).toInt() - in;
values[j] = QString::number(pos) + "=" + values.at(j).section('=', 1);
}
e.setAttribute(QStringLiteral("keyframes"), values.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("keyframes"), values.join(QLatin1Char(';')));
}
}
}
......
......@@ -850,7 +850,7 @@ void Monitor::slotStartDrag()
list.append(QString::number(p.x()));
list.append(QString::number(p.y()));
QByteArray data;
data.append(list.join(QStringLiteral(";")).toUtf8());
data.append(list.join(QLatin1Char(';')).toUtf8());
mimeData->setData(QStringLiteral("kdenlive/clip"), data);
drag->setMimeData(mimeData);
/*QPixmap pix = m_currentClip->thumbnail();
......@@ -893,7 +893,7 @@ void Monitor::mouseMoveEvent(QMouseEvent *event)
list.append(QString::number(p.x()));
list.append(QString::number(p.y()));
QByteArray data;
data.append(list.join(QStringLiteral(";")).toUtf8());
data.append(list.join(QLatin1Char(';')).toUtf8());
mimeData->setData(QStringLiteral("kdenlive/clip"), data);
drag->setMimeData(mimeData);
drag->start(Qt::MoveAction);
......
......@@ -473,7 +473,7 @@ void CutClipJob::processAnalyseLog()
foreach (int frm, frames) {
sortedFrames << QString::number(frm);
}
jobResults.insert(QStringLiteral("i-frame"), sortedFrames.join(QStringLiteral(";")));
jobResults.insert(QStringLiteral("i-frame"), sortedFrames.join(QLatin1Char(';')));
QMap<QString, QString> extraInfo;
extraInfo.insert(QStringLiteral("addmarkers"), QStringLiteral("3"));
extraInfo.insert(QStringLiteral("key"), QStringLiteral("i-frame"));
......
......@@ -496,7 +496,7 @@ void AbstractClipItem::insertKeyframe(ProfileInfo profile, QDomElement effect, i
newkfr.append(QString::number(pos) + '=' + e.attribute(QStringLiteral("default")));
}
}
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QLatin1Char(';')));
}
}
}
......@@ -545,7 +545,7 @@ void AbstractClipItem::movedKeyframe(QDomElement effect, int newpos, int oldpos,
}
}
}
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QLatin1Char(';')));
} else if (e.attribute(QStringLiteral("type")) == QLatin1String("geometry")) {
QString kfr = e.attribute(QStringLiteral("value"));
const QStringList keyframes = kfr.split(';', QString::SkipEmptyParts);
......@@ -558,7 +558,7 @@ void AbstractClipItem::movedKeyframe(QDomElement effect, int newpos, int oldpos,
newkfr.append(QString::number(newpos) + '=' + str.section('=', 1, 1));
}
}
e.setAttribute(QStringLiteral("value"), newkfr.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("value"), newkfr.join(QLatin1Char(';')));
}
}
......@@ -587,7 +587,7 @@ void AbstractClipItem::removeKeyframe(QDomElement effect, int frame)
newkfr.append(str);
}
}
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("keyframes"), newkfr.join(QLatin1Char(';')));
} else if (e.attribute(QStringLiteral("type")) == QLatin1String("geometry")) {
QString kfr = e.attribute(QStringLiteral("value"));
const QStringList keyframes = kfr.split(';', QString::SkipEmptyParts);
......@@ -597,7 +597,7 @@ void AbstractClipItem::removeKeyframe(QDomElement effect, int frame)
newkfr.append(str);
}
}
e.setAttribute(QStringLiteral("value"), newkfr.join(QStringLiteral(";")));
e.setAttribute(QStringLiteral("value"), newkfr.join(QLatin1Char(';')));
} else if (e.attribute(QStringLiteral("type")) == QLatin1String("animated")) {
m_keyframeView.removeKeyframe(frame);
// inserting a keyframe touches all animated params
......
......@@ -1553,7 +1553,7 @@ EffectsParameterList ClipItem::addEffect(ProfileInfo info, QDomElement effect, b
values[j] = pos + '=' + locale.toString(val);
}
}
parameters.addParam(e.attribute(QStringLiteral("name")), values.join(QStringLiteral(";")));
parameters.addParam(e.attribute(QStringLiteral("name")), values.join(QLatin1Char(';')));
/*parameters.addParam("max", e.attribute("max"));
parameters.addParam("min", e.attribute("min"));
parameters.addParam("factor", );*/
......
......@@ -149,7 +149,7 @@ void HeaderTrack::updateEffectLabel(const QStringList &effects)
{
if (!effects.isEmpty()) {
effect_label->setHidden(false);
effect_label->setToolTip(effects.join(QStringLiteral("/")));
effect_label->setToolTip(effects.join(QLatin1Char('/')));
} else {
effect_label->setHidden(true);
effect_label->setToolTip(QString());
......
......@@ -689,11 +689,11 @@ void KeyframeView::addDefaultKeyframe(ProfileInfo profile, int frame, mlt_keyfra
defaultVal = EffectsController::getStringRectEval(profile, defaultVal).simplified();
}
mlt_rect rect;
rect.x = locale.toDouble(defaultVal.section(QStringLiteral(" "), 0, 0));
rect.y = locale.toDouble(defaultVal.section(QStringLiteral(" "), 1, 1));
rect.w = locale.toDouble(defaultVal.section(QStringLiteral(" "), 2, 2));
rect.h = locale.toDouble(defaultVal.section(QStringLiteral(" "), 3, 3));
rect.o = defaultVal.count(QLatin1Char(' ')) > 3 ? locale.toDouble(defaultVal.section(QStringLiteral(" "), 4, 4)) : 1.0;
rect.x = locale.toDouble(defaultVal.section(QLatin1Char(' '), 0, 0));
rect.y = locale.toDouble(defaultVal.section(QLatin1Char(' '), 1, 1));
rect.w = locale.toDouble(defaultVal.section(QLatin1Char(' '), 2, 2));
rect.h = locale.toDouble(defaultVal.section(QLatin1Char(' '), 3, 3));
rect.o = defaultVal.count(QLatin1Char(' ')) > 3 ? locale.toDouble(defaultVal.section(QLatin1Char(' '), 4, 4)) : 1.0;
m_keyProperties.anim_set(paramName.toUtf8().constData(), rect, frame - m_offset, duration - m_offset, type);
} else {
......@@ -804,7 +804,7 @@ const QString KeyframeView::serialize(const QString &name, bool rectAnimation)
if (!name.isEmpty()) {
m_keyAnim = m_keyProperties.get_animation(m_inTimeline.toUtf8().constData());
}
return result.join(QStringLiteral(";"));
return result.join(QLatin1Char(';'));
}
QList<QPoint> KeyframeView::loadKeyframes(const QString &data)
......@@ -980,7 +980,7 @@ void KeyframeView::setOffset(int frames)
int KeyframeView::checkNegatives(const QString &data, int maxDuration)
{
int result = -2;
QStringList frames = data.split(QStringLiteral(";"));
QStringList frames = data.split(QLatin1Char(';'));
for (int i = 0; i < frames.count(); i++) {
if (frames.at(i).startsWith(QLatin1String("-"))) {
// We found a negative kfr
......
......@@ -180,11 +180,11 @@ void PreviewManager::disconnectTrack()
bool PreviewManager::loadParams()
{
m_extension = m_doc->getDocumentProperty(QStringLiteral("previewextension"));
m_consumerParams = m_doc->getDocumentProperty(QStringLiteral("previewparameters")).split(QStringLiteral(" "), QString::SkipEmptyParts);
m_consumerParams = m_doc->getDocumentProperty(QStringLiteral("previewparameters")).split(QLatin1Char(' '), QString::SkipEmptyParts);
if (m_consumerParams.isEmpty() || m_extension.isEmpty()) {
m_doc->selectPreviewProfile();
m_consumerParams = m_doc->getDocumentProperty(QStringLiteral("previewparameters")).split(QStringLiteral(" "), QString::SkipEmptyParts);
m_consumerParams = m_doc->getDocumentProperty(QStringLiteral("previewparameters")).split(QLatin1Char(' '), QString::SkipEmptyParts);
m_extension = m_doc->getDocumentProperty(QStringLiteral("previewextension"));
}
if (m_consumerParams.isEmpty() || m_extension.isEmpty()) {
......
......@@ -215,8 +215,8 @@ QMap<QString, QString> Timeline::documentProperties()
props.insert(QStringLiteral("audiotargettrack"), QString::number(audioTarget));
props.insert(QStringLiteral("videotargettrack"), QString::number(videoTarget));
QPair <QStringList, QStringList> chunks = m_ruler->previewChunks();
props.insert(QStringLiteral("previewchunks"), chunks.first.join(QStringLiteral(",")));
props.insert(QStringLiteral("dirtypreviewchunks"), chunks.second.join(QStringLiteral(",")));
props.insert(QStringLiteral("previewchunks"), chunks.first.join(QLatin1Char(',')));
props.insert(QStringLiteral("dirtypreviewchunks"), chunks.second.join(QLatin1Char(',')));
props.insert(QStringLiteral("disablepreview"), QString::number((int) m_disablePreview->isChecked()));
return props;
}
......@@ -1243,7 +1243,7 @@ void Timeline::setParam(ProfileInfo info, QDomElement param, const QString &valu
}
kfrs[l] = fr + '=' + QString::number((int)(val + offset));
}
param.setAttribute(QStringLiteral("keyframes"), kfrs.join(QStringLiteral(";")));
param.setAttribute(QStringLiteral("keyframes"), kfrs.join(QLatin1Char(';')));
} else if (type == QLatin1String("double") || type == QLatin1String("constant")) {
param.setAttribute(QStringLiteral("value"), locale.toDouble(value) * fact + offset);
} else {
......@@ -1988,7 +1988,7 @@ void Timeline::loadPreviewRender()
return;
}
m_timelinePreview->buildPreviewTrack();
m_timelinePreview->loadChunks(chunks.split(QStringLiteral(","), QString::SkipEmptyParts), dirty.split(QStringLiteral(","), QString::SkipEmptyParts), documentDate);
m_timelinePreview->loadChunks(chunks.split(QLatin1Char(','), QString::SkipEmptyParts), dirty.split(QLatin1Char(','), QString::SkipEmptyParts), documentDate);
m_usePreview = true;
} else {
m_ruler->hidePreview(true);
......
......@@ -451,7 +451,7 @@ bool Transition::updateKeyframes(const ItemInfo &oldInfo, const ItemInfo &newInf
separator.prepend(QStringLiteral("|"));
}
values[i] = QString::number(duration) + separator + pos.section('=', 1);
pa.setAttribute(QStringLiteral("value"), values.join(QStringLiteral(";")));
pa.setAttribute(QStringLiteral("value"), values.join(QLatin1Char(';')));
return true;
}
++i;
......@@ -503,7 +503,7 @@ bool Transition::updateKeyframes(const ItemInfo &oldInfo, const ItemInfo &newInf
}
}
}
pa.setAttribute(QStringLiteral("value"), values.join(QStringLiteral(";")));
pa.setAttribute(QStringLiteral("value"), values.join(QLatin1Char(';')));
}
return true;
}
......
......@@ -64,12 +64,12 @@ QString GradientWidget::gradientToString() const
{
QStringList result;
result << color1->color().name(QColor::HexArgb) << color2->color().name(QColor::HexArgb) << QString::number(color1_pos->value()) << QString::number(color2_pos->value()) << QString::number(angle->value());
return result.join(QStringLiteral(";"));
return result.join(QLatin1Char(';'));
}
QLinearGradient GradientWidget::gradientFromString(const QString &str, int width, int height)
{
QStringList values = str.split(QStringLiteral(";"));
QStringList values = str.split(QLatin1Char(';'));
QLinearGradient gr;
if (values.count() < 5) {
// invalid gradient data
......