author | ar <ar> | 2004-05-27 22:04:46 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-27 22:04:46 (UTC) |
commit | 4f7c3c4d0d634706d13950b3827714b168e279e3 (patch) (unidiff) | |
tree | 2df448e7a4dcd538c26365873e194be2b55e83b7 /noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | |
parent | 46f81a089ba8febdb79e0d150b69f74bb1ea7d18 (diff) | |
download | opie-4f7c3c4d0d634706d13950b3827714b168e279e3.zip opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.gz opie-4f7c3c4d0d634706d13950b3827714b168e279e3.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/gutenbrowser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp index be2b897..f14080f 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | |||
@@ -408,68 +408,70 @@ void Gutenbrowser::ForwardBtn() { | |||
408 | if(useWrap) | 408 | if(useWrap) |
409 | s.replace(QRegExp("\n"),""); | 409 | s.replace(QRegExp("\n"),""); |
410 | insertString+=s; | 410 | insertString+=s; |
411 | Lview->insertLine( s, -1); | 411 | Lview->insertLine( s, -1); |
412 | // odebug << s << oendl; | 412 | // odebug << s << oendl; |
413 | currentLine++; | 413 | currentLine++; |
414 | } | 414 | } |
415 | // Lview->insertAt( insertString,0,0, FALSE); | 415 | // Lview->insertAt( insertString,0,0, FALSE); |
416 | currentFilePos = f.at(); | 416 | currentFilePos = f.at(); |
417 | // if( i_pageNum != pages) { | 417 | // if( i_pageNum != pages) { |
418 | // Lview->MultiLine_Ex::pageDown( FALSE); | 418 | // Lview->MultiLine_Ex::pageDown( FALSE); |
419 | i_pageNum++; | 419 | i_pageNum++; |
420 | pageStopArray.resize(i_pageNum + 1); | 420 | pageStopArray.resize(i_pageNum + 1); |
421 | // int length = Lview->length(); | 421 | // int length = Lview->length(); |
422 | 422 | ||
423 | pageStopArray[i_pageNum ] = currentFilePos; | 423 | pageStopArray[i_pageNum ] = currentFilePos; |
424 | // qDebug("%d current page is number %d, pagesize %d, length %d, current %d", | 424 | // odebug << currentFilePos << " current page is number " << i_pageNum |
425 | // currentFilePos, i_pageNum, pageSize, Lview->length(), pageStopArray[i_pageNum] ); | 425 | // << ", pagesize " << pageSize << ", length " << Lview->length() |
426 | // << ", current " << pageStopArray[i_pageNum] << oendl; | ||
426 | setStatus(); | 427 | setStatus(); |
427 | Lview->setCursorPosition( 0, 0, FALSE); | 428 | Lview->setCursorPosition( 0, 0, FALSE); |
428 | // } | 429 | // } |
429 | 430 | ||
430 | } else { | 431 | } else { |
431 | // odebug << "bal" << oendl; | 432 | // odebug << "bal" << oendl; |
432 | // if( i_pageNum != pages) { | 433 | // if( i_pageNum != pages) { |
433 | 434 | ||
434 | // // int newTop = Lview->Top(); | 435 | // // int newTop = Lview->Top(); |
435 | // // if(Lview->lastRow() > i) | 436 | // // if(Lview->lastRow() > i) |
436 | // Lview->ScrollUp(1); | 437 | // Lview->ScrollUp(1); |
437 | // // i_pageNum++; | 438 | // // i_pageNum++; |
438 | // setStatus(); | 439 | // setStatus(); |
439 | // Lview->setCursorPosition( Lview->Top(), 0, FALSE); | 440 | // Lview->setCursorPosition( Lview->Top(), 0, FALSE); |
440 | 441 | ||
441 | // } | 442 | // } |
442 | 443 | ||
443 | } | 444 | } |
444 | Lview->setFocus(); | 445 | Lview->setFocus(); |
445 | 446 | ||
446 | // odebug << "page number " << i_pageNum << " line number " << currentLine << "" << oendl; | 447 | // odebug << "page number " << i_pageNum << " line number " << currentLine << "" << oendl; |
447 | } | 448 | } |
448 | 449 | ||
449 | 450 | ||
450 | void Gutenbrowser::BackBtn() { | 451 | void Gutenbrowser::BackBtn() { |
451 | if( i_pageNum > 0) { | 452 | if( i_pageNum > 0) { |
452 | int pageSize= Lview->PageSize(); | 453 | int pageSize= Lview->PageSize(); |
453 | // int length=Lview->length(); | 454 | // int length=Lview->length(); |
454 | 455 | ||
455 | i_pageNum--; | 456 | i_pageNum--; |
456 | currentFilePos = f.at(); | 457 | currentFilePos = f.at(); |
457 | 458 | ||
458 | // qDebug("%d move back to %d, current page number %d, %d, length %d", | 459 | // odebug << currentFilePos << " move back to " << pageStopArray[i_pageNum - 1 ] |
459 | // currentFilePos, pageStopArray[i_pageNum - 1 ], i_pageNum, pageSize, Lview->length() ); | 460 | // << ", current page number " << i_pageNum |
461 | // << ", " << pageSize << ", length " << Lview->length() << oendl; | ||
460 | 462 | ||
461 | if( i_pageNum < 2) { | 463 | if( i_pageNum < 2) { |
462 | f.at( 0); | 464 | f.at( 0); |
463 | } else { | 465 | } else { |
464 | if(!f.at( pageStopArray[i_pageNum - 1] )) | 466 | if(!f.at( pageStopArray[i_pageNum - 1] )) |
465 | odebug << "File positioned backward did not work" << oendl; | 467 | odebug << "File positioned backward did not work" << oendl; |
466 | } | 468 | } |
467 | QString s; | 469 | QString s; |
468 | // int sizeLine=0; | 470 | // int sizeLine=0; |
469 | Lview->clear(); | 471 | Lview->clear(); |
470 | // QString insertString; | 472 | // QString insertString; |
471 | 473 | ||
472 | for(int fd = 0; fd < pageSize ;fd++) { | 474 | for(int fd = 0; fd < pageSize ;fd++) { |
473 | // Lview->removeLine( Lview->PageSize() ); | 475 | // Lview->removeLine( Lview->PageSize() ); |
474 | f.readLine(s, 256); | 476 | f.readLine(s, 256); |
475 | if(useWrap) | 477 | if(useWrap) |
@@ -786,34 +788,35 @@ bool Gutenbrowser::load( const char *fileName) { | |||
786 | QString s; | 788 | QString s; |
787 | for(int fd=0; fd < Lview->PageSize() ;fd++) { | 789 | for(int fd=0; fd < Lview->PageSize() ;fd++) { |
788 | s=t.readLine(); | 790 | s=t.readLine(); |
789 | // insertString+=s; | 791 | // insertString+=s; |
790 | if(useWrap) | 792 | if(useWrap) |
791 | s.replace(QRegExp("\n"),""); | 793 | s.replace(QRegExp("\n"),""); |
792 | // s.replace(QRegExp("\r"),""); | 794 | // s.replace(QRegExp("\r"),""); |
793 | Lview->insertLine( s,-1); | 795 | Lview->insertLine( s,-1); |
794 | currentLine++; | 796 | currentLine++; |
795 | } | 797 | } |
796 | 798 | ||
797 | // int length = Lview->length(); | 799 | // int length = Lview->length(); |
798 | currentFilePos = f.at(); | 800 | currentFilePos = f.at(); |
799 | 801 | ||
800 | pageStopArray[1] = currentFilePos; | 802 | pageStopArray[1] = currentFilePos; |
801 | 803 | ||
802 | qDebug("<<<<<<<<<<<%d current page is number %d, length %d, current %d, pageSize %d", | 804 | odebug << "<<<<<<<<<<<" << currentFilePos << " current page is number " << i_pageNum |
803 | currentFilePos, i_pageNum, Lview->length(), pageStopArray[i_pageNum], Lview->PageSize() ); | 805 | << ", length " << Lview->length() << ", current " << pageStopArray[i_pageNum] |
806 | << ", pageSize " << Lview->PageSize() << oendl; | ||
804 | 807 | ||
805 | Lview->setMaxLines(Lview->PageSize()*2); | 808 | Lview->setMaxLines(Lview->PageSize()*2); |
806 | odebug << "Gulped " << currentLine << "" << oendl; | 809 | odebug << "Gulped " << currentLine << "" << oendl; |
807 | setCaption(title); | 810 | setCaption(title); |
808 | Lview->setAutoUpdate( TRUE); | 811 | Lview->setAutoUpdate( TRUE); |
809 | 812 | ||
810 | Lview->setCursorPosition(0,0,FALSE); | 813 | Lview->setCursorPosition(0,0,FALSE); |
811 | 814 | ||
812 | // pages = (int)(( Lview->numLines() / Lview->editSize() ) / 2 ) +1; | 815 | // pages = (int)(( Lview->numLines() / Lview->editSize() ) / 2 ) +1; |
813 | //odebug << "number of pages " << pages << "" << oendl; | 816 | //odebug << "number of pages " << pages << "" << oendl; |
814 | 817 | ||
815 | loadCheck = true; | 818 | loadCheck = true; |
816 | enableButtons(true); | 819 | enableButtons(true); |
817 | if( donateMenu->count() == 3) { | 820 | if( donateMenu->count() == 3) { |
818 | donateMenu->insertItem("Current Title", this, SLOT( InfoBarClick() )); | 821 | donateMenu->insertItem("Current Title", this, SLOT( InfoBarClick() )); |
819 | } | 822 | } |