Commit e9438a43 authored by Thomas McGuire's avatar Thomas McGuire
Browse files

Merged revisions 812915,821419,821732,821927 via svnmerge from

svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepimlibs

........
  r812915 | tilladam | 2008-05-26 17:57:51 +0200 (Mon, 26 May 2008) | 1 line
  
  Don't abuse QDir for chopping off a leading / in the DN part of the query. That fails on Windows in interesting ways.
........
  r821419 | tilladam | 2008-06-17 14:30:33 +0200 (Tue, 17 Jun 2008) | 2 lines
  
  Make a few things public, for access by the identitymanager's Private, which we can't make a friend (due to it being, well, private). Fixes the build.
........
  r821732 | staniek | 2008-06-18 12:13:19 +0200 (Wed, 18 Jun 2008) | 5 lines
  
  Destroy TransportManager using qAddPostRoutine, not K_GLOBAL_STATIC.
  This avoids crash on application's quit (msvc builds): destroying through K_GLOBAL_STATIC
  is too late for this object.
........
  r821927 | staniek | 2008-06-18 21:55:08 +0200 (Wed, 18 Jun 2008) | 13 lines
  
  
  - Resource::clear() fix crash appearing at qDeleteAll(mDistListMap) beacuse
    DistributionList objects' destructor calls
    Resource::removeDistributionList(), which in turn modifies with
    mDistListMap. We are now copying mDistListMap, clearing it and finally
    deleting all items from the copy, instead of erasing() every deleted item from the map.
  
  - simplify code related to mDistListMap: use Qt4 facilities and some
    more constness 
  
  Reviewed by Ingo, thanks.
........

svn path=/trunk/KDE/kdepimlibs/; revision=822818
parent f4a2e68c
......@@ -72,13 +72,16 @@ class StaticTransportManager : public TransportManager
StaticTransportManager() : TransportManager() {}
};
K_GLOBAL_STATIC( StaticTransportManager, sSelf )
StaticTransportManager *sSelf = 0;
static void destroyStaticTransportManager() {
delete sSelf;
}
TransportManager::TransportManager()
: QObject(), d( new Private )
{
qAddPostRoutine( sSelf.destroy );
qAddPostRoutine( destroyStaticTransportManager );
d->myOwnChange = false;
d->wallet = 0;
d->walletOpenFailed = false;
......@@ -103,13 +106,14 @@ TransportManager::TransportManager()
TransportManager::~TransportManager()
{
qRemovePostRoutine( sSelf.destroy );
qRemovePostRoutine( destroyStaticTransportManager );
delete d;
}
TransportManager *TransportManager::self()
{
if ( !sSelf.exists() ) {
if ( !sSelf ) {
sSelf = new StaticTransportManager;
sSelf->readConfig();
}
return sSelf;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment