Commit 5efab34a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QLatin1Char('/') here

parent 88df6570
......@@ -340,7 +340,7 @@ void AbstractImportExportJob::copyToFile(const KArchiveFile *archivefile, const
void AbstractImportExportJob::backupResourceFile(const Akonadi::AgentInstance &agent, const QString &defaultPath)
{
const QString identifier = agent.identifier();
const QString archivePath = defaultPath + identifier + QDir::separator();
const QString archivePath = defaultPath + identifier + QLatin1Char('/');
QString url = Utils::resourcePath(agent);
if (!url.isEmpty()) {
......@@ -476,7 +476,7 @@ void AbstractImportExportJob::extractZipFile(const KArchiveFile *file, const QSt
if (entry) {
if (entry->isDirectory()) {
const KArchiveDirectory *dir = static_cast<const KArchiveDirectory *>(entry);
dir->copyTo(destination + QDir::separator() + dir->name(), true);
dir->copyTo(destination + QLatin1Char('/') + dir->name(), true);
} else if (entry->isFile()) {
const KArchiveFile *dir = static_cast<const KArchiveFile *>(entry);
dir->copyTo(destination);
......
......@@ -91,7 +91,7 @@ void ExportAddressbookJob::slotWriteNextArchiveResource()
const Akonadi::AgentInstance agent = list.at(mIndexIdentifier);
const QString identifier = agent.identifier();
if (identifier.contains(QLatin1String("akonadi_vcarddir_resource_")) || identifier.contains(QLatin1String("akonadi_contacts_resource_"))) {
const QString archivePath = Utils::addressbookPath() + identifier + QDir::separator();
const QString archivePath = Utils::addressbookPath() + identifier + QLatin1Char('/');
QString url = Utils::resourcePath(agent, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/contacts/"));
if (!mAgentPaths.contains(url)) {
......
......@@ -92,7 +92,7 @@ void ExportAlarmJob::slotWriteNextArchiveResource()
const Akonadi::AgentInstance agent = list.at(mIndexIdentifier);
const QString identifier = agent.identifier();
if (identifier.contains(QLatin1String("akonadi_kalarm_dir_resource_"))) {
const QString archivePath = Utils::alarmPath() + identifier + QDir::separator();
const QString archivePath = Utils::alarmPath() + identifier + QLatin1Char('/');
const QString url = Utils::resourcePath(agent);
if (!mAgentPaths.contains(url)) {
......
......@@ -94,7 +94,7 @@ void ExportCalendarJob::slotWriteNextArchiveResource()
const Akonadi::AgentInstance agent = list.at(mIndexIdentifier);
const QString identifier = agent.identifier();
if (identifier.contains(QLatin1String("akonadi_icaldir_resource_"))) {
const QString archivePath = Utils::calendarPath() + identifier + QDir::separator();
const QString archivePath = Utils::calendarPath() + identifier + QLatin1Char('/');
const QString url = Utils::resourcePath(agent);
if (!mAgentPaths.contains(url)) {
......
......@@ -155,7 +155,7 @@ void ExportMailJob::slotWriteNextArchiveResource()
const QString identifier = agent.identifier();
if (identifier.contains(QLatin1String("akonadi_maildir_resource_"))
|| identifier.contains(QLatin1String("akonadi_mixedmaildir_resource_"))) {
const QString archivePath = Utils::mailsPath() + identifier + QDir::separator();
const QString archivePath = Utils::mailsPath() + identifier + QLatin1Char('/');
const QString url = Utils::resourcePath(agent);
if (!mAgentPaths.contains(url)) {
......@@ -660,7 +660,7 @@ void ExportMailJob::backupIdentity()
const int uoid = group.readEntry(QStringLiteral("uoid"), -1);
QFile file(vcardFileName);
if (file.exists()) {
const bool fileAdded = archive()->addLocalFile(vcardFileName, Utils::identitiesPath() + QString::number(uoid) + QDir::separator() + file.fileName());
const bool fileAdded = archive()->addLocalFile(vcardFileName, Utils::identitiesPath() + QString::number(uoid) + QLatin1Char('/') + file.fileName());
if (!fileAdded) {
Q_EMIT error(i18n("vCard file \"%1\" cannot be saved.", file.fileName()));
}
......
......@@ -994,7 +994,7 @@ void ImportMailJob::restoreIdentity()
if (!vcardFileName.isEmpty()) {
QFileInfo fileInfo(vcardFileName);
QFile file(vcardFileName);
const KArchiveEntry *vcardEntry = mArchiveDirectory->entry(Utils::identitiesPath() + QString::number(oldUid) + QDir::separator() + file.fileName());
const KArchiveEntry *vcardEntry = mArchiveDirectory->entry(Utils::identitiesPath() + QString::number(oldUid) + QLatin1Char('/') + file.fileName());
if (vcardEntry && vcardEntry->isFile()) {
const KArchiveFile *vcardFile = static_cast<const KArchiveFile *>(vcardEntry);
QString vcardFilePath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kmail2/%1").arg(fileInfo.fileName());
......
......@@ -105,7 +105,7 @@ void ExportNotesJob::slotWriteNextArchiveResource()
Akonadi::AgentInstance agent = list.at(mIndexIdentifier);
const QString identifier = agent.identifier();
if (identifier.contains(QLatin1String("akonadi_akonotes_resource_"))) {
const QString archivePath = Utils::notePath() + identifier + QDir::separator();
const QString archivePath = Utils::notePath() + identifier + QLatin1Char('/');
QString url = Utils::resourcePath(agent);
if (!mAgentPaths.contains(url) && QDir(url).exists()) {
......
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