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

Use QLatin1Char(...)

parent ec690396
...@@ -3434,7 +3434,7 @@ void Bin::slotLoadClipMarkers(const QString &id) ...@@ -3434,7 +3434,7 @@ void Bin::slotLoadClipMarkers(const QString &id)
QList<CommentedTime> markersList; QList<CommentedTime> markersList;
foreach (const QString &line, lines) { foreach (const QString &line, lines) {
markerText.clear(); markerText.clear();
values = line.split('\t', QString::SkipEmptyParts); values = line.split(QLatin1Char('\t'), QString::SkipEmptyParts);
double time1 = values.at(0).toDouble(&ok); double time1 = values.at(0).toDouble(&ok);
double time2 = -1; double time2 = -1;
if (!ok) { if (!ok) {
......
...@@ -1294,7 +1294,7 @@ void ProjectClip::updateFfmpegProgress() ...@@ -1294,7 +1294,7 @@ void ProjectClip::updateFfmpegProgress()
return; return;
} }
QString result = callerProcess->readAllStandardOutput(); QString result = callerProcess->readAllStandardOutput();
const QStringList lines = result.split('\n'); const QStringList lines = result.split(QLatin1Char('\n'));
for (const QString &data : lines) { for (const QString &data : lines) {
if (data.startsWith(QStringLiteral("out_time_ms"))) { if (data.startsWith(QStringLiteral("out_time_ms"))) {
long ms = data.section(QLatin1Char('='), 1).toLong(); long ms = data.section(QLatin1Char('='), 1).toLong();
......
...@@ -565,10 +565,10 @@ void KdenliveSettingsDialog::slotReadAudioDevices() ...@@ -565,10 +565,10 @@ void KdenliveSettingsDialog::slotReadAudioDevices()
QString result = QString(m_readProcess.readAllStandardOutput()); QString result = QString(m_readProcess.readAllStandardOutput());
//qCDebug(KDENLIVE_LOG) << "// / / / / / READING APLAY: "; //qCDebug(KDENLIVE_LOG) << "// / / / / / READING APLAY: ";
//qCDebug(KDENLIVE_LOG) << result; //qCDebug(KDENLIVE_LOG) << result;
const QStringList lines = result.split('\n'); const QStringList lines = result.split(QLatin1Char('\n'));
for (const QString &data : lines) { for (const QString &data : lines) {
////qCDebug(KDENLIVE_LOG) << "// READING LINE: " << data; ////qCDebug(KDENLIVE_LOG) << "// READING LINE: " << data;
if (!data.startsWith(' ') && data.count(':') > 1) { if (!data.startsWith(QLatin1Char(' ')) && data.count(QLatin1Char(':')) > 1) {
QString card = data.section(QLatin1Char(':'), 0, 0).section(QLatin1Char(' '), -1); QString card = data.section(QLatin1Char(':'), 0, 0).section(QLatin1Char(' '), -1);
QString device = data.section(QLatin1Char(':'), 1, 1).section(QLatin1Char(' '), -1); QString device = data.section(QLatin1Char(':'), 1, 1).section(QLatin1Char(' '), -1);
m_configSdl.kcfg_audio_device->addItem(data.section(QLatin1Char(':'), -1).simplified(), "plughw:" + card + QLatin1Char(',') + device); m_configSdl.kcfg_audio_device->addItem(data.section(QLatin1Char(':'), -1).simplified(), "plughw:" + card + QLatin1Char(',') + device);
......
...@@ -174,7 +174,7 @@ void MyTextItem::updateGeometry(int, int, int) ...@@ -174,7 +174,7 @@ void MyTextItem::updateGeometry(int, int, int)
double lineSpacing = data(TitleDocument::LineSpacing).toInt() + metrics.lineSpacing(); double lineSpacing = data(TitleDocument::LineSpacing).toInt() + metrics.lineSpacing();
// Calculate line width // Calculate line width
QStringList lines = text.split('\n'); QStringList lines = text.split(QLatin1Char('\n'));
double linePos = metrics.ascent(); double linePos = metrics.ascent();
QRectF bounding = boundingRect(); QRectF bounding = boundingRect();
/*if (lines.count() > 0) { /*if (lines.count() > 0) {
......
...@@ -252,14 +252,14 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo ...@@ -252,14 +252,14 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
listitems = items.split(QLatin1Char(';')); listitems = items.split(QLatin1Char(';'));
if (listitems.count() == 1) { if (listitems.count() == 1) {
// probably custom effect created before change to ';' as separator // probably custom effect created before change to ';' as separator
listitems = pa.attribute(QStringLiteral("paramlist")).split(','); listitems = pa.attribute(QStringLiteral("paramlist")).split(QLatin1Char(','));
} }
QDomElement list = pa.firstChildElement(QStringLiteral("paramlistdisplay")); QDomElement list = pa.firstChildElement(QStringLiteral("paramlistdisplay"));
QStringList listitemsdisplay; QStringList listitemsdisplay;
if (!list.isNull()) { if (!list.isNull()) {
listitemsdisplay = i18n(list.text().toUtf8().data()).split(','); listitemsdisplay = i18n(list.text().toUtf8().data()).split(QLatin1Char(','));
} else { } else {
listitemsdisplay = i18n(pa.attribute("paramlistdisplay").toUtf8().data()).split(','); listitemsdisplay = i18n(pa.attribute("paramlistdisplay").toUtf8().data()).split(QLatin1Char(','));
} }
if (listitemsdisplay.count() != listitems.count()) { if (listitemsdisplay.count() != listitems.count()) {
listitemsdisplay = listitems; listitemsdisplay = listitems;
......
...@@ -975,7 +975,7 @@ void ClipPropertiesController::slotFillMeta(QTreeWidget *tree) ...@@ -975,7 +975,7 @@ void ClipPropertiesController::slotFillMeta(QTreeWidget *tree)
QString res = p.readAllStandardOutput(); QString res = p.readAllStandardOutput();
m_controller->setProperty(QStringLiteral("kdenlive:exiftool"), 1); m_controller->setProperty(QStringLiteral("kdenlive:exiftool"), 1);
QTreeWidgetItem *exif = nullptr; QTreeWidgetItem *exif = nullptr;
QStringList list = res.split('\n'); QStringList list = res.split(QLatin1Char('\n'));
foreach (const QString &tagline, list) { foreach (const QString &tagline, list) {
if (tagline.startsWith(QLatin1String("-File")) || tagline.startsWith(QLatin1String("-ExifTool"))) { if (tagline.startsWith(QLatin1String("-File")) || tagline.startsWith(QLatin1String("-ExifTool"))) {
continue; continue;
...@@ -1005,7 +1005,7 @@ void ClipPropertiesController::slotFillMeta(QTreeWidget *tree) ...@@ -1005,7 +1005,7 @@ void ClipPropertiesController::slotFillMeta(QTreeWidget *tree)
m_controller->setProperty(QStringLiteral("kdenlive:exiftool"), 1); m_controller->setProperty(QStringLiteral("kdenlive:exiftool"), 1);
} }
QTreeWidgetItem *exif = nullptr; QTreeWidgetItem *exif = nullptr;
QStringList list = res.split('\n'); QStringList list = res.split(QLatin1Char('\n'));
foreach (const QString &tagline, list) { foreach (const QString &tagline, list) {
if (m_type != Image && !tagline.startsWith(QLatin1String("-H264"))) { if (m_type != Image && !tagline.startsWith(QLatin1String("-H264"))) {
continue; continue;
......
...@@ -644,7 +644,7 @@ QString TitleDocument::rectFToString(const QRectF &c) ...@@ -644,7 +644,7 @@ QString TitleDocument::rectFToString(const QRectF &c)
QRectF TitleDocument::stringToRect(const QString &s) QRectF TitleDocument::stringToRect(const QString &s)
{ {
QStringList l = s.split(','); QStringList l = s.split(QLatin1Char(','));
if (l.size() < 4) { if (l.size() < 4) {
return QRectF(); return QRectF();
} }
...@@ -653,7 +653,7 @@ QRectF TitleDocument::stringToRect(const QString &s) ...@@ -653,7 +653,7 @@ QRectF TitleDocument::stringToRect(const QString &s)
QColor TitleDocument::stringToColor(const QString &s) QColor TitleDocument::stringToColor(const QString &s)
{ {
QStringList l = s.split(','); QStringList l = s.split(QLatin1Char(','));
if (l.size() < 4) { if (l.size() < 4) {
return QColor(); return QColor();
} }
...@@ -675,7 +675,7 @@ QTransform TitleDocument::stringToTransform(const QString &s) ...@@ -675,7 +675,7 @@ QTransform TitleDocument::stringToTransform(const QString &s)
QList<QVariant> TitleDocument::stringToList(const QString &s) QList<QVariant> TitleDocument::stringToList(const QString &s)
{ {
QStringList l = s.split(','); QStringList l = s.split(QLatin1Char(','));
if (l.size() < 3) { if (l.size() < 3) {
return QList<QVariant>(); return QList<QVariant>();
} }
......
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