-rw-r--r-- | core/pim/addressbook/abview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 7226e82..161b163 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp @@ -249,97 +249,97 @@ void AbView::showPersonal( bool personal ) { qWarning ("void AbView::showPersonal( %d )", personal); if ( personal ){ if ( m_inPersonal ) return; // Now switch to vCard Backend and load data. // The current default backend will be stored // to avoid unneeded load/stores. m_storedDB = m_contactdb; OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, addressbookPersonalVCardName() ); m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); m_inPersonal = true; m_curr_View = CardView; }else{ if ( !m_inPersonal ) return; // Remove vCard Backend and restore default m_contactdb->save(); delete m_contactdb; m_contactdb = m_storedDB; m_storedDB = 0l; m_curr_View = TableView; m_inPersonal = false; } load(); } QStringList AbView::categories() { mCat.load( categoryFileName() ); QStringList categoryList = mCat.labels( "Contacts" ); return categoryList; } // BEGIN: Slots void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, - bool , QString cat = QString::null ) + bool , QString cat ) { qWarning( "void AbView::slotDoFind" ); // We reloading the data: Deselect Letterpicker emit signalClearLetterPicker(); // Use the current Category if nothing else selected int category = 0; if ( cat.isEmpty() ) category = m_curr_category; else{ category = mCat.id("Contacts", cat ); } qWarning ("Find in Category %d", category); QRegExp r( str ); r.setCaseSensitive( caseSensitive ); r.setWildcard( !useRegExp ); // Get all matching entries out of the database m_list = m_contactdb->matchRegexp( r ); qWarning( "found: %d", m_list.count() ); if ( m_list.count() == 0 ){ emit signalNotFound(); return; } // Now remove all contacts with wrong category (if any selected) // This algorithm is a litte bit ineffective, but // we will not have a lot of matching entries.. clearForCategory(); // Now show all found entries updateView( true ); } void AbView::offSearch() { m_inSearch = false; load(); } void AbView::slotSwitch(){ qWarning("AbView::slotSwitch()"); |