Hello community, here is the log from the commit of package kcalcore for openSUSE:Factory checked in at 2016-08-29 14:36:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcalcore (Old) and /work/SRC/openSUSE:Factory/.kcalcore.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kcalcore" Changes: -------- --- /work/SRC/openSUSE:Factory/kcalcore/kcalcore.changes 2016-07-21 07:50:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kcalcore.new/kcalcore.changes 2016-08-29 14:36:33.000000000 +0200 @@ -1,0 +2,16 @@ +Fri Aug 12 10:11:46 UTC 2016 - tittiatcoke@gmail.com + +- Update to KDE Applications 16.08.0 + * KDE Applications 16.08.0 + * https://www.kde.org/announcements/announce-applications-16.08.0.php + + +------------------------------------------------------------------- +Mon Aug 8 14:49:53 UTC 2016 - tittiatcoke@gmail.com + +- Update to KDE Applications 16.07.90 + * KDE Applications 16.07.90 (16.08-RC) + * https://www.kde.org/announcements/announce-applications-16.07.90.php + + +------------------------------------------------------------------- Old: ---- kcalcore-16.04.3.tar.xz New: ---- kcalcore-16.08.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcalcore.spec ++++++ --- /var/tmp/diff_new_pack.pzU0Yu/_old 2016-08-29 14:36:35.000000000 +0200 +++ /var/tmp/diff_new_pack.pzU0Yu/_new 2016-08-29 14:36:35.000000000 +0200 @@ -17,7 +17,7 @@ Name: kcalcore -Version: 16.04.3 +Version: 16.08.0 Release: 0 %define kf5_version 5.19.0 Summary: KDE PIM Libraries: KCalCore ++++++ kcalcore-16.04.3.tar.xz -> kcalcore-16.08.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/CMakeLists.txt new/kcalcore-16.08.0/CMakeLists.txt --- old/kcalcore-16.04.3/CMakeLists.txt 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/CMakeLists.txt 2016-08-06 09:12:19.000000000 +0200 @@ -3,7 +3,8 @@ project(KCalCore) # ECM setup -find_package(ECM 5.19.0 CONFIG REQUIRED) +set(KF5_VERSION "5.23.0") +find_package(ECM ${KF5_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${KCalCore_SOURCE_DIR}/cmake) include(GenerateExportHeader) @@ -17,8 +18,9 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(ECMQtDeclareLoggingCategory) -set(KF5_VERSION "5.19.0") -set(KCALENDARCORE_LIB_VERSION "5.2.3") +set(PIM_VERSION "5.3.0") + +set(KCALENDARCORE_LIB_VERSION ${PIM_VERSION}) ecm_setup_version(${KCALENDARCORE_LIB_VERSION} VARIABLE_PREFIX KCALCORE VERSION_HEADER "${KCalCore_BINARY_DIR}/kcalcore_version.h" PACKAGE_VERSION_FILE "${KCalCore_BINARY_DIR}/KF5CalendarCoreConfigVersion.cmake" @@ -48,8 +50,7 @@ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) -add_definitions(-DQT_NO_CAST_FROM_ASCII) -remove_definitions(-DQT_NO_CAST_TO_ASCII) +add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII) ########### Targets ########### add_subdirectory(src) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/KF5CalendarCoreConfig.cmake.in new/kcalcore-16.08.0/KF5CalendarCoreConfig.cmake.in --- old/kcalcore-16.04.3/KF5CalendarCoreConfig.cmake.in 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/KF5CalendarCoreConfig.cmake.in 2016-08-06 09:12:19.000000000 +0200 @@ -5,11 +5,11 @@ find_dependency(KF5KDELibs4Support "@KF5_VERSION@") find_dependency(LibIcal "@LibIcal_MIN_VERSION@") +include(FeatureSummary) + set_package_properties(LibIcal PROPERTIES DESCRIPTION "The Ical library" URL "http://sourceforge.net/projects/freeassociation" ) -include(FeatureSummary) - include("${CMAKE_CURRENT_LIST_DIR}/KF5CalendarCoreTargets.cmake") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/CMakeLists.txt new/kcalcore-16.08.0/autotests/CMakeLists.txt --- old/kcalcore-16.04.3/autotests/CMakeLists.txt 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/CMakeLists.txt 2016-08-06 09:12:19.000000000 +0200 @@ -6,8 +6,6 @@ # needed by loadcalendar file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cal DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -remove_definitions(-DQT_NO_CAST_FROM_ASCII) - macro(macro_unit_tests) foreach(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testattachment.cpp new/kcalcore-16.08.0/autotests/testattachment.cpp --- old/kcalcore-16.04.3/autotests/testattachment.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testattachment.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -51,7 +51,7 @@ QCOMPARE(attachment3.size(), attachment2.size()); QByteArray fred("jkajskldfasjfklasjfaskfaskfasfkasfjdasfkasjf"); - Attachment attachment4(fred, QByteArray("image/nonsense")); + Attachment attachment4(fred, QLatin1String("image/nonsense")); QCOMPARE(fred, attachment4.data()); QVERIFY(attachment4.isBinary()); QByteArray ethel("a9fafafjafkasmfasfasffksjklfjau"); @@ -75,7 +75,7 @@ QTest::addColumnKCalCore::Attachment::Ptr("attachment"); Attachment::Ptr nonInline = Attachment::Ptr(new Attachment(QStringLiteral("http://www.kde.org"))); - Attachment::Ptr inlineAttachment = Attachment::Ptr(new Attachment(QByteArray("foo"), QByteArray("image/nonsense"))); + Attachment::Ptr inlineAttachment = Attachment::Ptr(new Attachment(QByteArray("foo"), QLatin1String("image/nonsense"))); QTest::newRow("inline") << inlineAttachment; QTest::newRow("not inline") << nonInline; @@ -99,10 +99,10 @@ void AttachmentTest::testWriteToTempFile() { QByteArray data("foo"); - Attachment::Ptr inlineAttachment = Attachment::Ptr(new Attachment(data.toBase64(), QByteArray("image/png"))); + Attachment::Ptr inlineAttachment = Attachment::Ptr(new Attachment(data.toBase64(), QLatin1String("image/png"))); Event *event = new Event(); QString filePath = event->writeAttachmentToTempFile(inlineAttachment); - QVERIFY(filePath.endsWith(".png")); + QVERIFY(filePath.endsWith(QLatin1String(".png"))); QFile file(filePath); QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); QCOMPARE(file.readLine(), data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testattendee.cpp new/kcalcore-16.08.0/autotests/testattendee.cpp --- old/kcalcore-16.04.3/autotests/testattendee.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testattendee.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -99,7 +99,7 @@ QVERIFY(!(attendee1 == attendee2)); attendee2.setRole(Attendee::ReqParticipant); QVERIFY(!(attendee1 == attendee2)); - QVERIFY(attendee1.name() == "fred"); + QVERIFY(attendee1.name() == QLatin1String("fred")); } void AttendeeTest::testCompareType() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testcalfilter.cpp new/kcalcore-16.08.0/autotests/testcalfilter.cpp --- old/kcalcore-16.04.3/autotests/testcalfilter.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testcalfilter.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -33,9 +33,9 @@ { CalFilter f; f.setName(QStringLiteral("testfilter")); - QVERIFY(f.name() == "testfilter"); + QVERIFY(f.name() == QLatin1String("testfilter")); CalFilter g(QStringLiteral("fredfilter")); - QVERIFY(g.name() == "fredfilter"); + QVERIFY(g.name() == QLatin1String("fredfilter")); CalFilter f1, f2; QVERIFY(f1 == f2); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testcustomproperties.cpp new/kcalcore-16.08.0/autotests/testcustomproperties.cpp --- old/kcalcore-16.04.3/autotests/testcustomproperties.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testcustomproperties.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -38,22 +38,22 @@ QByteArray name("X-KDE-KORG-TEXT"); QCOMPARE(cp.customPropertyName(app, key), name); cp.setCustomProperty(app, key, QStringLiteral("rich")); - QCOMPARE(cp.customProperty(app, key), QString("rich")); - QCOMPARE(cp.nonKDECustomProperty(name), QString("rich")); + QCOMPARE(cp.customProperty(app, key), QLatin1String("rich")); + QCOMPARE(cp.nonKDECustomProperty(name), QLatin1String("rich")); cp.removeCustomProperty(app, key); cp.setCustomProperty(app, key, QStringLiteral("foo")); cp.setCustomProperty(app, key, QStringLiteral("rich")); - QCOMPARE(cp.customProperty(app, key), QString("rich")); + QCOMPARE(cp.customProperty(app, key), QLatin1String("rich")); key = "X-TEXT"; cp.setNonKDECustomProperty(key, QStringLiteral("rich")); - QCOMPARE(cp.nonKDECustomProperty(key), QString("rich")); + QCOMPARE(cp.nonKDECustomProperty(key), QLatin1String("rich")); cp.removeNonKDECustomProperty(key); cp.setNonKDECustomProperty(key, QStringLiteral("foo")); cp.setNonKDECustomProperty(key, QStringLiteral("rich")); - QCOMPARE(cp.nonKDECustomProperty(key), QString("rich")); + QCOMPARE(cp.nonKDECustomProperty(key), QLatin1String("rich")); } void CustomPropertiesTest::testCompare() @@ -71,7 +71,7 @@ cp3.setCustomProperty(app, key, cp1.customProperty(app, key)); QVERIFY(cp1 == cp3); - QVERIFY(cp1.customProperty(app, key) == QString("rich")); + QVERIFY(cp1.customProperty(app, key) == QLatin1String("rich")); QVERIFY(cp1.customProperty(app, "foo").isEmpty()); QVERIFY(cp1.customProperty(app, QByteArray()).isEmpty()); @@ -88,7 +88,7 @@ cp3.setNonKDECustomProperty(key, cp1.nonKDECustomProperty(key)); QVERIFY(cp1 == cp3); - QVERIFY(cp1.nonKDECustomProperty(key) == QString("rich")); + QVERIFY(cp1.nonKDECustomProperty(key) == QLatin1String("rich")); QVERIFY(cp1.nonKDECustomProperty("foo").isEmpty()); QVERIFY(cp1.nonKDECustomProperty(QByteArray()).isEmpty()); @@ -110,7 +110,7 @@ CustomProperties cp; cp.setCustomProperties(cpmap); - QVERIFY(cp.customProperties().value("X-key3") == QString("val3")); + QVERIFY(cp.customProperties().value("X-key3") == QLatin1String("val3")); } void CustomPropertiesTest::testMapCompare() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testevent.cpp new/kcalcore-16.08.0/autotests/testevent.cpp --- old/kcalcore-16.04.3/autotests/testevent.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testevent.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -76,8 +76,8 @@ event->setDescription(QStringLiteral("This is a description of the first event")); event->setLocation(QStringLiteral("the place")); //KDE5: QVERIFY( event->typeStr() == i18n( "event" ) ); - QVERIFY(event->summary() == "Event1 Summary"); - QVERIFY(event->location() == "the place"); + QVERIFY(event->summary() == QLatin1String("Event1 Summary")); + QVERIFY(event->location() == QLatin1String("the place")); QVERIFY(event->type() == Incidence::TypeEvent); } @@ -100,7 +100,7 @@ QVERIFY(!(event1 == event2)); QVERIFY(event1.dtEnd() == event2.dtStart()); - QVERIFY(event2.summary() == "Event2 Summary"); + QVERIFY(event2.summary() == QLatin1String("Event2 Summary")); } void EventTest::testClone() @@ -261,4 +261,38 @@ event1.setDtEnd(KDateTime(dt).addDays(2)); QCOMPARE(event1.dirtyFields(), QSetIncidenceBase::Field() << IncidenceBase::FieldDtEnd); -} \ No newline at end of file +} + +void EventTest::testIsMultiDay_data() +{ + QTest::addColumn<KDateTime>("start"); + QTest::addColumn<KDateTime>("end"); + QTest::addColumn<bool>("isMultiDay"); + + QTest::newRow("event0") << KDateTime(QDate(2016, 7, 9), QTime(12, 0, 0)) << KDateTime(QDate(2016, 7, 9), QTime(13, 0, 0)) << false; + + QTest::newRow("event1") << KDateTime(QDate(2016, 7, 9), QTime(12, 0, 0)) << KDateTime(QDate(2016, 7, 10), QTime(0, 0, 0)) << false; + + QTest::newRow("event2") << KDateTime(QDate(2016, 7, 9), QTime(12, 0, 0)) << KDateTime(QDate(2016, 7, 10), QTime(12, 0, 0)) << true; + + QTest::newRow("event3") << KDateTime(QDate(2016, 12, 31), QTime(0, 0, 0)) << KDateTime(QDate(2017, 1, 1), QTime(0, 0, 0)) << false; + + QTest::newRow("event4") << KDateTime(QDate(2016, 12, 31), QTime(0, 0, 1)) << KDateTime(QDate(2017, 1, 1), QTime(0, 0, 1)) << true; + + QTest::newRow("event5") << KDateTime(QDate(2016, 12, 31), QTime(12, 0, 0)) << KDateTime(QDate(2017, 1, 1), QTime(12, 0, 0)) << true; + + QTest::newRow("event6") << KDateTime(QDate(2016, 12, 24), QTime(12, 0, 0)) << KDateTime(QDate(2017, 1, 1), QTime(0, 0, 0)) << true; +} + +void EventTest::testIsMultiDay() +{ + QFETCH(KDateTime, start); + QFETCH(KDateTime, end); + QFETCH(bool, isMultiDay); + + Event event; + event.setDtStart(start); + event.setDtEnd(end); + + QCOMPARE(event.isMultiDay(), isMultiDay); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testevent.h new/kcalcore-16.08.0/autotests/testevent.h --- old/kcalcore-16.04.3/autotests/testevent.h 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testevent.h 2016-08-06 09:12:19.000000000 +0200 @@ -40,6 +40,8 @@ void testSerializer(); void testDurationDtEnd(); void testDtEndChange(); + void testIsMultiDay_data(); + void testIsMultiDay(); }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testfilestorage.cpp new/kcalcore-16.08.0/autotests/testfilestorage.cpp --- old/kcalcore-16.04.3/autotests/testfilestorage.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testfilestorage.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -121,7 +121,7 @@ event->setDtStart(KDateTime(currentDate)); event->setDtEnd(KDateTime(currentDate.addDays(1))); - const QChar latin1_umlaut[] = { 0xFC, '\0' }; + const QChar latin1_umlaut[] = { 0xFC, QLatin1Char('\0') }; event->setSummary(QString(latin1_umlaut)); @@ -156,7 +156,7 @@ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); const QByteArray bytesFromFile = file.readAll(); - const QChar utf_umlaut[] = { 0xC3, 0XBC, '\0' }; + const QChar utf_umlaut[] = { 0xC3, 0XBC, QLatin1Char('\0') }; QVERIFY(bytesFromFile.contains(QString(utf_umlaut).toLatin1().constData())); QVERIFY(!bytesFromFile.contains(QString(latin1_umlaut).toLatin1().constData())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testicalformat.cpp new/kcalcore-16.08.0/autotests/testicalformat.cpp --- old/kcalcore-16.04.3/autotests/testicalformat.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testicalformat.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -46,12 +46,12 @@ event->setDtEnd(KDateTime(currentDate.addDays(1))); // ü - const QChar latin1_umlaut[] = { 0xFC, '\0' }; + const QChar latin1_umlaut[] = { 0xFC, QLatin1Char('\0') }; event->setSummary(QString(latin1_umlaut)); // Test if toString( Incidence ) didn't mess charsets const QString serialized = format.toString(event.staticCast<Incidence>()); - const QChar utf_umlaut[] = { 0xC3, 0XBC, '\0' }; + const QChar utf_umlaut[] = { 0xC3, 0XBC, QLatin1Char('\0') }; QVERIFY(serialized.toUtf8().contains(QString(utf_umlaut).toLatin1().constData())); QVERIFY(!serialized.toUtf8().contains(QString(latin1_umlaut).toLatin1().constData())); QVERIFY(serialized.toLatin1().contains(QString(latin1_umlaut).toLatin1().constData())); @@ -59,9 +59,9 @@ // test fromString( QString ) const QString serializedCalendar = - "BEGIN:VCALENDAR\nPRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN\nVERSION:2.0\n" + + QLatin1String("BEGIN:VCALENDAR\nPRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN\nVERSION:2.0\n") + serialized + - "\nEND:VCALENDAR"; + QLatin1String("\nEND:VCALENDAR"); Incidence::Ptr event2 = format.fromString(serializedCalendar); QVERIFY(event->summary() == event2->summary()); @@ -71,7 +71,7 @@ // test save() MemoryCalendar::Ptr calendar(new MemoryCalendar(QStringLiteral("UTC"))); calendar->addIncidence(event); - QVERIFY(format.save(calendar, "hommer.ics")); + QVERIFY(format.save(calendar, QLatin1String("hommer.ics"))); // Make sure hommer.ics is in UTF-8 QFile file(QStringLiteral("hommer.ics")); @@ -84,7 +84,7 @@ // Test load: MemoryCalendar::Ptr calendar2(new MemoryCalendar(QStringLiteral("UTC"))); - QVERIFY(format.load(calendar2, "hommer.ics")); + QVERIFY(format.load(calendar2, QLatin1String("hommer.ics"))); QVERIFY(calendar2->incidences().count() == 1); // qDebug() << format.toString( event.staticCast<Incidence>() ); @@ -139,9 +139,9 @@ // test fromString(QString) const QString serializedCalendar = - "BEGIN:VCALENDAR\nPRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN\nVERSION:2.0\n" + + QLatin1String("BEGIN:VCALENDAR\nPRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN\nVERSION:2.0\n") + serialized + - "\nEND:VCALENDAR"; + QLatin1String("\nEND:VCALENDAR"); Incidence::Ptr event2 = format.fromString(serializedCalendar); QVERIFY(event2->attendeeCount() == 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testjournal.cpp new/kcalcore-16.08.0/autotests/testjournal.cpp --- old/kcalcore-16.04.3/autotests/testjournal.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testjournal.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -35,8 +35,8 @@ journal->setDescription(QStringLiteral("This is a description of my journal")); journal->setLocation(QStringLiteral("the place")); //KDE5: QVERIFY( journal->typeStr() == i18n( "journal" ) ); - QVERIFY(journal->summary() == "Journal Summary"); - QVERIFY(journal->location() == "the place"); + QVERIFY(journal->summary() == QLatin1String("Journal Summary")); + QVERIFY(journal->location() == QLatin1String("the place")); } void JournalTest::testCompare() @@ -55,7 +55,7 @@ journal2.setLocation(QStringLiteral("the other place")); QVERIFY(!(journal1 == journal2)); - QVERIFY(journal2.summary() == "Journal2 Summary"); + QVERIFY(journal2.summary() == QLatin1String("Journal2 Summary")); } void JournalTest::testClone() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testmemorycalendar.cpp new/kcalcore-16.08.0/autotests/testmemorycalendar.cpp --- old/kcalcore-16.04.3/autotests/testmemorycalendar.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testmemorycalendar.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -123,7 +123,7 @@ QVERIFY(store.load()); Todo::Ptr todo = cal->incidence(QStringLiteral("4")).staticCast<Todo>(); - QVERIFY(todo->uid() == "4"); + QVERIFY(todo->uid() == QLatin1String("4")); QVERIFY(todo->summaryIsRich()); QVERIFY(todo->locationIsRich()); cal->close(); @@ -136,12 +136,12 @@ // the incidences had special relations. // This test tests that scenario, and will crash if it fails. MemoryCalendar::Ptr cal(new MemoryCalendar(KDateTime::UTC)); - FileStorage store1(cal, ICALTESTDATADIR "test_relations.ics"); + FileStorage store1(cal, QLatin1Literal(ICALTESTDATADIR) + QLatin1String("test_relations.ics")); QVERIFY(store1.load()); const Todo::List oldTodos = cal->todos(); qDebug() << "Loaded " << oldTodos.count() << " todos into oldTodos."; - FileStorage store2(cal, ICALTESTDATADIR "test_relations.ics"); + FileStorage store2(cal, QLatin1String(ICALTESTDATADIR) + QLatin1String("test_relations.ics")); QVERIFY(store2.load()); const Todo::List newTodos = cal->todos(); qDebug() << "Loaded " << newTodos.count() << " into newTodos."; @@ -264,7 +264,7 @@ QVERIFY(main); QVERIFY(exception); QVERIFY(exception->recurrenceId() == newRecId); - QVERIFY(exception->summary() == "exception"); + QVERIFY(exception->summary() == QLatin1String("exception")); QVERIFY(main->summary() == event1->summary()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testperson.cpp new/kcalcore-16.08.0/autotests/testperson.cpp --- old/kcalcore-16.04.3/autotests/testperson.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testperson.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -34,7 +34,7 @@ void PersonTest::testValidity() { Person person(QStringLiteral("fred"), QStringLiteral("fred@flintstone.com")); - QVERIFY(person.name() == "fred"); + QVERIFY(person.name() == QLatin1String("fred")); } void PersonTest::testCompare() @@ -49,21 +49,21 @@ QVERIFY(person1 == *person3.data()); QVERIFY(person1 == person1copy); QVERIFY(person1 == person1assign); - QVERIFY(person1.name() == "fred"); - QVERIFY(person2.email() == "wilma@flintstone.com"); - QVERIFY(person3->name() == "fred"); - QVERIFY(person3->email() == "fred@flintstone.com"); + QVERIFY(person1.name() == QLatin1String("fred")); + QVERIFY(person2.email() == QLatin1String("wilma@flintstone.com")); + QVERIFY(person3->name() == QLatin1String("fred")); + QVERIFY(person3->email() == QLatin1String("fred@flintstone.com")); } void PersonTest::testStringify() { Person person1(QStringLiteral("fred"), QStringLiteral("fred@flintstone.com")); Person person2(QStringLiteral("wilma"), QStringLiteral("wilma@flintstone.com")); - QVERIFY(person1.fullName() == "fred <fred@flintstone.com>"); - QVERIFY(person2.fullName() == "wilma <wilma@flintstone.com>"); + QVERIFY(person1.fullName() == QLatin1String("fred <fred@flintstone.com>")); + QVERIFY(person2.fullName() == QLatin1String("wilma <wilma@flintstone.com>")); person1.setName(QLatin1String("")); - QVERIFY(person1.fullName() == "fred@flintstone.com"); + QVERIFY(person1.fullName() == QLatin1String("fred@flintstone.com")); person1.setEmail(QString()); QVERIFY(person1.fullName().isEmpty()); } @@ -84,10 +84,10 @@ int count; in_stream >> name; - QVERIFY(name == "fred"); + QVERIFY(name == QLatin1String("fred")); in_stream >> email; - QVERIFY(email == "fred@flintstone.com"); + QVERIFY(email == QLatin1String("fred@flintstone.com")); in_stream >> count; QVERIFY(count == initial_count); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testreadrecurrenceid.cpp new/kcalcore-16.08.0/autotests/testreadrecurrenceid.cpp --- old/kcalcore-16.04.3/autotests/testreadrecurrenceid.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testreadrecurrenceid.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -30,7 +30,7 @@ void TestReadRecurrenceId::testReadSingleException() { KCalCore::ICalFormat format; - QFile file(ICALTESTDATADIR "test_recurrenceid_single.ics"); + QFile file(QLatin1String(ICALTESTDATADIR) + QLatin1String("test_recurrenceid_single.ics")); QVERIFY(file.open(QIODevice::ReadOnly)); // qDebug() << file.readAll(); @@ -48,7 +48,7 @@ void TestReadRecurrenceId::testReadSingleExceptionWithThisAndFuture() { KCalCore::ICalFormat format; - QFile file(ICALTESTDATADIR "test_recurrenceid_thisandfuture.ics"); + QFile file(QLatin1String(ICALTESTDATADIR) + QLatin1String("test_recurrenceid_thisandfuture.ics")); QVERIFY(file.open(QIODevice::ReadOnly)); KCalCore::Incidence::Ptr i = format.fromString(QString::fromUtf8(file.readAll())); QVERIFY(i); @@ -82,7 +82,7 @@ { KCalCore::MemoryCalendar::Ptr calendar(new KCalCore::MemoryCalendar(KDateTime::UTC)); KCalCore::ICalFormat format; - QFile file(ICALTESTDATADIR "test_recurrenceid.ics"); + QFile file(QLatin1String(ICALTESTDATADIR) + QLatin1String("test_recurrenceid.ics")); QVERIFY(file.open(QIODevice::ReadOnly)); format.fromString(calendar, QString::fromUtf8(file.readAll())); QCOMPARE(calendar->rawEvents().size(), 2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/autotests/testtodo.cpp new/kcalcore-16.08.0/autotests/testtodo.cpp --- old/kcalcore-16.04.3/autotests/testtodo.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/autotests/testtodo.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -39,8 +39,8 @@ todo->setLocation(QStringLiteral("the place")); todo->setPercentComplete(5); //KDE5: QVERIFY( todo->typeStr() == i18n( "to-do" ) ); - QVERIFY(todo->summary() == "To-do1 Summary"); - QVERIFY(todo->location() == "the place"); + QVERIFY(todo->summary() == QLatin1String("To-do1 Summary")); + QVERIFY(todo->location() == QLatin1String("the place")); QVERIFY(todo->percentComplete() == 5); } @@ -65,7 +65,7 @@ QVERIFY(!(todo1 == todo2)); QVERIFY(todo1.dtDue() == todo2.dtStart()); - QVERIFY(todo2.summary() == "To-do2 Summary"); + QVERIFY(todo2.summary() == QLatin1String("To-do2 Summary")); QVERIFY(!(todo1.isCompleted() == todo2.isCompleted())); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/src/calendar.cpp new/kcalcore-16.08.0/src/calendar.cpp --- old/kcalcore-16.04.3/src/calendar.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/src/calendar.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -1021,10 +1021,13 @@ // First, go over the list of orphans and see if this is their parent Incidence::List l = values(d->mOrphans, uid); d->mOrphans.remove(uid); - d->mIncidenceRelations[uid].reserve(l.count()); - for (int i = 0, end = l.count(); i < end; ++i) { - d->mIncidenceRelations[uid].append(l[i]); - d->mOrphanUids.remove(l[i]->uid()); + if (!l.isEmpty()) { + Incidence::List &relations = d->mIncidenceRelations[uid]; + relations.reserve(relations.count() + l.count()); + for (int i = 0, end = l.count(); i < end; ++i) { + relations.append(l[i]); + d->mOrphanUids.remove(l[i]->uid()); + } } // Now see about this incidences parent @@ -1075,10 +1078,10 @@ // If this incidence is related to something else, tell that about it if (!parentUid.isEmpty()) { - d->mIncidenceRelations[parentUid].erase( - std::remove(d->mIncidenceRelations[parentUid].begin(), - d->mIncidenceRelations[parentUid].end(), incidence), - d->mIncidenceRelations[parentUid].end()); + Incidence::List &relations = d->mIncidenceRelations[parentUid]; + relations.erase( + std::remove(relations.begin(), relations.end(), incidence), + relations.end()); } // Remove this one from the orphans list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/src/event.cpp new/kcalcore-16.08.0/src/event.cpp --- old/kcalcore-16.04.3/src/event.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/src/event.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -206,7 +206,7 @@ // End date is non inclusive // If we have an incidence that duration is one day and ends with a start of a new day // than it is not a multiday event - if (multi && end.time() != QTime(0, 0, 0)) { + if (multi && end.time() == QTime(0, 0, 0)) { multi = start.daysTo(end) > 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/src/icalformat.cpp new/kcalcore-16.08.0/src/icalformat.cpp --- old/kcalcore-16.04.3/src/icalformat.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/src/icalformat.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -147,8 +147,10 @@ return fromRawString(cal, string.toUtf8(), deleted, notebook); } -Incidence::Ptr ICalFormat::readIncidence(const QByteArray &string, ICalTimeZones *tzlist) +Incidence::Ptr ICalFormat::readIncidence(const QByteArray &string) { + static ICalTimeZones *tzCache = new ICalTimeZones(); // populated on demand further down the call chain + icalcomponent *calendar; // Let's defend const correctness until the very gates of hell^Wlibical @@ -161,11 +163,11 @@ Incidence::Ptr incidence; if (icalcomponent_isa(calendar) == ICAL_VCALENDAR_COMPONENT) { - incidence = d->mImpl->readOneIncidence(calendar, tzlist); + incidence = d->mImpl->readOneIncidence(calendar, tzCache); } else if (icalcomponent_isa(calendar) == ICAL_XROOT_COMPONENT) { icalcomponent *comp = icalcomponent_get_first_component(calendar, ICAL_VCALENDAR_COMPONENT); if (comp) { - incidence = d->mImpl->readOneIncidence(comp, tzlist); + incidence = d->mImpl->readOneIncidence(comp, tzCache); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/src/icalformat.h new/kcalcore-16.08.0/src/icalformat.h --- old/kcalcore-16.04.3/src/icalformat.h 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/src/icalformat.h 2016-08-06 09:12:19.000000000 +0200 @@ -107,15 +107,11 @@ Timezones are instead solely interpreted by using system-timezones. @param string is a utf8 QByteArray containing the data to be parsed. - @param tzlist is a collection of timezones used for the parsed date-times. - This collection may be empty or pre-populated. If it is empty, it is populated - automatically from the systemtimezones and thus acts as a cache. The tzlist may be 0 - if the timezone should be read everytime from the system. @return non-zero pointer if the parsing was successful; 0 otherwise. @see fromString(const QString &), fromRawString() */ - Incidence::Ptr readIncidence(const QByteArray &string, ICalTimeZones *tzlist); + Incidence::Ptr readIncidence(const QByteArray &string); /** Parses a string and fills a RecurrenceRule object with the information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalcore-16.04.3/src/incidence.cpp new/kcalcore-16.08.0/src/incidence.cpp --- old/kcalcore-16.04.3/src/incidence.cpp 2016-06-15 06:36:43.000000000 +0200 +++ new/kcalcore-16.08.0/src/incidence.cpp 2016-08-06 09:12:19.000000000 +0200 @@ -52,16 +52,16 @@ { public: Private() - : mRevision(0), - mDescriptionIsRich(false), - mSummaryIsRich(false), - mLocationIsRich(false), + : mGeoLatitude(INVALID_LATLON), + mGeoLongitude(INVALID_LATLON), mRecurrence(0), + mRevision(0), + mPriority(0), mStatus(StatusNone), mSecrecy(SecrecyPublic), - mPriority(0), - mGeoLatitude(INVALID_LATLON), - mGeoLongitude(INVALID_LATLON), + mDescriptionIsRich(false), + mSummaryIsRich(false), + mLocationIsRich(false), mHasGeo(false), mThisAndFuture(false), mLocalOnly(false) @@ -70,26 +70,26 @@ Private(const Private &p) : mCreated(p.mCreated), - mRevision(p.mRevision), mDescription(p.mDescription), - mDescriptionIsRich(p.mDescriptionIsRich), mSummary(p.mSummary), - mSummaryIsRich(p.mSummaryIsRich), mLocation(p.mLocation), - mLocationIsRich(p.mLocationIsRich), mCategories(p.mCategories), - mRecurrence(0), mResources(p.mResources), - mStatus(p.mStatus), mStatusString(p.mStatusString), - mSecrecy(p.mSecrecy), - mPriority(p.mPriority), mSchedulingID(p.mSchedulingID), mRelatedToUid(p.mRelatedToUid), + mRecurrenceId(p.mRecurrenceId), mGeoLatitude(p.mGeoLatitude), mGeoLongitude(p.mGeoLongitude), + mRecurrence(0), + mRevision(p.mRevision), + mPriority(p.mPriority), + mStatus(p.mStatus), + mSecrecy(p.mSecrecy), + mDescriptionIsRich(p.mDescriptionIsRich), + mSummaryIsRich(p.mSummaryIsRich), + mLocationIsRich(p.mLocationIsRich), mHasGeo(p.mHasGeo), - mRecurrenceId(p.mRecurrenceId), mThisAndFuture(p.mThisAndFuture), mLocalOnly(false) { @@ -149,31 +149,30 @@ } KDateTime mCreated; // creation datetime - int mRevision; // revision number - QString mDescription; // description string - bool mDescriptionIsRich; // description string is richtext. QString mSummary; // summary string - bool mSummaryIsRich; // summary string is richtext. QString mLocation; // location string - bool mLocationIsRich; // location string is richtext. QStringList mCategories; // category list - mutable Recurrence *mRecurrence; // recurrence Attachment::List mAttachments; // attachments list Alarm::List mAlarms; // alarms list QStringList mResources; // resources list (not calendar resources) - Status mStatus; // status QString mStatusString; // status string, for custom status - Secrecy mSecrecy; // secrecy - int mPriority; // priority: 1 = highest, 2 = less, etc. QString mSchedulingID; // ID for scheduling mails - QMap<RelType, QString> mRelatedToUid; // incidence uid this is related to, for each relType + QHash<Attachment::Ptr, QString> mTempFiles; // Temporary files for writing attachments to. + KDateTime mRecurrenceId; // recurrenceId + float mGeoLatitude; // Specifies latitude in decimal degrees float mGeoLongitude; // Specifies longitude in decimal degrees + mutable Recurrence *mRecurrence; // recurrence + int mRevision; // revision number + int mPriority; // priority: 1 = highest, 2 = less, etc. + Status mStatus; // status + Secrecy mSecrecy; // secrecy + bool mDescriptionIsRich; // description string is richtext. + bool mSummaryIsRich; // summary string is richtext. + bool mLocationIsRich; // location string is richtext. bool mHasGeo; // if incidence has geo data - QHash<Attachment::Ptr, QString> mTempFiles; // Temporary files for writing attachments to. - KDateTime mRecurrenceId; // recurrenceId bool mThisAndFuture; bool mLocalOnly; // allow changes that won't go to the server };