TypeRepository* TypeRepository::self() { if (!s_instance) sdType.setObject(s_instance, new TypeRepository()); return s_instance; }
ServerTypeManager* ServerTypeManager::self() { if ( !mSelf ) serverManagerDeleter.setObject( mSelf, new ServerTypeManager( 0, "ServerTypeManager" ) ); return mSelf; }
ExtensionManager* ExtensionManager::self() { if (!m_self) { extensionManagerDeleter.setObject(m_self, new ExtensionManager()); } return m_self; }
void AddresseeLineEdit::init() { if ( !s_completion ) { completionDeleter.setObject( s_completion, new KMailCompletion() ); s_completion->setOrder( completionOrder() ); s_completion->setIgnoreCase( true ); completionItemsDeleter.setObject( s_completionItemMap, new KPIM::CompletionItemsMap() ); completionSourcesDeleter.setObject( s_completionSources, new QStringList() ); completionSourceWeightsDeleter.setObject( s_completionSourceWeights, new QMap<QString,int> ); ldapClientToCompletionSourceMapDeleter.setObject( s_ldapClientToCompletionSourceMap, new QMap<int,int> ); } // connect( s_completion, SIGNAL(match(const QString&)), // this, SLOT(slotMatched(const QString&)) ); if ( m_useCompletion ) { if ( !s_LDAPTimer ) { ldapTimerDeleter.setObject( s_LDAPTimer, new QTimer ); ldapSearchDeleter.setObject( s_LDAPSearch, new KPIM::LdapSearch ); ldapTextDeleter.setObject( s_LDAPText, new QString ); } updateLDAPWeights(); if ( !m_completionInitialized ) { setCompletionObject( s_completion, false ); connect( this, SIGNAL(completion(const QString&)), this, SLOT(slotCompletion()) ); connect( this, SIGNAL(returnPressed(const QString&)), this, SLOT(slotReturnPressed(const QString&)) ); KCompletionBox *box = completionBox(); connect( box, SIGNAL(activated(const QString&)), this, SLOT(slotPopupCompletion(const QString&)) ); connect( box, SIGNAL(userCancelled(const QString&)), SLOT(slotUserCancelled(const QString&)) ); // The emitter is always called KPIM::IMAPCompletionOrder by contract if ( !QDBusConnection::sessionBus().connect( "kde.org.pim.completionorder", "/", "kde.org.pim.CompletionOrder", "completionOrderChanged", this, SLOT(slotIMAPCompletionOrderChanged()) ) ) { kError() << "AddresseeLineEdit: connection to orderChanged() failed"; } connect( s_LDAPTimer, SIGNAL(timeout()), SLOT(slotStartLDAPLookup()) ); connect( s_LDAPSearch, SIGNAL(searchData(const KPIM::LdapResultList&)), SLOT(slotLDAPSearchData(const KPIM::LdapResultList&)) ); m_completionInitialized = true; } }
PicAsm12bit *PicAsm12bit::self() { if ( !m_self ) picAsm12BitStaticDeleter.setObject( m_self, new PicAsm12bit() ); return m_self; }