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

Fix Bug 379510 - Event templates do not work

FIXED-IN: 5.5.1
BUG: 379510
parent 5d57c001
...@@ -296,14 +296,14 @@ void IncidenceDialogPrivate::loadTemplate(const QString &templateName) ...@@ -296,14 +296,14 @@ void IncidenceDialogPrivate::loadTemplate(const QString &templateName)
const QString fileName = QStandardPaths::locate( const QString fileName = QStandardPaths::locate(
QStandardPaths::GenericDataLocation, QStandardPaths::GenericDataLocation,
QStringLiteral("korganizer/templates/") + QStringLiteral("/korganizer/templates/") +
typeToString(mEditor->type()) + QLatin1Char('/') + typeToString(mEditor->type()) + QLatin1Char('/') +
templateName); templateName);
if (fileName.isEmpty()) { if (fileName.isEmpty()) {
KMessageBox::error( KMessageBox::error(
q, q,
i18nc("@info", "Unable to find template '%1'.", fileName)); i18nc("@info", "Unable to find template '%1'.", templateName));
return; return;
} }
...@@ -384,7 +384,7 @@ void IncidenceDialogPrivate::saveTemplate(const QString &templateName) ...@@ -384,7 +384,7 @@ void IncidenceDialogPrivate::saveTemplate(const QString &templateName)
} }
QString fileName = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QString fileName = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
QStringLiteral("korganizer/templates/") + typeToString(mEditor->type()) + QLatin1Char('/'); QStringLiteral("/korganizer/templates/") + typeToString(mEditor->type()) + QLatin1Char('/');
QDir().mkpath(fileName); QDir().mkpath(fileName);
fileName += templateName; fileName += templateName;
......
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