Commit c7002c08 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more QLatin1Char/QStringLiteral

parent 8f68095d
......@@ -971,7 +971,7 @@ void Bin::slotLocateClip()
qCDebug(KDENLIVE_LOG) << " / / " + url.toString();
} else {
if(!exists) {
emitMessage(i18n("Couldn't locate ") + QString(" (" + url.toString() + ")"), 100, ErrorMessage);
emitMessage(i18n("Couldn't locate ") + QString(" (" + url.toString() + QLatin1Char(')')), 100, ErrorMessage);
}
return;
}
......
......@@ -1100,9 +1100,9 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
pixelFormat = sizes.takeFirst();
for (int j = 0; j < sizes.count(); ++j) {
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0);
itemRates = sizes.at(j).section(QLatin1Char('='), 1, 1).split(',', QString::SkipEmptyParts);
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 + "] " + 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('[' + 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));
}
}
}
......@@ -1125,7 +1125,7 @@ void KdenliveSettingsDialog::slotUpdatev4lCaptureProfile()
m_configCapture.p_colorspace->setText(ProfilesDialog::getColorspaceDescription(601));
m_configCapture.p_progressive->setText(i18n("Progressive"));
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/"));
if (!dir.exists() || !dir.exists(QStringLiteral("video4linux"))) {
saveCurrentV4lProfile();
}
......@@ -1133,7 +1133,7 @@ void KdenliveSettingsDialog::slotUpdatev4lCaptureProfile()
void KdenliveSettingsDialog::loadCurrentV4lProfileInfo()
{
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......@@ -1178,7 +1178,7 @@ void KdenliveSettingsDialog::saveCurrentV4lProfile()
profile.frame_rate_num = m_configCapture.p_fps->text().section(QLatin1Char('/'), 0, 0).toInt();
profile.frame_rate_den = m_configCapture.p_fps->text().section(QLatin1Char('/'), 1, 1).toInt();
profile.progressive = m_configCapture.p_progressive->text() == i18n("Progressive");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......
......@@ -756,7 +756,7 @@ void RenderWidget::slotEditProfile()
if (d->exec() == QDialog::Accepted) {
slotDeleteProfile(false);
QString exportFile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/export/customprofiles.xml";
QString exportFile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/export/customprofiles.xml");
QDomDocument doc;
QFile file(exportFile);
doc.setContent(&file, false);
......@@ -875,7 +875,7 @@ void RenderWidget::slotDeleteProfile(bool refresh)
}
QString currentProfile = item->text(0);
QString exportFile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/export/customprofiles.xml";
QString exportFile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/export/customprofiles.xml");
QDomDocument doc;
QFile file(exportFile);
doc.setContent(&file, false);
......@@ -1012,7 +1012,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
QFileInfo dfi(dest);
QStringList filePath;
// construct the full file path
filePath << dfi.absolutePath() << QDir::separator() << dfi.completeBaseName() + "_" <<
filePath << dfi.absolutePath() << QDir::separator() << dfi.completeBaseName() + QLatin1Char('_') <<
QString(trackNames.at(stemIdx)).replace(QLatin1Char(' '), QLatin1Char('_')) << QStringLiteral(".") << dfi.suffix();
dest = filePath.join(QString());
}
......@@ -1775,8 +1775,8 @@ void RenderWidget::parseProfiles(const QString &selectedProfile)
foreach (const QString &filename, fileList) {
parseFile(directory.absoluteFilePath(filename), true);
}
if (QFile::exists(exportFolder + "customprofiles.xml")) {
parseFile(exportFolder + "customprofiles.xml", true);
if (QFile::exists(exportFolder + QStringLiteral("customprofiles.xml"))) {
parseFile(exportFolder + QStringLiteral("customprofiles.xml"), true);
}
focusFirstVisibleItem(selectedProfile);
......@@ -2001,14 +2001,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
item->setData(0, StandardRole, standard);
item->setData(0, ParamsRole, params);
if (params.contains(QLatin1String("%quality"))) {
item->setData(0, BitratesRole, profile.attribute(QStringLiteral("qualities")).split(',', QString::SkipEmptyParts));
item->setData(0, BitratesRole, profile.attribute(QStringLiteral("qualities")).split(QLatin1Char(','), QString::SkipEmptyParts));
} else if (params.contains(QLatin1String("%bitrate"))) {
item->setData(0, BitratesRole, profile.attribute(QStringLiteral("bitrates")).split(',', QString::SkipEmptyParts));
item->setData(0, BitratesRole, profile.attribute(QStringLiteral("bitrates")).split(QLatin1Char(','), QString::SkipEmptyParts));
}
if (params.contains(QLatin1String("%audioquality"))) {
item->setData(0, AudioBitratesRole, profile.attribute(QStringLiteral("audioqualities")).split(',', QString::SkipEmptyParts));
item->setData(0, AudioBitratesRole, profile.attribute(QStringLiteral("audioqualities")).split(QLatin1Char(','), QString::SkipEmptyParts));
} else if (params.contains(QLatin1String("%audiobitrate"))) {
item->setData(0, AudioBitratesRole, profile.attribute(QStringLiteral("audiobitrates")).split(',', QString::SkipEmptyParts));
item->setData(0, AudioBitratesRole, profile.attribute(QStringLiteral("audiobitrates")).split(QLatin1Char(','), QString::SkipEmptyParts));
}
if (profile.hasAttribute(QStringLiteral("speeds"))) {
item->setData(0, SpeedsRole, profile.attribute(QStringLiteral("speeds")).split(QLatin1Char(';'), QString::SkipEmptyParts));
......@@ -2087,14 +2087,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
item->setData(0, StandardRole, standard);
item->setData(0, ParamsRole, params);
if (params.contains(QLatin1String("%quality"))) {
item->setData(0, BitratesRole, profileElement.attribute(QStringLiteral("qualities")).split(',', QString::SkipEmptyParts));
item->setData(0, BitratesRole, profileElement.attribute(QStringLiteral("qualities")).split(QLatin1Char(','), QString::SkipEmptyParts));
} else if (params.contains(QLatin1String("%bitrate"))) {
item->setData(0, BitratesRole, profileElement.attribute(QStringLiteral("bitrates")).split(',', QString::SkipEmptyParts));
item->setData(0, BitratesRole, profileElement.attribute(QStringLiteral("bitrates")).split(QLatin1Char(','), QString::SkipEmptyParts));
}
if (params.contains(QLatin1String("%audioquality"))) {
item->setData(0, AudioBitratesRole, profileElement.attribute(QStringLiteral("audioqualities")).split(',', QString::SkipEmptyParts));
item->setData(0, AudioBitratesRole, profileElement.attribute(QStringLiteral("audioqualities")).split(QLatin1Char(','), QString::SkipEmptyParts));
} else if (params.contains(QLatin1String("%audiobitrate"))) {
item->setData(0, AudioBitratesRole, profileElement.attribute(QStringLiteral("audiobitrates")).split(',', QString::SkipEmptyParts));
item->setData(0, AudioBitratesRole, profileElement.attribute(QStringLiteral("audiobitrates")).split(QLatin1Char(','), QString::SkipEmptyParts));
}
if (profileElement.hasAttribute(QStringLiteral("speeds"))) {
item->setData(0, SpeedsRole, profileElement.attribute(QStringLiteral("speeds")).split(QLatin1Char(';'), QString::SkipEmptyParts));
......@@ -2376,7 +2376,7 @@ void RenderWidget::slotDeleteScript()
if (item) {
QString path = item->data(1, Qt::UserRole + 1).toString();
bool success = true;
success &= QFile::remove(path + ".mlt");
success &= QFile::remove(path + QStringLiteral(".mlt"));
success &= QFile::remove(path);
if (!success) {
qCWarning(KDENLIVE_LOG) << "// Error removing script or playlist: " << path << ", " << path << ".mlt";
......
......@@ -123,7 +123,7 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
}
if (!m_errors.isEmpty()) {
KMessageWidget *errorLabel = new KMessageWidget(this);
errorLabel->setText("<ul>" + m_errors + "</ul>");
errorLabel->setText(QStringLiteral("<ul>") + m_errors + QStringLiteral("</ul>"));
errorLabel->setMessageType(KMessageWidget::Error);
errorLabel->setWordWrap(true);
errorLabel->setCloseButtonVisible(false);
......@@ -141,7 +141,7 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
}
if (!m_warnings.isEmpty()) {
KMessageWidget *errorLabel = new KMessageWidget(this);
errorLabel->setText("<ul>" + m_warnings + "</ul>");
errorLabel->setText(QStringLiteral("<ul>") + m_warnings + QStringLiteral("</ul>"));
errorLabel->setMessageType(KMessageWidget::Warning);
errorLabel->setWordWrap(true);
errorLabel->setCloseButtonVisible(false);
......@@ -150,7 +150,7 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
}
if (!m_infos.isEmpty()) {
KMessageWidget *errorLabel = new KMessageWidget(this);
errorLabel->setText("<ul>" + m_infos + "</ul>");
errorLabel->setText(QStringLiteral("<ul>") + m_infos + QStringLiteral("</ul>"));
errorLabel->setMessageType(KMessageWidget::Information);
errorLabel->setWordWrap(true);
errorLabel->setCloseButtonVisible(false);
......@@ -275,7 +275,7 @@ void Wizard::slotUpdateCaptureParameters()
m_capture.v4l_formats->blockSignals(true);
m_capture.v4l_formats->clear();
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......@@ -294,9 +294,9 @@ void Wizard::slotUpdateCaptureParameters()
pixelFormat = sizes.takeFirst();
for (int j = 0; j < sizes.count(); ++j) {
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0);
itemRates = sizes.at(j).section(QLatin1Char('='), 1, 1).split(',', QString::SkipEmptyParts);
itemRates = sizes.at(j).section(QLatin1Char('='), 1, 1).split(QLatin1Char(','), QString::SkipEmptyParts);
for (int k = 0; k < itemRates.count(); ++k) {
QString formatDescription = '[' + format + "] " + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')');
QString formatDescription = '[' + 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));
}
......@@ -848,7 +848,7 @@ void Wizard::slotSaveCaptureFormat()
profile.frame_rate_num = format.at(3).toInt();
profile.frame_rate_den = format.at(4).toInt();
profile.progressive = 1;
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/profiles/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/profiles/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......
......@@ -593,7 +593,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
for (int i = 0; i < buttons.count(); ++i) {
QDomElement button = dvddoc.createElement(QStringLiteral("button"));
button.setAttribute(QStringLiteral("name"), 'b' + QString::number(i));
nametext = dvddoc.createTextNode('{' + buttonsTarget.at(i) + ";}");
nametext = dvddoc.createTextNode(QLatin1Char('{') + buttonsTarget.at(i) + QStringLiteral(";}"));
button.appendChild(nametext);
pgc.appendChild(button);
}
......@@ -657,7 +657,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
if (i == voburls.count() - 1) {
call = dvddoc.createTextNode(QStringLiteral("{g1 = 0; call menu;}"));
} else {
call = dvddoc.createTextNode("{if ( g1 eq 999 ) { call menu; } jump title " + QString::number(i + 2).rightJustified(2, '0') + ";}");
call = dvddoc.createTextNode("{if ( g1 eq 999 ) { call menu; } jump title " + QString::number(i + 2).rightJustified(2, '0') + QStringLiteral(";}"));
}
post.appendChild(call);
pgc2.appendChild(post);
......@@ -854,7 +854,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
iso.remove();
}
errorMessage(i18n("DVD ISO is broken"));
m_status.error_log->append(m_creationLog + "<br /><a name=\"result\" /><strong>" + i18n("DVD ISO is broken") + "</strong>");
m_status.error_log->append(m_creationLog + QStringLiteral("<br /><a name=\"result\" /><strong>") + i18n("DVD ISO is broken") + QStringLiteral("</strong>"));
m_status.error_log->scrollToAnchor(QStringLiteral("result"));
m_status.error_box->setHidden(false);
m_status.menu_file->setPlainText(m_menuFile.readAll());
......
......@@ -445,7 +445,7 @@ void EffectsListView::slotRemoveEffect()
QTreeWidgetItem *item = m_effectsList->currentItem();
QString effectId = item->text(0);
QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/effects/";
QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/");
QDir directory = QDir(path);
QStringList filter;
......
......@@ -374,7 +374,7 @@ void CollapsibleEffect::slotSaveEffect()
if (name.isEmpty()) {
return;
}
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/effects/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......
......@@ -180,7 +180,7 @@ void CollapsibleGroup::slotSaveGroup()
if (name.isEmpty()) {
return;
}
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/effects/");
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/"));
if (!dir.exists()) {
dir.mkpath(QStringLiteral("."));
}
......
......@@ -271,10 +271,10 @@ void LibraryWidget::slotAddToLibrary()
if (name.isEmpty() || !ok) {
return;
}
if (m_directory.exists(name + ".mlt")) {
if (m_directory.exists(name + QStringLiteral(".mlt"))) {
//TODO: warn and ask for overwrite / rename
}
QString fullPath = m_directory.absoluteFilePath(name + ".mlt");
QString fullPath = m_directory.absoluteFilePath(name + QStringLiteral(".mlt"));
m_manager->slotSaveSelection(fullPath);
}
......
......@@ -418,7 +418,7 @@ void MainWindow::init(const QString &MltPath, const QUrl &Url, const QString &cl
if (tempAction->shortcut() == QKeySequence(0)) {
tempAction->setToolTip(strippedTooltip);
} else {
tempAction->setToolTip(strippedTooltip + QStringLiteral(" (") + tempAction->shortcut().toString() + ")");
tempAction->setToolTip(strippedTooltip + QStringLiteral(" (") + tempAction->shortcut().toString() + QLatin1Char(')'));
}
}
}
......@@ -3002,7 +3002,7 @@ void MainWindow::hideEvent(QHideEvent */*event*/)
if (baseClip == nullptr) {
tmppath.append("untitled.mlt");
} else {
tmppath.append((baseClip->name().isEmpty() ? baseClip->fileURL().fileName() : baseClip->name()) + '-' + QString::number(zone.x()).rightJustified(4, '0') + ".mlt");
tmppath.append((baseClip->name().isEmpty() ? baseClip->fileURL().fileName() : baseClip->name()) + '-' + QString::number(zone.x()).rightJustified(4, '0') + QStringLiteral(".mlt"));
}
path = QUrl(tmppath);
}
......@@ -3217,7 +3217,7 @@ void MainWindow::buildDynamicActions()
foreach (const QString &stab, QStringList() << "vidstab" << "videostab2" << "videostab") {
filter = Mlt::Factory::filter(profile, (char *)stab.toUtf8().constData());
if (filter && filter->is_valid()) {
QAction *action = new QAction(i18n("Stabilize") + QStringLiteral(" (") + stab + ")", m_extraFactory->actionCollection());
QAction *action = new QAction(i18n("Stabilize") + QStringLiteral(" (") + stab + QLatin1Char(')'), m_extraFactory->actionCollection());
action->setData(QStringList() << QString::number((int) AbstractClipJob::FILTERCLIPJOB) << stab);
ts->addAction(action->text(), action);
connect(action, &QAction::triggered, pCore->bin(), &Bin::slotStartClipJob);
......
......@@ -45,11 +45,11 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
return;
}
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = qgetenv("MLT_PROFILES_PATH");
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = qgetenv("MLT_DATA") + "/profiles/";
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = qgetenv("MLT_PREFIX") + "/share/mlt/profiles/";
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = qgetenv("MLT_DATA") + QStringLiteral("/profiles/");
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = qgetenv("MLT_PREFIX") + QStringLiteral("/share/mlt/profiles/");
if (profilePath.isEmpty() || !QFile::exists(profilePath)) profilePath = KdenliveSettings::mltpath();
// build-time definition
if ((profilePath.isEmpty() || !QFile::exists(profilePath)) && !QStringLiteral(MLT_DATADIR).isEmpty()) profilePath = QStringLiteral(MLT_DATADIR) + "/profiles/";
if ((profilePath.isEmpty() || !QFile::exists(profilePath)) && !QStringLiteral(MLT_DATADIR).isEmpty()) profilePath = QStringLiteral(MLT_DATADIR) + QStringLiteral("/profiles/");
KdenliveSettings::setMltpath(profilePath);
#ifdef Q_OS_WIN
......@@ -87,7 +87,7 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
}
}
if (profilePath.isEmpty()) {
profilePath = QDir::cleanPath(meltPath).section(QLatin1Char('/'), 0, -3) + "/share/mlt/profiles/";
profilePath = QDir::cleanPath(meltPath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/share/mlt/profiles/");
KdenliveSettings::setMltpath(profilePath);
}
QStringList profilesFilter;
......@@ -98,12 +98,12 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
if (!meltPath.isEmpty()) {
if(meltPath.contains(QLatin1Char('/'))) {
#ifdef Q_OS_WIN
profilePath = meltPath.section(QLatin1Char('/'), 0, -2) + "/share/mlt/profiles/";
profilePath = meltPath.section(QLatin1Char('/'), 0, -2) + QStringLiteral("/share/mlt/profiles/");
#else
profilePath = meltPath.section(QLatin1Char('/'), 0, -2) + "/share/mlt/profiles/";
profilePath = meltPath.section(QLatin1Char('/'), 0, -2) + QStringLiteral("/share/mlt/profiles/");
#endif
} else {
profilePath = qApp->applicationDirPath() + "/share/mlt/profiles/";
profilePath = qApp->applicationDirPath() + QStringLiteral("/share/mlt/profiles/");
}
KdenliveSettings::setMltpath(profilePath);
profilesList = QDir(profilePath).entryList(profilesFilter, QDir::Files);
......
......@@ -864,7 +864,7 @@ void ClipController::disableEffects(bool disable)
void ClipController::saveZone(QPoint zone, const QDir &dir)
{
QString path = QString(clipName() + QLatin1Char('_') + QString::number(zone.x()) + ".mlt");
QString path = QString(clipName() + QLatin1Char('_') + QString::number(zone.x()) + QStringLiteral(".mlt"));
if (dir.exists(path)) {
//TODO ask for overwrite
}
......
......@@ -220,7 +220,7 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
if (originalPlayAction->shortcut() == QKeySequence(0)) {
m_playAction->setToolTip(strippedTooltip);
} else {
m_playAction->setToolTip(strippedTooltip + QStringLiteral(" (") + originalPlayAction->shortcut().toString() + ")");
m_playAction->setToolTip(strippedTooltip + QStringLiteral(" (") + originalPlayAction->shortcut().toString() + QLatin1Char(')'));
}
m_playMenu->addAction(m_playAction);
connect(m_playAction, &QAction::triggered, this, &Monitor::slotSwitchPlay);
......
......@@ -737,7 +737,7 @@ void TitleWidget::slotImageTool()
QStringList mimeTypeFilters;
QString allExtensions = i18n("All Images") + QStringLiteral(" (");
foreach (const QByteArray &mimeType, supported) {
mimeTypeFilters.append(i18n("%1 Image", QString(mimeType)) + "( *." + QString(mimeType) + ")");
mimeTypeFilters.append(i18n("%1 Image", QString(mimeType)) + "( *." + QString(mimeType) + QLatin1Char(')'));
allExtensions.append("*." + mimeType + QLatin1Char(' '));
}
mimeTypeFilters.sort();
......
......@@ -840,14 +840,14 @@ void ResourceWidget::DownloadRequestFinished(QNetworkReply *reply)
KMessageBox::information(this, i18n("Resource saved to ") + mSaveLocation, i18n("Data Imported"));
emit addClip(QUrl(mSaveLocation), QStringList());// MainWindow::slotDownloadResources() links this signal to MainWindow::slotAddProjectClip
m_desc.append("<br>" + i18n("Saved file to") + "<br>");
m_desc.append(QStringLiteral("<br>") + i18n("Saved file to") + QStringLiteral("<br>"));
m_desc.append(mSaveLocation);
updateLayout();
} else {
#ifdef QT5_USE_WEBKIT
m_pOAuth2->ForgetAccessToken();
#endif
m_desc.append("<br>" + i18n("Error Saving File"));
m_desc.append(QStringLiteral("<br>") + i18n("Error Saving File"));
updateLayout();
}
......@@ -861,7 +861,7 @@ void ResourceWidget::DownloadRequestFinished(QNetworkReply *reply)
#ifdef QT5_USE_WEBKIT
m_pOAuth2->ForgetAccessToken();
#endif
m_desc.append("<br>" + i18n("Error Downloading File. Error code: ") + reply->error() + "<br>");
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>");
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