Commit 956d5209 authored by David Faure's avatar David Faure
Browse files

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent 7d749890
Pipeline #39115 passed with stage
in 16 minutes and 20 seconds
......@@ -1658,7 +1658,7 @@ QStringList dontShowErrors(const EventId& eventId)
{
if (eventId.isEmpty())
return QStringList();
KConfig config(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfig config(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfigGroup group(&config, DONT_SHOW_ERRORS_GROUP);
const QString id = QStringLiteral("%1:%2").arg(eventId.resourceId()).arg(eventId.eventId());
return group.readEntry(id, QStringList());
......@@ -1684,7 +1684,7 @@ void setDontShowErrors(const EventId& eventId, const QStringList& tags)
{
if (eventId.isEmpty())
return;
KConfig config(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfig config(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfigGroup group(&config, DONT_SHOW_ERRORS_GROUP);
const QString id = QStringLiteral("%1:%2").arg(eventId.resourceId()).arg(eventId.eventId());
if (tags.isEmpty())
......@@ -1702,7 +1702,7 @@ void setDontShowErrors(const EventId& eventId, const QString& tag)
{
if (eventId.isEmpty() || tag.isEmpty())
return;
KConfig config(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfig config(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + ALARM_OPTS_FILE);
KConfigGroup group(&config, DONT_SHOW_ERRORS_GROUP);
const QString id = QStringLiteral("%1:%2").arg(eventId.resourceId()).arg(eventId.eventId());
QStringList tags = group.readEntry(id, QStringList());
......
......@@ -389,7 +389,7 @@ CalendarCreator::CalendarCreator(CalEvent::Type alarmType, const QString& file,
, mStandard(true)
, mNew(true)
{
const QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + file;
const QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + file;
mUrlString = QUrl::fromLocalFile(path).toString();
qCDebug(KALARM_LOG) << "CalendarCreator: New:" << mName << ", type=" << mAlarmType << ", path=" << mUrlString;
}
......
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