-rw-r--r-- | libopie2/opieui/olistview.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index d7c92fd..0b3bdea 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp | |||
@@ -184,13 +184,13 @@ void OListView::serializeFrom( QDataStream& s ) | |||
184 | while ( columns() < cols ) addColumn( QString::null ); | 184 | while ( columns() < cols ) addColumn( QString::null ); |
185 | 185 | ||
186 | for ( int i = 0; i < cols; ++i ) | 186 | for ( int i = 0; i < cols; ++i ) |
187 | { | 187 | { |
188 | QString coltext; | 188 | QString coltext; |
189 | s >> coltext; | 189 | s >> coltext; |
190 | qDebug( "read text '%s' for column %d", (const char*) coltext, i ); | 190 | odebug << "read text '" << coltext << "' for column " << i << "" << oendl; |
191 | setColumnText( i, coltext ); | 191 | setColumnText( i, coltext ); |
192 | } | 192 | } |
193 | 193 | ||
194 | int items; | 194 | int items; |
195 | s >> items; | 195 | s >> items; |
196 | odebug << "read number of items = " << items << oendl; | 196 | odebug << "read number of items = " << items << oendl; |
@@ -439,19 +439,19 @@ void OListViewItem::serializeFrom( QDataStream& s ) | |||
439 | odebug << "loading OListViewItem..." << oendl; | 439 | odebug << "loading OListViewItem..." << oendl; |
440 | 440 | ||
441 | for ( int i = 0; i < listView()->columns(); ++i ) | 441 | for ( int i = 0; i < listView()->columns(); ++i ) |
442 | { | 442 | { |
443 | QString coltext; | 443 | QString coltext; |
444 | s >> coltext; | 444 | s >> coltext; |
445 | qDebug( "read text '%s' for column %d", (const char*) coltext, i ); | 445 | odebug << "read text '" << coltext << "' for column " << i << "" << oendl; |
446 | setText( i, coltext ); | 446 | setText( i, coltext ); |
447 | } | 447 | } |
448 | 448 | ||
449 | int items; | 449 | int items; |
450 | s >> items; | 450 | s >> items; |
451 | qDebug( "read number of items = %d", items ); | 451 | odebug << "read number of items = " << items << "" << oendl; |
452 | 452 | ||
453 | for ( int i = 0; i < items; ++i ) | 453 | for ( int i = 0; i < items; ++i ) |
454 | { | 454 | { |
455 | OListViewItem* item = childFactory(); | 455 | OListViewItem* item = childFactory(); |
456 | s >> (*item); | 456 | s >> (*item); |
457 | } | 457 | } |
@@ -612,13 +612,13 @@ ONamedListView::~ONamedListView() | |||
612 | 612 | ||
613 | 613 | ||
614 | void ONamedListView::addColumns( const QStringList& columns ) | 614 | void ONamedListView::addColumns( const QStringList& columns ) |
615 | { | 615 | { |
616 | for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it ) | 616 | for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it ) |
617 | { | 617 | { |
618 | qDebug( "adding column %s", (const char*) *it ); | 618 | odebug << "adding column " << *it << "" << oendl; |
619 | addColumn( *it ); | 619 | addColumn( *it ); |
620 | } | 620 | } |
621 | } | 621 | } |
622 | 622 | ||
623 | 623 | ||
624 | int ONamedListView::findColumn( const QString& text ) const | 624 | int ONamedListView::findColumn( const QString& text ) const |
@@ -641,17 +641,17 @@ ONamedListViewItem* ONamedListView::find( int column, const QString& text, int r | |||
641 | 641 | ||
642 | ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const | 642 | ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const |
643 | { | 643 | { |
644 | ONamedListViewItem* result; | 644 | ONamedListViewItem* result; |
645 | while ( item && item->text( column ) != text ) | 645 | while ( item && item->text( column ) != text ) |
646 | { | 646 | { |
647 | qDebug( "checked %s", (const char*) item->text( column ) ); | 647 | odebug << "checked " << item->text( column ) << "" << oendl; |
648 | 648 | ||
649 | if ( recurse < 0 || recurse > 0 ) | 649 | if ( recurse < 0 || recurse > 0 ) |
650 | { | 650 | { |
651 | qDebug( "recursion is %d - recursing into...", recurse ); | 651 | odebug << "recursion is " << recurse << " - recursing into..." << oendl; |
652 | result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 ); | 652 | result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 ); |
653 | if ( result ) return result; | 653 | if ( result ) return result; |
654 | } | 654 | } |
655 | 655 | ||
656 | 656 | ||
657 | item = (ONamedListViewItem*) item->itemBelow(); | 657 | item = (ONamedListViewItem*) item->itemBelow(); |
@@ -722,13 +722,13 @@ ONamedListViewItem::~ONamedListViewItem() | |||
722 | 722 | ||
723 | void ONamedListViewItem::setText( const QStringList& texts ) | 723 | void ONamedListViewItem::setText( const QStringList& texts ) |
724 | { | 724 | { |
725 | int col = 0; | 725 | int col = 0; |
726 | for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it ) | 726 | for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it ) |
727 | { | 727 | { |
728 | qDebug( "setting column %d = text %s", col, (const char*) *it ); | 728 | odebug << "setting column " << col << " = text " << *it << "" << oendl; |
729 | OListViewItem::setText( col++, *it ); | 729 | OListViewItem::setText( col++, *it ); |
730 | } | 730 | } |
731 | 731 | ||
732 | } | 732 | } |
733 | 733 | ||
734 | 734 | ||
@@ -738,13 +738,13 @@ void ONamedListViewItem::setText( const QString& column, const QString& text ) | |||
738 | //FIXME: because of the linear search over all column texts. | 738 | //FIXME: because of the linear search over all column texts. |
739 | //FIXME: I will optimize later by using a hash map. | 739 | //FIXME: I will optimize later by using a hash map. |
740 | int col = ( (ONamedListView*) listView() )->findColumn( column ); | 740 | int col = ( (ONamedListView*) listView() )->findColumn( column ); |
741 | if ( col != -1 ) | 741 | if ( col != -1 ) |
742 | OListViewItem::setText( col, text ); | 742 | OListViewItem::setText( col, text ); |
743 | else | 743 | else |
744 | qWarning( "ONamedListViewItem::setText(): Warning! Columntext '%s' not found.", (const char*) column ); | 744 | owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl; |
745 | } | 745 | } |
746 | 746 | ||
747 | 747 | ||
748 | ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const | 748 | ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const |
749 | { | 749 | { |
750 | return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse ); | 750 | return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse ); |