Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abview.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 7a5b6d4..7abb45c 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp @@ -49,13 +49,13 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): m_contactdb ( 0l ), m_storedDB ( 0l ), m_viewStack( 0l ), m_abTable( 0l ), m_orderedFields( ordered ) { - owarn << "AbView::c'tor" << oendl; + odebug << "AbView::c'tor" << oendl; // Load default database and handle syncing myself.. ! m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available mCat.load( categoryFileName() ); // Create Layout and put WidgetStack into it. @@ -97,34 +97,34 @@ AbView::~AbView() } } void AbView::setView( Views view ) { - owarn << "AbView::setView( Views view )" << oendl; + odebug << "AbView::setView( Views view )" << oendl; m_curr_View = view; load(); } void AbView::addEntry( const Opie::OPimContact &newContact ) { - owarn << "AbView::AddContact" << oendl; + odebug << "AbView::AddContact" << oendl; m_contactdb->add ( newContact ); load(); } void AbView::removeEntry( const int UID ) { - owarn << "AbView;:RemoveContact" << oendl; + odebug << "AbView;:RemoveContact" << oendl; m_contactdb->remove( UID ); load(); } void AbView::replaceEntry( const Opie::OPimContact &contact ) { - owarn << "AbView::ReplaceContact" << oendl; + odebug << "AbView::ReplaceContact" << oendl; m_contactdb->replace( contact ); load(); } Opie::OPimContact AbView::currentEntry() @@ -142,20 +142,20 @@ Opie::OPimContact AbView::currentEntry() m_curr_Contact = currentContact.uid(); return currentContact; } bool AbView::save() { - // owarn << "AbView::Save data" << oendl; + // odebug << "AbView::Save data" << oendl; return m_contactdb->save(); } void AbView::load() { - owarn << "AbView::Load data" << oendl; + odebug << "AbView::Load data" << oendl; // Letter Search is stopped at this place emit signalClearLetterPicker(); if ( m_inPersonal ) // VCard Backend does not sort.. @@ -163,73 +163,73 @@ void AbView::load() else{ m_list = m_contactdb->sorted( true, 0, 0, 0 ); if ( m_curr_category != -1 ) clearForCategory(); } - owarn << "Number of contacts: " << m_list.count() << oendl; + odebug << "Number of contacts: " << m_list.count() << oendl; updateView( true ); } void AbView::reload() { - owarn << "AbView::::reload()" << oendl; + odebug << "AbView::::reload()" << oendl; m_contactdb->reload(); load(); } void AbView::clear() { // :SX } void AbView::setShowByCategory( const QString& cat ) { - owarn << "AbView::setShowCategory( const QString& cat )" << oendl; + odebug << "AbView::setShowCategory( const QString& cat )" << oendl; int intCat = 0; // All (cat == NULL) will be stored as -1 if ( cat.isNull() ) intCat = -1; else intCat = mCat.id("Contacts", cat ); // Just do anything if we really change the category if ( intCat != m_curr_category ){ - // owarn << "Categories: Selected " << cat << ".. Number: " + // odebug << "Categories: Selected " << cat << ".. Number: " // << m_curr_category << oendl; m_curr_category = intCat; emit signalClearLetterPicker(); load(); } } void AbView::setShowToView( Views view ) { - owarn << "void AbView::setShowToView( View " << view << " )" << oendl; + odebug << "void AbView::setShowToView( View " << view << " )" << oendl; if ( m_curr_View != view ){ - owarn << "Change the View (Category is: " << m_curr_category << ")" << oendl; + odebug << "Change the View (Category is: " << m_curr_category << ")" << oendl; m_prev_View = m_curr_View; m_curr_View = view; updateView(); } } void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) { - owarn << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl; + odebug << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl; assert( mode < AbConfig::LASTELEMENT ); Opie::OPimContact query; if ( c == 0 ){ load(); @@ -276,13 +276,13 @@ QString AbView::showCategory() const { return mCat.label( "Contacts", m_curr_category ); } void AbView::showPersonal( bool personal ) { - owarn << "void AbView::showPersonal( " << personal << " )" << oendl; + odebug << "void AbView::showPersonal( " << personal << " )" << oendl; if ( personal ){ if ( m_inPersonal ) return; @@ -346,22 +346,22 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, if ( cat.isEmpty() ) category = m_curr_category; else{ category = mCat.id("Contacts", cat ); } - // owarn << "Find in Category " << category << oendl; + // odebug << "Find in Category " << category << oendl; QRegExp r( str ); r.setCaseSensitive( caseSensitive ); r.setWildcard( !useRegExp ); // Get all matching entries out of the database m_list = m_contactdb->matchRegexp( r ); - // owarn << "Found: " << m_list.count() << oendl; + // odebug << "Found: " << m_list.count() << oendl; if ( m_list.count() == 0 ){ emit signalNotFound(); return; } // Now remove all contacts with wrong category (if any selected) @@ -379,22 +379,22 @@ void AbView::offSearch() m_inSearch = false; load(); } void AbView::slotSwitch(){ - // owarn << "AbView::slotSwitch()" << oendl; + // odebug << "AbView::slotSwitch()" << oendl; m_prev_View = m_curr_View; switch ( (int) m_curr_View ){ case TableView: - owarn << "Switching to CardView" << oendl; + odebug << "Switching to CardView" << oendl; m_curr_View = CardView; break; case CardView: - owarn << "Switching to TableView" << oendl; + odebug << "Switching to TableView" << oendl; m_curr_View = TableView; break; } updateView(); } @@ -407,59 +407,59 @@ void AbView::clearForCategory() // Now remove all contacts with wrong category if any category selected Opie::OPimContactAccess::List allList = m_list; if ( m_curr_category != -1 ){ for ( it = allList.begin(); it != allList.end(); ++it ){ if ( !contactCompare( *it, m_curr_category ) ){ - //owarn << "Removing " << (*it).uid() << oendl; + //odebug << "Removing " << (*it).uid() << oendl; m_list.remove( (*it).uid() ); } } } } bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) { - // owarn << "bool AbView::contactCompare( const Opie::OPimContact &cnt, " + // odebug << "bool AbView::contactCompare( const Opie::OPimContact &cnt, " // << category << " )" << oendl; bool returnMe; QArray<int> cats; cats = cnt.categories(); - // owarn << "Number of categories: " << cats.count() << oendl; + // odebug << "Number of categories: " << cats.count() << oendl; returnMe = false; if ( cats.count() == 0 && category == 0 ) // Contacts with no category will just shown on "All" and "Unfiled" returnMe = true; else { int i; for ( i = 0; i < int(cats.count()); i++ ) { - //owarn << "Comparing " << cats[i] << " with " << category << oendl; + //odebug << "Comparing " << cats[i] << " with " << category << oendl; if ( cats[i] == category ) { returnMe = true; break; } } } - // owarn << "Return: " << returnMe << oendl; + // odebug << "Return: " << returnMe << oendl; return returnMe; } // In Some rare cases we have to update all lists.. void AbView::updateListinViews() { m_abTable -> setContacts( m_list ); m_ablabel -> setContacts( m_list ); } void AbView::updateView( bool newdata ) { - // owarn << "AbView::updateView()" << oendl; + // odebug << "AbView::updateView()" << oendl; if ( m_viewStack -> visibleWidget() ){ m_viewStack -> visibleWidget() -> clearFocus(); } // If we switching the view, we have to store some information |