mirror of
https://invent.kde.org/multimedia/kdenlive.git
synced 2025-07-16 19:10:12 +00:00
QString refactor: replace QString() with QStringLiteral()
Replace `QString()` constructors with `QStringLiteral()` macro to improve performance.
This commit is contained in:
parent
9d7c0000e5
commit
e83354d625
97 changed files with 381 additions and 381 deletions
|
@ -124,7 +124,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
QScopedPointer<Mlt::Producer> playlst(prod.cut(frame.toInt(), frame.toInt() + chunkSize));
|
||||
QScopedPointer<Mlt::Consumer> cons(
|
||||
new Mlt::Consumer(profile, QString("avformat:%1").arg(baseFolder.absoluteFilePath(fileName)).toUtf8().constData()));
|
||||
new Mlt::Consumer(profile, QStringLiteral("avformat:%1").arg(baseFolder.absoluteFilePath(fileName)).toUtf8().constData()));
|
||||
for (const QString ¶m : std::as_const(consumerParams)) {
|
||||
if (param.contains(QLatin1Char('='))) {
|
||||
cons->set(param.section(QLatin1Char('='), 0, 0).toUtf8().constData(), param.section(QLatin1Char('='), 1).toUtf8().constData());
|
||||
|
|
|
@ -33,7 +33,7 @@ RenderJob::RenderJob(const QString &render, const QString &scenelist, const QStr
|
|||
, m_prog(render)
|
||||
, m_kdenlivesocket(new QLocalSocket(this))
|
||||
, m_logfile(m_dest + QStringLiteral(".log"))
|
||||
, m_erase(debugMode == false && (scenelist.startsWith(QDir::tempPath()) || scenelist.startsWith(QString("xml:%2").arg(QDir::tempPath()))))
|
||||
, m_erase(debugMode == false && (scenelist.startsWith(QDir::tempPath()) || scenelist.startsWith(QStringLiteral("xml:%2").arg(QDir::tempPath()))))
|
||||
, m_seconds(0)
|
||||
, m_frame(in)
|
||||
, m_framein(in)
|
||||
|
|
|
@ -403,9 +403,9 @@ void AssetListWidget::updateAssetInfo(const QModelIndex ¤t, const QModelIn
|
|||
// Add link to our documentation
|
||||
const QString link = buildLink(id, type);
|
||||
if (!description.isEmpty()) {
|
||||
description.append(QString("<br/><a title=\"%1\" href=\"%2\">🔗 %3</a>").arg(i18nc("@info:tooltip", "Online documentation"), link, id));
|
||||
description.append(QStringLiteral("<br/><a title=\"%1\" href=\"%2\">🔗 %3</a>").arg(i18nc("@info:tooltip", "Online documentation"), link, id));
|
||||
} else {
|
||||
description = QString("<a title=\"%1\" href=\"%2\">🔗 %3</a>").arg(i18nc("@info:tooltip", "Online documentation"), link, id);
|
||||
description = QStringLiteral("<a title=\"%1\" href=\"%2\">🔗 %3</a>").arg(i18nc("@info:tooltip", "Online documentation"), link, id);
|
||||
}
|
||||
}
|
||||
m_infoDocument->setHtml(description);
|
||||
|
|
|
@ -117,9 +117,9 @@ void KeyframeMonitorHelper::slotUpdateFromMonitorData(const QVariantList ¢er
|
|||
// Center rect to new pos
|
||||
QPointF offset = expected - pt;
|
||||
r.translate(offset);
|
||||
QString res = QString("%1 %2 %3 %4").arg(int(r.x())).arg(int(r.y())).arg(int(r.width())).arg(int(r.height()));
|
||||
QString res = QStringLiteral("%1 %2 %3 %4").arg(int(r.x())).arg(int(r.y())).arg(int(r.width())).arg(int(r.height()));
|
||||
if (data.size() > 4) {
|
||||
res.append(QString(" %1").arg(data.at(4)));
|
||||
res.append(QStringLiteral(" %1").arg(data.at(4)));
|
||||
}
|
||||
kfr->updateKeyframe(kf.first, res);
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ AssetCommand::AssetCommand(const std::shared_ptr<AssetParameterModel> &model, co
|
|||
m_name = m_model->data(index, AssetParameterModel::NameRole).toString();
|
||||
const QString id = model->getAssetId();
|
||||
if (EffectsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", EffectsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", EffectsRepository::get()->getName(id))));
|
||||
} else if (TransitionsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", TransitionsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", TransitionsRepository::get()->getName(id))));
|
||||
}
|
||||
m_oldValue = m_model->data(index, AssetParameterModel::ValueRole).toString();
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ AssetMultiCommand::AssetMultiCommand(const std::shared_ptr<AssetParameterModel>
|
|||
m_name = m_model->data(m_indexes.first(), AssetParameterModel::NameRole).toString();
|
||||
const QString id = model->getAssetId();
|
||||
if (EffectsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", EffectsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", EffectsRepository::get()->getName(id))));
|
||||
} else if (TransitionsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", TransitionsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1", TransitionsRepository::get()->getName(id))));
|
||||
}
|
||||
for (QModelIndex ix : std::as_const(m_indexes)) {
|
||||
QVariant previousVal = m_model->data(ix, AssetParameterModel::ValueRole);
|
||||
|
@ -163,10 +163,10 @@ AssetKeyframeCommand::AssetKeyframeCommand(const std::shared_ptr<AssetParameterM
|
|||
{
|
||||
const QString id = model->getAssetId();
|
||||
if (EffectsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", EffectsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", EffectsRepository::get()->getName(id))));
|
||||
|
||||
} else if (TransitionsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", TransitionsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", TransitionsRepository::get()->getName(id))));
|
||||
}
|
||||
m_oldValue = m_model->getKeyframeModel()->getKeyModel(m_index)->getInterpolatedValue(m_pos);
|
||||
}
|
||||
|
@ -213,9 +213,9 @@ AssetMultiKeyframeCommand::AssetMultiKeyframeCommand(const std::shared_ptr<Asset
|
|||
{
|
||||
const QString id = model->getAssetId();
|
||||
if (EffectsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", EffectsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", EffectsRepository::get()->getName(id))));
|
||||
} else if (TransitionsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", TransitionsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Edit %1 keyframe", TransitionsRepository::get()->getName(id))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,9 +271,9 @@ AssetUpdateCommand::AssetUpdateCommand(const std::shared_ptr<AssetParameterModel
|
|||
{
|
||||
const QString id = model->getAssetId();
|
||||
if (EffectsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Update %1", EffectsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Update %1", EffectsRepository::get()->getName(id))));
|
||||
} else if (TransitionsRepository::get()->exists(id)) {
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Update %1", TransitionsRepository::get()->getName(id))));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18n("Update %1", TransitionsRepository::get()->getName(id))));
|
||||
}
|
||||
m_oldValue = m_model->getAllParameters();
|
||||
}
|
||||
|
|
|
@ -866,7 +866,7 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
|
|||
contentWidth = qRound(frameSize.width() / pCore->getCurrentSar() * factor);
|
||||
}
|
||||
// Center
|
||||
content = QString("%1 %2 %3 %4")
|
||||
content = QStringLiteral("%1 %2 %3 %4")
|
||||
.arg((profileSize.width() - contentWidth) / 2)
|
||||
.arg((profileSize.height() - contentHeight) / 2)
|
||||
.arg(contentWidth)
|
||||
|
@ -916,9 +916,9 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
|
|||
n *= profileSize.height();
|
||||
}
|
||||
ix++;
|
||||
content.append(QString("%1 ").arg(qRound(n)));
|
||||
content.append(QStringLiteral("%1 ").arg(qRound(n)));
|
||||
} else {
|
||||
content.append(QString("%1 ").arg(val));
|
||||
content.append(QStringLiteral("%1 ").arg(val));
|
||||
}
|
||||
}
|
||||
content = content.trimmed();
|
||||
|
@ -1167,7 +1167,7 @@ QJsonDocument AssetParameterModel::toJson(QVector<int> selection, bool includeFi
|
|||
wval = wval * frameSize.width() * 2;
|
||||
double hval = h.split(";").at(i).split("=").at(1).toDouble();
|
||||
hval = hval * frameSize.height() * 2;
|
||||
value.append(QString("%1=%2 %3 %4 %5 1;").arg(pos).arg(int(xval - wval / 2)).arg(int(yval - hval / 2)).arg(int(wval)).arg(int(hval)));
|
||||
value.append(QStringLiteral("%1=%2 %3 %4 %5 1;").arg(pos).arg(int(xval - wval / 2)).arg(int(yval - hval / 2)).arg(int(wval)).arg(int(hval)));
|
||||
}
|
||||
currentParam.insert(QLatin1String("value"), value);
|
||||
currentParam.insert(QLatin1String("type"), QJsonValue(int(ParamType::AnimatedRect)));
|
||||
|
@ -1274,7 +1274,7 @@ QJsonDocument AssetParameterModel::valueAsJson(int pos, bool includeFixed) const
|
|||
y = y * frameSize.height();
|
||||
w = w * frameSize.width() * 2;
|
||||
h = h * frameSize.height() * 2;
|
||||
currentParam.insert(QLatin1String("value"), QString("0=%1 %2 %3 %4 1;").arg(int(x - x / 2)).arg(int(y - y / 2)).arg(int(w)).arg(int(h)));
|
||||
currentParam.insert(QLatin1String("value"), QStringLiteral("0=%1 %2 %3 %4 1;").arg(int(x - x / 2)).arg(int(y - y / 2)).arg(int(w)).arg(int(h)));
|
||||
currentParam.insert(QLatin1String("type"), QJsonValue(int(ParamType::AnimatedRect)));
|
||||
currentParam.insert(QLatin1String("min"), QJsonValue(0));
|
||||
currentParam.insert(QLatin1String("max"), QJsonValue(0));
|
||||
|
|
|
@ -46,7 +46,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
|
|||
setSizePolicy(QSizePolicy::Preferred, addSpacer ? QSizePolicy::Preferred : QSizePolicy::Fixed);
|
||||
const QString paramTag = model->getAssetId();
|
||||
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/presets/"));
|
||||
const QString presetFile = dir.absoluteFilePath(QString("%1.json").arg(paramTag));
|
||||
const QString presetFile = dir.absoluteFilePath(QStringLiteral("%1.json").arg(paramTag));
|
||||
connect(this, &AssetParameterView::updatePresets, this, [this, presetFile](const QString &presetName) {
|
||||
m_presetMenu->clear();
|
||||
m_presetGroup.reset(new QActionGroup(this));
|
||||
|
@ -333,7 +333,7 @@ void AssetParameterView::slotDeletePreset(const QString &presetName)
|
|||
}
|
||||
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/presets/"));
|
||||
if (dir.exists()) {
|
||||
const QString presetFile = dir.absoluteFilePath(QString("%1.json").arg(m_model->getAssetId()));
|
||||
const QString presetFile = dir.absoluteFilePath(QStringLiteral("%1.json").arg(m_model->getAssetId()));
|
||||
m_model->deletePreset(presetFile, presetName);
|
||||
Q_EMIT updatePresets();
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void AssetParameterView::slotSavePreset(QString presetName)
|
|||
if (!dir.exists()) {
|
||||
dir.mkpath(QStringLiteral("."));
|
||||
}
|
||||
const QString presetFile = dir.absoluteFilePath(QString("%1.json").arg(m_model->getAssetId()));
|
||||
const QString presetFile = dir.absoluteFilePath(QStringLiteral("%1.json").arg(m_model->getAssetId()));
|
||||
m_model->savePreset(presetFile, presetName);
|
||||
Q_EMIT updatePresets(presetName);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void AssetParameterView::slotLoadPreset()
|
|||
}
|
||||
const QString presetName = action->data().toString();
|
||||
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/presets/"));
|
||||
const QString presetFile = dir.absoluteFilePath(QString("%1.json").arg(m_model->getAssetId()));
|
||||
const QString presetFile = dir.absoluteFilePath(QStringLiteral("%1.json").arg(m_model->getAssetId()));
|
||||
const QVector<QPair<QString, QVariant>> params = m_model->loadPreset(presetFile, presetName);
|
||||
auto *command = new AssetUpdateCommand(m_model, params);
|
||||
pCore->pushUndo(command);
|
||||
|
|
|
@ -59,7 +59,7 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model,
|
|||
m_progress = new QProgressBar(this);
|
||||
m_progress->setMaximumHeight(m_button->height() / 5);
|
||||
m_progress->setTextVisible(false);
|
||||
m_progress->setStyleSheet(QString("QProgressBar::chunk {background-color: %1;}").arg(m_progress->palette().highlight().color().name()));
|
||||
m_progress->setStyleSheet(QStringLiteral("QProgressBar::chunk {background-color: %1;}").arg(m_progress->palette().highlight().color().name()));
|
||||
layout->addWidget(m_progress);
|
||||
m_progress->setVisible(false);
|
||||
setMinimumHeight(m_button->sizeHint().height());
|
||||
|
@ -92,17 +92,17 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model,
|
|||
n *= pSize.height();
|
||||
}
|
||||
ix++;
|
||||
current.append(QString("%1 ").arg(qRound(n)));
|
||||
current.append(QStringLiteral("%1 ").arg(qRound(n)));
|
||||
} else {
|
||||
current.append(QString("%1 ").arg(val));
|
||||
current.append(QStringLiteral("%1 ").arg(val));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
current = defaultValue;
|
||||
}
|
||||
}
|
||||
// values << QPair<QString, QVariant>(QString("rect"),current);
|
||||
// values << QPair<QString, QVariant>(QString("_reset"),1);
|
||||
// values << QPair<QString, QVariant>(QStringLiteral("rect"),current);
|
||||
// values << QPair<QString, QVariant>(QStringLiteral("_reset"),1);
|
||||
values << QPair<QString, QVariant>(m_keyParam, current);
|
||||
} else {
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@ void KeyframeCurveEditor::updateKeyframeData(double val)
|
|||
QVariant data(val);
|
||||
if (m_rectindex >= 0) {
|
||||
auto rectdata = m_model->getInterpolatedValue(keyframePos, m_paramindex).toString().split(QLatin1Char(' '));
|
||||
rectdata[m_rectindex] = QString("%1").arg(val);
|
||||
rectdata[m_rectindex] = QStringLiteral("%1").arg(val);
|
||||
data = QVariant(rectdata.join(QLatin1Char(' ')));
|
||||
}
|
||||
m_model->updateKeyframe(GenTime(keyframePos, fps), data, m_currentPointIndex, m_paramindex);
|
||||
|
|
|
@ -123,9 +123,9 @@ void MultiSwitchParamWidget::slotRefresh()
|
|||
// Replace -1 with out position
|
||||
int out = m_model->data(m_index, AssetParameterModel::OutRole).toInt() - m_model->data(m_index, AssetParameterModel::InRole).toInt();
|
||||
if (convertToTime) {
|
||||
max.replace(QLatin1String("-1="), QString("%1=").arg(m_model->framesToTime(out)));
|
||||
max.replace(QLatin1String("-1="), QStringLiteral("%1=").arg(m_model->framesToTime(out)));
|
||||
} else {
|
||||
max.replace(QLatin1String("-1="), QString("%1=").arg(out));
|
||||
max.replace(QLatin1String("-1="), QStringLiteral("%1=").arg(out));
|
||||
}
|
||||
}
|
||||
qDebug() << "=== GOT FILTER IN ROLE: " << m_model->data(m_index, AssetParameterModel::InRole).toInt()
|
||||
|
|
|
@ -186,7 +186,7 @@ const QString SlideWidget::getWipeString(wipeInfo info)
|
|||
start = QStringLiteral("0% 0% 100% 100%");
|
||||
break;
|
||||
}
|
||||
start.append(QString(" %1%").arg(info.startTransparency));
|
||||
start.append(QStringLiteral(" %1%").arg(info.startTransparency));
|
||||
|
||||
switch (info.end) {
|
||||
case LEFT:
|
||||
|
@ -205,6 +205,6 @@ const QString SlideWidget::getWipeString(wipeInfo info)
|
|||
end = QStringLiteral("0% 0% 100% 100%");
|
||||
break;
|
||||
}
|
||||
end.append(QString(" %1%").arg(info.endTransparency));
|
||||
return QString("0=%1;-1=%2").arg(start, end);
|
||||
end.append(QStringLiteral(" %1%").arg(info.endTransparency));
|
||||
return QStringLiteral("0=%1;-1=%2").arg(start, end);
|
||||
}
|
||||
|
|
|
@ -204,10 +204,10 @@ void UrlListParamWidget::slotRefresh()
|
|||
// Duplicate name, add a suffix
|
||||
const QString baseName = lumaName;
|
||||
int i = 2;
|
||||
lumaName = baseName + QString(" / %1").arg(i);
|
||||
lumaName = baseName + QStringLiteral(" / %1").arg(i);
|
||||
while (entryMap.contains(lumaName)) {
|
||||
i++;
|
||||
lumaName = baseName + QString(" / %1").arg(i);
|
||||
lumaName = baseName + QStringLiteral(" / %1").arg(i);
|
||||
}
|
||||
}
|
||||
entryMap.insert(lumaName, value);
|
||||
|
|
|
@ -40,7 +40,7 @@ void MixerWidget::property_changed(mlt_service, MixerWidget *widget, mlt_event_d
|
|||
QVector<double> levels;
|
||||
for (int i = 0; i < widget->m_channels; i++) {
|
||||
// NOTE: this is an approximation. To get the real peak level, we need version 2 of audiolevel MLT filter, see property_changedV2
|
||||
levels << log10(mlt_properties_get_double(filter_props, QString("_audio_level.%1").arg(i).toUtf8().constData()) / 1.18) * 20;
|
||||
levels << log10(mlt_properties_get_double(filter_props, QStringLiteral("_audio_level.%1").arg(i).toUtf8().constData()) / 1.18) * 20;
|
||||
}
|
||||
widget->m_levels[pos] = std::move(levels);
|
||||
if (widget->m_levels.size() > widget->m_maxLevels) {
|
||||
|
@ -58,7 +58,7 @@ void MixerWidget::property_changedV2(mlt_service, MixerWidget *widget, mlt_event
|
|||
if (!widget->m_levels.contains(pos)) {
|
||||
QVector<double> levels;
|
||||
for (int i = 0; i < widget->m_channels; i++) {
|
||||
levels << mlt_properties_get_double(filter_props, QString("_audio_level.%1").arg(i).toUtf8().constData());
|
||||
levels << mlt_properties_get_double(filter_props, QStringLiteral("_audio_level.%1").arg(i).toUtf8().constData());
|
||||
}
|
||||
widget->m_levels[pos] = std::move(levels);
|
||||
if (widget->m_levels.size() > widget->m_maxLevels) {
|
||||
|
@ -413,7 +413,7 @@ void MixerWidget::setTrackName(const QString &name)
|
|||
if (name.isEmpty() || m_tid == -1) {
|
||||
m_trackLabel->setText(m_trackTag);
|
||||
} else {
|
||||
m_trackLabel->setText(QString("%1 - %2").arg(m_trackTag, name));
|
||||
m_trackLabel->setText(QStringLiteral("%1 - %2").arg(m_trackTag, name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ void AbstractProjectItem::setRefCount(uint sequenceCount, uint totalCount)
|
|||
m_usageText = QString::number(sequenceCount);
|
||||
}
|
||||
} else {
|
||||
m_usageText = QString("%1|%2").arg(sequenceCount).arg(totalCount);
|
||||
m_usageText = QStringLiteral("%1|%2").arg(sequenceCount).arg(totalCount);
|
||||
}
|
||||
m_currentSequenceUsage = sequenceCount;
|
||||
m_totalUsage = totalCount;
|
||||
|
|
|
@ -304,7 +304,7 @@ public:
|
|||
// Draw usage counter
|
||||
const QString usage = index.data(AbstractProjectItem::UsageCount).toString();
|
||||
if (!usage.isEmpty()) {
|
||||
subText.append(QString(" [%1]").arg(usage));
|
||||
subText.append(QStringLiteral(" [%1]").arg(usage));
|
||||
}
|
||||
painter->drawText(r2, Qt::AlignLeft | Qt::AlignTop, subText, &bounding);
|
||||
// Add audio/video icons for selective drag
|
||||
|
@ -501,12 +501,12 @@ public:
|
|||
// Draw usage counter
|
||||
const QString usage = isFolder ? QString() : index.data(AbstractProjectItem::UsageCount).toString();
|
||||
if (!usage.isEmpty()) {
|
||||
int usageWidth = option.fontMetrics.horizontalAdvance(QString(" [%1]").arg(usage));
|
||||
int usageWidth = option.fontMetrics.horizontalAdvance(QStringLiteral(" [%1]").arg(usage));
|
||||
int availableWidth = textRect.width() - usageWidth;
|
||||
if (option.fontMetrics.horizontalAdvance(itemText) > availableWidth) {
|
||||
itemText = option.fontMetrics.elidedText(itemText, Qt::ElideRight, availableWidth);
|
||||
}
|
||||
itemText.append(QString(" [%1]").arg(usage));
|
||||
itemText.append(QStringLiteral(" [%1]").arg(usage));
|
||||
} else {
|
||||
if (option.fontMetrics.horizontalAdvance(itemText) > textRect.width()) {
|
||||
itemText = option.fontMetrics.elidedText(itemText, Qt::ElideRight, textRect.width());
|
||||
|
@ -2189,7 +2189,7 @@ void Bin::slotDuplicateClip()
|
|||
m_doc->storeGroups(uuid);
|
||||
pCore->projectManager()->syncTimeline(uuid, true);
|
||||
}
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QString("XXXXXX.mlt")));
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.mlt")));
|
||||
src.setAutoRemove(false);
|
||||
if (!src.open()) {
|
||||
pCore->displayMessage(i18n("Could not create temporary file in %1", QDir::temp().absolutePath()), MessageType::ErrorMessage, 500);
|
||||
|
@ -2367,7 +2367,7 @@ void Bin::rebuildFilters(int tagsCount)
|
|||
m_filterMenu->addAction(tagFilter);
|
||||
|
||||
for (int i = 1; i <= tagsCount; i++) {
|
||||
QAction *tag = pCore->window()->actionCollection()->action(QString("tag_%1").arg(i));
|
||||
QAction *tag = pCore->window()->actionCollection()->action(QStringLiteral("tag_%1").arg(i));
|
||||
if (tag) {
|
||||
QAction *tagFilter = new QAction(tag->icon(), tag->text(), &m_filterTagGroup);
|
||||
tagFilter->setData(tag->data());
|
||||
|
@ -2381,7 +2381,7 @@ void Bin::rebuildFilters(int tagsCount)
|
|||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
auto *rateFilter = new QAction(QIcon::fromTheme(QStringLiteral("favorite")), i18np("%1 Star", "%1 Stars", i), &m_filterRateGroup);
|
||||
rateFilter->setData(QString(".%1").arg(2 * i));
|
||||
rateFilter->setData(QStringLiteral(".%1").arg(2 * i));
|
||||
rateFilter->setCheckable(true);
|
||||
m_filterMenu->addAction(rateFilter);
|
||||
}
|
||||
|
@ -5645,7 +5645,7 @@ void Bin::requestSelectionTranscoding(bool forceReplace)
|
|||
ClipType::ProducerType type = clip->clipType();
|
||||
std::pair<int, int> fpsInfo = clip->fpsInfo();
|
||||
int integerFps = qRound(double(fpsInfo.first) / fpsInfo.second);
|
||||
QString suffix = QString("-%1fps").arg(integerFps);
|
||||
QString suffix = QStringLiteral("-%1fps").arg(integerFps);
|
||||
m_transcodingDialog->addUrl(resource, id, suffix, type, QString());
|
||||
} else {
|
||||
m_transcodingDialog->addUrl(clip->clipName(), id, QString(), clip->clipType(), QString());
|
||||
|
@ -5830,7 +5830,7 @@ void Bin::updateKeyBinding(const QString &bindingMessage)
|
|||
|
||||
void Bin::showBinInfo()
|
||||
{
|
||||
pCore->window()->showKeyBinding(QString("%1%2").arg(m_clipsCountMessage, m_keyBindingMessage));
|
||||
pCore->window()->showKeyBinding(QStringLiteral("%1%2").arg(m_clipsCountMessage, m_keyBindingMessage));
|
||||
}
|
||||
|
||||
bool Bin::containsId(const QString &clipId) const
|
||||
|
@ -6323,7 +6323,7 @@ const QString Bin::binInfoToString() const
|
|||
QDockWidget *dock = qobject_cast<QDockWidget *>(parentWidget());
|
||||
QString binInfo;
|
||||
if (dock) {
|
||||
binInfo = QString("%1:%2:%3").arg(dock->objectName(), rootFolderId(), m_listType == BinIconView ? QLatin1String("1") : QLatin1String("0"));
|
||||
binInfo = QStringLiteral("%1:%2:%3").arg(dock->objectName(), rootFolderId(), m_listType == BinIconView ? QLatin1String("1") : QLatin1String("0"));
|
||||
}
|
||||
return binInfo;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ MoveBinClipCommand::MoveBinClipCommand(Bin *bin, QMap<QString, std::pair<QString
|
|||
, m_bin(bin)
|
||||
, m_clipIds(std::move(clipIds))
|
||||
{
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Move Clip")));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Move Clip")));
|
||||
}
|
||||
// virtual
|
||||
void MoveBinClipCommand::undo()
|
||||
|
@ -35,7 +35,7 @@ MoveBinFolderCommand::MoveBinFolderCommand(Bin *bin, QString clipId, QString old
|
|||
, m_oldParentId(std::move(oldParentId))
|
||||
, m_newParentId(std::move(newParentId))
|
||||
{
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Move Clip")));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Move Clip")));
|
||||
}
|
||||
// virtual
|
||||
void MoveBinFolderCommand::undo()
|
||||
|
@ -59,7 +59,7 @@ RenameBinSubClipCommand::RenameBinSubClipCommand(Bin *bin, QString clipId, QStri
|
|||
, m_in(in)
|
||||
, m_out(out)
|
||||
{
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Rename Zone")));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Rename Zone")));
|
||||
}
|
||||
// virtual
|
||||
void RenameBinSubClipCommand::undo()
|
||||
|
@ -83,7 +83,7 @@ EditClipCommand::EditClipCommand(Bin *bin, QString id, QMap<QString, QString> ol
|
|||
, m_doIt(doIt)
|
||||
, m_firstExec(true)
|
||||
{
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Edit Clip")));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(i18nc("@action", "Edit Clip")));
|
||||
}
|
||||
// virtual
|
||||
void EditClipCommand::undo()
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "projectclip.h"
|
||||
#include <mlt++/Mlt.h>
|
||||
|
||||
QString BinPlaylist::binPlaylistId = QString("main_bin");
|
||||
QString BinPlaylist::binPlaylistId = QStringLiteral("main_bin");
|
||||
|
||||
BinPlaylist::BinPlaylist(const QUuid &uuid)
|
||||
: m_binPlaylist(new Mlt::Playlist(pCore->getProjectProfile()))
|
||||
|
|
|
@ -109,7 +109,7 @@ const QStringList MarkerListModel::categoriesToStringList() const
|
|||
QMapIterator<int, Core::MarkerCategory> i(pCore->markerTypes);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
categories << QString("%1:%2:%3").arg(i.value().displayName, QString::number(i.key()), i.value().color.name());
|
||||
categories << QStringLiteral("%1:%2:%3").arg(i.value().displayName, QString::number(i.key()), i.value().color.name());
|
||||
}
|
||||
return categories;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ QStringList MarkerListModel::guideCategoriesToStringList(const QString &categori
|
|||
int ix = entryObj[QLatin1String("index")].toInt();
|
||||
QString comment = entryObj[QLatin1String("comment")].toString();
|
||||
QString color = entryObj[QLatin1String("color")].toString();
|
||||
categories << QString("%1:%2:%3").arg(comment, QString::number(ix), color);
|
||||
categories << QStringLiteral("%1:%2:%3").arg(comment, QString::number(ix), color);
|
||||
}
|
||||
return categories;
|
||||
}
|
||||
|
|
|
@ -1281,7 +1281,7 @@ int SubtitleModel::saveSubtitleData(const QJsonArray &list, const QString &outFi
|
|||
if (outF.open(QIODevice::WriteOnly)) {
|
||||
QTextStream out(&outF);
|
||||
if (assFormat) {
|
||||
out << QString("[Script Info]\n; Script generated by Kdenlive %1\n").arg(KDENLIVE_VERSION);
|
||||
out << QStringLiteral("[Script Info]\n; Script generated by Kdenlive %1\n").arg(KDENLIVE_VERSION);
|
||||
for (const auto &entry : std::as_const(m_scriptInfo)) {
|
||||
out << entry.first + ": " + entry.second + '\n';
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ int SubtitleModel::saveSubtitleData(const QJsonArray &list, const QString &outFi
|
|||
|
||||
out << '\n';
|
||||
|
||||
out << QString("[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, "
|
||||
out << QStringLiteral("[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, "
|
||||
"Italic, Underline, StrikeOut, "
|
||||
"ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\n");
|
||||
for (const auto &entry : std::as_const(m_subtitleStyles)) {
|
||||
|
@ -1308,7 +1308,7 @@ int SubtitleModel::saveSubtitleData(const QJsonArray &list, const QString &outFi
|
|||
|
||||
if (!fontSection.isEmpty()) out << fontSection << '\n';
|
||||
|
||||
out << QString("[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n");
|
||||
out << QStringLiteral("[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n");
|
||||
}
|
||||
for (const auto &entry : std::as_const(list)) {
|
||||
if (!entry.isObject()) {
|
||||
|
@ -2400,7 +2400,7 @@ void SubtitleModel::setActiveSubLayer(int layer)
|
|||
QString SubtitleModel::previewSubtitlePath() const
|
||||
{
|
||||
QString path = pCore->currentDoc()->subTitlePath(m_timeline->uuid(), 0, false);
|
||||
path = path.left(path.lastIndexOf(QString(".ass")));
|
||||
path = path.left(path.lastIndexOf(QStringLiteral(".ass")));
|
||||
path += "-preview.ass";
|
||||
return path;
|
||||
}
|
||||
|
@ -2422,6 +2422,6 @@ const QString SubtitleModel::getLayerDefaultStyle(int layer) const
|
|||
if (m_defaultStyles.size() > layer) {
|
||||
return m_defaultStyles.at(layer);
|
||||
} else {
|
||||
return QString("Default");
|
||||
return QStringLiteral("Default");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -719,7 +719,7 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool gene
|
|||
bool ok;
|
||||
QDir sequenceFolder = pCore->currentDoc()->getCacheDir(CacheTmpWorkFiles, &ok);
|
||||
if (ok) {
|
||||
QString resource = sequenceFolder.absoluteFilePath(QString("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QString resource = sequenceFolder.absoluteFilePath(QStringLiteral("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QFile::remove(resource);
|
||||
}
|
||||
}
|
||||
|
@ -1189,7 +1189,7 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int trackId, int
|
|||
qWarning() << "Cannot write to cache folder: " << sequenceFolder.absolutePath();
|
||||
return nullptr;
|
||||
}
|
||||
resource = sequenceFolder.absoluteFilePath(QString("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
resource = sequenceFolder.absoluteFilePath(QStringLiteral("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
if (!QFileInfo::exists(resource)) {
|
||||
cloneProducerToFile(resource);
|
||||
}
|
||||
|
@ -1208,7 +1208,7 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int trackId, int
|
|||
QString url;
|
||||
QString original_resource;
|
||||
if (m_clipStatus == FileStatus::StatusMissing) {
|
||||
url = QString("timewarp:%1:%2").arg(QString::fromStdString(std::to_string(speed)), QString("qtext"));
|
||||
url = QStringLiteral("timewarp:%1:%2").arg(QString::fromStdString(std::to_string(speed)), QStringLiteral("qtext"));
|
||||
original_resource = originalProducer()->get("resource");
|
||||
|
||||
} else {
|
||||
|
@ -1219,7 +1219,7 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int trackId, int
|
|||
// We must use the special "consumer" producer for mlt playlist files
|
||||
resource.prepend(QStringLiteral("consumer:"));
|
||||
}
|
||||
url = QString("timewarp:%1:%2").arg(QString::fromStdString(std::to_string(speed)), resource);
|
||||
url = QStringLiteral("timewarp:%1:%2").arg(QString::fromStdString(std::to_string(speed)), resource);
|
||||
}
|
||||
warpProducer.reset(new Mlt::Producer(pCore->getProjectProfile(), url.toUtf8().constData()));
|
||||
int original_length = originalProducer()->get_length();
|
||||
|
@ -2180,7 +2180,7 @@ void ProjectClip::discardAudioThumb()
|
|||
QFile::remove(audioThumbPath);
|
||||
}
|
||||
// Clear audio cache
|
||||
QString key = QString("%1:%2").arg(m_binId).arg(st);
|
||||
QString key = QStringLiteral("%1:%2").arg(m_binId).arg(st);
|
||||
pCore->audioThumbCache.insert(key, QByteArray("-"));
|
||||
}
|
||||
// Delete thumbnail
|
||||
|
@ -2234,7 +2234,7 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
|
|||
{
|
||||
if (data.isEmpty()) {
|
||||
// Remove data
|
||||
return QStringList() << QString("kdenlive:clipanalysis." + name) << QString();
|
||||
return QStringList() << QStringLiteral("kdenlive:clipanalysis.%1").arg(name) << QString();
|
||||
// m_controller->resetProperty("kdenlive:clipanalysis." + name);
|
||||
}
|
||||
QString current = getProducerProperty("kdenlive:clipanalysis." + name);
|
||||
|
@ -2255,7 +2255,7 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
|
|||
pos++;
|
||||
geometry.insert(item);
|
||||
}
|
||||
return QStringList() << QString("kdenlive:clipanalysis." + name) << geometry.serialise();
|
||||
return QStringList() << QStringLiteral("kdenlive:clipanalysis.%1").arg(name) << geometry.serialise();
|
||||
// m_controller->setProperty("kdenlive:clipanalysis." + name, geometry.serialise());
|
||||
}*/
|
||||
// Add data with another name
|
||||
|
@ -2265,10 +2265,10 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
|
|||
++i;
|
||||
previous = getProducerProperty("kdenlive:clipanalysis." + name + QString::number(i));
|
||||
}
|
||||
return QStringList() << QString("kdenlive:clipanalysis." + name + QString::number(i)) << geometryWithOffset(data, offset);
|
||||
return QStringList() << QStringLiteral("kdenlive:clipanalysis.%1%2").arg(name).arg(i) << geometryWithOffset(data, offset);
|
||||
// m_controller->setProperty("kdenlive:clipanalysis." + name + QLatin1Char(' ') + QString::number(i), geometryWithOffset(data, offset));
|
||||
}
|
||||
return QStringList() << QString("kdenlive:clipanalysis." + name) << geometryWithOffset(data, offset);
|
||||
return QStringList() << QStringLiteral("kdenlive:clipanalysis.%1").arg(name) << geometryWithOffset(data, offset);
|
||||
// m_controller->setProperty("kdenlive:clipanalysis." + name, geometryWithOffset(data, offset));
|
||||
}
|
||||
|
||||
|
@ -2512,7 +2512,7 @@ bool ProjectClip::selfSoftDelete(Fun &undo, Fun &redo)
|
|||
bool ok;
|
||||
QDir sequenceFolder = pCore->currentDoc()->getCacheDir(CacheTmpWorkFiles, &ok);
|
||||
if (ok) {
|
||||
QString resource = sequenceFolder.absoluteFilePath(QString("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QString resource = sequenceFolder.absoluteFilePath(QStringLiteral("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QFile::remove(resource);
|
||||
}
|
||||
}
|
||||
|
@ -2633,7 +2633,7 @@ void ProjectClip::reloadTimeline(std::shared_ptr<EffectStackModel> stack)
|
|||
bool ok;
|
||||
QDir sequenceFolder = pCore->currentDoc()->getCacheDir(CacheTmpWorkFiles, &ok);
|
||||
if (ok) {
|
||||
QString resource = sequenceFolder.absoluteFilePath(QString("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QString resource = sequenceFolder.absoluteFilePath(QStringLiteral("sequence-%1.mlt").arg(m_sequenceUuid.toString()));
|
||||
QFile::remove(resource);
|
||||
}
|
||||
}
|
||||
|
@ -2823,12 +2823,12 @@ void ProjectClip::setRating(uint rating)
|
|||
|
||||
int ProjectClip::getAudioMax(int stream)
|
||||
{
|
||||
const QString key = QString("kdenlive:audio_max%1").arg(stream);
|
||||
const QString key = QStringLiteral("kdenlive:audio_max%1").arg(stream);
|
||||
if (m_masterProducer->property_exists(key.toUtf8().constData())) {
|
||||
return m_masterProducer->get_int(key.toUtf8().constData());
|
||||
}
|
||||
// Process audio max for the stream
|
||||
const QString key2 = QString("_kdenlive:audio%1").arg(stream);
|
||||
const QString key2 = QStringLiteral("_kdenlive:audio%1").arg(stream);
|
||||
if (!m_masterProducer->property_exists(key2.toUtf8().constData())) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -2851,7 +2851,7 @@ const QVector<uint8_t> ProjectClip::audioFrameCache(int stream)
|
|||
return audioLevels;
|
||||
}
|
||||
}
|
||||
const QString key = QString("_kdenlive:audio%1").arg(stream);
|
||||
const QString key = QStringLiteral("_kdenlive:audio%1").arg(stream);
|
||||
if (m_masterProducer->get_data(key.toUtf8().constData())) {
|
||||
const QVector<uint8_t> audioData = *static_cast<QVector<uint8_t> *>(m_masterProducer->get_data(key.toUtf8().constData()));
|
||||
return audioData;
|
||||
|
@ -2861,7 +2861,7 @@ const QVector<uint8_t> ProjectClip::audioFrameCache(int stream)
|
|||
return QVector<uint8_t>();
|
||||
|
||||
// TODO
|
||||
/*QString key = QString("%1:%2").arg(m_binId).arg(stream);
|
||||
/*QString key = QStringLiteral("%1:%2").arg(m_binId).arg(stream);
|
||||
QByteArray audioData;
|
||||
if (pCore->audioThumbCache.find(key, &audioData)) {
|
||||
if (audioData != QByteArray("-")) {
|
||||
|
@ -2910,7 +2910,7 @@ void ProjectClip::renameAudioStream(int id, const QString &name)
|
|||
{
|
||||
if (m_audioInfo) {
|
||||
m_audioInfo->renameStream(id, name);
|
||||
QString prop = QString("kdenlive:streamname.%1").arg(id);
|
||||
QString prop = QStringLiteral("kdenlive:streamname.%1").arg(id);
|
||||
m_masterProducer->set(prop.toUtf8().constData(), name.toUtf8().constData());
|
||||
if (m_audioInfo->activeStreams().keys().contains(id)) {
|
||||
pCore->bin()->updateTargets(clipId());
|
||||
|
@ -3006,7 +3006,7 @@ void ProjectClip::addAudioStreamEffect(int streamIndex, const QString effectName
|
|||
effects = QStringList({effectName});
|
||||
}
|
||||
m_streamEffects.insert(streamIndex, effects);
|
||||
setProducerProperty(QString("kdenlive:stream:%1").arg(streamIndex), effects.join(QLatin1Char('#')));
|
||||
setProducerProperty(QStringLiteral("kdenlive:stream:%1").arg(streamIndex), effects.join(QLatin1Char('#')));
|
||||
for (auto &p : m_audioProducers) {
|
||||
int stream = p.first / 100;
|
||||
if (stream == streamIndex) {
|
||||
|
@ -3052,10 +3052,10 @@ void ProjectClip::removeAudioStreamEffect(int streamIndex, QString effectName)
|
|||
}
|
||||
if (effects.isEmpty()) {
|
||||
m_streamEffects.remove(streamIndex);
|
||||
resetProducerProperty(QString("kdenlive:stream:%1").arg(streamIndex));
|
||||
resetProducerProperty(QStringLiteral("kdenlive:stream:%1").arg(streamIndex));
|
||||
} else {
|
||||
m_streamEffects.insert(streamIndex, effects);
|
||||
setProducerProperty(QString("kdenlive:stream:%1").arg(streamIndex), effects.join(QLatin1Char('#')));
|
||||
setProducerProperty(QStringLiteral("kdenlive:stream:%1").arg(streamIndex), effects.join(QLatin1Char('#')));
|
||||
}
|
||||
} else {
|
||||
// No effects for this stream, this is not expected, abort
|
||||
|
@ -3147,7 +3147,7 @@ const QStringList ProjectClip::enforcedParams() const
|
|||
QStringList paramNames = {QStringLiteral("rotate"), QStringLiteral("autorotate")};
|
||||
for (auto &name : paramNames) {
|
||||
if (hasProducerProperty(name)) {
|
||||
params << QString("%1=%2").arg(name, getProducerProperty(name));
|
||||
params << QStringLiteral("%1=%2").arg(name, getProducerProperty(name));
|
||||
}
|
||||
}
|
||||
return params;
|
||||
|
@ -3155,7 +3155,7 @@ const QStringList ProjectClip::enforcedParams() const
|
|||
|
||||
const QString ProjectClip::baseThumbPath()
|
||||
{
|
||||
return QString("%1/%2/#").arg(m_binId).arg(m_uuid.toString());
|
||||
return QStringLiteral("%1/%2/#").arg(m_binId).arg(m_uuid.toString());
|
||||
}
|
||||
|
||||
bool ProjectClip::canBeDropped(const QUuid &uuid) const
|
||||
|
|
|
@ -1585,7 +1585,7 @@ const std::pair<QString, QString> ProjectItemModel::sceneList(const QString &roo
|
|||
Mlt::Service s(m_projectTractor->get_service());
|
||||
std::unique_ptr<Mlt::Filter> filter = nullptr;
|
||||
if (!filterData.isEmpty()) {
|
||||
filter = std::make_unique<Mlt::Filter>(pCore->getProjectProfile(), QString("dynamictext:%1").arg(filterData).toUtf8().constData());
|
||||
filter = std::make_unique<Mlt::Filter>(pCore->getProjectProfile(), QStringLiteral("dynamictext:%1").arg(filterData).toUtf8().constData());
|
||||
filter->set("fgcolour", "#ffffff");
|
||||
filter->set("bgcolour", "#bb333333");
|
||||
s.attach(*filter.get());
|
||||
|
|
|
@ -65,7 +65,7 @@ ProjectSubClip::~ProjectSubClip()
|
|||
|
||||
const QString ProjectSubClip::cutClipId() const
|
||||
{
|
||||
return QString("%1/%2/%3").arg(m_parentClipId).arg(m_inPoint).arg(m_outPoint);
|
||||
return QStringLiteral("%1/%2/%3").arg(m_parentClipId).arg(m_inPoint).arg(m_outPoint);
|
||||
}
|
||||
|
||||
void ProjectSubClip::gotThumb(int pos, const QImage &img)
|
||||
|
@ -78,7 +78,7 @@ void ProjectSubClip::gotThumb(int pos, const QImage &img)
|
|||
|
||||
QString ProjectSubClip::getToolTip() const
|
||||
{
|
||||
return QString("%1-%2").arg(m_inPoint).arg(m_outPoint);
|
||||
return QStringLiteral("%1-%2").arg(m_inPoint).arg(m_outPoint);
|
||||
}
|
||||
|
||||
std::shared_ptr<ProjectClip> ProjectSubClip::clip(const QString &id)
|
||||
|
|
|
@ -54,7 +54,7 @@ DragButton::DragButton(int ix, const QString &tag, const QString &description, Q
|
|||
ac->setIcon(QIcon(QPixmap::fromImage(img)));
|
||||
ac->setCheckable(true);
|
||||
setDefaultAction(ac);
|
||||
pCore->window()->addAction(QString("tag_%1").arg(ix), ac, {}, QStringLiteral("bintags"));
|
||||
pCore->window()->addAction(QStringLiteral("tag_%1").arg(ix), ac, {}, QStringLiteral("bintags"));
|
||||
connect(ac, &QAction::triggered, this, [&](bool checked) { Q_EMIT switchTag(m_tag, checked); });
|
||||
}
|
||||
|
||||
|
|
|
@ -1369,9 +1369,9 @@ void Core::updateProjectTags(int previousCount, const QMap<int, QStringList> &ta
|
|||
if (previousCount > tags.size()) {
|
||||
// Clear previous tags
|
||||
for (int i = 1; i <= previousCount; i++) {
|
||||
QString current = currentDoc()->getDocumentProperty(QString("tag%1").arg(i));
|
||||
QString current = currentDoc()->getDocumentProperty(QStringLiteral("tag%1").arg(i));
|
||||
if (!current.isEmpty()) {
|
||||
currentDoc()->setDocumentProperty(QString("tag%1").arg(i), QString());
|
||||
currentDoc()->setDocumentProperty(QStringLiteral("tag%1").arg(i), QString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1379,7 +1379,7 @@ void Core::updateProjectTags(int previousCount, const QMap<int, QStringList> &ta
|
|||
int i = 1;
|
||||
while (j.hasNext()) {
|
||||
j.next();
|
||||
currentDoc()->setDocumentProperty(QString("tag%1").arg(i), QString("%1:%2").arg(j.value().at(1), j.value().at(2)));
|
||||
currentDoc()->setDocumentProperty(QStringLiteral("tag%1").arg(i), QStringLiteral("%1:%2").arg(j.value().at(1), j.value().at(2)));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -403,22 +403,22 @@ QString SubtitleStyle::toString(QString name) const
|
|||
.arg(name)
|
||||
.arg(m_fontName)
|
||||
.arg(m_fontSize, 0, 'f', 2)
|
||||
.arg("&H" + QString("%1").arg(QString::number(255 - m_primaryColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_primaryColour.blue(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_primaryColour.green(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_primaryColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QString("%1").arg(QString::number(255 - m_secondaryColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_secondaryColour.blue(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_secondaryColour.green(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_secondaryColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QString("%1").arg(QString::number(255 - m_outlineColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_outlineColour.blue(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_outlineColour.green(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_outlineColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QString("%1").arg(QString::number(255 - m_backColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_backColour.blue(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_backColour.green(), 16), 2, '0').toUpper() +
|
||||
QString("%1").arg(QString::number(m_backColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QStringLiteral("%1").arg(QString::number(255 - m_primaryColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_primaryColour.blue(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_primaryColour.green(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_primaryColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QStringLiteral("%1").arg(QString::number(255 - m_secondaryColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_secondaryColour.blue(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_secondaryColour.green(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_secondaryColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QStringLiteral("%1").arg(QString::number(255 - m_outlineColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_outlineColour.blue(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_outlineColour.green(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_outlineColour.red(), 16), 2, '0').toUpper())
|
||||
.arg("&H" + QStringLiteral("%1").arg(QString::number(255 - m_backColour.alpha(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_backColour.blue(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_backColour.green(), 16), 2, '0').toUpper() +
|
||||
QStringLiteral("%1").arg(QString::number(m_backColour.red(), 16), 2, '0').toUpper())
|
||||
.arg(m_bold ? -1 : 0)
|
||||
.arg(m_italic ? -1 : 0)
|
||||
.arg(m_underline ? -1 : 0)
|
||||
|
|
|
@ -164,7 +164,7 @@ void ClipCreationDialog::createAnimationClip(KdenliveDoc *doc, const QString &pa
|
|||
.arg(pCore->getCurrentFrameSize().width())
|
||||
.arg(pCore->getCurrentFrameSize().height());
|
||||
/*const QString templateJson =
|
||||
QString("{\"v\":\"5.7.1\",\"ip\":0,\"op\":%1,\"nm\":\"Animation\",\"mn\":\"{c9eac49f-b1f0-482f-a8d8-302293bd1e46}\",\"fr\":%2,\"w\":%3,\"h\":%4,"
|
||||
QStringLiteral("{\"v\":\"5.7.1\",\"ip\":0,\"op\":%1,\"nm\":\"Animation\",\"mn\":\"{c9eac49f-b1f0-482f-a8d8-302293bd1e46}\",\"fr\":%2,\"w\":%3,\"h\":%4,"
|
||||
"\"assets\":[],\"layers\":[{\"ddd\":0,\"ty\":3,\"ind\":0,\"st\":0,\"ip\":0,\"op\":90,\"nm\":\"Layer\",\"mn\":\"{4d7c9721-b5ef-4075-a89c-"
|
||||
"c4c5629423db}\",\"ks\":{\"a\":{\"a\":0,\"k\":[960,540]},\"p\":{\"a\":0,\"k\":[960,540]},\"s\":{\"a\":0,\"k\":[100,100]},\"r\":{\"a\":0,\"k\":"
|
||||
"0},\"o\":{\"a\":0,\"k\":100}}}],\"meta\":{\"g\":\"Glaxnimate 0.5.0-52-g36d6269d\"}}")
|
||||
|
@ -359,7 +359,7 @@ do?", file.path()), i18n("Clip already exists")) == KMessageBox::Cancel)
|
|||
if (isOnRemovableDevice(file) && !isOnRemovableDevice(m_doc->projectFolder())) {
|
||||
int answer = KMessageBox::warningYesNoCancel(QApplication::activeWindow(), i18n("Clip <b>%1</b><br /> is on a removable device, will not be
|
||||
available when device is unplugged", file.path()), i18n("File on a Removable Device"), KGuiItem(i18n("Copy file to project folder")),
|
||||
KGuiItem(i18n("Continue")), KStandardGuiItem::cancel(), QString("copyFilesToProjectFolder"));
|
||||
KGuiItem(i18n("Continue")), KStandardGuiItem::cancel(), QStringLiteral("copyFilesToProjectFolder"));
|
||||
|
||||
if (answer == KMessageBox::Cancel) continue;
|
||||
else if (answer == KMessageBox::Yes) {
|
||||
|
|
|
@ -279,7 +279,7 @@ QMap<QString, QString> ClipJobManager::getClipJobNames()
|
|||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (!i.value().isEmpty()) {
|
||||
newIds.insert(QString("%1;%2").arg(i.key(), id2s.value(i.key())), i.value());
|
||||
newIds.insert(QStringLiteral("%1;%2").arg(i.key(), id2s.value(i.key())), i.value());
|
||||
}
|
||||
}
|
||||
// Add the 3 internal jobs
|
||||
|
|
|
@ -73,7 +73,7 @@ ExportGuidesDialog::ExportGuidesDialog(const MarkerListModel *model, const GenTi
|
|||
});
|
||||
|
||||
connect(btn2, &QAbstractButton::clicked, this, [this]() {
|
||||
QString filter = format_text->isChecked() ? QString("%1 (*.txt)").arg(i18n("Text File")) : QString("%1 (*.json)").arg(i18n("JSON File"));
|
||||
QString filter = format_text->isChecked() ? QStringLiteral("%1 (*.txt)").arg(i18n("Text File")) : QStringLiteral("%1 (*.json)").arg(i18n("JSON File"));
|
||||
const QString startFolder = pCore->projectManager()->current()->projectDataFolder();
|
||||
QString filename = QFileDialog::getSaveFileName(this, i18nc("@title:window", "Export Guides Data"), startFolder, filter);
|
||||
QFile file(filename);
|
||||
|
@ -121,7 +121,7 @@ ExportGuidesDialog::ExportGuidesDialog(const MarkerListModel *model, const GenTi
|
|||
while (i.hasNext()) {
|
||||
i.next();
|
||||
a = new QAction(this);
|
||||
a->setText(QString("%1 - %2").arg(i.value(), i.key()));
|
||||
a->setText(QStringLiteral("%1 - %2").arg(i.value(), i.key()));
|
||||
a->setData(i.key());
|
||||
infoButton->addAction(a);
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ void KdenliveSettingsDialog::initProjectPage()
|
|||
m_configProject.setupUi(p9);
|
||||
// Timeline preview
|
||||
QString currentPreviewData =
|
||||
KdenliveSettings::previewparams().isEmpty() ? QString() : QString("%1;%2").arg(KdenliveSettings::previewparams(), KdenliveSettings::previewextension());
|
||||
KdenliveSettings::previewparams().isEmpty() ? QString() : QStringLiteral("%1;%2").arg(KdenliveSettings::previewparams(), KdenliveSettings::previewextension());
|
||||
m_tlPreviewProfiles = new EncodingTimelinePreviewProfilesChooser(p9, true, currentPreviewData, false);
|
||||
m_configProject.preview_profile_box->addWidget(m_tlPreviewProfiles);
|
||||
auto *vbox = new QVBoxLayout;
|
||||
|
@ -822,14 +822,14 @@ void KdenliveSettingsDialog::fillMonitorData()
|
|||
m_configSdl.fullscreen_monitor->addItem(i18n("auto"));
|
||||
int ix = 0;
|
||||
for (const QScreen *screen : qApp->screens()) {
|
||||
QString screenName = screen->name().isEmpty() ? i18n("Monitor %1", ix + 1) : QString("%1: %2").arg(ix + 1).arg(screen->name());
|
||||
QString screenName = screen->name().isEmpty() ? i18n("Monitor %1", ix + 1) : QStringLiteral("%1: %2").arg(ix + 1).arg(screen->name());
|
||||
if (!screen->model().isEmpty()) {
|
||||
screenName.append(QString(" - %1").arg(screen->model()));
|
||||
screenName.append(QStringLiteral(" - %1").arg(screen->model()));
|
||||
}
|
||||
if (!screen->manufacturer().isEmpty()) {
|
||||
screenName.append(QString(" (%1)").arg(screen->manufacturer()));
|
||||
screenName.append(QStringLiteral(" (%1)").arg(screen->manufacturer()));
|
||||
}
|
||||
m_configSdl.fullscreen_monitor->addItem(screenName, QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
m_configSdl.fullscreen_monitor->addItem(screenName, QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
ix++;
|
||||
}
|
||||
if (!KdenliveSettings::fullscreen_monitor().isEmpty()) {
|
||||
|
|
|
@ -108,7 +108,7 @@ void ProxyTest::startTest()
|
|||
QMapIterator<QString, QString> k(values);
|
||||
int proxyResize = pCore->currentDoc()->getDocumentProperty(QStringLiteral("proxyresize")).toInt();
|
||||
QElapsedTimer timer;
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QString("XXXXXX.mov")));
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.mov")));
|
||||
if (!src.open()) {
|
||||
// Something went wrong
|
||||
QMetaObject::invokeMethod(this, "showMessage", Qt::QueuedConnection, Q_ARG(QString, i18n("Cannot create temporary files")));
|
||||
|
@ -145,7 +145,7 @@ void ProxyTest::startTest()
|
|||
QString params = k.value().section(QLatin1Char(';'), 0, 0);
|
||||
QString extension = k.value().section(QLatin1Char(';'), 1, 1);
|
||||
// Testing vaapi support
|
||||
QTemporaryFile tmp(QDir::temp().absoluteFilePath(QString("XXXXXX.%1").arg(extension)));
|
||||
QTemporaryFile tmp(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.%1").arg(extension)));
|
||||
if (!tmp.open()) {
|
||||
// Something went wrong
|
||||
QMetaObject::invokeMethod(this, "showMessage", Qt::QueuedConnection, Q_ARG(QString, i18n("Cannot create temporary files")));
|
||||
|
@ -156,7 +156,7 @@ void ProxyTest::startTest()
|
|||
if (params.contains(QStringLiteral("%frameSize"))) {
|
||||
int w = proxyResize;
|
||||
int h = w * 1080 / 1920;
|
||||
params.replace(QStringLiteral("%frameSize"), QString("%1x%2").arg(w).arg(h));
|
||||
params.replace(QStringLiteral("%frameSize"), QStringLiteral("%1x%2").arg(w).arg(h));
|
||||
}
|
||||
params.replace(QStringLiteral("%nvcodec"), QStringLiteral("h264_cuvid"));
|
||||
m_process.reset(new QProcess());
|
||||
|
|
|
@ -1964,7 +1964,7 @@ void RenderWidget::updateMetadataToolTip()
|
|||
i.next();
|
||||
QString metaName = i.key().section(QLatin1Char('.'), 2, 2);
|
||||
metaName[0] = metaName[0].toUpper();
|
||||
tipText.append(QString("%1: <b>%2</b><br/>").arg(metaName, i.value()));
|
||||
tipText.append(QStringLiteral("%1: <b>%2</b><br/>").arg(metaName, i.value()));
|
||||
}
|
||||
m_view.edit_metadata->setToolTip(tipText);
|
||||
}
|
||||
|
|
|
@ -1473,22 +1473,22 @@ void SubtitleEdit::slotSelectFont()
|
|||
QString newText = text;
|
||||
|
||||
if (newText.contains(fontNameRegex)) {
|
||||
newText.replace(fontNameRegex, QString("\\fn%1").arg(fontName));
|
||||
newText.replace(fontNameRegex, QStringLiteral("\\fn%1").arg(fontName));
|
||||
} else {
|
||||
newText.insert(newText.length() - 1, QString("\\fn%1").arg(fontName));
|
||||
newText.insert(newText.length() - 1, QStringLiteral("\\fn%1").arg(fontName));
|
||||
}
|
||||
|
||||
if (newText.contains(sizeRegex)) {
|
||||
newText.replace(sizeRegex, QString("\\fs%1").arg(fontSize));
|
||||
newText.replace(sizeRegex, QStringLiteral("\\fs%1").arg(fontSize));
|
||||
} else {
|
||||
newText.insert(newText.length() - 1, QString("\\fs%1").arg(fontSize));
|
||||
newText.insert(newText.length() - 1, QStringLiteral("\\fs%1").arg(fontSize));
|
||||
}
|
||||
|
||||
if (!bold) {
|
||||
if (newText.contains(fontWeightRegex)) {
|
||||
newText.replace(fontWeightRegex, QString("\\b%1").arg(fontWeight));
|
||||
newText.replace(fontWeightRegex, QStringLiteral("\\b%1").arg(fontWeight));
|
||||
} else {
|
||||
newText.insert(newText.length() - 1, QString("\\b%1").arg(fontWeight));
|
||||
newText.insert(newText.length() - 1, QStringLiteral("\\b%1").arg(fontWeight));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ void SubtitleEdit::slotSelectFont()
|
|||
|
||||
cursor.insertText(newText);
|
||||
} else {
|
||||
cursor.insertText(QString("{\\fn%1\\fs%2\\b%3\\i%4\\u%5\\s%6}")
|
||||
cursor.insertText(QStringLiteral("{\\fn%1\\fs%2\\b%3\\i%4\\u%5\\s%6}")
|
||||
.arg(fontName)
|
||||
.arg(fontSize)
|
||||
.arg(fontWeight)
|
||||
|
@ -1585,9 +1585,9 @@ void SubtitleEdit::slotResetStyle()
|
|||
cursor.setPosition(right, QTextCursor::KeepAnchor);
|
||||
|
||||
if (styleRegex.match(text).hasMatch()) {
|
||||
text.replace(styleRegex.match(text).captured(0), QString("\\r%1").arg(newStyle));
|
||||
text.replace(styleRegex.match(text).captured(0), QStringLiteral("\\r%1").arg(newStyle));
|
||||
} else {
|
||||
text.insert(text.length() - 1, QString("\\r%1").arg(newStyle));
|
||||
text.insert(text.length() - 1, QStringLiteral("\\r%1").arg(newStyle));
|
||||
}
|
||||
cursor.insertText(text);
|
||||
} else {
|
||||
|
@ -1598,7 +1598,7 @@ void SubtitleEdit::slotResetStyle()
|
|||
cursor.setPosition(left, QTextCursor::MoveAnchor);
|
||||
cursor.setPosition(right, QTextCursor::KeepAnchor);
|
||||
|
||||
cursor.insertText(QString("{\\r%1}").arg(newStyle));
|
||||
cursor.insertText(QStringLiteral("{\\r%1}").arg(newStyle));
|
||||
}
|
||||
} else {
|
||||
// if text selected
|
||||
|
@ -1626,13 +1626,13 @@ void SubtitleEdit::slotResetStyle()
|
|||
|
||||
if (leftTagsBlock.hasSelection()) {
|
||||
if (styleRegex.match(leftText).hasMatch()) {
|
||||
leftText.replace(styleRegex.match(leftText).captured(0), QString("\\r%1").arg(newStyle));
|
||||
leftText.replace(styleRegex.match(leftText).captured(0), QStringLiteral("\\r%1").arg(newStyle));
|
||||
} else {
|
||||
leftText.insert(leftText.length() - 1, QString("\\r%1").arg(newStyle));
|
||||
leftText.insert(leftText.length() - 1, QStringLiteral("\\r%1").arg(newStyle));
|
||||
}
|
||||
leftTagsBlock.insertText(leftText);
|
||||
} else {
|
||||
leftTagsBlock.insertText(QString("{\\r%1}").arg(newStyle));
|
||||
leftTagsBlock.insertText(QStringLiteral("{\\r%1}").arg(newStyle));
|
||||
}
|
||||
|
||||
if (leftTagsBlock != rightTagsBlock) {
|
||||
|
@ -1642,11 +1642,11 @@ void SubtitleEdit::slotResetStyle()
|
|||
;
|
||||
} else {
|
||||
// insert \r to make new style only take effect between the selected text
|
||||
rightText.insert(rightText.length() - 1, QString("\\r"));
|
||||
rightText.insert(rightText.length() - 1, QStringLiteral("\\r"));
|
||||
}
|
||||
rightTagsBlock.insertText(rightText);
|
||||
} else {
|
||||
rightTagsBlock.insertText(QString("{\\r}"));
|
||||
rightTagsBlock.insertText(QStringLiteral("{\\r}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1678,9 +1678,9 @@ void SubtitleEdit::slotSetPosition()
|
|||
int y = QInputDialog::getInt(this, i18n("Set Position Y"), i18n("Y:"), subPos.second, 0, 9999, 1, &ok);
|
||||
if (ok) {
|
||||
if (match.hasMatch()) {
|
||||
text.replace(posRegex, QString("\\pos(%1,%2)").arg(x).arg(y));
|
||||
text.replace(posRegex, QStringLiteral("\\pos(%1,%2)").arg(x).arg(y));
|
||||
} else {
|
||||
text.insert(text.length() - 1, QString("\\pos(%1,%2)").arg(x).arg(y));
|
||||
text.insert(text.length() - 1, QStringLiteral("\\pos(%1,%2)").arg(x).arg(y));
|
||||
}
|
||||
cursor.insertText(text);
|
||||
}
|
||||
|
@ -1691,7 +1691,7 @@ void SubtitleEdit::slotSetPosition()
|
|||
if (ok) {
|
||||
int y = QInputDialog::getInt(this, i18n("Set Position Y"), i18n("Y:"), subPos.second, 0, 9999, 1, &ok);
|
||||
if (ok) {
|
||||
cursor.insertText(QString("{\\pos(%1,%2)}").arg(x).arg(y));
|
||||
cursor.insertText(QStringLiteral("{\\pos(%1,%2)}").arg(x).arg(y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ SubtitleStyleEdit::SubtitleStyleEdit(QWidget *parent)
|
|||
connect(buttonPrimaryColor, &QPushButton::clicked, this, [this]() {
|
||||
QColor color = QColorDialog::getColor(m_style.primaryColour(), this, tr("Select primary color"), QColorDialog::ShowAlphaChannel);
|
||||
if (color.isValid()) {
|
||||
buttonPrimaryColor->setStyleSheet(QString("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
buttonPrimaryColor->setStyleSheet(QStringLiteral("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
updateProperties();
|
||||
}
|
||||
});
|
||||
|
@ -62,7 +62,7 @@ SubtitleStyleEdit::SubtitleStyleEdit(QWidget *parent)
|
|||
connect(buttonSecondaryColor, &QPushButton::clicked, this, [this]() {
|
||||
QColor color = QColorDialog::getColor(m_style.secondaryColour(), this, tr("Select secondary color"), QColorDialog::ShowAlphaChannel);
|
||||
if (color.isValid()) {
|
||||
buttonSecondaryColor->setStyleSheet(QString("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
buttonSecondaryColor->setStyleSheet(QStringLiteral("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
updateProperties();
|
||||
}
|
||||
});
|
||||
|
@ -70,7 +70,7 @@ SubtitleStyleEdit::SubtitleStyleEdit(QWidget *parent)
|
|||
connect(buttonOutlineColor, &QPushButton::clicked, this, [this]() {
|
||||
QColor color = QColorDialog::getColor(m_style.outlineColour(), this, tr("Select outline color"), QColorDialog::ShowAlphaChannel);
|
||||
if (color.isValid()) {
|
||||
buttonOutlineColor->setStyleSheet(QString("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
buttonOutlineColor->setStyleSheet(QStringLiteral("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
updateProperties();
|
||||
}
|
||||
});
|
||||
|
@ -78,7 +78,7 @@ SubtitleStyleEdit::SubtitleStyleEdit(QWidget *parent)
|
|||
connect(buttonBackColor, &QPushButton::clicked, this, [this]() {
|
||||
QColor color = QColorDialog::getColor(m_style.backColour(), this, tr("Select background color"), QColorDialog::ShowAlphaChannel);
|
||||
if (color.isValid()) {
|
||||
buttonBackColor->setStyleSheet(QString("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
buttonBackColor->setStyleSheet(QStringLiteral("background-color: %1").arg(color.name(QColor::HexArgb)));
|
||||
updateProperties();
|
||||
}
|
||||
});
|
||||
|
@ -215,10 +215,10 @@ void SubtitleStyleEdit::setProperties(const SubtitleStyle &style, const QString
|
|||
checkUnderline->setChecked(style.underline());
|
||||
checkStrikeOut->setChecked(style.strikeOut());
|
||||
|
||||
buttonPrimaryColor->setStyleSheet(QString("background-color: %1").arg(style.primaryColour().name(QColor::HexArgb)));
|
||||
buttonSecondaryColor->setStyleSheet(QString("background-color: %1").arg(style.secondaryColour().name(QColor::HexArgb)));
|
||||
buttonOutlineColor->setStyleSheet(QString("background-color: %1").arg(style.outlineColour().name(QColor::HexArgb)));
|
||||
buttonBackColor->setStyleSheet(QString("background-color: %1").arg(style.backColour().name(QColor::HexArgb)));
|
||||
buttonPrimaryColor->setStyleSheet(QStringLiteral("background-color: %1").arg(style.primaryColour().name(QColor::HexArgb)));
|
||||
buttonSecondaryColor->setStyleSheet(QStringLiteral("background-color: %1").arg(style.secondaryColour().name(QColor::HexArgb)));
|
||||
buttonOutlineColor->setStyleSheet(QStringLiteral("background-color: %1").arg(style.outlineColour().name(QColor::HexArgb)));
|
||||
buttonBackColor->setStyleSheet(QStringLiteral("background-color: %1").arg(style.backColour().name(QColor::HexArgb)));
|
||||
|
||||
spinMarginL->setValue(style.marginL());
|
||||
spinMarginR->setValue(style.marginR());
|
||||
|
@ -246,7 +246,7 @@ void SubtitleStyleEdit::setProperties(const SubtitleStyle &style, const QString
|
|||
// create a new subtitle file
|
||||
m_previewFile.setFileName(m_previewPath);
|
||||
m_previewFile.open(QIODevice::WriteOnly);
|
||||
QString fileContent = QString("[Script Info]\n; Script generated by Kdenlive for preview purpose\nScriptType: v4.00+\n"
|
||||
QString fileContent = QStringLiteral("[Script Info]\n; Script generated by Kdenlive for preview purpose\nScriptType: v4.00+\n"
|
||||
"PlayResX: %1\nPlayResY: %2\nLayoutResX: %3\nLayoutResY: %4\nWrapStyle: 0\n"
|
||||
"ScaledBorderAndShadow: yes\nYCbCr Matrix: None\n\n"
|
||||
"[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, "
|
||||
|
@ -316,7 +316,7 @@ void SubtitleStyleEdit::updateProperties()
|
|||
|
||||
m_previewFile.setFileName(m_previewPath);
|
||||
m_previewFile.open(QIODevice::WriteOnly);
|
||||
QString fileContent = QString("[Script Info]\n; Script generated by Kdenlive for preview purpose\nScriptType: v4.00+\n"
|
||||
QString fileContent = QStringLiteral("[Script Info]\n; Script generated by Kdenlive for preview purpose\nScriptType: v4.00+\n"
|
||||
"PlayResX: %1\nPlayResY: %2\nLayoutResX: %3\nLayoutResY: %4\nWrapStyle: 0\n"
|
||||
"ScaledBorderAndShadow: yes\nYCbCr Matrix: None\n\n"
|
||||
"[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, "
|
||||
|
|
|
@ -66,7 +66,7 @@ void VideoTextEdit::cleanup()
|
|||
cutZones.clear();
|
||||
m_hoveredBlock = -1;
|
||||
clear();
|
||||
document()->setDefaultStyleSheet(QString("a {text-decoration:none;color:%1}").arg(palette().text().color().name()));
|
||||
document()->setDefaultStyleSheet(QStringLiteral("a {text-decoration:none;color:%1}").arg(palette().text().color().name()));
|
||||
setCurrentFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ void TextBasedEdit::startRecognition()
|
|||
speech_progress->setValue(percent);
|
||||
});
|
||||
m_tCodeJob->start(KdenliveSettings::meltpath(),
|
||||
{QStringLiteral("-progress"), m_sourceUrl, QStringLiteral("-consumer"), QString("avformat:%1").arg(m_playlistWav.fileName()),
|
||||
{QStringLiteral("-progress"), m_sourceUrl, QStringLiteral("-consumer"), QStringLiteral("avformat:%1").arg(m_playlistWav.fileName()),
|
||||
QStringLiteral("vn=1"), QStringLiteral("ar=16000")});
|
||||
speech_progress->setValue(0);
|
||||
frame_progress->setVisible(true);
|
||||
|
@ -1178,7 +1178,7 @@ void TextBasedEdit::slotProcessSpeechStatus(int, QProcess::ExitStatus status)
|
|||
m_visualEditor->moveCursor(QTextCursor::End);
|
||||
QTextCursor cursor = m_visualEditor->textCursor();
|
||||
QTextCharFormat fmt = cursor.charFormat();
|
||||
fmt.setAnchorHref(QString("%1#%2:%3").arg(m_binId).arg(silenceStart.seconds()).arg(GenTime(m_clipDuration + m_clipOffset).seconds()));
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3").arg(m_binId).arg(silenceStart.seconds()).arg(GenTime(m_clipDuration + m_clipOffset).seconds()));
|
||||
fmt.setAnchor(true);
|
||||
cursor.insertText(i18n("No speech"), fmt);
|
||||
m_visualEditor->textCursor().insertBlock(cursor.blockFormat());
|
||||
|
@ -1245,7 +1245,7 @@ void TextBasedEdit::slotProcessWhisperSpeech()
|
|||
// Insert space
|
||||
GenTime silenceStart(m_lastPosition, pCore->getCurrentFps());
|
||||
m_visualEditor->moveCursor(QTextCursor::End);
|
||||
fmt.setAnchorHref(QString("%1#%2:%3")
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3")
|
||||
.arg(m_binId)
|
||||
.arg(silenceStart.seconds())
|
||||
.arg(GenTime(sentenceStart.frames(pCore->getCurrentFps()) - 1, pCore->getCurrentFps()).seconds()));
|
||||
|
@ -1269,7 +1269,7 @@ void TextBasedEdit::slotProcessWhisperSpeech()
|
|||
if (nextSentence.frames(pCore->getCurrentFps()) > lastSentence.frames(pCore->getCurrentFps()) + 1) {
|
||||
// Insert space
|
||||
m_visualEditor->moveCursor(QTextCursor::End);
|
||||
fmt.setAnchorHref(QString("%1#%2:%3")
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3")
|
||||
.arg(m_binId)
|
||||
.arg(lastSentence.seconds())
|
||||
.arg(GenTime(nextSentence.frames(pCore->getCurrentFps()) - 1, pCore->getCurrentFps()).seconds()));
|
||||
|
@ -1284,7 +1284,7 @@ void TextBasedEdit::slotProcessWhisperSpeech()
|
|||
continue;
|
||||
}
|
||||
fmt.setAnchor(true);
|
||||
fmt.setAnchorHref(QString("%1#%2:%3").arg(m_binId).arg(wordZone.first).arg(wordZone.second));
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3").arg(m_binId).arg(wordZone.first).arg(wordZone.second));
|
||||
cursor.insertText(text, fmt);
|
||||
fmt.setAnchor(false);
|
||||
cursor.insertText(QStringLiteral(" "), fmt);
|
||||
|
@ -1326,7 +1326,7 @@ void TextBasedEdit::slotProcessSpeech()
|
|||
// Insert space
|
||||
GenTime silenceStart(m_lastPosition, pCore->getCurrentFps());
|
||||
m_visualEditor->moveCursor(QTextCursor::End);
|
||||
fmt.setAnchorHref(QString("%1#%2:%3")
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3")
|
||||
.arg(m_binId)
|
||||
.arg(silenceStart.seconds())
|
||||
.arg(GenTime(startPos.frames(pCore->getCurrentFps()) - 1, pCore->getCurrentFps()).seconds()));
|
||||
|
@ -1350,7 +1350,7 @@ void TextBasedEdit::slotProcessSpeech()
|
|||
for (const QJsonValue &v : obj2) {
|
||||
textFound = true;
|
||||
fmt.setAnchor(true);
|
||||
fmt.setAnchorHref(QString("%1#%2:%3")
|
||||
fmt.setAnchorHref(QStringLiteral("%1#%2:%3")
|
||||
.arg(m_binId)
|
||||
.arg(v.toObject().value("start").toDouble() + m_clipOffset)
|
||||
.arg(v.toObject().value("end").toDouble() + m_clipOffset));
|
||||
|
@ -1473,15 +1473,15 @@ void TextBasedEdit::previewPlaylist(bool createNew)
|
|||
properties.insert(QStringLiteral("kdenlive:baseid"), m_binId);
|
||||
QStringList playZones;
|
||||
for (const auto &p : std::as_const(zones)) {
|
||||
playZones << QString("%1:%2").arg(p.x()).arg(p.y());
|
||||
playZones << QStringLiteral("%1:%2").arg(p.x()).arg(p.y());
|
||||
}
|
||||
properties.insert(QStringLiteral("kdenlive:cutzones"), playZones.join(QLatin1Char(';')));
|
||||
if (createNew) {
|
||||
int ix = 1;
|
||||
m_playlist = QString("%1-cut%2.kdenlive").arg(sourcePath).arg(ix);
|
||||
m_playlist = QStringLiteral("%1-cut%2.kdenlive").arg(sourcePath).arg(ix);
|
||||
while (QFile::exists(m_playlist)) {
|
||||
ix++;
|
||||
m_playlist = QString("%1-cut%2.kdenlive").arg(sourcePath).arg(ix);
|
||||
m_playlist = QStringLiteral("%1-cut%2.kdenlive").arg(sourcePath).arg(ix);
|
||||
}
|
||||
QUrl url = KUrlRequesterDialog::getUrl(QUrl::fromLocalFile(m_playlist), this, i18n("Enter new playlist path"));
|
||||
if (url.isEmpty()) {
|
||||
|
|
|
@ -1235,7 +1235,7 @@ const QString RemapView::getKeyframesData(QMap<int, int> keyframes) const
|
|||
// HACK: we always set last keyframe 1 frame after in MLT to ensure we have a correct last frame
|
||||
offset = 1;
|
||||
}
|
||||
result << QString("%1=%2").arg(props.frames_to_time(i.key() + offset, mlt_time_clock)).arg(GenTime(i.value(), pCore->getCurrentFps()).seconds());
|
||||
result << QStringLiteral("%1=%2").arg(props.frames_to_time(i.key() + offset, mlt_time_clock)).arg(GenTime(i.value(), pCore->getCurrentFps()).seconds());
|
||||
}
|
||||
return result.join(QLatin1Char(';'));
|
||||
}
|
||||
|
|
|
@ -431,9 +431,9 @@ void Wizard::slotCheckPrograms(QString &infos, QString &warnings, QString &error
|
|||
const QStringList mltpath({QFileInfo(KdenliveSettings::meltpath()).canonicalPath(), qApp->applicationDirPath()});
|
||||
QString exepath;
|
||||
if (KdenliveSettings::ffmpegpath().isEmpty() || !QFileInfo::exists(KdenliveSettings::ffmpegpath())) {
|
||||
exepath = QStandardPaths::findExecutable(QString("ffmpeg%1").arg(FFMPEG_SUFFIX), mltpath);
|
||||
exepath = QStandardPaths::findExecutable(QStringLiteral("ffmpeg%1").arg(FFMPEG_SUFFIX), mltpath);
|
||||
if (exepath.isEmpty()) {
|
||||
exepath = QStandardPaths::findExecutable(QString("ffmpeg%1").arg(FFMPEG_SUFFIX));
|
||||
exepath = QStandardPaths::findExecutable(QStringLiteral("ffmpeg%1").arg(FFMPEG_SUFFIX));
|
||||
}
|
||||
qDebug() << "Found FFMpeg binary: " << exepath;
|
||||
if (exepath.isEmpty()) {
|
||||
|
|
|
@ -975,7 +975,7 @@ QString DocumentChecker::getMissingProducers(QDomElement &e, const QDomNodeList
|
|||
return original;
|
||||
}
|
||||
}
|
||||
bool isPreviewChunk = QFileInfo(resource).absolutePath().endsWith(QString("/%1/preview").arg(m_documentid));
|
||||
bool isPreviewChunk = QFileInfo(resource).absolutePath().endsWith(QStringLiteral("/%1/preview").arg(m_documentid));
|
||||
// Missing clip found, make sure to omit timeline preview
|
||||
if (!isPreviewChunk) {
|
||||
checkClip(e, resource);
|
||||
|
@ -1468,7 +1468,7 @@ void DocumentChecker::fixTitleFont(const QDomNodeList &producers, const QString
|
|||
QString xml = Xml::getXmlProperty(e, QStringLiteral("xmldata"));
|
||||
QStringList fonts = TitleWidget::extractFontList(xml);
|
||||
if (fonts.contains(oldFont)) {
|
||||
xml.replace(QString("font=\"%1\"").arg(oldFont), QString("font=\"%1\"").arg(newFont));
|
||||
xml.replace(QStringLiteral("font=\"%1\"").arg(oldFont), QStringLiteral("font=\"%1\"").arg(newFont));
|
||||
Xml::setXmlProperty(e, QStringLiteral("xmldata"), xml);
|
||||
Xml::setXmlProperty(e, QStringLiteral("force_reload"), QStringLiteral("2"));
|
||||
Xml::setXmlProperty(e, QStringLiteral("_fullreload"), QStringLiteral("2"));
|
||||
|
|
|
@ -76,7 +76,7 @@ QPair<bool, QString> DocumentValidator::validate(const double currentVersion)
|
|||
|
||||
if (mlt.hasAttribute(QStringLiteral("LC_NUMERIC"))) { // Backwards compatibility
|
||||
// Check document numeric separator (added in Kdenlive 16.12.1 and removed in Kdenlive 20.08)
|
||||
QString sep = Xml::getXmlProperty(main_playlist, "kdenlive:docproperties.decimalPoint", QString("."));
|
||||
QString sep = Xml::getXmlProperty(main_playlist, "kdenlive:docproperties.decimalPoint", QStringLiteral("."));
|
||||
QString mltLocale = mlt.attribute(QStringLiteral("LC_NUMERIC"), "C"); // Backwards compatibility
|
||||
qDebug() << "LOCALE: Document uses " << sep << " as decimal point and " << mltLocale << " as locale";
|
||||
|
||||
|
@ -1593,7 +1593,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
item.insert(QLatin1String("leaf"), QJsonValue(QLatin1String("clip")));
|
||||
QString pos = elements.at(h).toElement().attribute(QStringLiteral("position"));
|
||||
QString track = trackIndex.value(elements.at(h).toElement().attribute(QStringLiteral("track")));
|
||||
item.insert(QLatin1String("data"), QJsonValue(QString("%1:%2").arg(track, pos)));
|
||||
item.insert(QLatin1String("data"), QJsonValue(QStringLiteral("%1:%2").arg(track, pos)));
|
||||
array.push_back(item);
|
||||
}
|
||||
QJsonObject currentGroup;
|
||||
|
@ -1608,7 +1608,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
}
|
||||
const QString playlistName = playlists.at(i).toElement().attribute(QStringLiteral("id"));
|
||||
QDomElement duplicate_playlist = m_doc.createElement(QStringLiteral("playlist"));
|
||||
duplicate_playlist.setAttribute(QStringLiteral("id"), QString("%1_duplicate").arg(playlistName));
|
||||
duplicate_playlist.setAttribute(QStringLiteral("id"), QStringLiteral("%1_duplicate").arg(playlistName));
|
||||
QDomElement pltype = m_doc.createElement(QStringLiteral("property"));
|
||||
pltype.setAttribute(QStringLiteral("name"), QStringLiteral("kdenlive:audio_track"));
|
||||
pltype.setNodeValue(QStringLiteral("1"));
|
||||
|
@ -1673,12 +1673,12 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
QJsonObject items;
|
||||
items.insert(QLatin1String("type"), QJsonValue(QStringLiteral("Leaf")));
|
||||
items.insert(QLatin1String("leaf"), QJsonValue(QLatin1String("clip")));
|
||||
items.insert(QLatin1String("data"), QJsonValue(QString("%1:%2").arg(playlistName).arg(pos)));
|
||||
items.insert(QLatin1String("data"), QJsonValue(QStringLiteral("%1:%2").arg(playlistName).arg(pos)));
|
||||
array.push_back(items);
|
||||
QJsonObject itemb;
|
||||
itemb.insert(QLatin1String("type"), QJsonValue(QStringLiteral("Leaf")));
|
||||
itemb.insert(QLatin1String("leaf"), QJsonValue(QLatin1String("clip")));
|
||||
itemb.insert(QLatin1String("data"), QJsonValue(QString("%1:%2").arg(duplicate_playlist.attribute(QStringLiteral("id"))).arg(pos)));
|
||||
itemb.insert(QLatin1String("data"), QJsonValue(QStringLiteral("%1:%2").arg(duplicate_playlist.attribute(QStringLiteral("id"))).arg(pos)));
|
||||
array.push_back(itemb);
|
||||
QJsonObject currentGroup;
|
||||
currentGroup.insert(QLatin1String("type"), QJsonValue(QStringLiteral("AVSplit")));
|
||||
|
@ -1702,7 +1702,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
mlt.insertBefore(duplicate_playlist, tractor);
|
||||
QDomNode lastTrack = tractor.firstChildElement(QStringLiteral("track"));
|
||||
QDomElement duplicate = m_doc.createElement(QStringLiteral("track"));
|
||||
duplicate.setAttribute(QStringLiteral("producer"), QString("%1_duplicate").arg(playlistName));
|
||||
duplicate.setAttribute(QStringLiteral("producer"), QStringLiteral("%1_duplicate").arg(playlistName));
|
||||
duplicate.setAttribute(QStringLiteral("hide"), QStringLiteral("video"));
|
||||
tractor.insertAfter(duplicate, lastTrack);
|
||||
trackOffset++;
|
||||
|
@ -1735,8 +1735,8 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
tracks = tractor.toElement().elementsByTagName(QStringLiteral("track"));
|
||||
for (int i = 0; i < tracks.count(); i++) {
|
||||
// Replace track names with their current index in our view
|
||||
const QString trackId = QString("%1:").arg(tracks.at(i).toElement().attribute(QStringLiteral("producer")));
|
||||
groupsData.replace(trackId, QString("%1:").arg(i - 1));
|
||||
const QString trackId = QStringLiteral("%1:").arg(tracks.at(i).toElement().attribute(QStringLiteral("producer")));
|
||||
groupsData.replace(trackId, QStringLiteral("%1:").arg(i - 1));
|
||||
}
|
||||
Xml::setXmlProperty(mainplaylist.toElement(), QStringLiteral("kdenlive:docproperties.groups"), groupsData);
|
||||
}
|
||||
|
@ -1832,7 +1832,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
|
|||
|
||||
QDomElement root = doc.documentElement();
|
||||
QDomElement nodelist = root.firstChildElement("name");
|
||||
QDomElement newNodeTag = doc.createElement(QString("name"));
|
||||
QDomElement newNodeTag = doc.createElement(QStringLiteral("name"));
|
||||
QDomText text = doc.createTextNode(newId);
|
||||
newNodeTag.appendChild(text);
|
||||
root.replaceChild(newNodeTag, nodelist);
|
||||
|
@ -2116,16 +2116,16 @@ void DocumentValidator::convertSubtitles()
|
|||
for (int i = 0; i < subtitlesList.size(); i++) {
|
||||
if (timelineUuid == documentUuid) {
|
||||
// Main timeline, subtitle file is named just with project file name with an index
|
||||
path = (i > 0) ? (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QString("%1-%2.srt").arg(fileName).arg(i)))
|
||||
: (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QString("%1.srt").arg(fileName)));
|
||||
path = (i > 0) ? (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QStringLiteral("%1-%2.srt").arg(fileName).arg(i)))
|
||||
: (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QStringLiteral("%1.srt").arg(fileName)));
|
||||
} else {
|
||||
// Secondary timeline, the timeline uuid is appended to the subtitle filename
|
||||
path = (i > 0) ? (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QString("%1%2-%3.srt").arg(fileName).arg(timelineUuid).arg(i)))
|
||||
: (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QString("%1%2.srt").arg(fileName).arg(timelineUuid)));
|
||||
path = (i > 0) ? (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QStringLiteral("%1%2-%3.srt").arg(fileName).arg(timelineUuid).arg(i)))
|
||||
: (QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QStringLiteral("%1%2.srt").arg(fileName).arg(timelineUuid)));
|
||||
}
|
||||
|
||||
QString newFileContent =
|
||||
QString("[Script Info]\n; Script generated by Kdenlive %1\nScriptType: v4.00+\nPlayResX: %2\nPlayResY: %3\nLayoutResX: "
|
||||
QStringLiteral("[Script Info]\n; Script generated by Kdenlive %1\nScriptType: v4.00+\nPlayResX: %2\nPlayResY: %3\nLayoutResX: "
|
||||
"%4\nLayoutResY: %5\nWrapStyle: 0\n"
|
||||
"ScaledBorderAndShadow: yes\nYCbCr Matrix: None\n\n"
|
||||
"[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, "
|
||||
|
|
|
@ -1011,7 +1011,7 @@ void KdenliveDoc::updateWorkFilesBeforeSave(const QString &newUrl, bool onRender
|
|||
finalName.append(QStringLiteral("-%1").arg(i.key().first));
|
||||
}
|
||||
QFileInfo info(finalName);
|
||||
QString subPath = info.dir().absoluteFilePath(QString("%1.ass").arg(info.fileName()));
|
||||
QString subPath = info.dir().absoluteFilePath(QStringLiteral("%1.ass").arg(info.fileName()));
|
||||
j.value()->getSubtitleModel()->copySubtitle(subPath, i.key().first, checkOverwrite, true);
|
||||
}
|
||||
}
|
||||
|
@ -2390,7 +2390,7 @@ QMap<int, QStringList> KdenliveDoc::getProjectTags() const
|
|||
QMap<int, QStringList> tags;
|
||||
int ix = 1;
|
||||
for (int i = 1; i < 50; i++) {
|
||||
QString current = getDocumentProperty(QString("tag%1").arg(i));
|
||||
QString current = getDocumentProperty(QStringLiteral("tag%1").arg(i));
|
||||
if (current.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
|
@ -2428,13 +2428,13 @@ const QString KdenliveDoc::subTitlePath(const QUuid &uuid, int ix, bool final, b
|
|||
path.append(QStringLiteral("-%1").arg(ix));
|
||||
}
|
||||
if (m_url.isValid() && final) {
|
||||
return QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QString("%1.ass").arg(path));
|
||||
return QFileInfo(m_url.toLocalFile()).dir().absoluteFilePath(QStringLiteral("%1.ass").arg(path));
|
||||
} else {
|
||||
if (restoreFromBackup) {
|
||||
const QString previousSessionId = pCore->currentDoc()->getDocumentProperty(QStringLiteral("sessionid"));
|
||||
return QDir::temp().absoluteFilePath(QString("%1-%2.ass").arg(path, previousSessionId));
|
||||
return QDir::temp().absoluteFilePath(QStringLiteral("%1-%2.ass").arg(path, previousSessionId));
|
||||
}
|
||||
return QDir::temp().absoluteFilePath(QString("%1-%2.ass").arg(path, pCore->sessionId));
|
||||
return QDir::temp().absoluteFilePath(QStringLiteral("%1-%2.ass").arg(path, pCore->sessionId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2739,7 +2739,7 @@ const QStringList KdenliveDoc::getDefaultGuideCategories()
|
|||
QLatin1String("#fdbc4b"), QLatin1String("#f39c1f"), QLatin1String("#f47750"), QLatin1String("#da4453")};
|
||||
QStringList guidesCategories;
|
||||
for (int i = 0; i < 9; i++) {
|
||||
guidesCategories << QString("%1 %2:%3:%4").arg(i18n("Category")).arg(QString::number(i + 1)).arg(QString::number(i)).arg(colors.at(i));
|
||||
guidesCategories << QStringLiteral("%1 %2:%3:%4").arg(i18n("Category")).arg(QString::number(i + 1)).arg(QString::number(i)).arg(colors.at(i));
|
||||
}
|
||||
return guidesCategories;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ void EffectTreeModel::editCustomAsset(const QString &newName, const QString &new
|
|||
if (!newDescription.trimmed().isEmpty()) {
|
||||
QDomElement root = doc.documentElement();
|
||||
QDomElement nodelist = root.firstChildElement("description");
|
||||
QDomElement newNodeTag = doc.createElement(QString("description"));
|
||||
QDomElement newNodeTag = doc.createElement(QStringLiteral("description"));
|
||||
QDomText text = doc.createTextNode(newDescription);
|
||||
newNodeTag.appendChild(text);
|
||||
if (!nodelist.isNull()) {
|
||||
|
@ -275,7 +275,7 @@ void EffectTreeModel::editCustomAsset(const QString &newName, const QString &new
|
|||
|
||||
QDomElement root = doc.documentElement();
|
||||
QDomElement nodelist = root.firstChildElement("name");
|
||||
QDomElement newNodeTag = doc.createElement(QString("name"));
|
||||
QDomElement newNodeTag = doc.createElement(QStringLiteral("name"));
|
||||
QDomText text = doc.createTextNode(newName);
|
||||
newNodeTag.appendChild(text);
|
||||
root.replaceChild(newNodeTag, nodelist);
|
||||
|
|
|
@ -132,7 +132,7 @@ void EffectListWidget::exportCustomEffect(const QModelIndex &index)
|
|||
return;
|
||||
}
|
||||
|
||||
QString filter = QString("%1 (*.xml);;%2 (*)").arg(i18n("Kdenlive Effect definitions"), i18n("All Files"));
|
||||
QString filter = QStringLiteral("%1 (*.xml);;%2 (*)").arg(i18n("Kdenlive Effect definitions"), i18n("All Files"));
|
||||
QString startFolder = KRecentDirs::dir(QStringLiteral(":KdenliveExportCustomEffect"));
|
||||
QUrl source = QUrl::fromLocalFile(EffectsRepository::get()->getCustomPath(name));
|
||||
startFolder.append(source.fileName());
|
||||
|
|
|
@ -264,7 +264,7 @@ QString EffectsRepository::getCustomPath(const QString &id)
|
|||
QString customAssetDir = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("effects"), QStandardPaths::LocateDirectory);
|
||||
QPair<QStringList, QStringList> results;
|
||||
QDir current_dir(customAssetDir);
|
||||
return current_dir.absoluteFilePath(QString("%1.xml").arg(id));
|
||||
return current_dir.absoluteFilePath(QStringLiteral("%1.xml").arg(id));
|
||||
}
|
||||
|
||||
QPair<QString, QString> EffectsRepository::reloadCustom(const QString &path)
|
||||
|
@ -388,7 +388,7 @@ QPair<QString, QString> EffectsRepository::fixCustomAssetFile(const QString &pat
|
|||
QString frame = val.section(QLatin1Char('='), 0, 0);
|
||||
QString frameVal = val.section(QLatin1Char('='), 1);
|
||||
double v = frameVal.toDouble() / factor;
|
||||
resultStr << QString("%1=%2").arg(frame).arg(v);
|
||||
resultStr << QStringLiteral("%1=%2").arg(frame).arg(v);
|
||||
} else {
|
||||
double v = val.toDouble() / factor;
|
||||
resultStr << QString::number(v);
|
||||
|
|
|
@ -344,7 +344,7 @@ void CollapsibleEffectView::updateGroupedInstances()
|
|||
auto *l = static_cast<QHBoxLayout *>(frame->layout());
|
||||
m_effectInstances = new QLabel(this);
|
||||
int h = (buttonUp->height() - 4) / 3;
|
||||
m_effectInstances->setStyleSheet(QString("margin: 2px; padding: 0px; border-radius: %1px; background: #885500; color: #FFFFFF;").arg(h));
|
||||
m_effectInstances->setStyleSheet(QStringLiteral("margin: 2px; padding: 0px; border-radius: %1px; background: #885500; color: #FFFFFF;").arg(h));
|
||||
m_effectInstances->setText(QString::number(groupedInstances));
|
||||
m_effectInstances->setToolTip(i18n("%1 instances of this effect in the group", groupedInstances));
|
||||
m_effectInstances->setMargin(4);
|
||||
|
@ -667,7 +667,7 @@ void CollapsibleEffectView::slotSaveEffect(const QString title, const QString de
|
|||
if (!enteredDescription.trimmed().isEmpty()) {
|
||||
QDomElement root = doc.documentElement();
|
||||
QDomElement nodelist = root.firstChildElement("description");
|
||||
QDomElement newNodeTag = doc.createElement(QString("description"));
|
||||
QDomElement newNodeTag = doc.createElement(QStringLiteral("description"));
|
||||
QDomText text = doc.createTextNode(enteredDescription);
|
||||
newNodeTag.appendChild(text);
|
||||
root.replaceChild(newNodeTag, nodelist);
|
||||
|
|
|
@ -780,7 +780,7 @@ void EffectStackView::slotSaveStack()
|
|||
QDomElement effect = doc.createElement(QStringLiteral("effectgroup"));
|
||||
effect.setAttribute(QStringLiteral("id"), name);
|
||||
|
||||
QDomElement describtionNode = doc.createElement(QString("description"));
|
||||
QDomElement describtionNode = doc.createElement(QStringLiteral("description"));
|
||||
QDomText descriptionText = doc.createTextNode(description);
|
||||
describtionNode.appendChild(descriptionText);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ GlaxnimateLauncher &GlaxnimateLauncher::instance()
|
|||
void GlaxnimateLauncher::reset()
|
||||
{
|
||||
if (m_stream && m_socket && m_stream && QLocalSocket::ConnectedState == m_socket->state()) {
|
||||
*m_stream << QString("clear");
|
||||
*m_stream << QStringLiteral("clear");
|
||||
m_socket->flush();
|
||||
}
|
||||
m_parent.reset();
|
||||
|
@ -87,7 +87,7 @@ void GlaxnimateLauncher::openClip(int clipId)
|
|||
m_parent->m_clipId = clipId;
|
||||
m_server.reset(new QLocalServer);
|
||||
connect(m_server.get(), &QLocalServer::newConnection, this, &GlaxnimateLauncher::onConnect);
|
||||
QString name = QString("kdenlive-%1").arg(QCoreApplication::applicationPid());
|
||||
QString name = QStringLiteral("kdenlive-%1").arg(QCoreApplication::applicationPid());
|
||||
QStringList args = {"--ipc", name, filename};
|
||||
/*QProcess childProcess;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
|
@ -133,7 +133,7 @@ void GlaxnimateLauncher::onConnect()
|
|||
connect(m_socket, &QLocalSocket::errorOccurred, this, &GlaxnimateLauncher::onSocketError);
|
||||
m_stream.reset(new QDataStream(m_socket));
|
||||
m_stream->setVersion(QDataStream::Qt_5_15);
|
||||
*m_stream << QString("hello");
|
||||
*m_stream << QStringLiteral("hello");
|
||||
m_socket->flush();
|
||||
m_server->close();
|
||||
m_isProtocolValid = false;
|
||||
|
@ -146,7 +146,7 @@ void GlaxnimateLauncher::onReadyRead()
|
|||
*m_stream >> message;
|
||||
qDebug() << message;
|
||||
if (message.startsWith("version ") && message != "version 1") {
|
||||
*m_stream << QString("bye");
|
||||
*m_stream << QStringLiteral("bye");
|
||||
m_socket->flush();
|
||||
m_server->close();
|
||||
} else {
|
||||
|
@ -240,7 +240,7 @@ bool GlaxnimateLauncher::copyToShared(const QImage &image)
|
|||
|
||||
m_sharedMemory->unlock();
|
||||
if (m_stream && m_socket) {
|
||||
*m_stream << QString("redraw");
|
||||
*m_stream << QStringLiteral("redraw");
|
||||
m_socket->flush();
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -130,7 +130,7 @@ void AudioLevelsTask::run()
|
|||
QVector<uint8_t> *levelsCopy = new QVector<uint8_t>(mltLevels);
|
||||
producer = binClip->originalProducer();
|
||||
producer->lock();
|
||||
QString key = QString("_kdenlive:audio%1").arg(stream);
|
||||
QString key = QStringLiteral("_kdenlive:audio%1").arg(stream);
|
||||
producer->set(key.toUtf8().constData(), levelsCopy, 0, (mlt_destructor)deleteQVariantList);
|
||||
producer->unlock();
|
||||
producer.reset();
|
||||
|
@ -197,7 +197,7 @@ void AudioLevelsTask::run()
|
|||
QVector<uint8_t> *levelsCopy = new QVector<uint8_t>(mltLevels);
|
||||
producer = binClip->originalProducer();
|
||||
producer->lock();
|
||||
QString key = QString("_kdenlive:audio%1").arg(stream);
|
||||
QString key = QStringLiteral("_kdenlive:audio%1").arg(stream);
|
||||
producer->set(key.toUtf8().constData(), levelsCopy, 0, (mlt_destructor)deleteQVariantList);
|
||||
producer->unlock();
|
||||
producer.reset();
|
||||
|
@ -218,8 +218,8 @@ void AudioLevelsTask::run()
|
|||
QVector<uint8_t> *levelsCopy = new QVector<uint8_t>(mltLevels);
|
||||
producer = binClip->originalProducer();
|
||||
producer->lock();
|
||||
QString key = QString("_kdenlive:audio%1").arg(stream);
|
||||
QString key2 = QString("kdenlive:audio_max%1").arg(stream);
|
||||
QString key = QStringLiteral("_kdenlive:audio%1").arg(stream);
|
||||
QString key2 = QStringLiteral("kdenlive:audio_max%1").arg(stream);
|
||||
producer->set(key2.toUtf8().constData(), int(maxLevel));
|
||||
producer->set(key.toUtf8().constData(), levelsCopy, 0, (mlt_destructor)deleteQVariantList);
|
||||
producer->unlock();
|
||||
|
|
|
@ -637,11 +637,11 @@ void ClipLoadTask::run()
|
|||
bool hasVideo = false;
|
||||
// Work around MLT freeze on files with cover art
|
||||
if (vindex > -1) {
|
||||
QString key = QString("meta.media.%1.stream.frame_rate").arg(vindex);
|
||||
QString key = QStringLiteral("meta.media.%1.stream.frame_rate").arg(vindex);
|
||||
fps = producer->get_double(key.toLatin1().constData());
|
||||
key = QString("meta.media.%1.codec.name").arg(vindex);
|
||||
key = QStringLiteral("meta.media.%1.codec.name").arg(vindex);
|
||||
QString codec_name = producer->get(key.toLatin1().constData());
|
||||
key = QString("meta.media.%1.codec.frame_rate").arg(vindex);
|
||||
key = QStringLiteral("meta.media.%1.codec.frame_rate").arg(vindex);
|
||||
QString frame_rate = producer->get(key.toLatin1().constData());
|
||||
if (codec_name == QLatin1String("png") || (codec_name == "mjpeg" && frame_rate == QLatin1String("90000"))) {
|
||||
// Cover art
|
||||
|
@ -697,7 +697,7 @@ void ClipLoadTask::run()
|
|||
QString adjustedFpsString;
|
||||
if (fps > 0) {
|
||||
int integerFps = qRound(fps);
|
||||
adjustedFpsString = QString("-%1fps").arg(integerFps);
|
||||
adjustedFpsString = QStringLiteral("-%1fps").arg(integerFps);
|
||||
}
|
||||
ClipType::ProducerType cType = type;
|
||||
if (cType == ClipType::Unknown) {
|
||||
|
|
|
@ -40,7 +40,7 @@ CustomJobTask::CustomJobTask(const ObjectId &owner, const QString &jobName, cons
|
|||
, m_jobProcess(nullptr)
|
||||
{
|
||||
m_description = jobName;
|
||||
m_tmpFrameFile.setFileTemplate(QString("%1/kdenlive-frame-.XXXXXX.png").arg(QDir::tempPath()));
|
||||
m_tmpFrameFile.setFileTemplate(QStringLiteral("%1/kdenlive-frame-.XXXXXX.png").arg(QDir::tempPath()));
|
||||
}
|
||||
|
||||
void CustomJobTask::start(QObject *object, const QString &jobId)
|
||||
|
|
|
@ -90,7 +90,7 @@ void CutTask::start(const ObjectId &owner, int in, int out, QObject *object, boo
|
|||
QDir dir = finfo.absoluteDir();
|
||||
QString inString = QString::number(int(GenTime(in, pCore->getCurrentFps()).seconds()));
|
||||
QString outString = QString::number(int(GenTime(out, pCore->getCurrentFps()).seconds()));
|
||||
QString fileName = QStringUtils::appendToFilename(finfo.fileName(), QString("-%1-%2").arg(inString, outString));
|
||||
QString fileName = QStringUtils::appendToFilename(finfo.fileName(), QStringLiteral("-%1-%2").arg(inString, outString));
|
||||
QString path = dir.absoluteFilePath(fileName);
|
||||
|
||||
QPointer<QDialog> d = new QDialog(QApplication::activeWindow());
|
||||
|
@ -129,12 +129,12 @@ void CutTask::start(const ObjectId &owner, int in, int out, QObject *object, boo
|
|||
std::function<void()> callBack = [&ui, transcoderExt]() {
|
||||
if (ui.acodec->currentData().toString().isEmpty()) {
|
||||
// Video only
|
||||
ui.extra_params->setPlainText(QString("-an -c:v %1").arg(ui.vcodec->currentData().toString()));
|
||||
ui.extra_params->setPlainText(QStringLiteral("-an -c:v %1").arg(ui.vcodec->currentData().toString()));
|
||||
} else if (ui.vcodec->currentData().toString().isEmpty()) {
|
||||
// Audio only
|
||||
ui.extra_params->setPlainText(QString("-vn -c:a %1").arg(ui.acodec->currentData().toString()));
|
||||
ui.extra_params->setPlainText(QStringLiteral("-vn -c:a %1").arg(ui.acodec->currentData().toString()));
|
||||
} else {
|
||||
ui.extra_params->setPlainText(QString("-c:a %1 -c:v %2").arg(ui.acodec->currentData().toString(), ui.vcodec->currentData().toString()));
|
||||
ui.extra_params->setPlainText(QStringLiteral("-c:a %1 -c:v %2").arg(ui.acodec->currentData().toString(), ui.vcodec->currentData().toString()));
|
||||
}
|
||||
QString path = ui.file_url->url().toLocalFile();
|
||||
QString fileName = path.section(QLatin1Char('.'), 0, -2);
|
||||
|
|
|
@ -326,7 +326,7 @@ void ProxyTask::run()
|
|||
h = int(w / pCore->getCurrentDar());
|
||||
}
|
||||
h += h % 2;
|
||||
proxyParams.replace(QStringLiteral("%frameSize"), QString("%1x%2").arg(w).arg(h));
|
||||
proxyParams.replace(QStringLiteral("%frameSize"), QStringLiteral("%1x%2").arg(w).arg(h));
|
||||
}
|
||||
if (supported) {
|
||||
// Full hardware decoding supported
|
||||
|
|
|
@ -130,14 +130,14 @@ void SceneSplitTask::run()
|
|||
m_jobDuration = int(binClip->duration().seconds());
|
||||
int producerDuration = binClip->frameDuration();
|
||||
// QStringList parameters =
|
||||
// {QStringLiteral("-loglevel"),QStringLiteral("info"),QStringLiteral("-i"),source,QStringLiteral("-filter:v"),QString("scdet"),QStringLiteral("-f"),QStringLiteral("null"),QStringLiteral("-")};
|
||||
// {QStringLiteral("-loglevel"),QStringLiteral("info"),QStringLiteral("-i"),source,QStringLiteral("-filter:v"),QStringLiteral("scdet"),QStringLiteral("-f"),QStringLiteral("null"),QStringLiteral("-")};
|
||||
QStringList parameters = {QStringLiteral("-y"),
|
||||
QStringLiteral("-loglevel"),
|
||||
QStringLiteral("info"),
|
||||
QStringLiteral("-i"),
|
||||
source,
|
||||
QStringLiteral("-filter:v"),
|
||||
QString("select='gt(scene,%1)',showinfo").arg(m_threshold),
|
||||
QStringLiteral("select='gt(scene,%1)',showinfo").arg(m_threshold),
|
||||
QStringLiteral("-vsync"),
|
||||
QStringLiteral("vfr"),
|
||||
QStringLiteral("-f"),
|
||||
|
|
|
@ -112,7 +112,7 @@ void SpeedTask::start(QObject *object, bool force)
|
|||
QDir dir(fileUrl.url().toLocalFile());
|
||||
binClip = pCore->projectItemModel()->getClipByBinID(binId.section(QLatin1Char('/'), 0, 0));
|
||||
mltfile = QFileInfo(binClip->url()).fileName().section(QLatin1Char('.'), 0, -2);
|
||||
mltfile.append(QString("-%1.mlt").arg(QString::number(int(speed))));
|
||||
mltfile.append(QStringLiteral("-%1.mlt").arg(QString::number(int(speed))));
|
||||
mltfile = dir.absoluteFilePath(mltfile);
|
||||
}
|
||||
// Filter several clips, destination points to a folder
|
||||
|
@ -185,12 +185,12 @@ void SpeedTask::run()
|
|||
Q_ARG(int, int(KMessageWidget::Warning)));
|
||||
return;
|
||||
}
|
||||
producerArgs << QString("timewarp:%1:%2").arg(m_speed).arg(url);
|
||||
producerArgs << QStringLiteral("timewarp:%1:%2").arg(m_speed).arg(url);
|
||||
if (m_inPoint > -1) {
|
||||
producerArgs << QString("in=%1").arg(m_inPoint);
|
||||
producerArgs << QStringLiteral("in=%1").arg(m_inPoint);
|
||||
}
|
||||
if (m_outPoint > -1) {
|
||||
producerArgs << QString("out=%1").arg(m_outPoint);
|
||||
producerArgs << QStringLiteral("out=%1").arg(m_outPoint);
|
||||
}
|
||||
} else {
|
||||
QMetaObject::invokeMethod(pCore.get(), "displayBinMessage", Qt::QueuedConnection, Q_ARG(QString, i18n("No producer for this clip.")),
|
||||
|
@ -215,15 +215,15 @@ void SpeedTask::run()
|
|||
for (const auto &it : m_filterParams) {
|
||||
qDebug() << ". . ." << it.first << " = " << it.second;
|
||||
if (it.second.typeId() == QMetaType::Double) {
|
||||
producerArgs << QString("%1=%2").arg(it.first, QString::number(it.second.toDouble()));
|
||||
producerArgs << QStringLiteral("%1=%2").arg(it.first, QString::number(it.second.toDouble()));
|
||||
} else {
|
||||
producerArgs << QString("%1=%2").arg(it.first, it.second.toString());
|
||||
producerArgs << QStringLiteral("%1=%2").arg(it.first, it.second.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// Start the MLT Process
|
||||
QProcess filterProcess;
|
||||
producerArgs << QStringLiteral("-consumer") << QString("xml:%1").arg(m_destination) << QStringLiteral("terminate_on_pause=1");
|
||||
producerArgs << QStringLiteral("-consumer") << QStringLiteral("xml:%1").arg(m_destination) << QStringLiteral("terminate_on_pause=1");
|
||||
m_jobProcess.reset(new QProcess);
|
||||
QMetaObject::invokeMethod(m_object, "updateJobProgress");
|
||||
QObject::connect(this, &AbstractTask::jobCanceled, m_jobProcess.get(), &QProcess::kill, Qt::DirectConnection);
|
||||
|
|
|
@ -111,10 +111,10 @@ void StabilizeTask::run()
|
|||
producerArgs << binClip->enforcedParams();
|
||||
|
||||
if (m_inPoint > -1) {
|
||||
producerArgs << QString("in=%1").arg(m_inPoint);
|
||||
producerArgs << QStringLiteral("in=%1").arg(m_inPoint);
|
||||
}
|
||||
if (m_outPoint > -1) {
|
||||
producerArgs << QString("out=%1").arg(m_outPoint);
|
||||
producerArgs << QStringLiteral("out=%1").arg(m_outPoint);
|
||||
}
|
||||
} else {
|
||||
// Filter applied on a track of master producer, leave config to source job
|
||||
|
@ -142,22 +142,22 @@ void StabilizeTask::run()
|
|||
for (const auto &it : m_filterParams) {
|
||||
qDebug() << ". . ." << it.first << " = " << it.second;
|
||||
if (it.second.typeId() == QMetaType::Double) {
|
||||
producerArgs << QString("%1=%2").arg(it.first, QString::number(it.second.toDouble()));
|
||||
producerArgs << QStringLiteral("%1=%2").arg(it.first, QString::number(it.second.toDouble()));
|
||||
} else {
|
||||
producerArgs << QString("%1=%2").arg(it.first, it.second.toString());
|
||||
producerArgs << QStringLiteral("%1=%2").arg(it.first, it.second.toString());
|
||||
}
|
||||
}
|
||||
QString targetFile = m_destination + QStringLiteral(".trf");
|
||||
int count = 1;
|
||||
while (QFile::exists(targetFile)) {
|
||||
targetFile = m_destination + QString("-%1.trf").arg(count);
|
||||
targetFile = m_destination + QStringLiteral("-%1.trf").arg(count);
|
||||
count++;
|
||||
}
|
||||
producerArgs << QString("filename=%1").arg(targetFile);
|
||||
producerArgs << QStringLiteral("filename=%1").arg(targetFile);
|
||||
|
||||
// Start the MLT Process
|
||||
QProcess filterProcess;
|
||||
producerArgs << QStringLiteral("-consumer") << QString("xml:%1").arg(m_destination) << QStringLiteral("all=1") << QStringLiteral("terminate_on_pause=1");
|
||||
producerArgs << QStringLiteral("-consumer") << QStringLiteral("xml:%1").arg(m_destination) << QStringLiteral("all=1") << QStringLiteral("terminate_on_pause=1");
|
||||
m_jobProcess.reset(new QProcess);
|
||||
QMetaObject::invokeMethod(m_object, "updateJobProgress");
|
||||
QObject::connect(this, &AbstractTask::jobCanceled, m_jobProcess.get(), &QProcess::kill, Qt::DirectConnection);
|
||||
|
|
|
@ -68,7 +68,7 @@ void TranscodeTask::run()
|
|||
QString source;
|
||||
QTemporaryFile src;
|
||||
if (type == ClipType::Text || type == ClipType::Timeline) {
|
||||
src.setFileTemplate(QDir::temp().absoluteFilePath(QString("XXXXXX.mlt")));
|
||||
src.setFileTemplate(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.mlt")));
|
||||
if (src.open()) {
|
||||
source = src.fileName();
|
||||
QDomDocument doc;
|
||||
|
@ -122,7 +122,7 @@ void TranscodeTask::run()
|
|||
// change FFmpeg params to MLT format
|
||||
m_isFfmpegJob = false;
|
||||
// insert transcoded filename
|
||||
m_transcodeParams.replace(QStringLiteral("%1"), QString("-consumer %1"));
|
||||
m_transcodeParams.replace(QStringLiteral("%1"), QStringLiteral("-consumer %1"));
|
||||
// Convert param style
|
||||
QStringList params = m_transcodeParams.split(QLatin1Char('-'), Qt::SkipEmptyParts);
|
||||
QStringList mltParameters;
|
||||
|
@ -133,7 +133,7 @@ void TranscodeTask::run()
|
|||
} else {
|
||||
if (t.contains(QLatin1String("%1"))) {
|
||||
// file name
|
||||
mltParameters.prepend(t.section(QLatin1Char(' '), 1).replace(QLatin1String("%1"), QString("avformat:%1").arg(destUrl)));
|
||||
mltParameters.prepend(t.section(QLatin1Char(' '), 1).replace(QLatin1String("%1"), QStringLiteral("avformat:%1").arg(destUrl)));
|
||||
mltParameters.prepend(QStringLiteral("-consumer"));
|
||||
continue;
|
||||
}
|
||||
|
@ -159,8 +159,8 @@ void TranscodeTask::run()
|
|||
// Ask for progress reporting
|
||||
mltParameters << QStringLiteral("progress=1");
|
||||
if (m_outPoint > 0) {
|
||||
mltParameters.prepend(QString("out=%1").arg(m_outPoint));
|
||||
mltParameters.prepend(QString("in=%1").arg(m_inPoint));
|
||||
mltParameters.prepend(QStringLiteral("out=%1").arg(m_outPoint));
|
||||
mltParameters.prepend(QStringLiteral("in=%1").arg(m_inPoint));
|
||||
}
|
||||
mltParameters.prepend(source);
|
||||
m_jobProcess.reset(new QProcess);
|
||||
|
|
|
@ -194,8 +194,8 @@ DeviceMap JogShuttle::enumerateDevices(const QString &devPath)
|
|||
for (const QString &fileName : fileList) {
|
||||
QString devFullPath = devDir.absoluteFilePath(fileName);
|
||||
QString fileLink = JogShuttle::canonicalDevice(devFullPath);
|
||||
// qCDebug(KDENLIVE_LOG) << QString(" [%1] ").arg(fileName);
|
||||
// qCDebug(KDENLIVE_LOG) << QString(" [%1] ").arg(fileLink);
|
||||
// qCDebug(KDENLIVE_LOG) << QStringLiteral(" [%1] ").arg(fileName);
|
||||
// qCDebug(KDENLIVE_LOG) << QStringLiteral(" [%1] ").arg(fileLink);
|
||||
|
||||
media_ctrl mc;
|
||||
media_ctrl_open_dev(&mc, fileLink.toUtf8().data());
|
||||
|
|
|
@ -80,7 +80,7 @@ LayoutManagement::LayoutManagement(QObject *parent)
|
|||
m_container->setLayout(l1);
|
||||
KColorScheme scheme(main->palette().currentColorGroup(), KColorScheme::Button);
|
||||
QColor bg = scheme.background(KColorScheme::AlternateBackground).color();
|
||||
QString style = QString("padding-left: %4; padding-right: %4;background-color: rgb(%1,%2,%3);")
|
||||
QString style = QStringLiteral("padding-left: %4; padding-right: %4;background-color: rgb(%1,%2,%3);")
|
||||
.arg(bg.red())
|
||||
.arg(bg.green())
|
||||
.arg(bg.blue())
|
||||
|
|
|
@ -38,7 +38,7 @@ AudioStreamInfo::AudioStreamInfo(const std::shared_ptr<Mlt::Producer> &producer,
|
|||
snprintf(property, sizeof(property), "kdenlive:streamname.%d", ix);
|
||||
QString channelDescription = producer->get(property);
|
||||
if (channelDescription.isEmpty()) {
|
||||
channelDescription = QString("%1|").arg(streamIndex++);
|
||||
channelDescription = QStringLiteral("%1|").arg(streamIndex++);
|
||||
switch (chan) {
|
||||
case 1:
|
||||
channelDescription.append(i18n("Mono "));
|
||||
|
|
|
@ -269,10 +269,10 @@ void MainWindow::init(const QString &mltPath)
|
|||
KColorScheme scheme(QApplication::palette().currentColorGroup(), KColorScheme::Tooltip);
|
||||
if (highlight) {
|
||||
QColor col = scheme.decoration(KColorScheme::HoverColor).color();
|
||||
topFrame->setStyleSheet(QString("QFrame {border: 1px solid rgba(%1,%2,%3,70)}").arg(col.red()).arg(col.green()).arg(col.blue()));
|
||||
topFrame->setStyleSheet(QStringLiteral("QFrame {border: 1px solid rgba(%1,%2,%3,70)}").arg(col.red()).arg(col.green()).arg(col.blue()));
|
||||
} else {
|
||||
QColor col = scheme.decoration(KColorScheme::FocusColor).color();
|
||||
topFrame->setStyleSheet(QString("QFrame {border: 1px solid rgba(%1,%2,%3,100)}").arg(col.red()).arg(col.green()).arg(col.blue()));
|
||||
topFrame->setStyleSheet(QStringLiteral("QFrame {border: 1px solid rgba(%1,%2,%3,100)}").arg(col.red()).arg(col.green()).arg(col.blue()));
|
||||
}
|
||||
} else {
|
||||
topFrame->setStyleSheet(QString());
|
||||
|
@ -2062,15 +2062,15 @@ void MainWindow::setupActions()
|
|||
QAction *ac = new QAction(QIcon(), i18n("Select Audio Track %1", i), this);
|
||||
ac->setData(i - 1);
|
||||
connect(ac, &QAction::triggered, this, &MainWindow::slotActivateAudioTrackSequence);
|
||||
addAction(QString("activate_audio_%1").arg(i), ac, QKeySequence(Qt::ALT | keysequence[i - 1]), timelineActions);
|
||||
addAction(QStringLiteral("activate_audio_%1").arg(i), ac, QKeySequence(Qt::ALT | keysequence[i - 1]), timelineActions);
|
||||
QAction *ac2 = new QAction(QIcon(), i18n("Select Video Track %1", i), this);
|
||||
ac2->setData(i - 1);
|
||||
connect(ac2, &QAction::triggered, this, &MainWindow::slotActivateVideoTrackSequence);
|
||||
addAction(QString("activate_video_%1").arg(i), ac2, QKeySequence(keysequence[i - 1]), timelineActions);
|
||||
addAction(QStringLiteral("activate_video_%1").arg(i), ac2, QKeySequence(keysequence[i - 1]), timelineActions);
|
||||
QAction *ac3 = new QAction(QIcon(), i18n("Select Target %1", i), this);
|
||||
ac3->setData(i - 1);
|
||||
connect(ac3, &QAction::triggered, this, &MainWindow::slotActivateTarget);
|
||||
addAction(QString("activate_target_%1").arg(i), ac3, QKeySequence(Qt::CTRL | keysequence[i - 1]), timelineActions);
|
||||
addAction(QStringLiteral("activate_target_%1").arg(i), ac3, QKeySequence(Qt::CTRL | keysequence[i - 1]), timelineActions);
|
||||
}
|
||||
|
||||
// Setup effects and transitions actions.
|
||||
|
@ -4926,10 +4926,10 @@ void MainWindow::addBin(Bin *bin, const QString &binName, bool updateCount)
|
|||
objectNames << p->objectName();
|
||||
}
|
||||
}
|
||||
QString newBinName = QString("project_bin_%1").arg(ix);
|
||||
QString newBinName = QStringLiteral("project_bin_%1").arg(ix);
|
||||
while (objectNames.contains(newBinName)) {
|
||||
ix++;
|
||||
newBinName = QString("project_bin_%1").arg(ix);
|
||||
newBinName = QStringLiteral("project_bin_%1").arg(ix);
|
||||
}
|
||||
QDockWidget *binDock = addDock(binName.isEmpty() ? i18n("Project Bin %1", ix) : binName, newBinName, bin);
|
||||
if (pCore->guiReady()) {
|
||||
|
|
|
@ -31,10 +31,10 @@ static void mlt_log_handler(void *service, int mlt_level, const char *format, va
|
|||
char *id = mlt_properties_get(properties, "id");
|
||||
if (!resource || resource[0] != '<' || resource[strlen(resource) - 1] != '>') mlt_type = mlt_properties_get(properties, "mlt_type");
|
||||
if (service_name)
|
||||
message = QString("[%1 %2 %3] ").arg(mlt_type, service_name, id);
|
||||
message = QStringLiteral("[%1 %2 %3] ").arg(mlt_type, service_name, id);
|
||||
else
|
||||
message = QString::asprintf("[%s %p] ", mlt_type, service);
|
||||
if (resource) message.append(QString("\"%1\" ").arg(resource));
|
||||
if (resource) message.append(QStringLiteral("\"%1\" ").arg(resource));
|
||||
message.append(QString::vasprintf(format, args));
|
||||
message.replace('\n', "");
|
||||
if (!strcmp(mlt_type, "filter")) {
|
||||
|
|
|
@ -136,7 +136,7 @@ void ClipController::addMasterProducer(const std::shared_ptr<Mlt::Producer> &pro
|
|||
snprintf(property, sizeof(property), "meta.media.%d.stream.type", ix);
|
||||
QString type = m_properties->get(property);
|
||||
if (type == QLatin1String("video")) {
|
||||
QString key = QString("meta.media.%1.codec.name").arg(ix);
|
||||
QString key = QStringLiteral("meta.media.%1.codec.name").arg(ix);
|
||||
QString codec_name = m_properties->get(key.toLatin1().constData());
|
||||
if (codec_name == QLatin1String("png")) {
|
||||
// This is a cover image, skip
|
||||
|
@ -144,10 +144,10 @@ void ClipController::addMasterProducer(const std::shared_ptr<Mlt::Producer> &pro
|
|||
continue;
|
||||
}
|
||||
if (codec_name == QLatin1String("mjpeg")) {
|
||||
key = QString("meta.media.%1.stream.frame_rate").arg(ix);
|
||||
key = QStringLiteral("meta.media.%1.stream.frame_rate").arg(ix);
|
||||
QString fps = m_properties->get(key.toLatin1().constData());
|
||||
if (fps.isEmpty()) {
|
||||
key = QString("meta.media.%1.codec.frame_rate").arg(ix);
|
||||
key = QStringLiteral("meta.media.%1.codec.frame_rate").arg(ix);
|
||||
fps = m_properties->get(key.toLatin1().constData());
|
||||
}
|
||||
if (fps == QLatin1String("90000")) {
|
||||
|
@ -350,7 +350,7 @@ void ClipController::buildAudioInfo(int audioIndex)
|
|||
m_audioInfo = std::make_unique<AudioStreamInfo>(m_masterProducer, audioIndex, m_clipType == ClipType::Playlist || m_clipType == ClipType::Timeline);
|
||||
// Load stream effects
|
||||
for (int stream : m_audioInfo->streams().keys()) {
|
||||
QString streamEffect = m_properties->get(QString("kdenlive:stream:%1").arg(stream).toUtf8().constData());
|
||||
QString streamEffect = m_properties->get(QStringLiteral("kdenlive:stream:%1").arg(stream).toUtf8().constData());
|
||||
if (!streamEffect.isEmpty()) {
|
||||
m_streamEffects.insert(stream, streamEffect.split(QChar('#')));
|
||||
}
|
||||
|
@ -1158,11 +1158,11 @@ bool ClipController::isFullRange() const
|
|||
{
|
||||
bool full = !qstrcmp(m_masterProducer->get("meta.media.color_range"), "full");
|
||||
for (int i = 0; !full && i < m_masterProducer->get_int("meta.media.nb_streams"); i++) {
|
||||
QString key = QString("meta.media.%1.stream.type").arg(i);
|
||||
QString key = QStringLiteral("meta.media.%1.stream.type").arg(i);
|
||||
QString streamType(m_masterProducer->get(key.toLatin1().constData()));
|
||||
if (streamType == "video") {
|
||||
if (i == m_masterProducer->get_int("video_index")) {
|
||||
key = QString("meta.media.%1.codec.pix_fmt").arg(i);
|
||||
key = QStringLiteral("meta.media.%1.codec.pix_fmt").arg(i);
|
||||
QString pix_fmt = QString::fromLatin1(m_masterProducer->get(key.toLatin1().constData()));
|
||||
if (pix_fmt.startsWith("yuvj")) {
|
||||
full = true;
|
||||
|
|
|
@ -71,7 +71,7 @@ void ElidedLinkLabel::updateText(int width)
|
|||
if (m_link.isEmpty()) {
|
||||
setText(fontMetrics().elidedText(m_text, Qt::ElideLeft, width));
|
||||
} else {
|
||||
setText(QString("<a href=\"%1\">%2</a>").arg(m_link, fontMetrics().elidedText(m_text, Qt::ElideLeft, width)));
|
||||
setText(QStringLiteral("<a href=\"%1\">%2</a>").arg(m_link, fontMetrics().elidedText(m_text, Qt::ElideLeft, width)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ ClipPropertiesController::ClipPropertiesController(const QString &clipName, Clip
|
|||
// Probable an image proxy
|
||||
lab->setText(i18n("Image"));
|
||||
} else {
|
||||
lab->setText(m_properties->get(QString("meta.media.%1.codec.name").arg(m_properties->get_int("video_index")).toUtf8().constData()));
|
||||
lab->setText(m_properties->get(QStringLiteral("meta.media.%1.codec.name").arg(m_properties->get_int("video_index")).toUtf8().constData()));
|
||||
}
|
||||
} else {
|
||||
pbox->setCheckState(Qt::PartiallyChecked);
|
||||
|
@ -468,7 +468,7 @@ ClipPropertiesController::ClipPropertiesController(const QString &clipName, Clip
|
|||
pbox->setCheckState(hasProxyClip ? Qt::Checked : Qt::Unchecked);
|
||||
bg->setEnabled(pbox->isChecked());
|
||||
bg->setToolTip(pxy);
|
||||
lab->setText(hasProxyClip ? m_properties->get(QString("meta.media.%1.codec.name").arg(m_properties->get_int("video_index")).toUtf8().constData())
|
||||
lab->setText(hasProxyClip ? m_properties->get(QStringLiteral("meta.media.%1.codec.name").arg(m_properties->get_int("video_index")).toUtf8().constData())
|
||||
: QString());
|
||||
});
|
||||
hlay->addWidget(pbox);
|
||||
|
@ -605,7 +605,7 @@ ClipPropertiesController::ClipPropertiesController(const QString &clipName, Clip
|
|||
box->setObjectName(QStringLiteral("autorotate"));
|
||||
box->setChecked(autorotate == QLatin1String("0"));
|
||||
int vix = m_sourceProperties->get_int("video_index");
|
||||
const QString query = QString("meta.media.%1.codec.rotate").arg(vix);
|
||||
const QString query = QStringLiteral("meta.media.%1.codec.rotate").arg(vix);
|
||||
int angle = m_sourceProperties->get_int(query.toUtf8().constData());
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
connect(box, &QCheckBox::checkStateChanged, this, &ClipPropertiesController::slotEnableForce);
|
||||
|
@ -818,8 +818,8 @@ ClipPropertiesController::ClipPropertiesController(const QString &clipName, Clip
|
|||
// Rename event
|
||||
QString txt = item->text();
|
||||
int row = m_audioStreamsView->row(item) + 1;
|
||||
if (!txt.startsWith(QString("%1|").arg(row))) {
|
||||
txt.prepend(QString("%1|").arg(row));
|
||||
if (!txt.startsWith(QStringLiteral("%1|").arg(row))) {
|
||||
txt.prepend(QStringLiteral("%1|").arg(row));
|
||||
}
|
||||
m_controller->renameAudioStream(streamId, txt);
|
||||
QSignalBlocker bk(m_audioStreamsView);
|
||||
|
@ -940,7 +940,7 @@ ClipPropertiesController::ClipPropertiesController(const QString &clipName, Clip
|
|||
// Remove effect
|
||||
m_controller->requestRemoveStreamEffect(m_activeAudioStreams, QStringLiteral("volume"));
|
||||
} else {
|
||||
m_controller->requestAddStreamEffect(m_activeAudioStreams, QString("volume level=%1").arg(value));
|
||||
m_controller->requestAddStreamEffect(m_activeAudioStreams, QStringLiteral("volume level=%1").arg(value));
|
||||
}
|
||||
updateStreamIcon(m_audioStreamsView->currentRow(), m_activeAudioStreams);
|
||||
});
|
||||
|
@ -1402,8 +1402,8 @@ void ClipPropertiesController::fillProperties()
|
|||
|
||||
if (vindex > -1) {
|
||||
// We have a video stream
|
||||
QString codecInfo = QString("meta.media.%1.codec.").arg(vindex);
|
||||
QString streamInfo = QString("meta.media.%1.stream.").arg(vindex);
|
||||
QString codecInfo = QStringLiteral("meta.media.%1.codec.").arg(vindex);
|
||||
QString streamInfo = QStringLiteral("meta.media.%1.stream.").arg(vindex);
|
||||
QString property = codecInfo + QStringLiteral("long_name");
|
||||
QString codec = m_sourceProperties->get(property.toUtf8().constData());
|
||||
if (!codec.isEmpty()) {
|
||||
|
@ -1456,7 +1456,7 @@ void ClipPropertiesController::fillProperties()
|
|||
if (default_audio > -1) {
|
||||
propertyMap.append({i18n("Audio streams:"), QString::number(m_controller->audioStreamsCount())});
|
||||
|
||||
QString codecInfo = QString("meta.media.%1.codec.").arg(default_audio);
|
||||
QString codecInfo = QStringLiteral("meta.media.%1.codec.").arg(default_audio);
|
||||
QString property = codecInfo + QStringLiteral("long_name");
|
||||
QString codec = m_sourceProperties->get(property.toUtf8().constData());
|
||||
if (!codec.isEmpty()) {
|
||||
|
|
|
@ -788,7 +788,7 @@ void Monitor::buildBackgroundedProducer(int pos)
|
|||
}
|
||||
if (KdenliveSettings::monitor_background() != "black") {
|
||||
Mlt::Tractor trac(pCore->getProjectProfile());
|
||||
QString color = QString("color:%1").arg(KdenliveSettings::monitor_background());
|
||||
QString color = QStringLiteral("color:%1").arg(KdenliveSettings::monitor_background());
|
||||
std::shared_ptr<Mlt::Producer> bg(new Mlt::Producer(*trac.profile(), color.toUtf8().constData()));
|
||||
int maxLength = m_controller->originalProducer()->get_length();
|
||||
bg->set("length", maxLength);
|
||||
|
@ -1034,7 +1034,7 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
|
|||
// If the platform does now provide screen serial number, use indexes
|
||||
for (const QScreen *screen : qApp->screens()) {
|
||||
ix++;
|
||||
bool match = requestedMonitor == QString("%1:%2").arg(QString::number(ix), screen->serialNumber());
|
||||
bool match = requestedMonitor == QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber());
|
||||
// Check if monitor's index changed
|
||||
if (!match && !screen->serialNumber().isEmpty()) {
|
||||
match = requestedMonitor.section(QLatin1Char(':'), 1) == screen->serialNumber();
|
||||
|
@ -1046,9 +1046,9 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
|
|||
m_glWidget->resize(screen->geometry().size());
|
||||
screenFound = true;
|
||||
if (m_id == Kdenlive::ProjectMonitor) {
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
} else {
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1064,17 +1064,17 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
|
|||
// We have 3 monitors, use each
|
||||
if (m_id == Kdenlive::ProjectMonitor) {
|
||||
if (KdenliveSettings::clip_monitor_fullscreen().isEmpty()) {
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
} else {
|
||||
if (KdenliveSettings::clip_monitor_fullscreen() == QString("%1:%2").arg(QString::number(ix), screen->serialNumber())) {
|
||||
if (KdenliveSettings::clip_monitor_fullscreen() == QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (KdenliveSettings::project_monitor_fullscreen().isEmpty()) {
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
} else {
|
||||
if (KdenliveSettings::project_monitor_fullscreen() == QString("%1:%2").arg(QString::number(ix), screen->serialNumber())) {
|
||||
if (KdenliveSettings::project_monitor_fullscreen() == QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1082,9 +1082,9 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
|
|||
|
||||
} else {
|
||||
if (m_id == Kdenlive::ProjectMonitor) {
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setProject_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
} else {
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QString("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
KdenliveSettings::setClip_monitor_fullscreen(QStringLiteral("%1:%2").arg(QString::number(ix), screen->serialNumber()));
|
||||
}
|
||||
}
|
||||
m_glWidget->setParent(nullptr);
|
||||
|
@ -1328,7 +1328,7 @@ void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
|
|||
if ((m_controller != nullptr) && !m_controller->getProducerProperty(QStringLiteral("kdenlive:proxy")).isEmpty() &&
|
||||
m_controller->getProducerProperty(QStringLiteral("kdenlive:proxy")) != QLatin1String("-")) {
|
||||
// Clip monitor, using proxy. Use original clip url to get frame
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QString("XXXXXX.mlt")));
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.mlt")));
|
||||
if (src.open()) {
|
||||
src.setAutoRemove(false);
|
||||
m_controller->cloneProducerToFile(src.fileName());
|
||||
|
@ -1401,7 +1401,7 @@ void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
|
|||
QStringList pathInfo;
|
||||
if (useSourceResolution) {
|
||||
// Create a producer with the original clip
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QString("XXXXXX.mlt")));
|
||||
QTemporaryFile src(QDir::temp().absoluteFilePath(QStringLiteral("XXXXXX.mlt")));
|
||||
if (src.open()) {
|
||||
src.setAutoRemove(false);
|
||||
m_controller->cloneProducerToFile(src.fileName());
|
||||
|
@ -1892,7 +1892,7 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
|
|||
ClipType::ProducerType type = controller->clipType();
|
||||
if (type == ClipType::AV || type == ClipType::Video || type == ClipType::SlideShow) {
|
||||
m_glMonitor->rootObject()->setProperty("baseThumbPath",
|
||||
QString("image://thumbnail/%1/%2/#").arg(controller->clipId(), pCore->currentDoc()->uuid().toString()));
|
||||
QStringLiteral("image://thumbnail/%1/%2/#").arg(controller->clipId(), pCore->currentDoc()->uuid().toString()));
|
||||
} else {
|
||||
m_glMonitor->rootObject()->setProperty("baseThumbPath", QString());
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ void RecManager::slotRecord(bool record)
|
|||
qDebug() << "GOT FILTERED DSOW1: " << dshowOutput;
|
||||
// dshowOutput = dshowOutput.section(QLatin1Char('"'), 3, 3);
|
||||
if (dshowOutput.contains(QLatin1Char('"'))) {
|
||||
dshowOutput = QString("audio=\"%1\"").arg(dshowOutput.section(QLatin1Char('"'), 1, 1));
|
||||
dshowOutput = QStringLiteral("audio=\"%1\"").arg(dshowOutput.section(QLatin1Char('"'), 1, 1));
|
||||
qDebug().noquote() << "GOT FILTERED DSOW2: " << dshowOutput;
|
||||
// captureArgs << params.split(QLatin1Char(' '));
|
||||
// captureArgs.replace(captureArgs.indexOf(QLatin1String("default")), dshowOutput);
|
||||
|
@ -454,7 +454,7 @@ void RecManager::slotPreview(bool preview)
|
|||
producer = getV4lXmlPlaylist(profile, &isXml);
|
||||
|
||||
//producer =
|
||||
QString("avformat-novalidate:video4linux2:%1?width:%2&height:%3&frame_rate:%4").arg(KdenliveSettings::video4vdevice()).arg(profile.width).arg(profile.height).arg((double)
|
||||
QStringLiteral("avformat-novalidate:video4linux2:%1?width:%2&height:%3&frame_rate:%4").arg(KdenliveSettings::video4vdevice()).arg(profile.width).arg(profile.height).arg((double)
|
||||
profile.frame_rate_num / profile.frame_rate_den);
|
||||
if (!m_captureDevice->slotStartPreview(producer, isXml)) {
|
||||
// v4l capture failed to start
|
||||
|
|
|
@ -673,7 +673,7 @@ int VideoWidget::reconfigure()
|
|||
m_consumer->stop();
|
||||
m_consumer.reset();
|
||||
}
|
||||
QString audioBackend = (KdenliveSettings::external_display()) ? QString("decklink:%1").arg(KdenliveSettings::blackmagic_output_device())
|
||||
QString audioBackend = (KdenliveSettings::external_display()) ? QStringLiteral("decklink:%1").arg(KdenliveSettings::blackmagic_output_device())
|
||||
: KdenliveSettings::audiobackend();
|
||||
if (m_consumer == nullptr || serviceName.isEmpty() || serviceName != audioBackend) {
|
||||
m_consumer.reset(new Mlt::FilteredConsumer(pCore->getMonitorProfile(), audioBackend.toLatin1().constData()));
|
||||
|
|
|
@ -49,7 +49,7 @@ ClipStabilize::ClipStabilize(const std::vector<QString> &binIds, QString filterN
|
|||
QDomElement xml = EffectsRepository::get()->getXml(m_filtername);
|
||||
m_assetModel.reset(new AssetParameterModel(std::move(prop), xml, m_filtername, ObjectId()));
|
||||
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/presets/"));
|
||||
const QString presetFile = dir.absoluteFilePath(QString("%1.json").arg(m_assetModel->getAssetId()));
|
||||
const QString presetFile = dir.absoluteFilePath(QStringLiteral("%1.json").arg(m_assetModel->getAssetId()));
|
||||
const QVector<QPair<QString, QVariant>> params = m_assetModel->loadPreset(presetFile, i18n("Last setting"));
|
||||
if (!params.isEmpty()) {
|
||||
m_assetModel->setParameters(params);
|
||||
|
|
|
@ -165,7 +165,7 @@ void ClipTranscode::slotStartTransCode()
|
|||
}
|
||||
|
||||
if (mltEncoding) {
|
||||
params.replace(QStringLiteral("%1"), QString("-consumer %1"));
|
||||
params.replace(QStringLiteral("%1"), QStringLiteral("-consumer %1"));
|
||||
const QStringList splitted = params.split(QLatin1Char('-'), Qt::SkipEmptyParts);
|
||||
for (const QString &s : splitted) {
|
||||
QString t = s.simplified();
|
||||
|
@ -174,7 +174,7 @@ void ClipTranscode::slotStartTransCode()
|
|||
} else {
|
||||
if (t.contains(QLatin1String("%1"))) {
|
||||
// file name
|
||||
parameters.prepend(t.section(QLatin1Char(' '), 1).replace(QLatin1String("%1"), QString("avformat:%1").arg(destination)));
|
||||
parameters.prepend(t.section(QLatin1Char(' '), 1).replace(QLatin1String("%1"), QStringLiteral("avformat:%1").arg(destination)));
|
||||
parameters.prepend(QStringLiteral("-consumer"));
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -930,7 +930,7 @@ void ArchiveWidget::processElement(QDomElement e, const QString root)
|
|||
if (isTimewarp) {
|
||||
Xml::setXmlProperty(e, QStringLiteral("warp_resource"), dest.toLocalFile());
|
||||
Xml::setXmlProperty(e, QStringLiteral("resource"),
|
||||
QString("%1:%2").arg(Xml::getXmlProperty(e, QStringLiteral("warp_speed")), dest.toLocalFile()));
|
||||
QStringLiteral("%1:%2").arg(Xml::getXmlProperty(e, QStringLiteral("warp_speed")), dest.toLocalFile()));
|
||||
} else {
|
||||
Xml::setXmlProperty(e, QStringLiteral("resource"), dest.toLocalFile());
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ const QStringList GuideCategories::updatedGuides() const
|
|||
QString color = item->data(Qt::UserRole).toString();
|
||||
QString name = item->text();
|
||||
int ix = item->data(Qt::UserRole + 1).toInt();
|
||||
categories << QString("%1:%2:%3").arg(name, QString::number(ix), color);
|
||||
categories << QStringLiteral("%1:%2:%3").arg(name, QString::number(ix), color);
|
||||
}
|
||||
return categories;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
QVariant data(const QModelIndex &index, int role) const override
|
||||
{
|
||||
if (role == Qt::DisplayRole) {
|
||||
return QString("%1 %2").arg(QIdentityProxyModel::data(index, MarkerListModel::TCRole).toString(),
|
||||
return QStringLiteral("%1 %2").arg(QIdentityProxyModel::data(index, MarkerListModel::TCRole).toString(),
|
||||
QIdentityProxyModel::data(index, role).toString());
|
||||
}
|
||||
return sourceModel()->data(mapToSource(index), role);
|
||||
|
|
|
@ -176,7 +176,7 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
|
|||
proxy_imageminsize->setEnabled(generate_imageproxy->isChecked());
|
||||
QString currentProfileParams;
|
||||
if (!m_previewparams.isEmpty() || !m_previewextension.isEmpty()) {
|
||||
currentProfileParams = QString("%1;%2").arg(m_previewparams, m_previewextension);
|
||||
currentProfileParams = QStringLiteral("%1;%2").arg(m_previewparams, m_previewextension);
|
||||
}
|
||||
m_tlPreviewProfiles = new EncodingTimelinePreviewProfilesChooser(this, true, currentProfileParams);
|
||||
preview_profile_box->addWidget(m_tlPreviewProfiles);
|
||||
|
@ -529,7 +529,7 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly)
|
|||
|
||||
const QString ProjectSettings::selectedPreview() const
|
||||
{
|
||||
return QString("%1;%2").arg(m_tlPreviewProfiles->currentParams(), m_tlPreviewProfiles->currentExtension());
|
||||
return QStringLiteral("%1;%2").arg(m_tlPreviewProfiles->currentParams(), m_tlPreviewProfiles->currentExtension());
|
||||
}
|
||||
|
||||
void ProjectSettings::accept()
|
||||
|
|
|
@ -155,14 +155,14 @@ TemporaryData::TemporaryData(KdenliveDoc *doc, bool currentProjectOnly, QWidget
|
|||
ok = false;
|
||||
QDir global = m_doc->getCacheDir(SystemCacheRoot, &ok);
|
||||
QDir proxyFolder(global.absoluteFilePath(QStringLiteral("proxy")));
|
||||
gProxyPath->setText(QString("<a href='#'>%1</a>").arg(proxyFolder.absolutePath()));
|
||||
gProxyPath->setText(QStringLiteral("<a href='#'>%1</a>").arg(proxyFolder.absolutePath()));
|
||||
connect(gProxyPath, &QLabel::linkActivated, [proxyFolder]() { QDesktopServices::openUrl(QUrl::fromLocalFile(proxyFolder.absolutePath())); });
|
||||
|
||||
// Backup data
|
||||
connect(gBackupClean, &QToolButton::clicked, this, &TemporaryData::cleanBackup);
|
||||
connect(gBackupDelete, &QToolButton::clicked, this, &TemporaryData::deleteBackup);
|
||||
QDir backupFolder(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/.backup"));
|
||||
gBackupPath->setText(QString("<a href='#'>%1</a>").arg(backupFolder.absolutePath()));
|
||||
gBackupPath->setText(QStringLiteral("<a href='#'>%1</a>").arg(backupFolder.absolutePath()));
|
||||
connect(gBackupPath, &QLabel::linkActivated, [backupFolder]() { QDesktopServices::openUrl(QUrl::fromLocalFile(backupFolder.absolutePath())); });
|
||||
|
||||
// Config cleanup age
|
||||
|
|
|
@ -78,7 +78,7 @@ void NotesPlugin::slotInsertTimecode()
|
|||
}
|
||||
const QString clipName = pCore->bin()->getBinClipName(binId);
|
||||
const QString uuid = pCore->projectItemModel()->getBinClipUuid(binId);
|
||||
m_widget->insertHtml(QString("<a href=\"%1#%2\">%3:%4</a> ").arg(uuid, QString::number(frames), clipName, position));
|
||||
m_widget->insertHtml(QStringLiteral("<a href=\"%1#%2\">%3:%4</a> ").arg(uuid, QString::number(frames), clipName, position));
|
||||
} else {
|
||||
int frames = pCore->monitorManager()->projectMonitor()->position();
|
||||
QString position = pCore->timecode().getTimecodeFromFrames(frames);
|
||||
|
@ -87,10 +87,10 @@ void NotesPlugin::slotInsertTimecode()
|
|||
if (currentTrackInfo.first != -1) {
|
||||
// Insert timeline position with track reference
|
||||
m_widget->insertHtml(
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a> ")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a> ")
|
||||
.arg(uuid.toString(), QString::number(frames), QString::number(currentTrackInfo.first), currentTrackInfo.second, position));
|
||||
} else {
|
||||
m_widget->insertHtml(QString("<a href=\"%1!%2\">%3</a> ").arg(uuid.toString(), QString::number(frames), position));
|
||||
m_widget->insertHtml(QStringLiteral("<a href=\"%1!%2\">%3</a> ").arg(uuid.toString(), QString::number(frames), position));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void NotesPlugin::slotReAssign(const QStringList &anchors, const QList<QPoint> &
|
|||
updatedLink = a.section(QLatin1Char('#'), 1);
|
||||
position = updatedLink.toInt();
|
||||
if (!uuid.isEmpty()) {
|
||||
updatedLink.prepend(QString("%1#").arg(uuid));
|
||||
updatedLink.prepend(QStringLiteral("%1#").arg(uuid));
|
||||
}
|
||||
} else {
|
||||
if (a.contains(QLatin1Char('!'))) {
|
||||
|
@ -128,7 +128,7 @@ void NotesPlugin::slotReAssign(const QStringList &anchors, const QList<QPoint> &
|
|||
}
|
||||
position = updatedLink.toInt();
|
||||
if (!uuid.isEmpty()) {
|
||||
updatedLink.prepend(QString("%1#").arg(uuid));
|
||||
updatedLink.prepend(QStringLiteral("%1#").arg(uuid));
|
||||
}
|
||||
}
|
||||
QTextCursor cur(m_widget->textCursor());
|
||||
|
@ -137,10 +137,10 @@ void NotesPlugin::slotReAssign(const QStringList &anchors, const QList<QPoint> &
|
|||
QString pos = pCore->timecode().getTimecodeFromFrames(position);
|
||||
if (!binId.isEmpty()) {
|
||||
QString clipName = pCore->bin()->getBinClipName(binId);
|
||||
cur.insertHtml(QString("<a href=\"%1\">%2:%3</a> ").arg(updatedLink, clipName, pos));
|
||||
cur.insertHtml(QStringLiteral("<a href=\"%1\">%2:%3</a> ").arg(updatedLink, clipName, pos));
|
||||
} else {
|
||||
// Timestamp relative to project timeline
|
||||
cur.insertHtml(QString("<a href=\"%1\">%2</a> ").arg(updatedLink, pos));
|
||||
cur.insertHtml(QStringLiteral("<a href=\"%1\">%2</a> ").arg(updatedLink, pos));
|
||||
}
|
||||
ix++;
|
||||
}
|
||||
|
|
|
@ -1735,7 +1735,7 @@ void ProjectManager::saveWithUpdatedProfile(const QString &updatedProfile)
|
|||
|
||||
// Now update to new profile
|
||||
auto &newProfile = ProfileRepository::get()->getProfile(updatedProfile);
|
||||
QString convertedFile = QStringUtils::appendToFilename(currentFile, QString("-%1").arg(int(newProfile->fps() * 100)));
|
||||
QString convertedFile = QStringUtils::appendToFilename(currentFile, QStringLiteral("-%1").arg(int(newProfile->fps() * 100)));
|
||||
QString saveFolder = m_project->url().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).toLocalFile();
|
||||
QTemporaryFile tmpFile(saveFolder + "/kdenlive-XXXXXX.mlt");
|
||||
if (saveInTempFile) {
|
||||
|
|
|
@ -498,7 +498,7 @@ void AbstractPythonInterface::checkVersions(bool signalOnResult)
|
|||
if (version == QLatin1String("missing")) {
|
||||
version = i18nc("@item:intext indicates a missing dependency", "missing (optional)");
|
||||
}
|
||||
versions.append(QString("<b>%1</b> %2").arg(name, version));
|
||||
versions.append(QStringLiteral("<b>%1</b> %2").arg(name, version));
|
||||
if (m_versions->contains(name)) {
|
||||
(*m_versions)[name.toLower()] = version;
|
||||
} else {
|
||||
|
|
|
@ -241,7 +241,7 @@ std::vector<RenderRequest::RenderJob> RenderRequest::process()
|
|||
}
|
||||
|
||||
QString newPlaylistPath = playlistPath;
|
||||
newPlaylistPath = newPlaylistPath.replace(QStringLiteral(".mlt"), QString("-%1.mlt").arg(i));
|
||||
newPlaylistPath = newPlaylistPath.replace(QStringLiteral(".mlt"), QStringLiteral("-%1.mlt").arg(i));
|
||||
// QString newPlaylistPath = createEmptyTempFile(QStringLiteral("mlt")); // !!! This does not take the delayed rendering logic of generatePlaylistFile()
|
||||
// in to account
|
||||
|
||||
|
@ -318,7 +318,7 @@ void RenderRequest::createRenderJobs(std::vector<RenderJob> &jobs, const QDomDoc
|
|||
|
||||
QString RenderRequest::createEmptyTempFile(const QString &extension)
|
||||
{
|
||||
QTemporaryFile tmp(QDir::temp().absoluteFilePath(QString("kdenlive-XXXXXX.%1").arg(extension)));
|
||||
QTemporaryFile tmp(QDir::temp().absoluteFilePath(QStringLiteral("kdenlive-XXXXXX.%1").arg(extension)));
|
||||
if (!tmp.open()) {
|
||||
// Something went wrong
|
||||
qDebug() << "Could not create temporary file";
|
||||
|
@ -415,7 +415,7 @@ void RenderRequest::setDocTwoPassParams(int pass, QDomDocument &doc, const QStri
|
|||
if (m_presetParams.isX265()) {
|
||||
// The x265 codec is special
|
||||
QString x265params = consumer.attribute(QStringLiteral("x265-params"));
|
||||
x265params = QString("pass=%1:stats=%2:%3").arg(pass).arg(logFile.replace(":", "\\:"), x265params);
|
||||
x265params = QStringLiteral("pass=%1:stats=%2:%3").arg(pass).arg(logFile.replace(":", "\\:"), x265params);
|
||||
consumer.setAttribute(QStringLiteral("x265-params"), x265params);
|
||||
} else {
|
||||
consumer.setAttribute(QStringLiteral("pass"), pass);
|
||||
|
@ -568,7 +568,7 @@ void RenderRequest::prepareMultiAudioFiles(std::vector<RenderJob> &jobs, const Q
|
|||
}
|
||||
|
||||
// setup filenames
|
||||
QString appendix = QString("_A%1%2%3")
|
||||
QString appendix = QStringLiteral("_A%1%2%3")
|
||||
.arg(audioCount)
|
||||
.arg(trackName.isEmpty() ? QString() : QStringLiteral("-"))
|
||||
.arg(trackName.replace(QStringLiteral(" "), QStringLiteral("_")));
|
||||
|
|
|
@ -228,7 +228,7 @@ void RenderPresetRepository::parseMltPresets()
|
|||
const QStringList profiles = root.entryList(QDir::Files, QDir::Name);
|
||||
for (const QString &prof : profiles) {
|
||||
std::unique_ptr<RenderPresetModel> model(
|
||||
new RenderPresetModel(groupName, root.absoluteFilePath(prof), prof, QString("properties=lossless/" + prof), true));
|
||||
new RenderPresetModel(groupName, root.absoluteFilePath(prof), prof, QStringLiteral("properties=lossless/%1").arg(prof), true));
|
||||
if (m_profiles.count(model->name()) == 0) {
|
||||
m_groups.append(model->groupName());
|
||||
m_groups.removeDuplicates();
|
||||
|
@ -241,7 +241,7 @@ void RenderPresetRepository::parseMltPresets()
|
|||
QStringList profiles = root.entryList(QDir::Files, QDir::Name);
|
||||
for (const QString &prof : std::as_const(profiles)) {
|
||||
std::unique_ptr<RenderPresetModel> model(
|
||||
new RenderPresetModel(groupName, root.absoluteFilePath(prof), prof, QString("properties=stills/" + prof), false));
|
||||
new RenderPresetModel(groupName, root.absoluteFilePath(prof), prof, QStringLiteral("properties=stills/%1").arg(prof), false));
|
||||
m_groups.append(model->groupName());
|
||||
m_groups.removeDuplicates();
|
||||
m_profiles.insert(std::make_pair(model->name(), std::move(model)));
|
||||
|
|
|
@ -376,7 +376,7 @@ QImage AudioSpectrum::renderHUD(uint)
|
|||
} else {
|
||||
x = leftDist + m_innerScopeRect.width();
|
||||
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height() + 6);
|
||||
davinci.drawText(x - 10, y, i18n("%1 kHz", QString("%1").arg(m_freqMax / 1000., 0, 'f', 1)));
|
||||
davinci.drawText(x - 10, y, i18n("%1 kHz", QStringLiteral("%1").arg(m_freqMax / 1000., 0, 'f', 1)));
|
||||
}
|
||||
|
||||
if (hz > 0) {
|
||||
|
@ -439,7 +439,7 @@ QImage AudioSpectrum::renderHUD(uint)
|
|||
davinci.setPen(AbstractScopeWidget::penLighter);
|
||||
davinci.drawRect(rect);
|
||||
davinci.drawText(textRect,
|
||||
QString(i18n("%1 dB", QString("%1").arg(db, 0, 'f', 2)) + '\n' + i18n("%1 kHz", QString("%1").arg(freq / 1000, 0, 'f', 2))));
|
||||
QString(i18n("%1 dB", QStringLiteral("%1").arg(db, 0, 'f', 2)) + '\n' + i18n("%1 kHz", QStringLiteral("%1").arg(freq / 1000, 0, 'f', 2))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ QImage Spectrogram::renderHUD(uint)
|
|||
mouseX < m_innerScopeRect.width() && mouseX >= 0;
|
||||
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height() + 6);
|
||||
if (!hideText) {
|
||||
davinci.drawText(x - 10, y, i18n("%1 kHz", QString("%1").arg(m_freqMax / 1000., 0, 'f', 1)));
|
||||
davinci.drawText(x - 10, y, i18n("%1 kHz", QStringLiteral("%1").arg(m_freqMax / 1000., 0, 'f', 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ QImage Spectrogram::renderHUD(uint)
|
|||
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height() + 6);
|
||||
davinci.drawText(
|
||||
x - 10, y,
|
||||
i18n("%1 kHz", QString("%1").arg(double(m_mousePos.x() - m_innerScopeRect.left()) / m_innerScopeRect.width() * m_freqMax / 1000, 0, 'f', 2)));
|
||||
i18n("%1 kHz", QStringLiteral("%1").arg(double(m_mousePos.x() - m_innerScopeRect.left()) / m_innerScopeRect.width() * m_freqMax / 1000, 0, 'f', 2)));
|
||||
}
|
||||
|
||||
// Draw the dB brightness scale
|
||||
|
@ -431,7 +431,7 @@ QImage Spectrogram::renderAudioScope(uint, const audioShortVector &audioFrame, c
|
|||
for (QList<QVector<float>>::iterator it = m_fftHistory.begin(); it != m_fftHistory.end(); ++it) {
|
||||
storedBytes += (*it).size() * sizeof((*it)[0]);
|
||||
}
|
||||
qCDebug(KDENLIVE_LOG) << QString("Total storage used: %1 kB").arg((double)storedBytes / 1000, 0, 'f', 2);
|
||||
qCDebug(KDENLIVE_LOG) << QStringLiteral("Total storage used: %1 kB").arg((double)storedBytes / 1000, 0, 'f', 2);
|
||||
#endif
|
||||
|
||||
m_fftHistoryImg = spectrum;
|
||||
|
|
|
@ -70,7 +70,7 @@ bool loadProjectBin(Mlt::Tractor tractor, const QUuid &activeUuid)
|
|||
continue;
|
||||
}
|
||||
if (binIdCorresp.count(args.at(1)) > 0) {
|
||||
binsToOpen << QString("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
binsToOpen << QStringLiteral("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ bool constructTimelineFromTractor(const std::shared_ptr<TimelineItemModel> &time
|
|||
continue;
|
||||
}
|
||||
if (binIdCorresp.count(args.at(1)) > 0) {
|
||||
binsToOpen << QString("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
binsToOpen << QStringLiteral("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
}
|
||||
}
|
||||
if (pCore->window()) {
|
||||
|
@ -382,7 +382,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
|
|||
continue;
|
||||
}
|
||||
if (binIdCorresp.count(args.at(1)) > 0) {
|
||||
binsToOpen << QString("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
binsToOpen << QStringLiteral("%1:%2:%3").arg(args.at(0), binIdCorresp.at(args.at(1)), args.at(2));
|
||||
}
|
||||
}
|
||||
if (pCore->window()) {
|
||||
|
@ -544,7 +544,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
|
|||
int compoId;
|
||||
int aTrack = t->get_a_track();
|
||||
if (!timeline->isTrack(timeline->getTrackIndexFromPosition(t->get_b_track() - 1))) {
|
||||
QString tcInfo = QString("<a href=\"%1!%2\">%3</a>")
|
||||
QString tcInfo = QStringLiteral("<a href=\"%1!%2\">%3</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(t->get_in()), pCore->timecode().getTimecodeFromFrames(t->get_in()));
|
||||
m_notesLog << i18n("%1 Composition (%2) with invalid track reference found and removed.", tcInfo, t->get("id"));
|
||||
m_errorMessage << i18n("Invalid composition %1 found on track %2 at %3, compositing with track %4.", t->get("id"), t->get_b_track(),
|
||||
|
@ -553,7 +553,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
|
|||
}
|
||||
if (aTrack > tractor.count()) {
|
||||
int tid = timeline->getTrackIndexFromPosition(t->get_b_track() - 1);
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(t->get_in()), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
timeline->getTrackTagById(tid), pCore->timecode().getTimecodeFromFrames(t->get_in()));
|
||||
m_notesLog << i18n("%1 Composition (%2) with invalid track reference found and removed.", tcInfo, t->get("id"));
|
||||
|
@ -567,7 +567,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
|
|||
if (pos > 0 && videoTracksIndexes.at(pos - 1) != aTrack) {
|
||||
t->set("force_track", 1);
|
||||
int tid = timeline->getTrackIndexFromPosition(t->get_b_track() - 1);
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(t->get_in()), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
timeline->getTrackTagById(tid), pCore->timecode().getTimecodeFromFrames(t->get_in()));
|
||||
m_notesLog << i18n("%1 Composition was not applied on expected track, manually enforce the track.", tcInfo);
|
||||
|
@ -581,7 +581,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
|
|||
if (!compositionOk) {
|
||||
// timeline->requestItemDeletion(compoId, false);
|
||||
int tid = timeline->getTrackIndexFromPosition(t->get_b_track() - 1);
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(t->get_in()), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
timeline->getTrackTagById(tid), pCore->timecode().getTimecodeFromFrames(t->get_in()));
|
||||
m_notesLog << i18n("%1 Invalid composition found and removed.", tcInfo);
|
||||
|
@ -699,7 +699,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
if (cid1 > 0 && cid2 > 0) {
|
||||
if (timeline->getClipSubPlaylistIndex(cid1) == 1) {
|
||||
// Delete clip
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(in), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
timeline->getTrackTagById(tid), pCore->timecode().getTimecodeFromFrames(timeline->getClipPosition(cid1)));
|
||||
m_notesLog << i18n("Incorrect Mix, clip %1 was removed at %2.", timeline->getClipName(cid1), tcInfo);
|
||||
|
@ -709,7 +709,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
|
||||
} else if (timeline->getClipSubPlaylistIndex(cid2) == 1) {
|
||||
// Delete clip
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(in), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
timeline->getTrackTagById(tid), pCore->timecode().getTimecodeFromFrames(timeline->getClipPosition(cid2)));
|
||||
m_notesLog << i18n("Incorrect Mix, clip %1 was removed at %2.", timeline->getClipName(cid2), tcInfo);
|
||||
|
@ -781,7 +781,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
if (QUuid(clipId).isNull()) {
|
||||
qDebug() << "===== ERROR IN CLIP: " << clip->parent().get("kdenlive:id") << ", UUID: " << clipId;
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
m_notesLog << i18n("%1 Timeline clip (%2) without bin reference found and removed.", tcInfo, clip->parent().get("id"));
|
||||
|
@ -802,7 +802,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
if (binId == sequenceBinId) {
|
||||
// Trying to embed a sequence into itself, drop
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
m_notesLog << i18n("%1 Timeline clip (%2) without bin reference found and removed.", tcInfo, clip->parent().get("id"));
|
||||
|
@ -814,7 +814,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
if (binClip == nullptr || binClip->getProducerIntProperty("kdenlive:producer_type") != clip->parent().get_int("kdenlive:producer_type")) {
|
||||
// Sequence clip not found, error out
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
m_notesLog << i18n("%1 Timeline clip (%2) without bin reference found and removed.", tcInfo, clip->parent().get("id"));
|
||||
|
@ -832,7 +832,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
exit(1);
|
||||
QStringList fixedId = pCore->projectItemModel()->getClipByUrl(QFileInfo(resource));
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
if (!fixedId.isEmpty()) {
|
||||
|
@ -893,7 +893,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
if (startMixToFind || endMixToFind) {
|
||||
// A mix for this clip is missing
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
// Try to resize clip and put it on playlist 0
|
||||
|
@ -956,7 +956,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
// Check if playlist 0 is available
|
||||
enforceTopPlaylist = timeline->trackIsAvailable(tid, position, duration, 0);
|
||||
const QString tcInfo =
|
||||
QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1), trackTag,
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
if (enforceTopPlaylist) {
|
||||
|
@ -980,7 +980,7 @@ bool constructTrackFromMelt(const std::shared_ptr<TimelineItemModel> &timeline,
|
|||
timeline->requestItemDeletion(cid, false);
|
||||
m_errorMessage << i18n("Invalid clip %1 found on track %2 at %3.", clip->parent().get("id"), track.get("id"),
|
||||
pCore->timecode().getTimecodeFromFrames(position));
|
||||
const QString tcInfo = QString("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
const QString tcInfo = QStringLiteral("<a href=\"%1!%2?%3\">%4 %5</a>")
|
||||
.arg(timeline->uuid().toString(), QString::number(position), QString::number(timeline->getTrackPosition(tid) + 1),
|
||||
trackTag, pCore->timecode().getTimecodeFromFrames(position));
|
||||
m_notesLog << i18n("%1 Invalid clip (%2) found and removed", tcInfo, clip->parent().get("id"));
|
||||
|
|
|
@ -600,7 +600,7 @@ void ClipModel::requestRemapResize(int inPoint, int outPoint, int oldIn, int old
|
|||
// HACK: we always set last keyframe 1 frame after in MLT to ensure we have a correct last frame
|
||||
offset = 1;
|
||||
}
|
||||
result << QString("%1=%2")
|
||||
result << QStringLiteral("%1=%2")
|
||||
.arg(m_producer->frames_to_time(j.key() + offset, mlt_time_clock))
|
||||
.arg(GenTime(j.value(), pCore->getCurrentFps()).seconds());
|
||||
}
|
||||
|
|
|
@ -770,7 +770,7 @@ QJsonObject GroupsModel::toJson(int gid) const
|
|||
int track = ptr->isSubTitle(gid) ? -2 : ptr->getTrackPosition(ptr->getItemTrackId(gid));
|
||||
int pos = ptr->getItemPosition(gid);
|
||||
int subLayer = ptr->isSubTitle(gid) ? ptr->getSubtitleLayer(gid) : -1;
|
||||
currentGroup.insert(QLatin1String("data"), QJsonValue(QString("%1:%2:%3").arg(track).arg(pos).arg(subLayer)));
|
||||
currentGroup.insert(QLatin1String("data"), QJsonValue(QStringLiteral("%1:%2:%3").arg(track).arg(pos).arg(subLayer)));
|
||||
} else {
|
||||
qDebug() << "Impossible to create group because the timeline is not available anymore";
|
||||
Q_ASSERT(false);
|
||||
|
@ -912,7 +912,7 @@ void GroupsModel::adjustOffset(QJsonArray &updatedNodes, const QJsonObject &chil
|
|||
int trackPos = trackId == -2 ? -2 : ptr->getTrackPosition(trackMap.value(trackId));
|
||||
int subLayer = trackId == -2 ? cur_data.section(":", 2, 2).toInt() : -1;
|
||||
pos += offset;
|
||||
child.insert(QLatin1String("data"), QJsonValue(QString("%1:%2:%3").arg(trackPos).arg(pos).arg(subLayer)));
|
||||
child.insert(QLatin1String("data"), QJsonValue(QStringLiteral("%1:%2:%3").arg(trackPos).arg(pos).arg(subLayer)));
|
||||
updatedNodes.append(QJsonValue(child));
|
||||
}
|
||||
} else if (type != GroupType::Leaf) {
|
||||
|
|
|
@ -847,9 +847,9 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
|
|||
int newId = -1;
|
||||
QString binClipId;
|
||||
if (binId.contains(QLatin1Char('/'))) {
|
||||
binClipId = QString("%1/%2/%3").arg(binId.section(QLatin1Char('/'), 0, 0)).arg(zone.x()).arg(zone.y() - 1);
|
||||
binClipId = QStringLiteral("%1/%2/%3").arg(binId.section(QLatin1Char('/'), 0, 0)).arg(zone.x()).arg(zone.y() - 1);
|
||||
} else {
|
||||
binClipId = QString("%1/%2/%3").arg(binId).arg(zone.x()).arg(zone.y() - 1);
|
||||
binClipId = QStringLiteral("%1/%2/%3").arg(binId).arg(zone.x()).arg(zone.y() - 1);
|
||||
}
|
||||
result = timeline->requestClipInsertion(binClipId, trackIds.first(), insertFrame, newId, true, true, useTargets, undo, redo, affectedTracks);
|
||||
}
|
||||
|
|
|
@ -900,7 +900,7 @@ void TimelineItemModel::passSequenceProperties(const QMap<QString, QString> base
|
|||
QMapIterator<QString, QString> i(baseProperties);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
tractor()->set(QString("kdenlive:sequenceproperties.%1").arg(i.key()).toUtf8().constData(), i.value().toUtf8().constData());
|
||||
tractor()->set(QStringLiteral("kdenlive:sequenceproperties.%1").arg(i.key()).toUtf8().constData(), i.value().toUtf8().constData());
|
||||
}
|
||||
// Store groups data
|
||||
tractor()->set("kdenlive:sequenceproperties.groups", groupsData().toUtf8().constData());
|
||||
|
|
|
@ -6081,7 +6081,7 @@ const QString TimelineModel::sceneList(const QString &root, const QString &fullP
|
|||
Mlt::Service s(m_tractor->get_service());
|
||||
std::unique_ptr<Mlt::Filter> filter = nullptr;
|
||||
if (!filterData.isEmpty()) {
|
||||
filter = std::make_unique<Mlt::Filter>(pCore->getProjectProfile().get_profile(), QString("dynamictext:%1").arg(filterData).toUtf8().constData());
|
||||
filter = std::make_unique<Mlt::Filter>(pCore->getProjectProfile().get_profile(), QStringLiteral("dynamictext:%1").arg(filterData).toUtf8().constData());
|
||||
filter->set("fgcolour", "#ffffff");
|
||||
filter->set("bgcolour", "#bb333333");
|
||||
s.attach(*filter.get());
|
||||
|
@ -7345,7 +7345,7 @@ QByteArray TimelineModel::timelineHash()
|
|||
// Compositions hash
|
||||
for (auto &compo : m_allCompositions) {
|
||||
int track = getTrackPosition(compo.second->getCurrentTrackId());
|
||||
QString compoData = QString("%1 %2 %3 %4")
|
||||
QString compoData = QStringLiteral("%1 %2 %3 %4")
|
||||
.arg(QString::number(compo.second->getATrack()), QString::number(track), QString::number(compo.second->getPosition()),
|
||||
QString::number(compo.second->getPlaytime()));
|
||||
compoData.append(compo.second->getAssetId());
|
||||
|
|
|
@ -2873,7 +2873,7 @@ QByteArray TrackModel::trackHash()
|
|||
// Parse mixes
|
||||
for (auto &sameComposition : m_sameCompositions) {
|
||||
Mlt::Transition *tr = static_cast<Mlt::Transition *>(sameComposition.second->getAsset());
|
||||
QString mixData = QString("%1 %2 %3").arg(QString::number(tr->get_in()), QString::number(tr->get_out()), sameComposition.second->getAssetId());
|
||||
QString mixData = QStringLiteral("%1 %2 %3").arg(QString::number(tr->get_in()), QString::number(tr->get_out()), sameComposition.second->getAssetId());
|
||||
fileData.append(mixData.toLatin1());
|
||||
}
|
||||
return fileData;
|
||||
|
|
|
@ -170,7 +170,7 @@ void PreviewManager::loadChunks(QVariantList previewChunks, QVariantList dirtyCh
|
|||
}
|
||||
int position = playlist.clip_start(i);
|
||||
if (previewChunks.contains(QString::number(position))) {
|
||||
if (existingChuncks.contains(QString("%1.%2").arg(position).arg(m_extension))) {
|
||||
if (existingChuncks.contains(QStringLiteral("%1.%2").arg(position).arg(m_extension))) {
|
||||
clip.reset(playlist.get_clip(i));
|
||||
m_renderedChunks << position;
|
||||
m_previewTrack->insert_at(position, clip.get(), 1);
|
||||
|
@ -772,7 +772,7 @@ void PreviewManager::gotPreviewRender(int frame, const QString &file, int progre
|
|||
if (progress < 0) {
|
||||
if (m_warnOnCrash) {
|
||||
pCore->displayMessage(i18n("Preview rendering failed, check your parameters. %1Show details...%2",
|
||||
QString("<a href=\"" + QString::fromLatin1(QUrl::toPercentEncoding(file)) + QStringLiteral("\">")),
|
||||
QStringLiteral("<a href=\"%1\">").arg(QUrl::toPercentEncoding(file)),
|
||||
QStringLiteral("</a>")),
|
||||
MltError);
|
||||
} else {
|
||||
|
@ -782,7 +782,7 @@ void PreviewManager::gotPreviewRender(int frame, const QString &file, int progre
|
|||
return;
|
||||
}
|
||||
if (m_previewTrack->is_blank_at(frame)) {
|
||||
Mlt::Producer prod(pCore->getProjectProfile(), QString("avformat:%1").arg(file).toUtf8().constData());
|
||||
Mlt::Producer prod(pCore->getProjectProfile(), QStringLiteral("avformat:%1").arg(file).toUtf8().constData());
|
||||
if (prod.is_valid() && prod.get_length() == KdenliveSettings::timelinechunks()) {
|
||||
m_dirtyMutex.lock();
|
||||
m_dirtyChunks.removeAll(QVariant(frame));
|
||||
|
@ -858,7 +858,7 @@ const QStringList PreviewManager::getCompressedList(const QVariantList items) co
|
|||
if (current - KdenliveSettings::timelinechunks() == lastFrame) {
|
||||
lastFrame = current;
|
||||
if (frame == items.last()) {
|
||||
currentString.append(QString("-%1").arg(lastFrame));
|
||||
currentString.append(QStringLiteral("-%1").arg(lastFrame));
|
||||
resultString << currentString;
|
||||
currentString.clear();
|
||||
}
|
||||
|
@ -872,7 +872,7 @@ const QStringList PreviewManager::getCompressedList(const QVariantList items) co
|
|||
currentString = frame.toString();
|
||||
} else {
|
||||
// Range, store
|
||||
currentString.append(QString("-%1").arg(lastFrame));
|
||||
currentString.append(QStringLiteral("-%1").arg(lastFrame));
|
||||
resultString << currentString;
|
||||
currentString = frame.toString();
|
||||
}
|
||||
|
|
|
@ -4898,7 +4898,7 @@ void TimelineController::addAndInsertFile(const QString &recordedFile, int tid,
|
|||
if (endPos > 0) {
|
||||
// Limited space on track
|
||||
endPos = qMin(int(clip->frameDuration() - 1), endPos);
|
||||
QString binClipId = QString("%1/%2/%3").arg(binId).arg(0).arg(endPos);
|
||||
QString binClipId = QStringLiteral("%1/%2/%3").arg(binId).arg(0).arg(endPos);
|
||||
model->requestClipInsertion(binClipId, track, recPosition.first, id, true, true, false);
|
||||
endPos++;
|
||||
} else {
|
||||
|
@ -5587,7 +5587,7 @@ const QString TimelineController::getActionShortcut(const QString actionName)
|
|||
if (a) {
|
||||
shortcut = a->shortcut().toString(QKeySequence::NativeText);
|
||||
if (!shortcut.isEmpty()) {
|
||||
shortcut = QString(" (%1)").arg(shortcut);
|
||||
shortcut = QStringLiteral(" (%1)").arg(shortcut);
|
||||
}
|
||||
}
|
||||
return shortcut;
|
||||
|
|
|
@ -16,7 +16,7 @@ FunctionalUndoCommand::FunctionalUndoCommand(Fun undo, Fun redo, const QString &
|
|||
, m_redo(std::move(redo))
|
||||
, m_undone(false)
|
||||
{
|
||||
setText(QString("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(text));
|
||||
setText(QStringLiteral("%1 %2").arg(QTime::currentTime().toString("hh:mm")).arg(text));
|
||||
}
|
||||
|
||||
void FunctionalUndoCommand::undo()
|
||||
|
|
|
@ -15,7 +15,7 @@ QString QStringUtils::getUniqueName(const QStringList &names, const QString &nam
|
|||
QString newName = name;
|
||||
while (names.contains(newName)) {
|
||||
// name is not unique, add a suffix
|
||||
newName = name + QString("-%1").arg(i);
|
||||
newName = name + QStringLiteral("-%1").arg(i);
|
||||
i++;
|
||||
}
|
||||
return newName;
|
||||
|
|
|
@ -170,7 +170,7 @@ QImage ThumbnailCache::getThumbnail(QString hash, const QString &binId, int pos,
|
|||
if (hash.isEmpty()) {
|
||||
return QImage();
|
||||
}
|
||||
hash.append(QString("#%1.jpg").arg(pos));
|
||||
hash.append(QStringLiteral("#%1.jpg").arg(pos));
|
||||
QMutexLocker locker(&m_mutex);
|
||||
if (m_volatileCache->contains(hash)) {
|
||||
return m_volatileCache->get(hash);
|
||||
|
@ -364,7 +364,7 @@ QStringList ThumbnailCache::getAudioKey(const QString &binId, bool *ok)
|
|||
if (streamIxes.size() > 1) {
|
||||
QStringList streamsList;
|
||||
for (const int st : std::as_const(streamIxes)) {
|
||||
streamsList << QString("%1_%2.png").arg(binClip->hash()).arg(st);
|
||||
streamsList << QStringLiteral("%1_%2.png").arg(binClip->hash()).arg(st);
|
||||
}
|
||||
return streamsList;
|
||||
}
|
||||
|
@ -372,14 +372,14 @@ QStringList ThumbnailCache::getAudioKey(const QString &binId, bool *ok)
|
|||
if (streams.size() < 2) {
|
||||
int audio = binClip->getProducerIntProperty(QStringLiteral("audio_index"));
|
||||
if (audio > -1) {
|
||||
return {QString("%1_%2.png").arg(binClip->hash()).arg(audio)};
|
||||
return {QStringLiteral("%1_%2.png").arg(binClip->hash()).arg(audio)};
|
||||
}
|
||||
return {binClip->hash() + QStringLiteral(".png")};
|
||||
}
|
||||
QStringList streamsList;
|
||||
QStringList streamIndexes = streams.split(QLatin1Char(';'));
|
||||
for (const QString &st : std::as_const(streamIndexes)) {
|
||||
streamsList << QString("%1_%2.png").arg(binClip->hash(), st);
|
||||
streamsList << QStringLiteral("%1_%2.png").arg(binClip->hash(), st);
|
||||
}
|
||||
return streamsList;
|
||||
}
|
||||
|
|
|
@ -224,12 +224,12 @@ QString Timecode::getStringTimecode(int frames, const double &fps, bool showFram
|
|||
int hours = minutes / 60;
|
||||
minutes = minutes % 60;
|
||||
QString text = showFrames
|
||||
? QString("%1:%2:%3.%4")
|
||||
? QStringLiteral("%1:%2:%3.%4")
|
||||
.arg(hours, 2, 10, QLatin1Char('0'))
|
||||
.arg(minutes, 2, 10, QLatin1Char('0'))
|
||||
.arg(seconds, 2, 10, QLatin1Char('0'))
|
||||
.arg(frms, fps > 100 ? 3 : 2, 10, QLatin1Char('0'))
|
||||
: QString("%1:%2:%3").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0'));
|
||||
: QStringLiteral("%1:%2:%3").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0'));
|
||||
if (negative) {
|
||||
text.prepend('-');
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ const QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const
|
|||
|
||||
int seconds = frames / m_realFps;
|
||||
frames -= ceil(seconds * m_realFps);
|
||||
QString text = QString("%1:%2:%3:%4")
|
||||
QString text = QStringLiteral("%1:%2:%3:%4")
|
||||
.arg(hours, 2, 10, QLatin1Char('0'))
|
||||
.arg(minutes, 2, 10, QLatin1Char('0'))
|
||||
.arg(seconds, 2, 10, QLatin1Char('0'))
|
||||
|
@ -292,7 +292,7 @@ const QString Timecode::getTimecodeHH_MM_SS_HH(const GenTime &time) const
|
|||
int hours = minutes / 60;
|
||||
minutes = minutes % 60;
|
||||
|
||||
QString text = QString("%1:%2:%3%5%4")
|
||||
QString text = QStringLiteral("%1:%2:%3%5%4")
|
||||
.arg(hours, 2, 10, QLatin1Char('0'))
|
||||
.arg(minutes, 2, 10, QLatin1Char('0'))
|
||||
.arg(seconds, 2, 10, QLatin1Char('0'))
|
||||
|
@ -346,7 +346,7 @@ const QString Timecode::getTimecodeDropFrame(int framenumber) const
|
|||
int minutes = (int)floor(floor(framenumber / m_displayedFramesPerSecond) / 60) % 60;
|
||||
int hours = floor(floor(floor(framenumber / m_displayedFramesPerSecond) / 60) / 60);
|
||||
|
||||
QString text = QString("%1:%2:%3,%4")
|
||||
QString text = QStringLiteral("%1:%2:%3,%4")
|
||||
.arg(hours, 2, 10, QLatin1Char('0'))
|
||||
.arg(minutes, 2, 10, QLatin1Char('0'))
|
||||
.arg(seconds, 2, 10, QLatin1Char('0'))
|
||||
|
|
|
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (str.startsWith(QLatin1String("--profile="))) {
|
||||
QString s = str;
|
||||
s.remove(0, QString("--profile=").length());
|
||||
s.remove(0, QStringLiteral("--profile=").length());
|
||||
profile = s.toStdString();
|
||||
args.removeOne(str);
|
||||
|
||||
|
|
|
@ -279,13 +279,13 @@ TEST_CASE("Non-BMP Unicode", "[NONBMP]")
|
|||
|
||||
// create a simple title with the non-BMP test string
|
||||
const QString titleXml =
|
||||
QString("<kdenlivetitle duration=\"150\" LC_NUMERIC=\"C\" width=\"1920\" height=\"1080\" out=\"149\">\n <item type=\"QGraphicsTextItem\" "
|
||||
QStringLiteral("<kdenlivetitle duration=\"150\" LC_NUMERIC=\"C\" width=\"1920\" height=\"1080\" out=\"149\">\n <item type=\"QGraphicsTextItem\" "
|
||||
"z-index=\"0\">\n <position x=\"777\" y=\"482\">\n <transform>1,0,0,0,1,0,0,0,1</transform>\n </position>\n <content "
|
||||
"shadow=\"0;#64000000;3;3;3\" font-underline=\"0\" box-height=\"138\" font-outline-color=\"0,0,0,255\" font=\"DejaVu Sans\" "
|
||||
"letter-spacing=\"0\" font-pixel-size=\"120\" font-italic=\"0\" typewriter=\"0;2;1;0;0\" alignment=\"0\" font-weight=\"63\" "
|
||||
"font-outline=\"3\" box-width=\"573.25\" font-color=\"252,233,79,255\">") +
|
||||
emojiTestString +
|
||||
QString("</content>\n </item>\n <startviewport rect=\"0,0,1920,1080\"/>\n <endviewport rect=\"0,0,1920,1080\"/>\n <background "
|
||||
QStringLiteral("</content>\n </item>\n <startviewport rect=\"0,0,1920,1080\"/>\n <endviewport rect=\"0,0,1920,1080\"/>\n <background "
|
||||
"color=\"0,0,0,0\"/>\n</kdenlivetitle>\n");
|
||||
|
||||
QString binId2 = KdenliveTests::createTextProducer(pCore->getProjectProfile(), binModel, titleXml, emojiTestString, 150);
|
||||
|
|
|
@ -903,9 +903,9 @@ TEST_CASE("Simple Mix", "[SameTrackMix]")
|
|||
mix2();
|
||||
|
||||
// Now switch mixes to Slide type
|
||||
timeline->switchComposition(cid7, QString("slide"));
|
||||
timeline->switchComposition(cid6, QString("slide"));
|
||||
timeline->switchComposition(cid5, QString("slide"));
|
||||
timeline->switchComposition(cid7, QStringLiteral("slide"));
|
||||
timeline->switchComposition(cid6, QStringLiteral("slide"));
|
||||
timeline->switchComposition(cid5, QStringLiteral("slide"));
|
||||
mix2();
|
||||
|
||||
// Mix 3 and 4, this will revert all subsequent mixes
|
||||
|
@ -917,9 +917,9 @@ TEST_CASE("Simple Mix", "[SameTrackMix]")
|
|||
mix2();
|
||||
|
||||
// Now switch mixes to Wipe type
|
||||
timeline->switchComposition(cid7, QString("wipe"));
|
||||
timeline->switchComposition(cid6, QString("wipe"));
|
||||
timeline->switchComposition(cid5, QString("wipe"));
|
||||
timeline->switchComposition(cid7, QStringLiteral("wipe"));
|
||||
timeline->switchComposition(cid6, QStringLiteral("wipe"));
|
||||
timeline->switchComposition(cid5, QStringLiteral("wipe"));
|
||||
mix2();
|
||||
|
||||
// Mix 3 and 4, this will revert all subsequent mixes
|
||||
|
|
|
@ -50,7 +50,7 @@ TEST_CASE("Basic tests of the render preset model", "[RenderPresets]")
|
|||
CHECK(model->getParam("three") == QStringLiteral("third"));
|
||||
CHECK(model->getParam("four") == QStringLiteral("4"));
|
||||
|
||||
CHECK(model->params().toString().length() == QString("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params().toString().length() == QStringLiteral("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params().size() == 4);
|
||||
CHECK(model->params().contains("one"));
|
||||
CHECK(model->params().contains("two"));
|
||||
|
@ -58,38 +58,38 @@ TEST_CASE("Basic tests of the render preset model", "[RenderPresets]")
|
|||
CHECK(model->params().contains("four"));
|
||||
|
||||
// test removing a normal parameter in the middle
|
||||
CHECK(model->params({QStringLiteral("three")}).toString().length() == QString("one=first two=second value four=4").length());
|
||||
CHECK(model->params({QStringLiteral("three")}).toString().length() == QStringLiteral("one=first two=second value four=4").length());
|
||||
CHECK(model->params({QStringLiteral("three")}).size() == 3);
|
||||
CHECK_FALSE(model->params({QStringLiteral("three")}).contains("three"));
|
||||
|
||||
// test removing a parameter at the first position
|
||||
CHECK(model->params({QStringLiteral("one")}).toString().length() == QString("two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("one")}).toString().length() == QStringLiteral("two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("one")}).size() == 3);
|
||||
CHECK_FALSE(model->params({QStringLiteral("one")}).contains("one"));
|
||||
|
||||
// test removing a parameter at the last position
|
||||
CHECK(model->params({QStringLiteral("four")}).toString().length() == QString("one=first two=second value three=third").length());
|
||||
CHECK(model->params({QStringLiteral("four")}).toString().length() == QStringLiteral("one=first two=second value three=third").length());
|
||||
CHECK(model->params({QStringLiteral("four")}).size() == 3);
|
||||
CHECK_FALSE(model->params({QStringLiteral("four")}).contains("four"));
|
||||
|
||||
// test removing a non-existing parameter
|
||||
CHECK(model->params({QStringLiteral("fifth")}).toString().length() == QString("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("fifth")}).toString().length() == QStringLiteral("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("fifth")}).size() == 4);
|
||||
CHECK_FALSE(model->params({QStringLiteral("fifth")}).contains("fifth"));
|
||||
|
||||
// test removing a handing a value should do nothing
|
||||
CHECK(model->params({QStringLiteral("first")}).toString().length() == QString("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("first")}).toString().length() == QStringLiteral("one=first two=second value three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("first")}).size() == 4);
|
||||
CHECK_FALSE(model->params({QStringLiteral("first")}).contains("first"));
|
||||
|
||||
// test removing multiple parameters
|
||||
CHECK(model->params({QStringLiteral("one"), QStringLiteral("three")}).toString().length() == QString("two=second value four=4").length());
|
||||
CHECK(model->params({QStringLiteral("one"), QStringLiteral("three")}).toString().length() == QStringLiteral("two=second value four=4").length());
|
||||
CHECK(model->params({QStringLiteral("one"), QStringLiteral("three")}).size() == 2);
|
||||
CHECK_FALSE(model->params({QStringLiteral("one"), QStringLiteral("three")}).contains("one"));
|
||||
CHECK_FALSE(model->params({QStringLiteral("one"), QStringLiteral("three")}).contains("three"));
|
||||
|
||||
// test removing a parameter with space in value
|
||||
CHECK(model->params({QStringLiteral("two")}).toString().length() == QString("one=first three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("two")}).toString().length() == QStringLiteral("one=first three=third four=4").length());
|
||||
CHECK(model->params({QStringLiteral("two")}).size() == 3);
|
||||
CHECK_FALSE(model->params({QStringLiteral("two")}).contains("two"));
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ TEST_CASE("Test saving sequences elements", "[TSG]")
|
|||
state();
|
||||
REQUIRE(timeline->checkConsistency());
|
||||
// Add secondary timeline
|
||||
const QString seq2 = ClipCreator::createPlaylistClip(QStringLiteral("Sequence2"), {2, 2}, QString("-1"), binModel);
|
||||
const QString seq2 = ClipCreator::createPlaylistClip(QStringLiteral("Sequence2"), {2, 2}, QStringLiteral("-1"), binModel);
|
||||
QMap<QUuid, QString> uids = pCore->projectItemModel()->getAllSequenceClips();
|
||||
QUuid secondaryUuid;
|
||||
QMapIterator<QUuid, QString> i(uids);
|
||||
|
|
|
@ -26,7 +26,7 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
|
||||
SECTION("Item creation Test")
|
||||
{
|
||||
auto item = TreeItem::construct(QList<QVariant>{QString("test")}, model, false);
|
||||
auto item = TreeItem::construct(QList<QVariant>{QStringLiteral("test")}, model, false);
|
||||
int id = item->getId();
|
||||
REQUIRE(item->depth() == 0);
|
||||
REQUIRE(KdenliveTests::checkModelConsistency(model));
|
||||
|
@ -51,7 +51,7 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
REQUIRE(model->data(model->getIndexFromItem(item), 0) == QStringLiteral("test"));
|
||||
|
||||
// Try joint creation / assignation
|
||||
auto item2 = item->appendChild(QList<QVariant>{QString("test2")});
|
||||
auto item2 = item->appendChild(QList<QVariant>{QStringLiteral("test2")});
|
||||
auto state = [&]() {
|
||||
REQUIRE(KdenliveTests::checkModelConsistency(model));
|
||||
REQUIRE(item->depth() == 1);
|
||||
|
@ -67,7 +67,7 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
REQUIRE(KdenliveTests::modelSize(model) == 3);
|
||||
|
||||
// Add a second child to item to check if everything collapses
|
||||
auto item3 = item->appendChild(QList<QVariant>{QString("test3")});
|
||||
auto item3 = item->appendChild(QList<QVariant>{QStringLiteral("test3")});
|
||||
state();
|
||||
REQUIRE(model->rowCount(model->getIndexFromItem(item3)) == 0);
|
||||
REQUIRE(model->rowCount(model->getIndexFromItem(item)) == 2);
|
||||
|
@ -79,7 +79,7 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
|
||||
SECTION("Invalid moves")
|
||||
{
|
||||
auto item = model->getRoot()->appendChild(QList<QVariant>{QString("test")});
|
||||
auto item = model->getRoot()->appendChild(QList<QVariant>{QStringLiteral("test")});
|
||||
auto state = [&]() {
|
||||
REQUIRE(KdenliveTests::checkModelConsistency(model));
|
||||
REQUIRE(model->rowCount() == 1);
|
||||
|
@ -95,9 +95,9 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
state();
|
||||
REQUIRE(model->rowCount(model->getIndexFromItem(item)) == 0);
|
||||
|
||||
auto item2 = item->appendChild(QList<QVariant>{QString("test2")});
|
||||
auto item3 = item2->appendChild(QList<QVariant>{QString("test3")});
|
||||
auto item4 = item3->appendChild(QList<QVariant>{QString("test4")});
|
||||
auto item2 = item->appendChild(QList<QVariant>{QStringLiteral("test2")});
|
||||
auto item3 = item2->appendChild(QList<QVariant>{QStringLiteral("test3")});
|
||||
auto item4 = item3->appendChild(QList<QVariant>{QStringLiteral("test4")});
|
||||
auto state2 = [&]() {
|
||||
state();
|
||||
REQUIRE(item2->depth() == 2);
|
||||
|
@ -130,11 +130,11 @@ TEST_CASE("Basic tree testing", "[TreeModel]")
|
|||
SECTION("Deregistration tests")
|
||||
{
|
||||
// we construct a non trivial structure
|
||||
auto item = model->getRoot()->appendChild(QList<QVariant>{QString("test")});
|
||||
auto item2 = item->appendChild(QList<QVariant>{QString("test2")});
|
||||
auto item3 = item2->appendChild(QList<QVariant>{QString("test3")});
|
||||
auto item4 = item3->appendChild(QList<QVariant>{QString("test4")});
|
||||
auto item5 = item2->appendChild(QList<QVariant>{QString("test5")});
|
||||
auto item = model->getRoot()->appendChild(QList<QVariant>{QStringLiteral("test")});
|
||||
auto item2 = item->appendChild(QList<QVariant>{QStringLiteral("test2")});
|
||||
auto item3 = item2->appendChild(QList<QVariant>{QStringLiteral("test3")});
|
||||
auto item4 = item3->appendChild(QList<QVariant>{QStringLiteral("test4")});
|
||||
auto item5 = item2->appendChild(QList<QVariant>{QStringLiteral("test5")});
|
||||
auto state = [&]() {
|
||||
REQUIRE(KdenliveTests::checkModelConsistency(model));
|
||||
REQUIRE(model->rowCount() == 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue