summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2017-11-08 22:12:10 +0300
committerAlberto Mardegan <mardy@users.sourceforge.net>2017-11-09 07:37:48 +0000
commit0bd985beafe755552b8badf434cf9286ac5d2fad (patch)
tree6e6d9377449e5e877881c64906ea0005602ca9cf
parent12b0bf8427863dd2db66cb65cdb05c04bce9218b (diff)
QVersitOrganizerImporter: fix reading of visual reminder URL
ICAL specs do not include ATTACH property for DISPLAY VALARM components, therefore our exporter is using the X-QTPROJECT-ATTACH tag. However, the importer was considering only ATTACH tag, and therefore was not able to import the data URL attached to visual alarm reminders. This fixes the OrganizerVersitExportImportTests::test_organizerImportExportItemDetails() test. Change-Id: Ide732c10a88be1e36db472f44d814c8563b5d34d Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
-rw-r--r--src/versitorganizer/qversitorganizerimporter_p.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/versitorganizer/qversitorganizerimporter_p.cpp b/src/versitorganizer/qversitorganizerimporter_p.cpp
index 3f242781b..7ca9242f9 100644
--- a/src/versitorganizer/qversitorganizerimporter_p.cpp
+++ b/src/versitorganizer/qversitorganizerimporter_p.cpp
@@ -346,7 +346,8 @@ bool QVersitOrganizerImporterPrivate::createItemReminder(
repetitionDelay = Duration::parseDuration(valarmProperty.value()).toSeconds();
} else if (valarmProperty.name() == QStringLiteral("ACTION")) {
actionValue = valarmProperty.value().toUpper();
- } else if (valarmProperty.name() == QStringLiteral("ATTACH")) {
+ } else if (valarmProperty.name() == QStringLiteral("ATTACH") ||
+ valarmProperty.name() == QStringLiteral("X-QTPROJECT-ATTACH")) {
attachValues.append(valarmProperty.variantValue());
} else if (valarmProperty.name() == QStringLiteral("DESCRIPTION")) {
descriptionValue = valarmProperty.value();
@@ -373,6 +374,8 @@ bool QVersitOrganizerImporterPrivate::createItemReminder(
QOrganizerItemVisualReminder visualReminder;
visualReminder.setRepetition(repetitionCount, repetitionDelay);
visualReminder.setSecondsBeforeStart(secondsBeforeStart);
+ if (!attachValues.isEmpty())
+ visualReminder.setDataUrl(QUrl(attachValues.first().toString()));
if (!descriptionValue.isEmpty()) {
visualReminder.setMessage(descriptionValue);
updatedDetails->append(visualReminder);