summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp2
-rw-r--r--core/pim/addressbook/abtable.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 6b8e4dd..139030d 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -55,33 +55,33 @@ int AbLabel::currentEntry_UID()
55 else 55 else
56 return ( contact.uid() ); 56 return ( contact.uid() );
57} 57}
58 58
59Opie::OPimContact AbLabel::currentEntry() 59Opie::OPimContact AbLabel::currentEntry()
60{ 60{
61 if ( ! m_empty ) 61 if ( ! m_empty )
62 return ( *m_itCurContact ); 62 return ( *m_itCurContact );
63 else 63 else
64 return Opie::OPimContact(); 64 return Opie::OPimContact();
65} 65}
66 66
67 67
68bool AbLabel::selectContact( int UID ) 68bool AbLabel::selectContact( int UID )
69{ 69{
70 70
71 for ( int r = 0; r < m_viewList.count(); ++r ) { 71 for ( uint r = 0; r < m_viewList.count(); ++r ) {
72 if ( m_viewList.uidAt( r ) == UID ){ 72 if ( m_viewList.uidAt( r ) == UID ){
73 m_itCurContact.setCurrent( r ); 73 m_itCurContact.setCurrent( r );
74 break; 74 break;
75 } 75 }
76 } 76 }
77 77
78 sync(); 78 sync();
79 79
80 return true; 80 return true;
81} 81}
82 82
83 83
84 84
85void AbLabel::sync() 85void AbLabel::sync()
86{ 86{
87 QString text = (*m_itCurContact).toRichText(); 87 QString text = (*m_itCurContact).toRichText();
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 30d749c..0be7d1a 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -172,33 +172,32 @@ void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList )
172 updateVisible(); 172 updateVisible();
173 173
174 setPaintingEnabled( TRUE ); 174 setPaintingEnabled( TRUE );
175 175
176} 176}
177 177
178void AbTable::setOrderedList( const QValueList<int> ordered ) 178void AbTable::setOrderedList( const QValueList<int> ordered )
179{ 179{
180 intFields = ordered; 180 intFields = ordered;
181} 181}
182 182
183 183
184bool AbTable::selectContact( int UID ) 184bool AbTable::selectContact( int UID )
185{ 185{
186 odebug << "AbTable::selectContact( " << UID << " )" << oendl; 186 odebug << "AbTable::selectContact( " << UID << " )" << oendl;
187 int rows = numRows(); 187 int rows = numRows();
188 Opie::OPimContact* foundContact = 0l;
189 bool found = false; 188 bool found = false;
190 189
191 setPaintingEnabled( FALSE ); 190 setPaintingEnabled( FALSE );
192 odebug << "Search start" << oendl; 191 odebug << "Search start" << oendl;
193 for ( int r = 0; r < rows; ++r ) { 192 for ( int r = 0; r < rows; ++r ) {
194 if ( m_viewList.uidAt( r ) == UID ){ 193 if ( m_viewList.uidAt( r ) == UID ){
195 ensureCellVisible( r, 0 ); 194 ensureCellVisible( r, 0 );
196 setCurrentCell( r, 0 ); 195 setCurrentCell( r, 0 );
197 found = true; 196 found = true;
198 break; 197 break;
199 } 198 }
200 } 199 }
201 odebug << "Search end" << oendl; 200 odebug << "Search end" << oendl;
202 201
203 if ( !found ){ 202 if ( !found ){
204 ensureCellVisible( 0,0 ); 203 ensureCellVisible( 0,0 );
@@ -342,33 +341,33 @@ void AbTable::keyPressEvent( QKeyEvent *e )
342 emit signalSwitch(); 341 emit signalSwitch();
343 break; 342 break;
344 // case Qt::Key_Up: 343 // case Qt::Key_Up:
345 // odebug << "a" << oendl; 344 // odebug << "a" << oendl;
346 // emit signalKeyUp(); 345 // emit signalKeyUp();
347 // break; 346 // break;
348 // case Qt::Key_Down: 347 // case Qt::Key_Down:
349 // odebug << "b" << oendl; 348 // odebug << "b" << oendl;
350 // emit signalKeyDown(); 349 // emit signalKeyDown();
351 // break; 350 // break;
352 default: 351 default:
353 QTable::keyPressEvent( e ); 352 QTable::keyPressEvent( e );
354 } 353 }
355 354
356} 355}
357 356
358void AbTable::moveTo( char c ) 357void AbTable::moveTo( char /*c*/ )
359{ 358{
360 odebug << "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" << oendl; 359 odebug << "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" << oendl;
361 360
362#if 0 361#if 0
363 int rows = numRows(); 362 int rows = numRows();
364 QString value; 363 QString value;
365 AbTableItem *abi; 364 AbTableItem *abi;
366 int r; 365 int r;
367 if ( asc ) { 366 if ( asc ) {
368 r = 0; 367 r = 0;
369 while ( r < rows-1) { 368 while ( r < rows-1) {
370 abi = static_cast<AbTableItem*>( item(r, 0) ); 369 abi = static_cast<AbTableItem*>( item(r, 0) );
371 QChar first = abi->key()[0]; 370 QChar first = abi->key()[0];
372 //### is there a bug in QChar to char comparison??? 371 //### is there a bug in QChar to char comparison???
373 if ( first.row() || first.cell() >= c ) 372 if ( first.row() || first.cell() >= c )
374 break; 373 break;