Initialize the addressbook instance outside the constructor, so it does not try…

Authored by krake on Nov 27 2008, 10:26 PM.

Description

Initialize the addressbook instance outside the constructor, so it does not try to load any resources. Resources might use nested event loops to simulate synchronous load and result in re-entry of ::self() causing multiple instance of a class supposed to be a singleton.

Reduced to self() without arguments to just delegate to the one with argument, since the difference between the two constructors being used is just the value of the parameter passed to Private::init().
This has probably been different in the past.

Tobias could you check that this conclusion is correct and that the fix does not break anything else in KABC that I might not be aware of?

Fixes Bug 175971

CCMAIL: tokoe@kde.org

svn path=/trunk/KDE/kdepimlibs/; revision=889879

Details

Committed
krakeNov 27 2008, 10:26 PM
Parents
R172:b930118955b5: Make sure the hostname does not end with a \n. Strip it on input and strip it…
Branches
Unknown
Tags
Unknown