On Mon, 18 Apr 2011 18:35:27 +0300
ext-arun.1.ravind...@nokia.com wrote:

> From: Arun Ravindran <ext-arun.1.ravind...@nokia.com>
> 
> This patch fixes the following issue:
> 
> 1) A fresh device, with no call history.
> 2) Start dialer and receive and incoming call
> 3) Complete the call by disconnecting it.
> 4) See the call history (everything is fine)
> 5) close dialer and restart it again.
> 6) See call history, Shows the unix epoch or a time close to that.
> 
> This is because of wrong usage of QSettings.
> 
> When the dialer restarted the values of QSetting
> @ /home/meego/.config/com.meego.conf is
> 
> [CallHistory]
> CallHistory\1302858505\LineID=+358403445507
> CallHistory\1302858505\Type=1
> CallHistory\1302858505\Start=1302858505
> CallHistory\1302858505\End=1302858516

This is actually not what I wanted/expected to be happening.

What I expected was more like the following:
[CallHistory]
1302858505\LineID=+358403445507
1302858505\Type=1
1302858505\Start=1302858505
1302858505\End=1302858516

Where "CallHistory" is not repeated every time.

I did some slight reworking of the patch to apply to the new "headless"
master (some changes in historytablemodel.cpp prevented it from
applying) and see that, while the entries now appear consistent, now
they *all* prefix with "CallHistory\".  This is redundant since we
already define a top level group.  I really don't think we should be
using the childGroups() at all.

After a closer look, it seems the real reason we have any issue (see
BMC# 2043[1]) at all here is that when I originally created this hack, I
failed to call endGroup() when the the QSettings cache is initially
empty. Adding a simple cache->endGroup() before the return when
(events.size() == 0) seems to have solved the problem.

Shane...
[1]https://bugs.meego.com/show_bug.cgi?id=2043
_______________________________________________
MeeGo-handset mailing list
MeeGo-handset@lists.meego.com
http://lists.meego.com/listinfo/meego-handset

Reply via email to