From 6f1a74b1b69488fef5f4e07286d8f439d266681e Mon Sep 17 00:00:00 2001 From: Till Adam Date: Fri, 6 Jun 2008 12:00:23 +0000 Subject: [PATCH] Coding style, don't crash on search, initialize the new member. svn path=/branches/kdepim/enterprise/kdepim/; revision=817604 --- recipientspicker.cpp | 11 ++++++----- recipientspicker.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/recipientspicker.cpp b/recipientspicker.cpp index 9cdf940c6..b64120964 100644 --- a/recipientspicker.cpp +++ b/recipientspicker.cpp @@ -318,6 +318,7 @@ RecipientsPicker::RecipientsPicker( QWidget *parent ) #ifndef KDEPIM_NEW_DISTRLISTS , mDistributionListManager( 0 ) #endif + ,mLdapSearchDialog( 0 ) { // KWin::setType( winId(), NET::Dock ); @@ -783,12 +784,12 @@ void RecipientsPicker::resetSearch() void RecipientsPicker::slotSearchLDAP() { - if ( !ldapSearchDialog ) { - ldapSearchDialog = new KPIM::LDAPSearchDialog( this ); - connect( ldapSearchDialog, SIGNAL( addresseesAdded() ), + if ( !mLdapSearchDialog ) { + mLdapSearchDialog = new KPIM::LDAPSearchDialog( this ); + connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), SLOT(ldapSearchResult() ) ); } - ldapSearchDialog->show(); + mLdapSearchDialog->show(); } @@ -796,7 +797,7 @@ void RecipientsPicker::ldapSearchResult() { kdDebug() << k_funcinfo ; - QStringList emails = QStringList::split(',', ldapSearchDialog->selectedEMails() ); + QStringList emails = QStringList::split(',', mLdapSearchDialog->selectedEMails() ); QStringList::iterator it( emails.begin() ); QStringList::iterator end( emails.end() ); for ( ; it != end; ++it ){ diff --git a/recipientspicker.h b/recipientspicker.h index f6e9bd5e4..fd7feb209 100644 --- a/recipientspicker.h +++ b/recipientspicker.h @@ -207,10 +207,10 @@ class RecipientsPicker : public QDialog QPushButton *mToButton; QPushButton *mCcButton; QPushButton *mBccButton; - + QPushButton *mSearchLDAPButton; - KPIM::LDAPSearchDialog *ldapSearchDialog; - + KPIM::LDAPSearchDialog *mLdapSearchDialog; + QMap mCollectionMap; RecipientsCollection *mAllRecipients; RecipientsCollection *mSelectedRecipients;