diff --git a/autotests/loadcalendar.cpp b/autotests/loadcalendar.cpp --- a/autotests/loadcalendar.cpp +++ b/autotests/loadcalendar.cpp @@ -41,7 +41,10 @@ MemoryCalendar::Ptr cal(new MemoryCalendar(QTimeZone::utc())); FileStorage store(cal, QStringLiteral("cal")); - store.load(); + if (!store.load()) { + qWarning() << "Error storing into memory calendar"; + return 1; + } Todo::List todoList; diff --git a/autotests/testattendee.cpp b/autotests/testattendee.cpp --- a/autotests/testattendee.cpp +++ b/autotests/testattendee.cpp @@ -149,7 +149,7 @@ Person::Ptr person; bool rsvp; - QString name, email, delegate, delegator, cuType, uid; + QString delegate, delegator, cuType, uid; CustomProperties customProperties; Attendee::Role role; Attendee::PartStat status; diff --git a/autotests/testcreateddatecompat.cpp b/autotests/testcreateddatecompat.cpp --- a/autotests/testcreateddatecompat.cpp +++ b/autotests/testcreateddatecompat.cpp @@ -63,7 +63,7 @@ { KCalCore::MemoryCalendar::Ptr cal(new KCalCore::MemoryCalendar(QTimeZone::utc())); KCalCore::ICalFormat format; - format.fromRawString(cal, QByteArray(icalFile32)); + QVERIFY(format.fromRawString(cal, QByteArray(icalFile32))); KCalCore::Event::Ptr event = cal->event(QStringLiteral("uid")); QVERIFY(event); QCOMPARE(event->created(), @@ -74,7 +74,7 @@ { KCalCore::MemoryCalendar::Ptr cal(new KCalCore::MemoryCalendar(QTimeZone::utc())); KCalCore::ICalFormat format; - format.fromRawString(cal, QByteArray(icalFile33)); + QVERIFY(format.fromRawString(cal, QByteArray(icalFile33))); KCalCore::Event::Ptr event = cal->event(QStringLiteral("uid")); QVERIFY(event); QCOMPARE(event->created(), diff --git a/autotests/testfreebusy.cpp b/autotests/testfreebusy.cpp --- a/autotests/testfreebusy.cpp +++ b/autotests/testfreebusy.cpp @@ -63,7 +63,9 @@ const QDateTime thirdfb1DateTime(QDate(2007, 6, 27), QTime(7, 0, 0), Qt::UTC); fb1.addPeriod(thirdfb1DateTime, QDateTime(QDate(2007, 6, 27), QTime(8, 0, 0), Qt::UTC)); - QCOMPARE(fb1.busyPeriods().last().end(), QDateTime(QDate(2007, 10, 27), QTime(8, 0, 0), Qt::UTC)); + Period::List busyPeriods = fb1.busyPeriods(); + QVERIFY(!busyPeriods.isEmpty()); + QCOMPARE(busyPeriods.last().end(), QDateTime(QDate(2007, 10, 27), QTime(8, 0, 0), Qt::UTC)); } void FreeBusyTest::testAssign() diff --git a/autotests/testicalformat.cpp b/autotests/testicalformat.cpp --- a/autotests/testicalformat.cpp +++ b/autotests/testicalformat.cpp @@ -95,7 +95,7 @@ // Test fromRawString() MemoryCalendar::Ptr calendar3(new MemoryCalendar(QTimeZone::utc())); - format.fromRawString(calendar3, bytesFromFile); + QVERIFY(format.fromRawString(calendar3, bytesFromFile)); QVERIFY(calendar3->incidences().count() == 1); QVERIFY(*calendar3->incidences().at(0) == *event); diff --git a/autotests/testoccurrenceiterator.cpp b/autotests/testoccurrenceiterator.cpp --- a/autotests/testoccurrenceiterator.cpp +++ b/autotests/testoccurrenceiterator.cpp @@ -87,8 +87,6 @@ KCalCore::MemoryCalendar calendar(QTimeZone::utc()); QDateTime start(QDate(2013, 03, 10), QTime(10, 0, 0), Qt::UTC); - QDateTime end(QDate(2013, 03, 10), QTime(11, 0, 0), Qt::UTC); - QDateTime actualEnd(QDate(2013, 03, 13), QTime(11, 0, 0), Qt::UTC); KCalCore::Event::Ptr event(new KCalCore::Event()); @@ -129,8 +127,6 @@ calendar.filter()->setCriteria(KCalCore::CalFilter::HideCompletedTodos); QDateTime start(QDate(2013, 03, 10), QTime(10, 0, 0), Qt::UTC); - QDateTime end(QDate(2013, 03, 10), QTime(11, 0, 0), Qt::UTC); - QDateTime actualEnd(QDate(2013, 03, 13), QTime(11, 0, 0), Qt::UTC); KCalCore::Todo::Ptr todo(new KCalCore::Todo()); diff --git a/src/memorycalendar.cpp b/src/memorycalendar.cpp --- a/src/memorycalendar.cpp +++ b/src/memorycalendar.cpp @@ -668,7 +668,6 @@ const auto ts = timeZone.isValid() ? timeZone : this->timeZone(); QDateTime st(start, QTime(0, 0, 0), ts); QDateTime nd(end, QTime(23, 59, 59, 999), ts); - QDateTime yesterStart = st.addDays(-1); // Get non-recurring events QHashIteratori(d->mIncidences[Incidence::TypeEvent]);