Bug 392952

Summary: Regression: port to QTimeZone leads to blowing up iCal file size
Product: [Frameworks and Libraries] frameworks-kcalendarcore Reporter: Jochen Trumpf <Jochen.Trumpf>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.8.0
Attachments: fix for repeated VTIMEZONE entries in iCal resource

Description Jochen Trumpf 2018-04-10 03:37:04 UTC
Created attachment 111933 [details]
fix for repeated VTIMEZONE entries in iCal resource

Commit https://cgit.kde.org/kcalcore.git/commit/?h=Applications/17.12&id=d90afd544828cc3391720c7aaf9135fa577f303a introduced an unintended side effect that is blowing up iCal file sizes by storing a VTIMEZONE entry per event instead of a consolidated list.

The issue is ultimately caused by the replacement of the QMap based ICalTimeZones class with a QVector based type for tzUsedList. The ICalTimeZones::add method did check whether a to be added timezone is already in the map, whereas the replacement QVector::push_back method does not.

The bug occurs in lines 2419-2421 (Application/17.12 branch) of icalformat_p.cpp and is easily fixed with the attached patch.
Comment 1 Laurent Montel 2018-04-10 04:48:27 UTC
Git commit 8c9db8c09db4cc7ac5eda1b93fabb77e5b1e0272 by Laurent Montel.
Committed on 10/04/2018 at 04:47.
Pushed by mlaurent into branch 'Applications/18.04'.

Fix Bug 392952 - Regression: port to QTimeZone leads to blowing up iCal file size

FIXED-IN: 5.8.0

Apply patch from  Jochen Trumpf
thanks a lot

M  +3    -1    src/icalformat_p.cpp

https://commits.kde.org/kcalcore/8c9db8c09db4cc7ac5eda1b93fabb77e5b1e0272