Commit 38f6ab61 authored by Laurent Montel's avatar Laurent Montel 😁

Add more QLatin1Char(..)

parent c7002c08
......@@ -1102,7 +1102,7 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0);
itemRates = sizes.at(j).section(QLatin1Char('='), 1, 1).split(QLatin1Char(','), QString::SkipEmptyParts);
for (int k = 0; k < itemRates.count(); ++k) {
m_configCapture.kcfg_v4l_format->addItem('[' + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')'), QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section(QLatin1Char('/'), 0, 0) << itemRates.at(k).section(QLatin1Char('/'), 1, 1));
m_configCapture.kcfg_v4l_format->addItem(QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')'), QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section(QLatin1Char('/'), 0, 0) << itemRates.at(k).section(QLatin1Char('/'), 1, 1));
}
}
}
......
......@@ -572,7 +572,7 @@ void RenderWidget::slotSaveProfile()
bool RenderWidget::saveProfile(QDomElement newprofile)
{
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/export/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/export/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......@@ -1764,7 +1764,7 @@ void RenderWidget::parseProfiles(const QString &selectedProfile)
// Parse some MLT's profiles
parseMltPresets();
QString exportFolder = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/export/";
QString exportFolder = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/export/");
QDir directory(exportFolder);
QStringList filter;
filter << QStringLiteral("*.xml");
......
......@@ -296,7 +296,7 @@ void Wizard::slotUpdateCaptureParameters()
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0);
itemRates = sizes.at(j).section(QLatin1Char('='), 1, 1).split(QLatin1Char(','), QString::SkipEmptyParts);
for (int k = 0; k < itemRates.count(); ++k) {
QString formatDescription = '[' + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')');
QString formatDescription = QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')');
if (m_capture.v4l_formats->findText(formatDescription) == -1) {
m_capture.v4l_formats->addItem(formatDescription, QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section(QLatin1Char('/'), 0, 0) << itemRates.at(k).section(QLatin1Char('/'), 1, 1));
}
......@@ -461,7 +461,7 @@ void Wizard::checkMissingCodecs()
}
QStringList profilesList;
profilesList << QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("export/profiles.xml"));
QDir directory = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/export/");
QDir directory = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/export/"));
QStringList filter;
filter << QStringLiteral("*.xml");
const QStringList fileList = directory.entryList(filter, QDir::Files);
......@@ -672,7 +672,7 @@ void Wizard::installExtraMimes(const QString &baseName, const QStringList &globs
if (!mimeDir.exists()) {
mimeDir.mkpath(QStringLiteral("."));
}
QString packageFileName = mimeDir.absoluteFilePath(mimefile + ".xml");
QString packageFileName = mimeDir.absoluteFilePath(mimefile + QStringLiteral(".xml"));
//qCDebug(KDENLIVE_LOG) << "INSTALLING NEW MIME TO: " << packageFileName;
QFile packageFile(packageFileName);
if (!packageFile.open(QIODevice::WriteOnly)) {
......
......@@ -187,7 +187,7 @@ void DvdWizard::generateDvd()
}
if (!dir.exists()) {
// We failed creating tmp DVD directory
KMessageBox::sorry(this, i18n("Cannot create temporary directory %1", m_status.tmp_folder->url().toLocalFile() + "DVD"));
KMessageBox::sorry(this, i18n("Cannot create temporary directory %1", m_status.tmp_folder->url().toLocalFile() + QStringLiteral("DVD")));
return;
}
......@@ -515,7 +515,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
authitem->setIcon(QIcon::fromTheme(QStringLiteral("system-run")));
QDomDocument dvddoc;
QDomElement auth = dvddoc.createElement(QStringLiteral("dvdauthor"));
auth.setAttribute(QStringLiteral("dest"), m_status.tmp_folder->url().toLocalFile() + "DVD");
auth.setAttribute(QStringLiteral("dest"), m_status.tmp_folder->url().toLocalFile() + QStringLiteral("DVD"));
dvddoc.appendChild(auth);
QDomElement vmgm = dvddoc.createElement(QStringLiteral("vmgm"));
auth.appendChild(vmgm);
......@@ -786,7 +786,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
}
authitem->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok")));
QStringList args;
args << QStringLiteral("-dvd-video") << QStringLiteral("-v") << QStringLiteral("-o") << m_status.iso_image->url().toLocalFile() << m_status.tmp_folder->url().toLocalFile() + QDir::separator() + "DVD";
args << QStringLiteral("-dvd-video") << QStringLiteral("-v") << QStringLiteral("-o") << m_status.iso_image->url().toLocalFile() << m_status.tmp_folder->url().toLocalFile() + QDir::separator() + QStringLiteral("DVD");
if (m_mkiso) {
m_mkiso->blockSignals(true);
......@@ -881,7 +881,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
void DvdWizard::cleanup()
{
QDir dir(m_status.tmp_folder->url().toLocalFile() + QDir::separator() + "DVD");
QDir dir(m_status.tmp_folder->url().toLocalFile() + QDir::separator() + QStringLiteral("DVD"));
// Try to make sure we delete the correct directory
if (dir.exists() && dir.dirName() == QLatin1String("DVD")) {
dir.removeRecursively();
......@@ -928,8 +928,8 @@ void DvdWizard::slotGenerate()
m_status.job_progress->item(i)->setIcon(QIcon());
}
QString warnMessage;
if (QFile::exists(m_status.tmp_folder->url().toLocalFile() + "DVD")) {
warnMessage.append(i18n("Folder %1 already exists. Overwrite?\n", m_status.tmp_folder->url().toLocalFile() + "DVD"));
if (QFile::exists(m_status.tmp_folder->url().toLocalFile() + QStringLiteral("DVD"))) {
warnMessage.append(i18n("Folder %1 already exists. Overwrite?\n", m_status.tmp_folder->url().toLocalFile() + QStringLiteral("DVD")));
}
if (QFile::exists(m_status.iso_image->url().toLocalFile())) {
warnMessage.append(i18n("Image file %1 already exists. Overwrite?", m_status.iso_image->url().toLocalFile()));
......
......@@ -379,7 +379,7 @@ void CollapsibleEffect::slotSaveEffect()
dir.mkpath(QStringLiteral("."));
}
if (dir.exists(name + ".xml")) if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", name + ".xml")) == KMessageBox::No) {
if (dir.exists(name + QStringLiteral(".xml"))) if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", name + QStringLiteral(".xml"))) == KMessageBox::No) {
return;
}
......@@ -404,7 +404,7 @@ void CollapsibleEffect::slotSaveEffect()
effectprops.setAttribute(QStringLiteral("id"), name);
effectprops.setAttribute(QStringLiteral("type"), QStringLiteral("custom"));
QFile file(dir.absoluteFilePath(name + ".xml"));
QFile file(dir.absoluteFilePath(name + QStringLiteral(".xml")));
if (file.open(QFile::WriteOnly | QFile::Truncate)) {
QTextStream out(&file);
out << doc.toString();
......
......@@ -185,8 +185,8 @@ void CollapsibleGroup::slotSaveGroup()
dir.mkpath(QStringLiteral("."));
}
if (dir.exists(name + ".xml")) {
if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", name + ".xml")) == KMessageBox::No) {
if (dir.exists(name + QStringLiteral(".xml"))) {
if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", name + QStringLiteral(".xml"))) == KMessageBox::No) {
return;
}
}
......@@ -211,7 +211,7 @@ void CollapsibleGroup::slotSaveGroup()
base.setAttribute(QStringLiteral("id"), name);
base.setAttribute(QStringLiteral("type"), QStringLiteral("custom"));
QFile file(dir.absoluteFilePath(name + ".xml"));
QFile file(dir.absoluteFilePath(name + QStringLiteral(".xml")));
if (file.open(QFile::WriteOnly | QFile::Truncate)) {
QTextStream out(&file);
out << doc.toString();
......
......@@ -165,12 +165,12 @@ void ColorWheel::resizeEvent(QResizeEvent *event)
QString ColorWheel::getParamValues()
{
if (m_id == QLatin1String("gamma")) {
return QString::number(m_color.redF() * 2, 'g', 2) + "," + QString::number(m_color.greenF() * 2, 'g', 2) + "," + QString::number(m_color.blueF() * 2, 'g', 2);
return QString::number(m_color.redF() * 2, 'g', 2) + QLatin1Char(',') + QString::number(m_color.greenF() * 2, 'g', 2) + QLatin1Char(',') + QString::number(m_color.blueF() * 2, 'g', 2);
} else if (m_id == QLatin1String("gain")) {
return QString::number(m_color.redF() * 4, 'g', 2) + "," + QString::number(m_color.greenF() * 4, 'g', 2) + "," + QString::number(m_color.blueF() * 4, 'g', 2);
return QString::number(m_color.redF() * 4, 'g', 2) + QLatin1Char(',') + QString::number(m_color.greenF() * 4, 'g', 2) + QLatin1Char(',') + QString::number(m_color.blueF() * 4, 'g', 2);
}
// default (lift)
return QString::number(m_color.redF(), 'g', 2) + "," + QString::number(m_color.greenF(), 'g', 2) + "," + QString::number(m_color.blueF(), 'g', 2);
return QString::number(m_color.redF(), 'g', 2) + QLatin1Char(',') + QString::number(m_color.greenF(), 'g', 2) + QLatin1Char(',') + QString::number(m_color.blueF(), 'g', 2);
}
......
......@@ -2924,7 +2924,7 @@ void MainWindow::slotClipInTimeline(const QString &clipId)
QString track = pCore->projectManager()->currentTimeline()->getTrackInfo(matching.at(i).track).trackName;
QString start = pCore->projectManager()->current()->timecode().getTimecode(matching.at(i).startPos);
int j = 0;
QAction *a = new QAction(track + ": " + start, inTimelineMenu);
QAction *a = new QAction(track + QStringLiteral(": ") + start, inTimelineMenu);
a->setData(QStringList() << track << start);
connect(a, &QAction::triggered, this, &MainWindow::slotSelectClipInTimeline);
while (j < actionList.count()) {
......
......@@ -62,8 +62,8 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
meltPath = env + "melt.exe";
}
#else
QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + "/bin/melt";
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + "/bin/melt";
QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/bin/melt");
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + QStringLiteral("/bin/melt");
#endif
if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath();
if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt");
......
......@@ -531,7 +531,7 @@ int KeyframeView::mouseOverKeyFrames(const QRectF &br, QPointF pos, double scale
}
if ((pos - p).manhattanLength() <= m_handleSize / 2) {
//TODO
/*setToolTip('[' + QString::number((GenTime(key, m_fps) - cropStart()).seconds(), 'f', 2)
/*setToolTip(QLatin1Char('[') + QString::number((GenTime(key, m_fps) - cropStart()).seconds(), 'f', 2)
+ i18n("seconds") + ", " + QString::number(value, 'f', 1) + ']');*/
activeKeyframe = key;
if (previousEdit != activeKeyframe) {
......
......@@ -771,8 +771,8 @@ void ResourceWidget::slotAccessTokenReceived(const QString &sAccessToken)
} else {
m_meta = QString();
m_desc = "<br><b>" + i18n("Error Getting Access Token from Freesound.") + "</b>";
m_desc.append("<br><b>" + i18n("Try importing again to obtain a new freesound connection") + "</b>");
m_desc = "<br><b>" + i18n("Error Getting Access Token from Freesound.") + QStringLiteral("</b>");
m_desc.append("<br><b>" + i18n("Try importing again to obtain a new freesound connection") + QStringLiteral("</b>"));
updateLayout();
}
}
......@@ -862,7 +862,7 @@ void ResourceWidget::DownloadRequestFinished(QNetworkReply *reply)
m_pOAuth2->ForgetAccessToken();
#endif
m_desc.append(QStringLiteral("<br>") + i18n("Error Downloading File. Error code: ") + reply->error() + QStringLiteral("<br>"));
m_desc.append("<br><b>" + i18n("Try importing again to obtain a new freesound connection") + "</b>");
m_desc.append("<br><b>" + i18n("Try importing again to obtain a new freesound connection") + QStringLiteral("</b>"));
updateLayout();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment