Commit 6a9a42a0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: minor qstring optimization

parent c9f7c687
......@@ -106,7 +106,7 @@ KZip *AbstractImportExportJob::archive() const
void AbstractImportExportJob::backupUiRcFile(const QString &configFileName, const QString &application)
{
const QString configrcStr(configFileName);
const QString configrc = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kxmlgui5/") + application + QLatin1Char('/') + configrcStr;
const QString configrc = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kxmlgui5/") + application + QLatin1Char('/') + configrcStr;
if (QFileInfo::exists(configrc)) {
backupFile(configrc, Utils::configsPath(), configrcStr);
}
......@@ -501,7 +501,7 @@ void AbstractImportExportJob::restoreUiRcFile(const QString &configNameStr, cons
const KArchiveEntry *configNameentry = mArchiveDirectory->entry(Utils::configsPath() + configNameStr);
if (configNameentry && configNameentry->isFile()) {
const KArchiveFile *configNameconfiguration = static_cast<const KArchiveFile *>(configNameentry);
const QString configNamerc = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kxmlgui5/") + applicationName + QLatin1Char('/') + configNameStr;
const QString configNamerc = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kxmlgui5/") + applicationName + QLatin1Char('/') + configNameStr;
if (QFileInfo::exists(configNamerc)) {
if (overwriteConfigMessageBox(configNameStr)) {
copyToFile(configNameconfiguration, configNamerc, configNameStr, Utils::configsPath());
......
......@@ -246,11 +246,11 @@ void ImportCalendarJob::restoreConfig()
}
const QString freebusyStr(QStringLiteral("freebusyurls"));
const KArchiveEntry *freebusyentry = mArchiveDirectory->entry(Utils::dataPath() + QStringLiteral("korganizer/") + freebusyStr);
const KArchiveEntry *freebusyentry = mArchiveDirectory->entry(Utils::dataPath() + QLatin1String("korganizer/") + freebusyStr);
if (freebusyentry && freebusyentry->isFile()) {
const KArchiveFile *freebusyrcFile = static_cast<const KArchiveFile *>(freebusyentry);
const QString freebusypath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/korganizer/") + freebusyStr;
const QString freebusypath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/") + freebusyStr;
if (QFileInfo::exists(freebusypath)) {
//TODO 4.12 merge it.
if (overwriteConfigMessageBox(freebusyStr)) {
......
......@@ -266,7 +266,7 @@ QString Utils::storeResources(KZip *archive, const QString &identifier, const QS
}
const QString agentConfigFileName = Utils::prefixAkonadiConfigFile() + identifier;
const QString agentConfigFileNamePath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/akonadi/") + agentConfigFileName;
const QString agentConfigFileNamePath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1String("/akonadi/") + agentConfigFileName;
if (QFileInfo::exists(agentConfigFileNamePath)) {
fileAdded = archive->addLocalFile(agentConfigFileNamePath, path + agentConfigFileName);
if (!fileAdded) {
......
......@@ -65,7 +65,7 @@ void SelectionTypeTreeWidgetTest::shouldLoadTemplate()
QFETCH(QString, filename);
QFETCH(int, topLevelItems);
QString fileNameFullPath = QLatin1String(PIMDATAEXPORTER_DATA_DIR) + QStringLiteral("/") + filename;
QString fileNameFullPath = QLatin1String(PIMDATAEXPORTER_DATA_DIR) + QLatin1String("/") + filename;
QFile f(fileNameFullPath);
QVERIFY(f.exists());
SelectionTypeTreeWidget w(true);
......
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