[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/kresources/kolab/shared
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-03-21 10:50:14
Message-ID: 1206096614.751707.14078.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 788305 by vkrause:

cleanup type registration


 M  +3 -14     kmailconnection.cpp  


--- trunk/KDE/kdepim/kresources/kolab/shared/kmailconnection.cpp #788304:788305
@@ -46,15 +46,6 @@
 
 using namespace Kolab;
 
-static void registerTypes()
-{
-    static bool registered = false;
-    if (!registered) {
-      KMail::registerGroupwareTypes();
-      registered = true;
-    }
-}
-
 KMailConnection::KMailConnection( ResourceKolabBase* resource )
   : mResource( resource )
   , mKmailGroupwareInterface( 0 )
@@ -64,7 +55,7 @@
                    SIGNAL(serviceOwnerChanged(QString,QString,QString)),
                    this, SLOT(dbusServiceOwnerChanged(QString,QString,QString)));
 
-  registerTypes();
+  KMail::registerGroupwareTypes();
 }
 
 
@@ -89,8 +80,8 @@
       // using e.g. KMessageBox
       return false;
     }
-    registerTypes();
-    mKmailGroupwareInterface = new OrgKdeKmailGroupwareInterface( dbusService, \
"/Groupware" , QDBusConnection::sessionBus() ); +    mKmailGroupwareInterface = new \
OrgKdeKmailGroupwareInterface( dbusService, KMAIL_DBUS_GROUPWARE_PATH, +              \
QDBusConnection::sessionBus() );  
     connect( mKmailGroupwareInterface, \
                SIGNAL(incidenceAdded(QString,QString,uint,int,QString)),
              SLOT(fromKMailAddIncidence(QString,QString,uint,int,QString)) );
@@ -170,7 +161,6 @@
 {
   if ( !connectToKMail() )
     return false;
-  registerTypes();
 
   QDBusReply<KMail::SubResource::List> r = \
mKmailGroupwareInterface->subresourcesKolab( contentsType );  if ( r.isValid() )
@@ -200,7 +190,6 @@
 {
   if ( !connectToKMail() )
     return false;
-  registerTypes();
   QDBusReply< KMail::SernumDataPair::List > r = \
mKmailGroupwareInterface->incidencesKolab( mimetype, resource, startIndex, nbMessages \
);  if (r.isValid()) {
     lst = r.value();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic