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 | |||
@@ -52,7 +52,7 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
52 | m_abTable( 0l ), | 52 | m_abTable( 0l ), |
53 | m_orderedFields( ordered ) | 53 | m_orderedFields( ordered ) |
54 | { | 54 | { |
55 | owarn << "AbView::c'tor" << oendl; | 55 | odebug << "AbView::c'tor" << oendl; |
56 | // Load default database and handle syncing myself.. ! | 56 | // Load default database and handle syncing myself.. ! |
57 | m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); | 57 | m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); |
58 | m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available | 58 | m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available |
@@ -100,28 +100,28 @@ AbView::~AbView() | |||
100 | 100 | ||
101 | void AbView::setView( Views view ) | 101 | void AbView::setView( Views view ) |
102 | { | 102 | { |
103 | owarn << "AbView::setView( Views view )" << oendl; | 103 | odebug << "AbView::setView( Views view )" << oendl; |
104 | m_curr_View = view; | 104 | m_curr_View = view; |
105 | load(); | 105 | load(); |
106 | } | 106 | } |
107 | 107 | ||
108 | void AbView::addEntry( const Opie::OPimContact &newContact ) | 108 | void AbView::addEntry( const Opie::OPimContact &newContact ) |
109 | { | 109 | { |
110 | owarn << "AbView::AddContact" << oendl; | 110 | odebug << "AbView::AddContact" << oendl; |
111 | m_contactdb->add ( newContact ); | 111 | m_contactdb->add ( newContact ); |
112 | load(); | 112 | load(); |
113 | 113 | ||
114 | } | 114 | } |
115 | void AbView::removeEntry( const int UID ) | 115 | void AbView::removeEntry( const int UID ) |
116 | { | 116 | { |
117 | owarn << "AbView;:RemoveContact" << oendl; | 117 | odebug << "AbView;:RemoveContact" << oendl; |
118 | m_contactdb->remove( UID ); | 118 | m_contactdb->remove( UID ); |
119 | load(); | 119 | load(); |
120 | } | 120 | } |
121 | 121 | ||
122 | void AbView::replaceEntry( const Opie::OPimContact &contact ) | 122 | void AbView::replaceEntry( const Opie::OPimContact &contact ) |
123 | { | 123 | { |
124 | owarn << "AbView::ReplaceContact" << oendl; | 124 | odebug << "AbView::ReplaceContact" << oendl; |
125 | m_contactdb->replace( contact ); | 125 | m_contactdb->replace( contact ); |
126 | load(); | 126 | load(); |
127 | 127 | ||
@@ -145,14 +145,14 @@ Opie::OPimContact AbView::currentEntry() | |||
145 | 145 | ||
146 | bool AbView::save() | 146 | bool AbView::save() |
147 | { | 147 | { |
148 | //owarn << "AbView::Save data" << oendl; | 148 | //odebug << "AbView::Save data" << oendl; |
149 | 149 | ||
150 | return m_contactdb->save(); | 150 | return m_contactdb->save(); |
151 | } | 151 | } |
152 | 152 | ||
153 | void AbView::load() | 153 | void AbView::load() |
154 | { | 154 | { |
155 | owarn << "AbView::Load data" << oendl; | 155 | odebug << "AbView::Load data" << oendl; |
156 | 156 | ||
157 | // Letter Search is stopped at this place | 157 | // Letter Search is stopped at this place |
158 | emit signalClearLetterPicker(); | 158 | emit signalClearLetterPicker(); |
@@ -166,7 +166,7 @@ void AbView::load() | |||
166 | clearForCategory(); | 166 | clearForCategory(); |
167 | } | 167 | } |
168 | 168 | ||
169 | owarn << "Number of contacts: " << m_list.count() << oendl; | 169 | odebug << "Number of contacts: " << m_list.count() << oendl; |
170 | 170 | ||
171 | updateView( true ); | 171 | updateView( true ); |
172 | 172 | ||
@@ -174,7 +174,7 @@ void AbView::load() | |||
174 | 174 | ||
175 | void AbView::reload() | 175 | void AbView::reload() |
176 | { | 176 | { |
177 | owarn << "AbView::::reload()" << oendl; | 177 | odebug << "AbView::::reload()" << oendl; |
178 | 178 | ||
179 | m_contactdb->reload(); | 179 | m_contactdb->reload(); |
180 | load(); | 180 | load(); |
@@ -187,7 +187,7 @@ void AbView::clear() | |||
187 | 187 | ||
188 | void AbView::setShowByCategory( const QString& cat ) | 188 | void AbView::setShowByCategory( const QString& cat ) |
189 | { | 189 | { |
190 | owarn << "AbView::setShowCategory( const QString& cat )" << oendl; | 190 | odebug << "AbView::setShowCategory( const QString& cat )" << oendl; |
191 | 191 | ||
192 | int intCat = 0; | 192 | int intCat = 0; |
193 | 193 | ||
@@ -199,7 +199,7 @@ void AbView::setShowByCategory( const QString& cat ) | |||
199 | 199 | ||
200 | // Just do anything if we really change the category | 200 | // Just do anything if we really change the category |
201 | if ( intCat != m_curr_category ){ | 201 | if ( intCat != m_curr_category ){ |
202 | // owarn << "Categories: Selected " << cat << ".. Number: " | 202 | // odebug << "Categories: Selected " << cat << ".. Number: " |
203 | // << m_curr_category << oendl; | 203 | // << m_curr_category << oendl; |
204 | 204 | ||
205 | m_curr_category = intCat; | 205 | m_curr_category = intCat; |
@@ -212,10 +212,10 @@ void AbView::setShowByCategory( const QString& cat ) | |||
212 | 212 | ||
213 | void AbView::setShowToView( Views view ) | 213 | void AbView::setShowToView( Views view ) |
214 | { | 214 | { |
215 | owarn << "void AbView::setShowToView( View " << view << " )" << oendl; | 215 | odebug << "void AbView::setShowToView( View " << view << " )" << oendl; |
216 | 216 | ||
217 | if ( m_curr_View != view ){ | 217 | if ( m_curr_View != view ){ |
218 | owarn << "Change the View (Category is: " << m_curr_category << ")" << oendl; | 218 | odebug << "Change the View (Category is: " << m_curr_category << ")" << oendl; |
219 | m_prev_View = m_curr_View; | 219 | m_prev_View = m_curr_View; |
220 | m_curr_View = view; | 220 | m_curr_View = view; |
221 | 221 | ||
@@ -226,7 +226,7 @@ void AbView::setShowToView( Views view ) | |||
226 | 226 | ||
227 | void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) | 227 | void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) |
228 | { | 228 | { |
229 | owarn << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl; | 229 | odebug << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl; |
230 | 230 | ||
231 | assert( mode < AbConfig::LASTELEMENT ); | 231 | assert( mode < AbConfig::LASTELEMENT ); |
232 | 232 | ||
@@ -279,7 +279,7 @@ QString AbView::showCategory() const | |||
279 | 279 | ||
280 | void AbView::showPersonal( bool personal ) | 280 | void AbView::showPersonal( bool personal ) |
281 | { | 281 | { |
282 | owarn << "void AbView::showPersonal( " << personal << " )" << oendl; | 282 | odebug << "void AbView::showPersonal( " << personal << " )" << oendl; |
283 | 283 | ||
284 | if ( personal ){ | 284 | if ( personal ){ |
285 | 285 | ||
@@ -349,7 +349,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | |||
349 | category = mCat.id("Contacts", cat ); | 349 | category = mCat.id("Contacts", cat ); |
350 | } | 350 | } |
351 | 351 | ||
352 | //owarn << "Find in Category " << category << oendl; | 352 | //odebug << "Find in Category " << category << oendl; |
353 | 353 | ||
354 | QRegExp r( str ); | 354 | QRegExp r( str ); |
355 | r.setCaseSensitive( caseSensitive ); | 355 | r.setCaseSensitive( caseSensitive ); |
@@ -358,7 +358,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | |||
358 | // Get all matching entries out of the database | 358 | // Get all matching entries out of the database |
359 | m_list = m_contactdb->matchRegexp( r ); | 359 | m_list = m_contactdb->matchRegexp( r ); |
360 | 360 | ||
361 | //owarn << "Found: " << m_list.count() << oendl; | 361 | //odebug << "Found: " << m_list.count() << oendl; |
362 | if ( m_list.count() == 0 ){ | 362 | if ( m_list.count() == 0 ){ |
363 | emit signalNotFound(); | 363 | emit signalNotFound(); |
364 | return; | 364 | return; |
@@ -382,16 +382,16 @@ void AbView::offSearch() | |||
382 | } | 382 | } |
383 | 383 | ||
384 | void AbView::slotSwitch(){ | 384 | void AbView::slotSwitch(){ |
385 | //owarn << "AbView::slotSwitch()" << oendl; | 385 | //odebug << "AbView::slotSwitch()" << oendl; |
386 | 386 | ||
387 | m_prev_View = m_curr_View; | 387 | m_prev_View = m_curr_View; |
388 | switch ( (int) m_curr_View ){ | 388 | switch ( (int) m_curr_View ){ |
389 | case TableView: | 389 | case TableView: |
390 | owarn << "Switching to CardView" << oendl; | 390 | odebug << "Switching to CardView" << oendl; |
391 | m_curr_View = CardView; | 391 | m_curr_View = CardView; |
392 | break; | 392 | break; |
393 | case CardView: | 393 | case CardView: |
394 | owarn << "Switching to TableView" << oendl; | 394 | odebug << "Switching to TableView" << oendl; |
395 | m_curr_View = TableView; | 395 | m_curr_View = TableView; |
396 | break; | 396 | break; |
397 | } | 397 | } |
@@ -410,7 +410,7 @@ void AbView::clearForCategory() | |||
410 | if ( m_curr_category != -1 ){ | 410 | if ( m_curr_category != -1 ){ |
411 | for ( it = allList.begin(); it != allList.end(); ++it ){ | 411 | for ( it = allList.begin(); it != allList.end(); ++it ){ |
412 | if ( !contactCompare( *it, m_curr_category ) ){ | 412 | if ( !contactCompare( *it, m_curr_category ) ){ |
413 | //owarn << "Removing " << (*it).uid() << oendl; | 413 | //odebug << "Removing " << (*it).uid() << oendl; |
414 | m_list.remove( (*it).uid() ); | 414 | m_list.remove( (*it).uid() ); |
415 | } | 415 | } |
416 | } | 416 | } |
@@ -420,14 +420,14 @@ void AbView::clearForCategory() | |||
420 | 420 | ||
421 | bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) | 421 | bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) |
422 | { | 422 | { |
423 | //owarn << "bool AbView::contactCompare( const Opie::OPimContact &cnt, " | 423 | //odebug << "bool AbView::contactCompare( const Opie::OPimContact &cnt, " |
424 | // << category << " )" << oendl; | 424 | // << category << " )" << oendl; |
425 | 425 | ||
426 | bool returnMe; | 426 | bool returnMe; |
427 | QArray<int> cats; | 427 | QArray<int> cats; |
428 | cats = cnt.categories(); | 428 | cats = cnt.categories(); |
429 | 429 | ||
430 | //owarn << "Number of categories: " << cats.count() << oendl; | 430 | //odebug << "Number of categories: " << cats.count() << oendl; |
431 | 431 | ||
432 | returnMe = false; | 432 | returnMe = false; |
433 | if ( cats.count() == 0 && category == 0 ) | 433 | if ( cats.count() == 0 && category == 0 ) |
@@ -436,14 +436,14 @@ bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) | |||
436 | else { | 436 | else { |
437 | int i; | 437 | int i; |
438 | for ( i = 0; i < int(cats.count()); i++ ) { | 438 | for ( i = 0; i < int(cats.count()); i++ ) { |
439 | //owarn << "Comparing " << cats[i] << " with " << category << oendl; | 439 | //odebug << "Comparing " << cats[i] << " with " << category << oendl; |
440 | if ( cats[i] == category ) { | 440 | if ( cats[i] == category ) { |
441 | returnMe = true; | 441 | returnMe = true; |
442 | break; | 442 | break; |
443 | } | 443 | } |
444 | } | 444 | } |
445 | } | 445 | } |
446 | //owarn << "Return: " << returnMe << oendl; | 446 | //odebug << "Return: " << returnMe << oendl; |
447 | return returnMe; | 447 | return returnMe; |
448 | } | 448 | } |
449 | 449 | ||
@@ -456,7 +456,7 @@ void AbView::updateListinViews() | |||
456 | 456 | ||
457 | void AbView::updateView( bool newdata ) | 457 | void AbView::updateView( bool newdata ) |
458 | { | 458 | { |
459 | //owarn << "AbView::updateView()" << oendl; | 459 | //odebug << "AbView::updateView()" << oendl; |
460 | 460 | ||
461 | if ( m_viewStack -> visibleWidget() ){ | 461 | if ( m_viewStack -> visibleWidget() ){ |
462 | m_viewStack -> visibleWidget() -> clearFocus(); | 462 | m_viewStack -> visibleWidget() -> clearFocus(); |