author | ar <ar> | 2004-05-03 21:35:18 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-03 21:35:18 (UTC) |
commit | 412619441fab46fc79c695a23ccf9e38135bdfad (patch) (unidiff) | |
tree | 19d9b8af14cf6c345ef532bb32368b9c7b43c50f /noncore | |
parent | d1095d71394779557f446e2a67ba55bc62eec859 (diff) | |
download | opie-412619441fab46fc79c695a23ccf9e38135bdfad.zip opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.gz opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.bz2 |
- convert qDebug to odebug
29 files changed, 656 insertions, 585 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 5b22b00..270a4cf 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | |||
@@ -14,15 +14,19 @@ | |||
14 | //ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL | 14 | //ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL |
15 | 15 | ||
16 | #include "LibraryDialog.h" | ||
17 | #include "output.h" | ||
18 | |||
19 | /* OPIE */ | ||
16 | #include <qpe/applnk.h> | 20 | #include <qpe/applnk.h> |
17 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
18 | #include <qpe/qpedialog.h> | 22 | #include <qpe/qpedialog.h> |
23 | #include <opie2/odebug.h> | ||
19 | 24 | ||
20 | #include "LibraryDialog.h" | 25 | /* QT */ |
21 | #include "output.h" | ||
22 | |||
23 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
24 | #include <qmultilineedit.h> | 27 | #include <qmultilineedit.h> |
25 | //#include <qlayout.h> | 28 | //#include <qlayout.h> |
26 | 29 | ||
30 | /* STD */ | ||
27 | #include <unistd.h> | 31 | #include <unistd.h> |
28 | #include <stdio.h> | 32 | #include <stdio.h> |
@@ -65,5 +69,5 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W | |||
65 | config.setGroup( "FTPsite" ); | 69 | config.setGroup( "FTPsite" ); |
66 | ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); | 70 | ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); |
67 | qDebug("Library Dialog: ftp_host is "+ftp_host); | 71 | odebug << "Library Dialog: ftp_host is "+ftp_host << oendl; |
68 | // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) ); | 72 | // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) ); |
69 | // ftp_host=ftp_host.stripWhiteSpace(); | 73 | // ftp_host=ftp_host.stripWhiteSpace(); |
@@ -78,5 +82,5 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W | |||
78 | config.setGroup("General"); | 82 | config.setGroup("General"); |
79 | downDir =config.readEntry( "DownloadDirectory",local_library); | 83 | downDir =config.readEntry( "DownloadDirectory",local_library); |
80 | qDebug("downDir is "+downDir); | 84 | odebug << "downDir is "+downDir << oendl; |
81 | newindexLib.setName( old_index); | 85 | newindexLib.setName( old_index); |
82 | indexLib.setName( old_index); | 86 | indexLib.setName( old_index); |
@@ -100,5 +104,5 @@ void LibraryDialog::Newlibrary() | |||
100 | { | 104 | { |
101 | #ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files | 105 | #ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files |
102 | //qDebug("Opening new library index %s",newindexLib); | 106 | //odebug << "Opening new library index " << newindexLib << "" << oendl; |
103 | if ( newindexLib.open( IO_ReadOnly) ) { | 107 | if ( newindexLib.open( IO_ReadOnly) ) { |
104 | setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully | 108 | setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully |
@@ -122,5 +126,5 @@ void LibraryDialog::Newlibrary() | |||
122 | author = author.stripWhiteSpace(); | 126 | author = author.stripWhiteSpace(); |
123 | if (authBox->isChecked()) { // this reverses the first name and last name of the author | 127 | if (authBox->isChecked()) { // this reverses the first name and last name of the author |
124 | // qDebug("Sorting last name first"); | 128 | // odebug << "Sorting last name first" << oendl; |
125 | QString lastName, firstName=""; | 129 | QString lastName, firstName=""; |
126 | int finder=author.findRev( ' ', -1, TRUE); | 130 | int finder=author.findRev( ' ', -1, TRUE); |
@@ -181,5 +185,5 @@ void LibraryDialog::Library() | |||
181 | ListView5->clear(); | 185 | ListView5->clear(); |
182 | 186 | ||
183 | qDebug("opening GUTINDEX.ALL file"); | 187 | odebug << "opening GUTINDEX.ALL file" << oendl; |
184 | IDontKnowWhy = ""; | 188 | IDontKnowWhy = ""; |
185 | if ( indexLib.open( IO_ReadOnly) ) { // file opened successfully | 189 | if ( indexLib.open( IO_ReadOnly) ) { // file opened successfully |
@@ -201,5 +205,5 @@ void LibraryDialog::Library() | |||
201 | if( file.find("]",0,TRUE) != -1) | 205 | if( file.find("]",0,TRUE) != -1) |
202 | file = file.left( file.find("]",0,TRUE)); | 206 | file = file.left( file.find("]",0,TRUE)); |
203 | //qDebug("file is "+file); | 207 | //odebug << "file is "+file << oendl; |
204 | /// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 ); | 208 | /// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 ); |
205 | number = indexLine.mid(55,5); | 209 | number = indexLine.mid(55,5); |
@@ -208,8 +212,8 @@ void LibraryDialog::Library() | |||
208 | title = indexLine.mid( 9, 50 ); | 212 | title = indexLine.mid( 9, 50 ); |
209 | title = title.stripWhiteSpace(); | 213 | title = title.stripWhiteSpace(); |
210 | //qDebug("title is "+title); | 214 | //odebug << "title is "+title << oendl; |
211 | getAuthor(); // grok author | 215 | getAuthor(); // grok author |
212 | author = author.stripWhiteSpace(); | 216 | author = author.stripWhiteSpace(); |
213 | //qDebug("author is "+author); | 217 | //odebug << "author is "+author << oendl; |
214 | if (authBox->isChecked() == TRUE) { // this reverses the first name and last name of the author | 218 | if (authBox->isChecked() == TRUE) { // this reverses the first name and last name of the author |
215 | QString lastName, firstName=""; | 219 | QString lastName, firstName=""; |
@@ -398,6 +402,6 @@ void LibraryDialog::select_title( QListViewItem * item) | |||
398 | // DlglistItemNumber = item->text(0); | 402 | // DlglistItemNumber = item->text(0); |
399 | item = 0; | 403 | item = 0; |
400 | qDebug( "string from librarydialog is:%s %s %s", DlglistItemYear.latin1(),DlglistItemFile.latin1(),DlglistItemNumber.latin1()); | 404 | odebug << "string from librarydialog is:" << DlglistItemYear << " " << DlglistItemFile << " " << DlglistItemNumber << "" << oendl; |
401 | qDebug("Title is "+DlglistItemTitle); | 405 | odebug << "Title is "+DlglistItemTitle << oendl; |
402 | 406 | ||
403 | // check for connection here | 407 | // check for connection here |
@@ -405,5 +409,5 @@ void LibraryDialog::select_title( QListViewItem * item) | |||
405 | 409 | ||
406 | if(download_Etext()) { | 410 | if(download_Etext()) { |
407 | // qDebug("get here 2"); | 411 | // odebug << "get here 2" << oendl; |
408 | if(i_binary == 1) { | 412 | if(i_binary == 1) { |
409 | 413 | ||
@@ -424,5 +428,5 @@ bool LibraryDialog::download_Etext() | |||
424 | ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg"); | 428 | ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg"); |
425 | 429 | ||
426 | qDebug("about to network dialog"); | 430 | odebug << "about to network dialog" << oendl; |
427 | QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile; | 431 | QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile; |
428 | 432 | ||
@@ -432,9 +436,9 @@ bool LibraryDialog::download_Etext() | |||
432 | if( NewlistItemFile.find( DlglistItemFile.left(4) ,0,TRUE) ==-1 ) { | 436 | if( NewlistItemFile.find( DlglistItemFile.left(4) ,0,TRUE) ==-1 ) { |
433 | NewlistItemFile.replace( 0,4, DlglistItemFile.left(4)); | 437 | NewlistItemFile.replace( 0,4, DlglistItemFile.left(4)); |
434 | qDebug("NewlistItemFile is now "+NewlistItemFile); | 438 | odebug << "NewlistItemFile is now "+NewlistItemFile << oendl; |
435 | } | 439 | } |
436 | NewlistItemYear = DlglistItemYear.right(2); | 440 | NewlistItemYear = DlglistItemYear.right(2); |
437 | int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10); | 441 | int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10); |
438 | qDebug(NewlistItemYear); | 442 | odebug << NewlistItemYear << oendl; |
439 | if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) { | 443 | if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) { |
440 | NewlistItemYear = "90"; | 444 | NewlistItemYear = "90"; |
@@ -448,6 +452,6 @@ bool LibraryDialog::download_Etext() | |||
448 | 452 | ||
449 | outputFile=local_library+".guten_temp"; | 453 | outputFile=local_library+".guten_temp"; |
450 | //qDebug("Download file:%s",NewlistItemFile.latin1() ); | 454 | //odebug << "Download file:" << NewlistItemFile << "" << oendl; |
451 | qDebug("Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile); | 455 | odebug << "Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile << oendl; |
452 | QStringList networkList; | 456 | QStringList networkList; |
453 | networkList.append((const char *)ftp_host); | 457 | networkList.append((const char *)ftp_host); |
@@ -463,16 +467,16 @@ bool LibraryDialog::download_Etext() | |||
463 | if( NetworkDlg->exec() != 0 ) { // use new, improved, *INSTANT* network-dialog-file-getterer | 467 | if( NetworkDlg->exec() != 0 ) { // use new, improved, *INSTANT* network-dialog-file-getterer |
464 | File_Name= NetworkDlg->localFileName; | 468 | File_Name= NetworkDlg->localFileName; |
465 | qDebug("back to Library from Network Dialog"); | 469 | odebug << "back to Library from Network Dialog" << oendl; |
466 | qDebug("Just downloaded "+NetworkDlg->localFileName); | 470 | odebug << "Just downloaded "+NetworkDlg->localFileName << oendl; |
467 | 471 | ||
468 | // if (File_Name.find( local_library, 0, TRUE) != -1 ) { //could not be found | 472 | // if (File_Name.find( local_library, 0, TRUE) != -1 ) { //could not be found |
469 | // QString oldName=File_Name; | 473 | // QString oldName=File_Name; |
470 | // File_Name.replace(0,local_library.length(),downDir); | 474 | // File_Name.replace(0,local_library.length(),downDir); |
471 | // qDebug("File_Name now is "+File_Name); | 475 | // odebug << "File_Name now is "+File_Name << oendl; |
472 | 476 | ||
473 | // } | 477 | // } |
474 | // rename .txt to .etx | 478 | // rename .txt to .etx |
475 | if(NetworkDlg->successDownload) { | 479 | if(NetworkDlg->successDownload) { |
476 | qDebug("Filename is "+File_Name); | 480 | odebug << "Filename is "+File_Name << oendl; |
477 | if(File_Name.right(4)==".txt") { | 481 | if(File_Name.right(4)==".txt") { |
478 | QString s_fileName=File_Name; | 482 | QString s_fileName=File_Name; |
@@ -482,5 +486,5 @@ bool LibraryDialog::download_Etext() | |||
482 | File_Name=s_fileName; | 486 | File_Name=s_fileName; |
483 | 487 | ||
484 | qDebug("Filename is now "+File_Name); | 488 | odebug << "Filename is now "+File_Name << oendl; |
485 | 489 | ||
486 | } | 490 | } |
@@ -491,12 +495,12 @@ bool LibraryDialog::download_Etext() | |||
491 | name_file=name_file.left(name_file.length()-4); | 495 | name_file=name_file.left(name_file.length()-4); |
492 | 496 | ||
493 | qDebug("Setting doclink"); | 497 | odebug << "Setting doclink" << oendl; |
494 | DocLnk lnk; | 498 | DocLnk lnk; |
495 | qDebug("name is "+name_file); | 499 | odebug << "name is "+name_file << oendl; |
496 | lnk.setName(name_file); //sets file name | 500 | lnk.setName(name_file); //sets file name |
497 | qDebug("Title is "+DlglistItemTitle); | 501 | odebug << "Title is "+DlglistItemTitle << oendl; |
498 | lnk.setComment(DlglistItemTitle); | 502 | lnk.setComment(DlglistItemTitle); |
499 | 503 | ||
500 | qDebug("Filename is "+File_Name); | 504 | odebug << "Filename is "+File_Name << oendl; |
501 | lnk.setFile(File_Name); //sets File property | 505 | lnk.setFile(File_Name); //sets File property |
502 | lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D | 506 | lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D |
@@ -504,5 +508,5 @@ bool LibraryDialog::download_Etext() | |||
504 | lnk.setIcon("gutenbrowser/Gutenbrowser"); | 508 | lnk.setIcon("gutenbrowser/Gutenbrowser"); |
505 | if(!lnk.writeLink()) { | 509 | if(!lnk.writeLink()) { |
506 | qDebug("Writing doclink did not work"); | 510 | odebug << "Writing doclink did not work" << oendl; |
507 | } else { | 511 | } else { |
508 | } | 512 | } |
@@ -571,6 +575,6 @@ bool LibraryDialog::setTitle() | |||
571 | { | 575 | { |
572 | Config config("Gutenbrowser"); | 576 | Config config("Gutenbrowser"); |
573 | qDebug("setting title"); | 577 | odebug << "setting title" << oendl; |
574 | qDebug(DlglistItemTitle); | 578 | odebug << DlglistItemTitle << oendl; |
575 | 579 | ||
576 | if( DlglistItemTitle.find("[",0,TRUE) != -1) | 580 | if( DlglistItemTitle.find("[",0,TRUE) != -1) |
@@ -578,5 +582,5 @@ bool LibraryDialog::setTitle() | |||
578 | if( DlglistItemTitle.find("]",0,TRUE) !=-1) | 582 | if( DlglistItemTitle.find("]",0,TRUE) !=-1) |
579 | DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" ); | 583 | DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" ); |
580 | qDebug("Title being set is "+DlglistItemTitle); | 584 | odebug << "Title being set is "+DlglistItemTitle << oendl; |
581 | int test = 0; | 585 | int test = 0; |
582 | QString ramble, temp; | 586 | QString ramble, temp; |
@@ -739,5 +743,5 @@ void LibraryDialog::onButtonSearch() | |||
739 | if( SearchResultsDialog->exec() != 0) { | 743 | if( SearchResultsDialog->exec() != 0) { |
740 | texter = SearchResultsDialog->selText; | 744 | texter = SearchResultsDialog->selText; |
741 | // qDebug(texter); | 745 | // odebug << texter << oendl; |
742 | resultLs= SearchResultsDialog->resultsList; | 746 | resultLs= SearchResultsDialog->resultsList; |
743 | i_berger = 1; | 747 | i_berger = 1; |
@@ -750,5 +754,5 @@ void LibraryDialog::onButtonSearch() | |||
750 | for ( QStringList::Iterator it = resultLs.begin(); it != resultLs.end(); ++it ) { | 754 | for ( QStringList::Iterator it = resultLs.begin(); it != resultLs.end(); ++it ) { |
751 | texter.sprintf("%s \n",(*it).latin1()); | 755 | texter.sprintf("%s \n",(*it).latin1()); |
752 | // qDebug(texter); | 756 | // odebug << texter << oendl; |
753 | if( tester!=texter) | 757 | if( tester!=texter) |
754 | parseSearchResults( texter); | 758 | parseSearchResults( texter); |
@@ -807,5 +811,5 @@ void LibraryDialog::parseSearchResults( QString resultStr) | |||
807 | // int exit=QMessageBox::information(this, "Unzip?", "Ok to unzip "+ zipFile+" ?", QMessageBox::Yes, QMessageBox::No); | 811 | // int exit=QMessageBox::information(this, "Unzip?", "Ok to unzip "+ zipFile+" ?", QMessageBox::Yes, QMessageBox::No); |
808 | // if (exit==QMessageBox::Yes) { | 812 | // if (exit==QMessageBox::Yes) { |
809 | // qDebug("Issuing the command "+cmd); | 813 | // odebug << "Issuing the command "+cmd << oendl; |
810 | // #if defined(_WS_WIN_) | 814 | // #if defined(_WS_WIN_) |
811 | // WinExec( cmd, SW_HIDE ); | 815 | // WinExec( cmd, SW_HIDE ); |
@@ -841,5 +845,5 @@ void LibraryDialog::sort() | |||
841 | bool LibraryDialog::getItem(QListViewItem *it) | 845 | bool LibraryDialog::getItem(QListViewItem *it) |
842 | { | 846 | { |
843 | // qDebug("selected getItem"); | 847 | // odebug << "selected getItem" << oendl; |
844 | 848 | ||
845 | // DlglistItemNumber = it->text(0); | 849 | // DlglistItemNumber = it->text(0); |
@@ -859,5 +863,5 @@ bool LibraryDialog::getItem(QListViewItem *it) | |||
859 | bool LibraryDialog::onButtonDownload() | 863 | bool LibraryDialog::onButtonDownload() |
860 | { | 864 | { |
861 | // qDebug("selected onButtonDownloadz"); | 865 | // odebug << "selected onButtonDownloadz" << oendl; |
862 | 866 | ||
863 | QListViewItemIterator it1( ListView1 ); | 867 | QListViewItemIterator it1( ListView1 ); |
@@ -901,5 +905,5 @@ bool LibraryDialog::onButtonDownload() | |||
901 | void LibraryDialog::comboSelect(int index) | 905 | void LibraryDialog::comboSelect(int index) |
902 | { | 906 | { |
903 | // qDebug("we are sorting"); | 907 | // odebug << "we are sorting" << oendl; |
904 | ListView1->setSorting( index, TRUE); | 908 | ListView1->setSorting( index, TRUE); |
905 | ListView2->setSorting( index, TRUE); | 909 | ListView2->setSorting( index, TRUE); |
@@ -931,5 +935,5 @@ void LibraryDialog::newList() | |||
931 | if(!gutDir.exists()) gutDir.mkdir(QPEApplication::qpeDir()+"etc/gutenbrowser",true); | 935 | if(!gutDir.exists()) gutDir.mkdir(QPEApplication::qpeDir()+"etc/gutenbrowser",true); |
932 | if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) { | 936 | if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) { |
933 | qDebug("changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser"); | 937 | odebug << "changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser" << oendl; |
934 | QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; | 938 | QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; |
935 | QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1"; | 939 | QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1"; |
@@ -952,5 +956,5 @@ void LibraryDialog::newList() | |||
952 | if ( !fp ) { | 956 | if ( !fp ) { |
953 | } else { | 957 | } else { |
954 | qDebug("Issuing the command\n"+cmd); | 958 | odebug << "Issuing the command\n"+cmd << oendl; |
955 | // system(cmd); | 959 | // system(cmd); |
956 | while ( fgets( line, sizeof line, fp)) { | 960 | while ( fgets( line, sizeof line, fp)) { |
@@ -966,5 +970,5 @@ void LibraryDialog::newList() | |||
966 | // QString gutenindex=QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; | 970 | // QString gutenindex=QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; |
967 | // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0) | 971 | // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0) |
968 | // qDebug("renaming error"); | 972 | // odebug << "renaming error" << oendl; |
969 | // } | 973 | // } |
970 | 974 | ||
@@ -1025,5 +1029,5 @@ bool LibraryDialog::moreInfo() | |||
1025 | item=0; | 1029 | item=0; |
1026 | if(titleString.length()>2) { | 1030 | if(titleString.length()>2) { |
1027 | qDebug( "Title is "+titleString ); | 1031 | odebug << "Title is "+titleString << oendl; |
1028 | titleString.replace( QRegExp("\\s"), "%20"); | 1032 | titleString.replace( QRegExp("\\s"), "%20"); |
1029 | titleString.replace( QRegExp("'"), "%20"); | 1033 | titleString.replace( QRegExp("'"), "%20"); |
@@ -1049,10 +1053,10 @@ void LibraryDialog::FindLibrary() | |||
1049 | newindexLib.setName( new_index); | 1053 | newindexLib.setName( new_index); |
1050 | indexLib.setName( new_index); | 1054 | indexLib.setName( new_index); |
1051 | qDebug("index file is "+ new_index); | 1055 | odebug << "index file is "+ new_index << oendl; |
1052 | Newlibrary(); | 1056 | Newlibrary(); |
1053 | } else { | 1057 | } else { |
1054 | newindexLib.setName( old_index); | 1058 | newindexLib.setName( old_index); |
1055 | indexLib.setName( old_index); | 1059 | indexLib.setName( old_index); |
1056 | qDebug("new index nameis "+ old_index); | 1060 | odebug << "new index nameis "+ old_index << oendl; |
1057 | Library(); | 1061 | Library(); |
1058 | } | 1062 | } |
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp index aed53c6..6e6b707 100644 --- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | |||
@@ -11,13 +11,13 @@ | |||
11 | // // half-assed attempt at providing a network dialog. | 11 | // // half-assed attempt at providing a network dialog. |
12 | // /* Created: Sun Aug 27 15:24:52 2000*/ | 12 | // /* Created: Sun Aug 27 15:24:52 2000*/ |
13 | #include <unistd.h> | ||
14 | 13 | ||
15 | extern "C" { | ||
16 | #include <ftplib.h> | ||
17 | } | ||
18 | 14 | ||
19 | #include "NetworkDialog.h" | 15 | #include "NetworkDialog.h" |
20 | #include "gutenbrowser.h" | 16 | #include "gutenbrowser.h" |
21 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
20 | |||
21 | /* QT */ | ||
22 | #include <qprogressbar.h> | 22 | #include <qprogressbar.h> |
23 | #include <qstringlist.h> | 23 | #include <qstringlist.h> |
@@ -31,4 +31,10 @@ extern "C" { | |||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | 32 | ||
33 | /* STD */ | ||
34 | #include <unistd.h> | ||
35 | extern "C" { | ||
36 | #include <ftplib.h> | ||
37 | } | ||
38 | |||
33 | QProgressBar* ProgressBar1; | 39 | QProgressBar* ProgressBar1; |
34 | QPushButton* buttonCancel; | 40 | QPushButton* buttonCancel; |
@@ -120,5 +126,5 @@ void NetworkDialog::initDialog() { | |||
120 | // connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot())); | 126 | // connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot())); |
121 | if(autoOk) { | 127 | if(autoOk) { |
122 | qWarning("XXXXXXXXXXXXXXXXXXXXXXXX"); | 128 | owarn << "XXXXXXXXXXXXXXXXXXXXXXXX" << oendl; |
123 | buttonOk->setDown(true); | 129 | buttonOk->setDown(true); |
124 | doOk(); | 130 | doOk(); |
@@ -144,5 +150,5 @@ void NetworkDialog::timeSlot() { | |||
144 | // posTimer=TRUE; | 150 | // posTimer=TRUE; |
145 | // } | 151 | // } |
146 | // // qDebug("timer event"); | 152 | // // odebug << "timer event" << oendl; |
147 | // qApp->processEvents(); | 153 | // qApp->processEvents(); |
148 | // repaint(); | 154 | // repaint(); |
@@ -150,5 +156,5 @@ void NetworkDialog::timeSlot() { | |||
150 | 156 | ||
151 | void NetworkDialog::connectionTimeSlot() { | 157 | void NetworkDialog::connectionTimeSlot() { |
152 | // qDebug("Connections timed out"); | 158 | // odebug << "Connections timed out" << oendl; |
153 | // ftpQuit(); | 159 | // ftpQuit(); |
154 | // qApp->processEvents(); | 160 | // qApp->processEvents(); |
@@ -168,6 +174,6 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
168 | warnLabel ->setText( ""); | 174 | warnLabel ->setText( ""); |
169 | qApp->processEvents(); | 175 | qApp->processEvents(); |
170 | qDebug("Downloading: %s",networkUrl.latin1()); | 176 | odebug << "Downloading: " << networkUrl << "" << oendl; |
171 | qDebug("Into: %s",localFileName.latin1()); | 177 | odebug << "Into: " << localFileName << "" << oendl; |
172 | if( networkUrl.length() > 5) { | 178 | if( networkUrl.length() > 5) { |
173 | QString ftp_user = "anonymous"; | 179 | QString ftp_user = "anonymous"; |
@@ -175,5 +181,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
175 | // ftp_host= networkUrl.mid(networkUrl.find("ftp://",0, TRUE), | 181 | // ftp_host= networkUrl.mid(networkUrl.find("ftp://",0, TRUE), |
176 | if(ftp_host.length() < 2) { | 182 | if(ftp_host.length() < 2) { |
177 | qDebug("Please select an ftp host" ); | 183 | odebug << "Please select an ftp host" << oendl; |
178 | successDownload=false; | 184 | successDownload=false; |
179 | QMessageBox::message("Note","You need to select an ftp host"); | 185 | QMessageBox::message("Note","You need to select an ftp host"); |
@@ -181,6 +187,6 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
181 | } | 187 | } |
182 | QString msg; | 188 | QString msg; |
183 | qDebug(ftp_host); | 189 | odebug << ftp_host << oendl; |
184 | qDebug("Opening ftp connection."); | 190 | odebug << "Opening ftp connection." << oendl; |
185 | warnLabel->setText("connecting to: "+ftp_host ); | 191 | warnLabel->setText("connecting to: "+ftp_host ); |
186 | qApp->processEvents(); | 192 | qApp->processEvents(); |
@@ -201,5 +207,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
201 | return false; | 207 | return false; |
202 | } | 208 | } |
203 | qDebug("Changing directories."); | 209 | odebug << "Changing directories." << oendl; |
204 | TextLabel3->setText("Changing directories."); | 210 | TextLabel3->setText("Changing directories."); |
205 | qApp->processEvents(); | 211 | qApp->processEvents(); |
@@ -218,5 +224,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
218 | // return false; | 224 | // return false; |
219 | // } | 225 | // } |
220 | qDebug("Requesting directory list."); | 226 | odebug << "Requesting directory list." << oendl; |
221 | TextLabel3->setText("Getting directory list."); | 227 | TextLabel3->setText("Getting directory list."); |
222 | qApp->processEvents(); | 228 | qApp->processEvents(); |
@@ -233,5 +239,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
233 | if (tmp.open(IO_ReadOnly)) { | 239 | if (tmp.open(IO_ReadOnly)) { |
234 | QTextStream t( &tmp ); // use a text stream | 240 | QTextStream t( &tmp ); // use a text stream |
235 | qDebug("Finding partial filename "+s_partialFileName); | 241 | odebug << "Finding partial filename "+s_partialFileName << oendl; |
236 | while ( !t.eof()) { | 242 | while ( !t.eof()) { |
237 | s = t.readLine(); | 243 | s = t.readLine(); |
@@ -242,10 +248,10 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
242 | if (str.contains(".txt")) { | 248 | if (str.contains(".txt")) { |
243 | File_Name = str; | 249 | File_Name = str; |
244 | qDebug("Found file_name "+ File_Name); | 250 | odebug << "Found file_name "+ File_Name << oendl; |
245 | break; | 251 | break; |
246 | } | 252 | } |
247 | // if (str.contains(".zip")) { | 253 | // if (str.contains(".zip")) { |
248 | // File_Name = str; | 254 | // File_Name = str; |
249 | // qDebug("Found file_name "+ File_Name); | 255 | // odebug << "Found file_name "+ File_Name << oendl; |
250 | // break; | 256 | // break; |
251 | // } | 257 | // } |
@@ -257,5 +263,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
257 | } | 263 | } |
258 | else | 264 | else |
259 | qDebug("Error opening temp file."); | 265 | odebug << "Error opening temp file." << oendl; |
260 | 266 | ||
261 | Config cfg("Gutenbrowser"); | 267 | Config cfg("Gutenbrowser"); |
@@ -264,6 +270,6 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
264 | 270 | ||
265 | localFileName = temp+File_Name; | 271 | localFileName = temp+File_Name; |
266 | qDebug("Requesting file "+ File_Name); | 272 | odebug << "Requesting file "+ File_Name << oendl; |
267 | qDebug( "Saving as "+localFileName); | 273 | odebug << "Saving as "+localFileName << oendl; |
268 | msg="Requesting file "+ File_Name; | 274 | msg="Requesting file "+ File_Name; |
269 | TextLabel3->setText(msg); | 275 | TextLabel3->setText(msg); |
@@ -294,5 +300,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
294 | return false; | 300 | return false; |
295 | } | 301 | } |
296 | qDebug("Ftp session successful"); | 302 | odebug << "Ftp session successful" << oendl; |
297 | successDownload=TRUE; | 303 | successDownload=TRUE; |
298 | FtpQuit(conn); | 304 | FtpQuit(conn); |
@@ -303,5 +309,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
303 | 309 | ||
304 | void NetworkDialog::doOk() { | 310 | void NetworkDialog::doOk() { |
305 | qWarning("Do OK"); | 311 | owarn << "Do OK" << oendl; |
306 | QString loginStr; | 312 | QString loginStr; |
307 | loginStr = "gutenbrowser"; | 313 | loginStr = "gutenbrowser"; |
diff --git a/noncore/apps/opie-gutenbrowser/SearchDialog.cpp b/noncore/apps/opie-gutenbrowser/SearchDialog.cpp index 4ddb3f0..d989304 100644 --- a/noncore/apps/opie-gutenbrowser/SearchDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/SearchDialog.cpp | |||
@@ -99,5 +99,5 @@ void SearchDialog::byeBye() | |||
99 | 99 | ||
100 | searchString = get_text(); | 100 | searchString = get_text(); |
101 | // qDebug("Search string is "+searchString); | 101 | // odebug << "Search string is "+searchString << oendl; |
102 | Config cfg("Gutenbrowser"); | 102 | Config cfg("Gutenbrowser"); |
103 | cfg.setGroup("General"); | 103 | cfg.setGroup("General"); |
@@ -120,5 +120,5 @@ void SearchDialog::closed() | |||
120 | { | 120 | { |
121 | searchString = get_text(); | 121 | searchString = get_text(); |
122 | // qDebug("Search string is "+searchString); | 122 | // odebug << "Search string is "+searchString << oendl; |
123 | Config cfg("Gutenbrowser"); | 123 | Config cfg("Gutenbrowser"); |
124 | cfg.setGroup("General"); | 124 | cfg.setGroup("General"); |
diff --git a/noncore/apps/opie-gutenbrowser/browserDialog.cpp b/noncore/apps/opie-gutenbrowser/browserDialog.cpp index 81dd516..cc05d04 100644 --- a/noncore/apps/opie-gutenbrowser/browserDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/browserDialog.cpp | |||
@@ -11,4 +11,5 @@ copyright 2001 by L.J. Potter ljp@llornkcor.com | |||
11 | /* OPIE */ | 11 | /* OPIE */ |
12 | #include <opie2/ofiledialog.h> | 12 | #include <opie2/ofiledialog.h> |
13 | #include <opie2/odebug.h> | ||
13 | using namespace Opie::Ui; | 14 | using namespace Opie::Ui; |
14 | 15 | ||
@@ -53,5 +54,5 @@ void optionsDialog::BrowseSelected() { | |||
53 | fileName = str; | 54 | fileName = str; |
54 | // QStringList fileList=browseForFiles->fileList; | 55 | // QStringList fileList=browseForFiles->fileList; |
55 | // qDebug(selFile); | 56 | // odebug << selFile << oendl; |
56 | // QStringList::ConstIterator f; | 57 | // QStringList::ConstIterator f; |
57 | // QString fileTemp,filer; | 58 | // QString fileTemp,filer; |
@@ -77,5 +78,5 @@ void optionsDialog::setHttp(int index) { | |||
77 | Config config("Gutenbrowser"); | 78 | Config config("Gutenbrowser"); |
78 | config.setGroup( "HttpServer" ); | 79 | config.setGroup( "HttpServer" ); |
79 | qDebug("writing http server"); | 80 | odebug << "writing http server" << oendl; |
80 | if( index== 0) { | 81 | if( index== 0) { |
81 | config.writeEntry("Preferred", "http://sailor.gutenberg.org"); | 82 | config.writeEntry("Preferred", "http://sailor.gutenberg.org"); |
diff --git a/noncore/apps/opie-gutenbrowser/fontDialog.cpp b/noncore/apps/opie-gutenbrowser/fontDialog.cpp index a17b1d3..fa964a6 100644 --- a/noncore/apps/opie-gutenbrowser/fontDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/fontDialog.cpp | |||
@@ -91,5 +91,5 @@ void FontDialog::familyListBoxSlot(const QString & text) | |||
91 | // clearListBoxes(); | 91 | // clearListBoxes(); |
92 | family = text; | 92 | family = text; |
93 | // qDebug(family); | 93 | // odebug << family << oendl; |
94 | QStringList styles = fdb.styles( family ); // string list of styles of our current font family | 94 | QStringList styles = fdb.styles( family ); // string list of styles of our current font family |
95 | styleListBox->insertStringList( styles); | 95 | styleListBox->insertStringList( styles); |
@@ -101,5 +101,5 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); | |||
101 | for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) { | 101 | for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) { |
102 | dstyle = QString::number( *points ); | 102 | dstyle = QString::number( *points ); |
103 | qDebug(dstyle); | 103 | odebug << dstyle << oendl; |
104 | sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); | 104 | sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); |
105 | } | 105 | } |
@@ -152,5 +152,5 @@ void FontDialog::populateLists() | |||
152 | QString family = *f; | 152 | QString family = *f; |
153 | // if(family == defaultFont.family()) | 153 | // if(family == defaultFont.family()) |
154 | // qDebug(family); | 154 | // odebug << family << oendl; |
155 | familyListBox->insertItem( family); | 155 | familyListBox->insertItem( family); |
156 | 156 | ||
@@ -210,5 +210,5 @@ void FontDialog::changeText() | |||
210 | family = familyListBox->currentText(); | 210 | family = familyListBox->currentText(); |
211 | } | 211 | } |
212 | // qDebug("Font family is "+family); | 212 | // odebug << "Font family is "+family << oendl; |
213 | if( styleListBox->currentItem() == -1) | 213 | if( styleListBox->currentItem() == -1) |
214 | style=styleListBox->text(0); | 214 | style=styleListBox->text(0); |
@@ -216,5 +216,5 @@ void FontDialog::changeText() | |||
216 | style = styleListBox->currentText(); | 216 | style = styleListBox->currentText(); |
217 | } | 217 | } |
218 | // qDebug("font style is "+style); | 218 | // odebug << "font style is "+style << oendl; |
219 | 219 | ||
220 | if( sizeComboBox->currentItem() == -1 ) | 220 | if( sizeComboBox->currentItem() == -1 ) |
@@ -224,5 +224,5 @@ void FontDialog::changeText() | |||
224 | } | 224 | } |
225 | 225 | ||
226 | // qDebug("Font size is "+size); | 226 | // odebug << "Font size is "+size << oendl; |
227 | bool ok; | 227 | bool ok; |
228 | int i_size = size.toInt(&ok,10); | 228 | int i_size = size.toInt(&ok,10); |
@@ -232,11 +232,11 @@ void FontDialog::changeText() | |||
232 | for ( QStringList::Iterator s = charSetList.begin(); s != charSetList.end();++s ) { // for each font style | 232 | for ( QStringList::Iterator s = charSetList.begin(); s != charSetList.end();++s ) { // for each font style |
233 | charSet = *s; | 233 | charSet = *s; |
234 | // qDebug(charSet); | 234 | // odebug << charSet << oendl; |
235 | } | 235 | } |
236 | selectedFont = fdb.font(family,style,i_size,charSet); | 236 | selectedFont = fdb.font(family,style,i_size,charSet); |
237 | QFontInfo fontInfo( selectedFont); | 237 | QFontInfo fontInfo( selectedFont); |
238 | // if(fontInfo.italic() ) qDebug("italic"); | 238 | // if(fontInfo.italic() ) odebug << "italic" << oendl; |
239 | selectedFont.setWeight(fontInfo.weight() ); | 239 | selectedFont.setWeight(fontInfo.weight() ); |
240 | // qDebug("Style are "+style+" %d ",fontInfo.weight()); | 240 | // odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl; |
241 | Config cfg("Gutenbrowser"); | 241 | Config cfg("Gutenbrowser"); |
242 | cfg.setGroup("Font"); | 242 | cfg.setGroup("Font"); |
@@ -250,5 +250,5 @@ void FontDialog::changeText() | |||
250 | selectedFont.setItalic(TRUE); //ya right | 250 | selectedFont.setItalic(TRUE); //ya right |
251 | cfg.writeEntry("Italic","TRUE"); | 251 | cfg.writeEntry("Italic","TRUE"); |
252 | // qDebug("Style is "+styleListBox->currentText()); | 252 | // odebug << "Style is "+styleListBox->currentText() << oendl; |
253 | } else | 253 | } else |
254 | cfg.writeEntry("Italic","FALSE"); | 254 | cfg.writeEntry("Italic","FALSE"); |
diff --git a/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp b/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp index ad770b5..a9c7346 100644 --- a/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp +++ b/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp | |||
@@ -12,4 +12,5 @@ | |||
12 | * (at your option) any later version. * | 12 | * (at your option) any later version. * |
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | |||
14 | #include "optionsDialog.h" | 15 | #include "optionsDialog.h" |
15 | #include "gutenbrowser.h" | 16 | #include "gutenbrowser.h" |
@@ -17,13 +18,17 @@ | |||
17 | #include "output.h" | 18 | #include "output.h" |
18 | 19 | ||
20 | /* OPIE */ | ||
21 | #include <opie2/odebug.h> | ||
22 | #include <qpe/config.h> | ||
23 | |||
24 | /* QT */ | ||
19 | #include <qprogressbar.h> | 25 | #include <qprogressbar.h> |
20 | #include <stdlib.h> | ||
21 | #include <qurloperator.h> | 26 | #include <qurloperator.h> |
22 | #include <qpe/config.h> | ||
23 | #include <qlistbox.h> | 27 | #include <qlistbox.h> |
24 | 28 | ||
29 | /* STD */ | ||
30 | #include <stdlib.h> | ||
25 | #include <unistd.h> | 31 | #include <unistd.h> |
26 | #include <stdio.h> | 32 | #include <stdio.h> |
27 | #include <stdlib.h> | ||
28 | 33 | ||
29 | // :)~ | 34 | // :)~ |
@@ -39,5 +44,5 @@ void optionsDialog::ftpSiteDlg( ) | |||
39 | dir.mkdir(ListFile,true); | 44 | dir.mkdir(ListFile,true); |
40 | ListFile+="/ftpList"; | 45 | ListFile+="/ftpList"; |
41 | qDebug("opening "+ListFile); | 46 | odebug << "opening "+ListFile << oendl; |
42 | if ( QFile(ListFile).exists() ) { | 47 | if ( QFile(ListFile).exists() ) { |
43 | openSiteList(); | 48 | openSiteList(); |
@@ -77,5 +82,5 @@ void optionsDialog::getSite() | |||
77 | // if( NetworkDlg->exec() != 0 ) | 82 | // if( NetworkDlg->exec() != 0 ) |
78 | // { // use new, improved, *INSTANT* network-dialog-file-getterer | 83 | // { // use new, improved, *INSTANT* network-dialog-file-getterer |
79 | // qDebug("gitcha!"); | 84 | // odebug << "gitcha!" << oendl; |
80 | // } | 85 | // } |
81 | // delete NetworkDlg; | 86 | // delete NetworkDlg; |
@@ -85,5 +90,5 @@ void optionsDialog::getSite() | |||
85 | 90 | ||
86 | QString cmd="wget -T 15 -O " +outputFile + " " + networkUrl + " 2>&1" ; | 91 | QString cmd="wget -T 15 -O " +outputFile + " " + networkUrl + " 2>&1" ; |
87 | qDebug("Issuing the command "+cmd); | 92 | odebug << "Issuing the command "+cmd << oendl; |
88 | Output *outDlg; | 93 | Output *outDlg; |
89 | outDlg = new Output( 0, tr("Downloading ftp sites...."),TRUE); | 94 | outDlg = new Output( 0, tr("Downloading ftp sites...."),TRUE); |
@@ -114,5 +119,5 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
114 | // parse ftplist html and extract just the machine names/directories | 119 | // parse ftplist html and extract just the machine names/directories |
115 | // TODO: add locations!! | 120 | // TODO: add locations!! |
116 | qDebug("parse ftplist "+outputFile); | 121 | odebug << "parse ftplist "+outputFile << oendl; |
117 | QString ftpList, s_location; | 122 | QString ftpList, s_location; |
118 | QFile f( outputFile ); | 123 | QFile f( outputFile ); |
@@ -153,9 +158,9 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
153 | s = t.readLine(); | 158 | s = t.readLine(); |
154 | if(( start=s.find("<BR>(", 0, TRUE) ) != -1) { | 159 | if(( start=s.find("<BR>(", 0, TRUE) ) != -1) { |
155 | // qDebug("%s",s.latin1()); | 160 | // odebug << "" << s << "" << oendl; |
156 | end = s.find( ")", 0, TRUE)+1; | 161 | end = s.find( ")", 0, TRUE)+1; |
157 | s_location= s.mid( start+4, (end - start) ); | 162 | s_location= s.mid( start+4, (end - start) ); |
158 | 163 | ||
159 | // qDebug("%s", s_location.latin1()); | 164 | // odebug << "" << s_location << "" << oendl; |
160 | // ftpList += ftpSite + "\n"; | 165 | // ftpList += ftpSite + "\n"; |
161 | // ftp_QListBox_1->sort( TRUE ); | 166 | // ftp_QListBox_1->sort( TRUE ); |
@@ -191,5 +196,5 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
191 | void optionsDialog::openSiteList() { | 196 | void optionsDialog::openSiteList() { |
192 | 197 | ||
193 | qDebug(" just opens the ftp site list"); | 198 | odebug << " just opens the ftp site list" << oendl; |
194 | // ListFile = ( QDir::homeDirPath ()) +"/.gutenbrowser/ftpList"; | 199 | // ListFile = ( QDir::homeDirPath ()) +"/.gutenbrowser/ftpList"; |
195 | QFile f( ListFile); | 200 | QFile f( ListFile); |
@@ -231,5 +236,5 @@ void optionsDialog::select_site( const char *index ) | |||
231 | // if(s_site.find("(",0,TRUE)) | 236 | // if(s_site.find("(",0,TRUE)) |
232 | s_site2=s_site.right( s_site.length()-(s_site.find(" ",0,TRUE)+4) ); | 237 | s_site2=s_site.right( s_site.length()-(s_site.find(" ",0,TRUE)+4) ); |
233 | qDebug("Selected ftp site is "+ s_site2); | 238 | odebug << "Selected ftp site is "+ s_site2 << oendl; |
234 | int i_ftp = s_site2.find("/", 0, FALSE); | 239 | int i_ftp = s_site2.find("/", 0, FALSE); |
235 | ftp_host = s_site2.left(i_ftp ); | 240 | ftp_host = s_site2.left(i_ftp ); |
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp index 2a9a71e..be2b897 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | |||
@@ -15,11 +15,5 @@ | |||
15 | // ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL | 15 | // ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL |
16 | // donate@gutenberg.net | 16 | // donate@gutenberg.net |
17 | #include <qpe/qpeapplication.h> | 17 | |
18 | #include <qpe/fontdatabase.h> | ||
19 | #include <qpe/config.h> | ||
20 | #include <qpe/qcopenvelope_qws.h> | ||
21 | #include <qpe/mimetype.h> | ||
22 | #include <qpe/resource.h> | ||
23 | #include <qpe/applnk.h> | ||
24 | 18 | ||
25 | #include "editTitle.h" | 19 | #include "editTitle.h" |
@@ -34,5 +28,15 @@ | |||
34 | #include "output.h" | 28 | #include "output.h" |
35 | 29 | ||
30 | /* OPIE */ | ||
31 | #include <opie2/odebug.h> | ||
32 | #include <qpe/qpeapplication.h> | ||
33 | #include <qpe/fontdatabase.h> | ||
34 | #include <qpe/config.h> | ||
35 | #include <qpe/qcopenvelope_qws.h> | ||
36 | #include <qpe/mimetype.h> | ||
37 | #include <qpe/resource.h> | ||
38 | #include <qpe/applnk.h> | ||
36 | 39 | ||
40 | /* QT */ | ||
37 | #include <qregexp.h> | 41 | #include <qregexp.h> |
38 | #include <qregion.h> | 42 | #include <qregion.h> |
@@ -52,4 +56,5 @@ | |||
52 | #include <qpoint.h> | 56 | #include <qpoint.h> |
53 | 57 | ||
58 | /* STD */ | ||
54 | #include <stdio.h> | 59 | #include <stdio.h> |
55 | #include <stdlib.h> | 60 | #include <stdlib.h> |
@@ -132,5 +137,5 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
132 | int index=config.readNumEntry( "LineNumber", -1 ); | 137 | int index=config.readNumEntry( "LineNumber", -1 ); |
133 | if( index != -1) { | 138 | if( index != -1) { |
134 | // qDebug( tempTitle); | 139 | // odebug << tempTitle << oendl; |
135 | bookmarksMenu->insertItem( tempTitle); | 140 | bookmarksMenu->insertItem( tempTitle); |
136 | } | 141 | } |
@@ -155,5 +160,5 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
155 | // Bookmark(); | 160 | // Bookmark(); |
156 | for (int i=1;i< qApp->argc();i++) { | 161 | for (int i=1;i< qApp->argc();i++) { |
157 | qDebug("Suppose we open somethin"); | 162 | odebug << "Suppose we open somethin" << oendl; |
158 | load(qApp->argv()[i]); | 163 | load(qApp->argv()[i]); |
159 | } | 164 | } |
@@ -170,5 +175,5 @@ Gutenbrowser::~Gutenbrowser() { | |||
170 | // QPEApplication::grabKeyboard(); | 175 | // QPEApplication::grabKeyboard(); |
171 | // QPEApplication::ungrabKeyboard(); | 176 | // QPEApplication::ungrabKeyboard(); |
172 | qDebug("Exit"); | 177 | odebug << "Exit" << oendl; |
173 | } | 178 | } |
174 | 179 | ||
@@ -200,5 +205,5 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
200 | else | 205 | else |
201 | filename+="etc/gutenbrowser/"; | 206 | filename+="etc/gutenbrowser/"; |
202 | qDebug("filename "+filename); | 207 | odebug << "filename "+filename << oendl; |
203 | // QString filename = QDir::homeDirPath()+"/Applications/gutenbrowser/"; | 208 | // QString filename = QDir::homeDirPath()+"/Applications/gutenbrowser/"; |
204 | 209 | ||
@@ -208,9 +213,9 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
208 | config.setGroup( "Browser" ); | 213 | config.setGroup( "Browser" ); |
209 | QString brow = config.readEntry("Preferred", "Opera"); | 214 | QString brow = config.readEntry("Preferred", "Opera"); |
210 | qDebug("Preferred browser is "+brow); | 215 | odebug << "Preferred browser is "+brow << oendl; |
211 | if(!showMsg) { //if we just get the gutenindex.all | 216 | if(!showMsg) { //if we just get the gutenindex.all |
212 | cmd="wget -O " + filename +" " + url+" 2>&1" ; | 217 | cmd="wget -O " + filename +" " + url+" 2>&1" ; |
213 | chdir(local_library); | 218 | chdir(local_library); |
214 | qDebug("Issuing the system command: %s", cmd.latin1()); | 219 | odebug << "Issuing the system command: " << cmd << "" << oendl; |
215 | 220 | ||
216 | Output *outDlg; | 221 | Output *outDlg; |
@@ -224,5 +229,5 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
224 | sleep(1); | 229 | sleep(1); |
225 | fp = popen( (const char *) cmd, "r"); | 230 | fp = popen( (const char *) cmd, "r"); |
226 | // qDebug("Issuing the command\n"+cmd); | 231 | // odebug << "Issuing the command\n"+cmd << oendl; |
227 | // system(cmd); | 232 | // system(cmd); |
228 | while ( fgets( line, sizeof line, fp)) { | 233 | while ( fgets( line, sizeof line, fp)) { |
@@ -257,5 +262,5 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
257 | 262 | ||
258 | chdir(local_library); | 263 | chdir(local_library); |
259 | qDebug("Issuing the sys command: %s", cmd.latin1()); | 264 | odebug << "Issuing the sys command: " << cmd << "" << oendl; |
260 | system(cmd); | 265 | system(cmd); |
261 | } | 266 | } |
@@ -267,5 +272,5 @@ void Gutenbrowser::toggleButtonIcons( bool useEm) { | |||
267 | useEm=TRUE; | 272 | useEm=TRUE; |
268 | pixDir=QPEApplication::qpeDir()+"pics/gutenbrowser"; | 273 | pixDir=QPEApplication::qpeDir()+"pics/gutenbrowser"; |
269 | qDebug("Docdir is "+QPEApplication::documentDir()); | 274 | odebug << "Docdir is "+QPEApplication::documentDir() << oendl; |
270 | 275 | ||
271 | if( useIcons && QDir( pixDir).exists() ) { | 276 | if( useIcons && QDir( pixDir).exists() ) { |
@@ -382,5 +387,5 @@ void Gutenbrowser::PrintBtn() { | |||
382 | void Gutenbrowser::SearchBtn() { | 387 | void Gutenbrowser::SearchBtn() { |
383 | if( loadCheck) { | 388 | if( loadCheck) { |
384 | qDebug("loadCheck: we have a loaded doc"); | 389 | odebug << "loadCheck: we have a loaded doc" << oendl; |
385 | Search(); | 390 | Search(); |
386 | } | 391 | } |
@@ -405,5 +410,5 @@ void Gutenbrowser::ForwardBtn() { | |||
405 | insertString+=s; | 410 | insertString+=s; |
406 | Lview->insertLine( s, -1); | 411 | Lview->insertLine( s, -1); |
407 | // qDebug(s); | 412 | // odebug << s << oendl; |
408 | currentLine++; | 413 | currentLine++; |
409 | } | 414 | } |
@@ -424,5 +429,5 @@ void Gutenbrowser::ForwardBtn() { | |||
424 | 429 | ||
425 | } else { | 430 | } else { |
426 | // qDebug("bal"); | 431 | // odebug << "bal" << oendl; |
427 | // if( i_pageNum != pages) { | 432 | // if( i_pageNum != pages) { |
428 | 433 | ||
@@ -439,5 +444,5 @@ void Gutenbrowser::ForwardBtn() { | |||
439 | Lview->setFocus(); | 444 | Lview->setFocus(); |
440 | 445 | ||
441 | // qDebug("page number %d line number %d", i_pageNum, currentLine); | 446 | // odebug << "page number " << i_pageNum << " line number " << currentLine << "" << oendl; |
442 | } | 447 | } |
443 | 448 | ||
@@ -458,5 +463,5 @@ void Gutenbrowser::BackBtn() { | |||
458 | } else { | 463 | } else { |
459 | if(!f.at( pageStopArray[i_pageNum - 1] )) | 464 | if(!f.at( pageStopArray[i_pageNum - 1] )) |
460 | qDebug("File positioned backward did not work"); | 465 | odebug << "File positioned backward did not work" << oendl; |
461 | } | 466 | } |
462 | QString s; | 467 | QString s; |
@@ -514,5 +519,5 @@ void Gutenbrowser::TopBtn() { | |||
514 | if(loadCheck) { | 519 | if(loadCheck) { |
515 | if( i_pageNum != 0) { | 520 | if( i_pageNum != 0) { |
516 | qDebug("top"); | 521 | odebug << "top" << oendl; |
517 | qApp->processEvents(); | 522 | qApp->processEvents(); |
518 | currentLine = 0; | 523 | currentLine = 0; |
@@ -572,9 +577,9 @@ void Gutenbrowser::BeginBtn() { | |||
572 | pageStopArray.resize(i_pageNum + 1); | 577 | pageStopArray.resize(i_pageNum + 1); |
573 | pageStopArray[i_pageNum ] = currentFilePos; | 578 | pageStopArray[i_pageNum ] = currentFilePos; |
574 | // qDebug("new page number %d, found at %d", i_pageNum, currentFilePos); | 579 | // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; |
575 | } | 580 | } |
576 | // lastPage = i_pageNum; | 581 | // lastPage = i_pageNum; |
577 | if( LeftText.find( s_pattern, 0 , TRUE) != -1 || LeftText.find( sPattern2, 0 , TRUE) != -1 ) { | 582 | if( LeftText.find( s_pattern, 0 , TRUE) != -1 || LeftText.find( sPattern2, 0 , TRUE) != -1 ) { |
578 | qDebug("<<<<<< FOUND IT!! new page number %d, found at %d", i_pageNum, currentFilePos); | 583 | odebug << "<<<<<< FOUND IT!! new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; |
579 | break; | 584 | break; |
580 | } | 585 | } |
@@ -622,9 +627,9 @@ void Gutenbrowser::setBookmark() { | |||
622 | file_name=cfg.readEntry("Current",""); | 627 | file_name=cfg.readEntry("Current",""); |
623 | qApp->processEvents(); | 628 | qApp->processEvents(); |
624 | qDebug("Settingbook mark "+file_name); | 629 | odebug << "Settingbook mark "+file_name << oendl; |
625 | 630 | ||
626 | cfg.setGroup("Titles"); | 631 | cfg.setGroup("Titles"); |
627 | title=cfg.readEntry(file_name,""); | 632 | title=cfg.readEntry(file_name,""); |
628 | qDebug("title is "+ title); | 633 | odebug << "title is "+ title << oendl; |
629 | 634 | ||
630 | cfg.setGroup( "Bookmarks" ); | 635 | cfg.setGroup( "Bookmarks" ); |
@@ -655,9 +660,9 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
655 | config.setGroup( "Bookmarks" ); | 660 | config.setGroup( "Bookmarks" ); |
656 | 661 | ||
657 | // qDebug("<<<<<< %d, %d", Lview->PageSize(), Lview->lastRow() - Lview->topRow() ); | 662 | // odebug << "<<<<<< " << Lview->PageSize() << ", " << Lview->lastRow() - Lview->topRow() << "" << oendl; |
658 | 663 | ||
659 | QString itemString; | 664 | QString itemString; |
660 | 665 | ||
661 | qDebug("menu item %d", itemId); | 666 | odebug << "menu item " << itemId << "" << oendl; |
662 | QString tempTitle; | 667 | QString tempTitle; |
663 | QString s_Bmrkrow; | 668 | QString s_Bmrkrow; |
@@ -701,5 +706,5 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
701 | pageStopArray.resize(i_pageNum + 1); | 706 | pageStopArray.resize(i_pageNum + 1); |
702 | pageStopArray[i_pageNum ] = currentFilePos; | 707 | pageStopArray[i_pageNum ] = currentFilePos; |
703 | // qDebug("new page number %d, found at %d", i_pageNum, currentFilePos); | 708 | // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; |
704 | } | 709 | } |
705 | if(currentFilePos == bookmarkPosition) | 710 | if(currentFilePos == bookmarkPosition) |
@@ -730,5 +735,5 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
730 | } | 735 | } |
731 | 736 | ||
732 | qDebug("bookmark loaded"); | 737 | odebug << "bookmark loaded" << oendl; |
733 | setCaption(title); | 738 | setCaption(title); |
734 | } | 739 | } |
@@ -738,6 +743,6 @@ bool Gutenbrowser::load( const char *fileName) { | |||
738 | 743 | ||
739 | // QCopEnvelope ( "QPE/System", "busy()" ); | 744 | // QCopEnvelope ( "QPE/System", "busy()" ); |
740 | // qDebug("Title is already set as "+title); | 745 | // odebug << "Title is already set as "+title << oendl; |
741 | qDebug("sizeHint %d pageSize %d", sizeHint().height(),Lview->PageSize() ); | 746 | odebug << "sizeHint " << sizeHint().height() << " pageSize " << Lview->PageSize() << "" << oendl; |
742 | if( Lview->PageSize() < 4) { | 747 | if( Lview->PageSize() < 4) { |
743 | 748 | ||
@@ -745,5 +750,5 @@ bool Gutenbrowser::load( const char *fileName) { | |||
745 | Lview->setMinimumHeight( sizeHint().height() ); | 750 | Lview->setMinimumHeight( sizeHint().height() ); |
746 | pointSize = Lview->fontInfo().pointSize(); | 751 | pointSize = Lview->fontInfo().pointSize(); |
747 | qDebug("sizeHint %d point size %d", sizeHint().height(), pointSize); | 752 | odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl; |
748 | if(pointSize < 10) | 753 | if(pointSize < 10) |
749 | Lview->setFixedVisibleLines(19); | 754 | Lview->setFixedVisibleLines(19); |
@@ -763,5 +768,5 @@ bool Gutenbrowser::load( const char *fileName) { | |||
763 | i_pageNum = 1; | 768 | i_pageNum = 1; |
764 | // } | 769 | // } |
765 | qDebug("ready to open "+o_file); | 770 | odebug << "ready to open "+o_file << oendl; |
766 | 771 | ||
767 | if(f.isOpen()) f.close(); | 772 | if(f.isOpen()) f.close(); |
@@ -799,5 +804,5 @@ bool Gutenbrowser::load( const char *fileName) { | |||
799 | 804 | ||
800 | Lview->setMaxLines(Lview->PageSize()*2); | 805 | Lview->setMaxLines(Lview->PageSize()*2); |
801 | qDebug("Gulped %d", currentLine); | 806 | odebug << "Gulped " << currentLine << "" << oendl; |
802 | setCaption(title); | 807 | setCaption(title); |
803 | Lview->setAutoUpdate( TRUE); | 808 | Lview->setAutoUpdate( TRUE); |
@@ -806,5 +811,5 @@ bool Gutenbrowser::load( const char *fileName) { | |||
806 | 811 | ||
807 | // pages = (int)(( Lview->numLines() / Lview->editSize() ) / 2 ) +1; | 812 | // pages = (int)(( Lview->numLines() / Lview->editSize() ) / 2 ) +1; |
808 | //qDebug("number of pages %d", pages); | 813 | //odebug << "number of pages " << pages << "" << oendl; |
809 | 814 | ||
810 | loadCheck = true; | 815 | loadCheck = true; |
@@ -823,5 +828,5 @@ void Gutenbrowser::Search() { | |||
823 | // if( searchDlg->isHidden()) | 828 | // if( searchDlg->isHidden()) |
824 | { | 829 | { |
825 | qDebug("Starting search dialog"); | 830 | odebug << "Starting search dialog" << oendl; |
826 | searchDlg = new SearchDialog( this, "Etext Search", true); | 831 | searchDlg = new SearchDialog( this, "Etext Search", true); |
827 | searchDlg->setCaption( tr( "Etext Search" )); | 832 | searchDlg->setCaption( tr( "Etext Search" )); |
@@ -959,7 +964,7 @@ void Gutenbrowser::LibraryBtn() { | |||
959 | QString newestLibraryFile ="pgwhole.zip"; | 964 | QString newestLibraryFile ="pgwhole.zip"; |
960 | QString zipFile; | 965 | QString zipFile; |
961 | // qDebug("Local Library is %s ", local_library.latin1()); | 966 | // odebug << "Local Library is " << local_library << " " << oendl; |
962 | zipFile="/usr/bin/unzip"; | 967 | zipFile="/usr/bin/unzip"; |
963 | // qDebug("newestLibraryFile is %s ", newestLibraryFile.latin1()); | 968 | // odebug << "newestLibraryFile is " << newestLibraryFile << " " << oendl; |
964 | if( QFile::exists( local_library+newestLibraryFile)) { | 969 | if( QFile::exists( local_library+newestLibraryFile)) { |
965 | if( QFile::exists(zipFile) ) { | 970 | if( QFile::exists(zipFile) ) { |
@@ -990,5 +995,5 @@ void Gutenbrowser::LibraryBtn() { | |||
990 | listItemTitle = LibraryDlg->DlglistItemTitle; | 995 | listItemTitle = LibraryDlg->DlglistItemTitle; |
991 | file_name = LibraryDlg->File_Name; | 996 | file_name = LibraryDlg->File_Name; |
992 | // qDebug("title is being set as "+title); | 997 | // odebug << "title is being set as "+title << oendl; |
993 | title = listItemTitle; | 998 | title = listItemTitle; |
994 | 999 | ||
@@ -1012,5 +1017,5 @@ void Gutenbrowser::LibraryBtn() { | |||
1012 | if( file_name.find(".zip")) | 1017 | if( file_name.find(".zip")) |
1013 | { | 1018 | { |
1014 | qDebug("Found zip file\n"); | 1019 | odebug << "Found zip file\n" << oendl; |
1015 | // QStringList args; | 1020 | // QStringList args; |
1016 | // args="unzip"; | 1021 | // args="unzip"; |
@@ -1020,5 +1025,5 @@ void Gutenbrowser::LibraryBtn() { | |||
1020 | // args+=local_library; | 1025 | // args+=local_library; |
1021 | QString cmd = "/usr/bin/unzip -o " + local_library+file_name + " -d " + local_library; | 1026 | QString cmd = "/usr/bin/unzip -o " + local_library+file_name + " -d " + local_library; |
1022 | qDebug("Issuing the command "+ cmd); | 1027 | odebug << "Issuing the command "+ cmd << oendl; |
1023 | // unzipProc=new QProcess( this, "unzipProc" ); /// fark that idea! | 1028 | // unzipProc=new QProcess( this, "unzipProc" ); /// fark that idea! |
1024 | // unzipProc->start(); | 1029 | // unzipProc->start(); |
@@ -1063,5 +1068,5 @@ void Gutenbrowser::OpenBtn() { | |||
1063 | if( OpenDlg->exec() != 0) { | 1068 | if( OpenDlg->exec() != 0) { |
1064 | title = OpenDlg->openFileTitle; | 1069 | title = OpenDlg->openFileTitle; |
1065 | qDebug("title open as "+title); | 1070 | odebug << "title open as "+title << oendl; |
1066 | file_name = OpenDlg->file; | 1071 | file_name = OpenDlg->file; |
1067 | i_pageNum = 1; | 1072 | i_pageNum = 1; |
@@ -1070,5 +1075,5 @@ void Gutenbrowser::OpenBtn() { | |||
1070 | if(showMainList) { | 1075 | if(showMainList) { |
1071 | showMainList=FALSE; | 1076 | showMainList=FALSE; |
1072 | qDebug("ShowMainList is now false"); | 1077 | odebug << "ShowMainList is now false" << oendl; |
1073 | mainList->hide(); | 1078 | mainList->hide(); |
1074 | Lview->show(); | 1079 | Lview->show(); |
@@ -1079,5 +1084,5 @@ void Gutenbrowser::OpenBtn() { | |||
1079 | load(file_name); | 1084 | load(file_name); |
1080 | } else { | 1085 | } else { |
1081 | qDebug("file_name is empty!"); | 1086 | odebug << "file_name is empty!" << oendl; |
1082 | if(showMainList) { | 1087 | if(showMainList) { |
1083 | if(!Lview->isHidden()) | 1088 | if(!Lview->isHidden()) |
@@ -1245,5 +1250,5 @@ bool Gutenbrowser::getTitle( const char *file ) { | |||
1245 | config.setGroup( "Titles" ); | 1250 | config.setGroup( "Titles" ); |
1246 | title = config.readEntry(ramble, ""); | 1251 | title = config.readEntry(ramble, ""); |
1247 | // qDebug("(getTitle)title is being set as "+title); | 1252 | // odebug << "(getTitle)title is being set as "+title << oendl; |
1248 | } | 1253 | } |
1249 | } | 1254 | } |
@@ -1447,5 +1452,5 @@ void Gutenbrowser::keyPressEvent( QKeyEvent *e) { | |||
1447 | 1452 | ||
1448 | void Gutenbrowser::resizeEvent( QResizeEvent *ev) { | 1453 | void Gutenbrowser::resizeEvent( QResizeEvent *ev) { |
1449 | // qDebug("resize: %d,%d\n",ev->size().width(),ev->size().height()); | 1454 | // odebug << "resize: " << ev->size().width() << "," << ev->size().height() << "\n" << oendl; |
1450 | 1455 | ||
1451 | if( !LibraryDlg->isHidden()) | 1456 | if( !LibraryDlg->isHidden()) |
@@ -1477,5 +1482,5 @@ void Gutenbrowser::doOptions() { | |||
1477 | Ddir=optDlg->downloadDirEdit->text(); | 1482 | Ddir=optDlg->downloadDirEdit->text(); |
1478 | 1483 | ||
1479 | qDebug("writing library config"); | 1484 | odebug << "writing library config" << oendl; |
1480 | Config config("Gutenbrowser"); | 1485 | Config config("Gutenbrowser"); |
1481 | config.setGroup("General"); | 1486 | config.setGroup("General"); |
@@ -1494,5 +1499,5 @@ void Gutenbrowser::doOptions() { | |||
1494 | cmd+=Ddir.latin1(); | 1499 | cmd+=Ddir.latin1(); |
1495 | system(cmd); | 1500 | system(cmd); |
1496 | qDebug("Making new dir "+cmd); | 1501 | odebug << "Making new dir "+cmd << oendl; |
1497 | if(Ddir.right(1)!="/") { | 1502 | if(Ddir.right(1)!="/") { |
1498 | Ddir+="/"; | 1503 | Ddir+="/"; |
@@ -1510,5 +1515,5 @@ void Gutenbrowser::doOptions() { | |||
1510 | 1515 | ||
1511 | if(optDlg->fontDlg-> changedFonts) { | 1516 | if(optDlg->fontDlg-> changedFonts) { |
1512 | qDebug("Setting font"); | 1517 | odebug << "Setting font" << oendl; |
1513 | myFont=optDlg->fontDlg->selectedFont; | 1518 | myFont=optDlg->fontDlg->selectedFont; |
1514 | Lview->setFont( myFont); | 1519 | Lview->setFont( myFont); |
@@ -1516,9 +1521,9 @@ void Gutenbrowser::doOptions() { | |||
1516 | 1521 | ||
1517 | if(optDlg->useWordWrap_CheckBox->isChecked() ) { | 1522 | if(optDlg->useWordWrap_CheckBox->isChecked() ) { |
1518 | qDebug("WORD WRAP is set"); | 1523 | odebug << "WORD WRAP is set" << oendl; |
1519 | Lview->setWordWrap(QMultiLineEdit::WidgetWidth); | 1524 | Lview->setWordWrap(QMultiLineEdit::WidgetWidth); |
1520 | useWrap=true; | 1525 | useWrap=true; |
1521 | } else { | 1526 | } else { |
1522 | qDebug("Word wrap is NOT set"); | 1527 | odebug << "Word wrap is NOT set" << oendl; |
1523 | Lview->setWordWrap(QMultiLineEdit::NoWrap); | 1528 | Lview->setWordWrap(QMultiLineEdit::NoWrap); |
1524 | useWrap=false; | 1529 | useWrap=false; |
@@ -1579,6 +1584,6 @@ bool Gutenbrowser::setTitle() { | |||
1579 | void Gutenbrowser::OnNetworkDialog( const QString &/*networkUrl*/, const QString &/*output*/) | 1584 | void Gutenbrowser::OnNetworkDialog( const QString &/*networkUrl*/, const QString &/*output*/) |
1580 | { | 1585 | { |
1581 | // qDebug(networkUrl); | 1586 | // odebug << networkUrl << oendl; |
1582 | // qDebug(output); | 1587 | // odebug << output << oendl; |
1583 | // #ifndef Q_WS_QWS | 1588 | // #ifndef Q_WS_QWS |
1584 | // NetworkDialog *NetworkDlg; | 1589 | // NetworkDialog *NetworkDlg; |
@@ -1713,5 +1718,5 @@ void Gutenbrowser::cleanUp( ) | |||
1713 | 1718 | ||
1714 | QPEApplication::ungrabKeyboard(); | 1719 | QPEApplication::ungrabKeyboard(); |
1715 | // qDebug("Cleanup"); | 1720 | // odebug << "Cleanup" << oendl; |
1716 | if(f.isOpen()) f.close(); | 1721 | if(f.isOpen()) f.close(); |
1717 | } | 1722 | } |
@@ -1719,5 +1724,5 @@ void Gutenbrowser::cleanUp( ) | |||
1719 | void Gutenbrowser::fixKeys() | 1724 | void Gutenbrowser::fixKeys() |
1720 | { | 1725 | { |
1721 | qDebug("Attempting to fix keys"); | 1726 | odebug << "Attempting to fix keys" << oendl; |
1722 | 1727 | ||
1723 | } | 1728 | } |
@@ -1773,5 +1778,5 @@ void Gutenbrowser::listClickedSlot( QListBoxItem * index) { | |||
1773 | config.setGroup( "Files" ); | 1778 | config.setGroup( "Files" ); |
1774 | QString file = config.readEntry(temp, ""); | 1779 | QString file = config.readEntry(temp, ""); |
1775 | qDebug("About to load"); | 1780 | odebug << "About to load" << oendl; |
1776 | if( Lview->isVisible()) | 1781 | if( Lview->isVisible()) |
1777 | load(file); | 1782 | load(file); |
@@ -1814,9 +1819,9 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { | |||
1814 | DocLnk lnk; | 1819 | DocLnk lnk; |
1815 | lnk = DocLnk(frozenBoogers); | 1820 | lnk = DocLnk(frozenBoogers); |
1816 | // qDebug(lnk.file() ); | 1821 | // odebug << lnk.file() << oendl; |
1817 | title=lnk.comment(); | 1822 | title=lnk.comment(); |
1818 | load( lnk.file()); | 1823 | load( lnk.file()); |
1819 | this->show(); | 1824 | this->show(); |
1820 | // qDebug(title); | 1825 | // odebug << title << oendl; |
1821 | // qApp->processEvents(); | 1826 | // qApp->processEvents(); |
1822 | // repaint(); | 1827 | // repaint(); |
@@ -1874,5 +1879,5 @@ void Gutenbrowser::menuEditTitle() | |||
1874 | int currentItem = mainList->currentItem(); | 1879 | int currentItem = mainList->currentItem(); |
1875 | QString title_text = mainList->text( currentItem); | 1880 | QString title_text = mainList->text( currentItem); |
1876 | //qDebug("Selected "+title_text); | 1881 | //odebug << "Selected "+title_text << oendl; |
1877 | 1882 | ||
1878 | Config config("Gutenbrowser"); | 1883 | Config config("Gutenbrowser"); |
@@ -1888,13 +1893,13 @@ void Gutenbrowser::menuEditTitle() | |||
1888 | config.setGroup( "Titles" ); | 1893 | config.setGroup( "Titles" ); |
1889 | QString file_title = config.readEntry( s_filename, ""); | 1894 | QString file_title = config.readEntry( s_filename, ""); |
1890 | //qDebug("file_title is "+file_title); | 1895 | //odebug << "file_title is "+file_title << oendl; |
1891 | if(title_text == file_title ) { | 1896 | if(title_text == file_title ) { |
1892 | // selFile = s_filename; | 1897 | // selFile = s_filename; |
1893 | //qDebug("Edit: "+ file_title ); | 1898 | //odebug << "Edit: "+ file_title << oendl; |
1894 | i=i_numofFiles+1; | 1899 | i=i_numofFiles+1; |
1895 | Edit_Title *titleEdit; | 1900 | Edit_Title *titleEdit; |
1896 | titleEdit = new Edit_Title(this,file_title ,TRUE); | 1901 | titleEdit = new Edit_Title(this,file_title ,TRUE); |
1897 | if(titleEdit->exec() !=0) { | 1902 | if(titleEdit->exec() !=0) { |
1898 | //qDebug(titleEdit->newTitle); | 1903 | //odebug << titleEdit->newTitle << oendl; |
1899 | config.writeEntry( s_filename, titleEdit->newTitle); | 1904 | config.writeEntry( s_filename, titleEdit->newTitle); |
1900 | mainList->removeItem(currentItem); | 1905 | mainList->removeItem(currentItem); |
@@ -1912,5 +1917,5 @@ void Gutenbrowser::menuEditTitle() | |||
1912 | 1917 | ||
1913 | bool Gutenbrowser::UnZipIt(const QString &zipFile) { | 1918 | bool Gutenbrowser::UnZipIt(const QString &zipFile) { |
1914 | qDebug(zipFile); | 1919 | odebug << zipFile << oendl; |
1915 | #ifndef Q_WS_QWS | 1920 | #ifndef Q_WS_QWS |
1916 | if( QFile::exists( zipFile)) { // TODO findsome other way of dealingwithzip files. | 1921 | if( QFile::exists( zipFile)) { // TODO findsome other way of dealingwithzip files. |
@@ -1924,9 +1929,9 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1924 | // thatFile=zipFile.left(4); | 1929 | // thatFile=zipFile.left(4); |
1925 | // } | 1930 | // } |
1926 | // qDebug((const char*)local_library.latin1()); | 1931 | // odebug << (const char*)local_library.latin1() << oendl; |
1927 | QString cmd; | 1932 | QString cmd; |
1928 | #if defined(_WS_X11_) | 1933 | #if defined(_WS_X11_) |
1929 | if( chdir((const char*)local_library.latin1())!=0) | 1934 | if( chdir((const char*)local_library.latin1())!=0) |
1930 | qDebug("chdir failed."); | 1935 | odebug << "chdir failed." << oendl; |
1931 | cmd = "gunzip -S .zip " + local_library+zipFile; | 1936 | cmd = "gunzip -S .zip " + local_library+zipFile; |
1932 | //cmd = "gunzip -d " + zipFile /*newestLibraryFile */+" -d " + local_library; | 1937 | //cmd = "gunzip -d " + zipFile /*newestLibraryFile */+" -d " + local_library; |
@@ -1934,5 +1939,5 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1934 | #ifdef Q_WS_QWS | 1939 | #ifdef Q_WS_QWS |
1935 | if( chdir((const char*)local_library.latin1())!=0) | 1940 | if( chdir((const char*)local_library.latin1())!=0) |
1936 | qDebug("chdir failed."); | 1941 | odebug << "chdir failed." << oendl; |
1937 | cmd = "unzip " + local_library+zipFile; | 1942 | cmd = "unzip " + local_library+zipFile; |
1938 | // cmd = "/usr/bin/unzip -o " + local_library+zipFile +" -d /usr/share/doc/gutenbrowser" ;//+ local_library; | 1943 | // cmd = "/usr/bin/unzip -o " + local_library+zipFile +" -d /usr/share/doc/gutenbrowser" ;//+ local_library; |
@@ -1943,5 +1948,5 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1943 | if (exit==QMessageBox::Yes) { | 1948 | if (exit==QMessageBox::Yes) { |
1944 | #if defined(_WS_X11_)// | 1949 | #if defined(_WS_X11_)// |
1945 | qDebug("Issuing the command "+cmd); | 1950 | odebug << "Issuing the command "+cmd << oendl; |
1946 | system( cmd); | 1951 | system( cmd); |
1947 | if( QFile::exists(thatFile)) | 1952 | if( QFile::exists(thatFile)) |
@@ -1949,12 +1954,12 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1949 | if(isPgWhole) { | 1954 | if(isPgWhole) { |
1950 | if( rename("pgwhole","PGWHOLE.TXT") !=0) | 1955 | if( rename("pgwhole","PGWHOLE.TXT") !=0) |
1951 | qDebug("rename failed"); | 1956 | odebug << "rename failed" << oendl; |
1952 | } else { | 1957 | } else { |
1953 | if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) | 1958 | if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) |
1954 | qDebug("rename failed"); | 1959 | odebug << "rename failed" << oendl; |
1955 | } | 1960 | } |
1956 | #endif | 1961 | #endif |
1957 | #ifdef Q_WS_QWS | 1962 | #ifdef Q_WS_QWS |
1958 | qDebug("Issuing the command "+cmd); | 1963 | odebug << "Issuing the command "+cmd << oendl; |
1959 | system( cmd); | 1964 | system( cmd); |
1960 | if( QFile::exists(thatFile)) | 1965 | if( QFile::exists(thatFile)) |
@@ -1962,8 +1967,8 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1962 | if(isPgWhole) { | 1967 | if(isPgWhole) { |
1963 | if( rename("pgwhole","PGWHOLE.TXT") !=0) | 1968 | if( rename("pgwhole","PGWHOLE.TXT") !=0) |
1964 | qDebug("rename failed"); | 1969 | odebug << "rename failed" << oendl; |
1965 | } else { | 1970 | } else { |
1966 | if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) | 1971 | if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) |
1967 | qDebug("rename failed"); | 1972 | odebug << "rename failed" << oendl; |
1968 | } | 1973 | } |
1969 | #endif | 1974 | #endif |
@@ -1972,5 +1977,5 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1972 | } | 1977 | } |
1973 | else if(exit==QMessageBox::No) { | 1978 | else if(exit==QMessageBox::No) { |
1974 | // qDebug("unzip"); | 1979 | // odebug << "unzip" << oendl; |
1975 | return false; | 1980 | return false; |
1976 | } | 1981 | } |
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp index c9149ac..a226258 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | |||
@@ -12,7 +12,10 @@ | |||
12 | * (at your option) any later version. * | 12 | * (at your option) any later version. * |
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | |||
14 | //#include "gutenbrowserData.h" | 15 | //#include "gutenbrowserData.h" |
15 | #include "gutenbrowser.h" | 16 | #include "gutenbrowser.h" |
16 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
17 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
18 | #include <qpe/fontdatabase.h> | 21 | #include <qpe/fontdatabase.h> |
@@ -21,4 +24,5 @@ | |||
21 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
22 | 25 | ||
26 | /* QT */ | ||
23 | #include <qfontinfo.h> | 27 | #include <qfontinfo.h> |
24 | #include <qtoolbutton.h> | 28 | #include <qtoolbutton.h> |
@@ -40,5 +44,5 @@ void Gutenbrowser::initSlots() { | |||
40 | 44 | ||
41 | void Gutenbrowser::initConfig() { | 45 | void Gutenbrowser::initConfig() { |
42 | //qDebug("Starting configuration."); | 46 | //odebug << "Starting configuration." << oendl; |
43 | QDir library(local_library); | 47 | QDir library(local_library); |
44 | if ( !library.exists()) { | 48 | if ( !library.exists()) { |
@@ -58,5 +62,5 @@ void Gutenbrowser::initConfig() { | |||
58 | 62 | ||
59 | } | 63 | } |
60 | // qDebug( "init file is %s",iniFile.latin1()); | 64 | // odebug << "init file is " << iniFile << "" << oendl; |
61 | 65 | ||
62 | #ifdef Q_WS_QWS | 66 | #ifdef Q_WS_QWS |
@@ -148,7 +152,7 @@ void Gutenbrowser::initConfig() { | |||
148 | if(qExit=="TRUE") { | 152 | if(qExit=="TRUE") { |
149 | b_queryExit=TRUE; | 153 | b_queryExit=TRUE; |
150 | // qDebug("Please query before leaving the library."); | 154 | // odebug << "Please query before leaving the library." << oendl; |
151 | } else { | 155 | } else { |
152 | // qDebug("Please DO NOT query before leaving the library."); | 156 | // odebug << "Please DO NOT query before leaving the library." << oendl; |
153 | b_queryExit=FALSE; | 157 | b_queryExit=FALSE; |
154 | } | 158 | } |
@@ -162,5 +166,5 @@ void Gutenbrowser::initConfig() { | |||
162 | void Gutenbrowser::initMenuBar() | 166 | void Gutenbrowser::initMenuBar() |
163 | { | 167 | { |
164 | // qDebug("Starting menu init."); | 168 | // odebug << "Starting menu init." << oendl; |
165 | // menuBar entry fileMenu | 169 | // menuBar entry fileMenu |
166 | menubar = new QPEMenuBar(this); | 170 | menubar = new QPEMenuBar(this); |
@@ -208,5 +212,5 @@ void Gutenbrowser::initMenuBar() | |||
208 | void Gutenbrowser::initButtonBar() | 212 | void Gutenbrowser::initButtonBar() |
209 | { | 213 | { |
210 | //qDebug("Starting buttonbar init."); | 214 | //odebug << "Starting buttonbar init." << oendl; |
211 | 215 | ||
212 | OpenButton = new QPushButton( this, "OpenButton" ); | 216 | OpenButton = new QPushButton( this, "OpenButton" ); |
@@ -242,5 +246,5 @@ void Gutenbrowser::initButtonBar() | |||
242 | 246 | ||
243 | InfoBar = new QPushButton( this, "Info_Bar" ); | 247 | InfoBar = new QPushButton( this, "Info_Bar" ); |
244 | // qDebug("Infobar"); | 248 | // odebug << "Infobar" << oendl; |
245 | // if(!useSplitter) { | 249 | // if(!useSplitter) { |
246 | 250 | ||
@@ -294,5 +298,5 @@ void Gutenbrowser::initView() | |||
294 | QString italic=cfg.readEntry("Italic","FALSE"); | 298 | QString italic=cfg.readEntry("Italic","FALSE"); |
295 | if(italic=="TRUE") { | 299 | if(italic=="TRUE") { |
296 | qDebug("Set Italic font"); | 300 | odebug << "Set Italic font" << oendl; |
297 | defaultFont = fdb.font(family,"Regular",i_size,charSet); //workaround | 301 | defaultFont = fdb.font(family,"Regular",i_size,charSet); //workaround |
298 | defaultFont.setItalic(TRUE); | 302 | defaultFont.setItalic(TRUE); |
diff --git a/noncore/apps/opie-gutenbrowser/helpme.cpp b/noncore/apps/opie-gutenbrowser/helpme.cpp index 6a9b8c0..53e0236 100644 --- a/noncore/apps/opie-gutenbrowser/helpme.cpp +++ b/noncore/apps/opie-gutenbrowser/helpme.cpp | |||
@@ -15,13 +15,18 @@ | |||
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #include <qpe/qcopenvelope_qws.h> | ||
18 | #include <qpe/qpeapplication.h> | ||
19 | 17 | ||
20 | #include "helpme.h" | 18 | #include "helpme.h" |
21 | #include "helpwindow.h" | 19 | #include "helpwindow.h" |
22 | 20 | ||
21 | /* OPIE */ | ||
22 | #include <qpe/qcopenvelope_qws.h> | ||
23 | #include <qpe/qpeapplication.h> | ||
24 | #include <opie2/odebug.h> | ||
25 | |||
26 | /* QT */ | ||
23 | #include <qprogressdialog.h> | 27 | #include <qprogressdialog.h> |
24 | #include <qlayout.h> | 28 | #include <qlayout.h> |
25 | 29 | ||
30 | /* STD */ | ||
26 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
27 | #include <unistd.h> | 32 | #include <unistd.h> |
@@ -112,5 +117,5 @@ void HelpMe::help() | |||
112 | QString msg ; | 117 | QString msg ; |
113 | msg=QPEApplication::qpeDir()+"help/html/gutenbrowser-index.html"; // or where ever this ends up to be | 118 | msg=QPEApplication::qpeDir()+"help/html/gutenbrowser-index.html"; // or where ever this ends up to be |
114 | qDebug(msg); | 119 | odebug << msg << oendl; |
115 | QString url = "file://"+msg; | 120 | QString url = "file://"+msg; |
116 | goGetit( url); | 121 | goGetit( url); |
diff --git a/noncore/apps/opie-gutenbrowser/main.cpp b/noncore/apps/opie-gutenbrowser/main.cpp index 5c3348c..71c836d 100644 --- a/noncore/apps/opie-gutenbrowser/main.cpp +++ b/noncore/apps/opie-gutenbrowser/main.cpp | |||
@@ -38,5 +38,5 @@ OPIE_EXPORT_APP( OApplicationFactory<Gutenbrowser> ) | |||
38 | // // case 'v': // help | 38 | // // case 'v': // help |
39 | // // printf("Gutenbrowser: "VERSION"\n"); | 39 | // // printf("Gutenbrowser: "VERSION"\n"); |
40 | // // // qDebug("Gutenbrowser: "VERSION); | 40 | // // // odebug << "Gutenbrowser: "VERSION << oendl; |
41 | // // // return 0; | 41 | // // // return 0; |
42 | // // break; | 42 | // // break; |
diff --git a/noncore/apps/opie-gutenbrowser/openetext.cpp b/noncore/apps/opie-gutenbrowser/openetext.cpp index bd44ce6..0267416 100644 --- a/noncore/apps/opie-gutenbrowser/openetext.cpp +++ b/noncore/apps/opie-gutenbrowser/openetext.cpp | |||
@@ -19,4 +19,5 @@ | |||
19 | /* OPIE */ | 19 | /* OPIE */ |
20 | #include <opie2/ofiledialog.h> | 20 | #include <opie2/ofiledialog.h> |
21 | #include <opie2/odebug.h> | ||
21 | #include <qpe/applnk.h> | 22 | #include <qpe/applnk.h> |
22 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
@@ -24,13 +25,15 @@ | |||
24 | using namespace Opie::Ui; | 25 | using namespace Opie::Ui; |
25 | 26 | ||
26 | #include <stdlib.h> | 27 | /* QT */ |
27 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
28 | #include <qfileinfo.h> | 29 | #include <qfileinfo.h> |
29 | 30 | ||
31 | /* STD */ | ||
30 | #if defined(_WS_WIN_) | 32 | #if defined(_WS_WIN_) |
31 | #include <windows.h> | 33 | #include <windows.h> |
32 | #else | 34 | #else |
33 | #include <unistd.h> | 35 | #include <unistd.h> |
34 | #include "sys/stat.h" | 36 | #include <stdlib.h> |
37 | #include <sys/stat.h> | ||
35 | #endif | 38 | #endif |
36 | 39 | ||
@@ -135,5 +138,5 @@ OpenFileButton->setDown(TRUE); | |||
135 | filer = str; | 138 | filer = str; |
136 | 139 | ||
137 | qDebug("Open file: "+str); | 140 | odebug << "Open file: "+str << oendl; |
138 | 141 | ||
139 | // QStringList::ConstIterator f; | 142 | // QStringList::ConstIterator f; |
@@ -165,5 +168,5 @@ OpenFileButton->setDown(TRUE); | |||
165 | s_fileName = s_fileName.left( s_fileName.length() - 4); | 168 | s_fileName = s_fileName.left( s_fileName.length() - 4); |
166 | if( chdir((const char*)local_library.latin1())!=0) | 169 | if( chdir((const char*)local_library.latin1())!=0) |
167 | qDebug("chdir failed.");// QString cmd = "gunzip -d " + filer + " -d " + local_library; | 170 | odebug << "chdir failed." << oendl; // QString cmd = "gunzip -d " + filer + " -d " + local_library; |
168 | cmd = "gunzip -S .zip " + filer; | 171 | cmd = "gunzip -S .zip " + filer; |
169 | fileName = local_library + s_fileName + ".txt"; | 172 | fileName = local_library + s_fileName + ".txt"; |
@@ -172,10 +175,10 @@ OpenFileButton->setDown(TRUE); | |||
172 | // this renames the .txt to .etx!! | 175 | // this renames the .txt to .etx!! |
173 | else /*if( s_fileName.right(4) == ".txt" || if( s_fileName.right(4) == ".TXT"))*/ { | 176 | else /*if( s_fileName.right(4) == ".txt" || if( s_fileName.right(4) == ".TXT"))*/ { |
174 | // qDebug("Filename is "+fileName); | 177 | // odebug << "Filename is "+fileName << oendl; |
175 | s_fileName = fileName; | 178 | s_fileName = fileName; |
176 | s_fileName.replace( s_fileName.length()-3,3,"gtn");// s_fileName.replace( s_fileName.length()-3,3,"etx"); | 179 | s_fileName.replace( s_fileName.length()-3,3,"gtn");// s_fileName.replace( s_fileName.length()-3,3,"etx"); |
177 | rename(fileName.latin1(),s_fileName.latin1()); | 180 | rename(fileName.latin1(),s_fileName.latin1()); |
178 | fileName = s_fileName; | 181 | fileName = s_fileName; |
179 | // qDebug("Filename is now "+fileName); | 182 | // odebug << "Filename is now "+fileName << oendl; |
180 | } | 183 | } |
181 | } else | 184 | } else |
@@ -188,14 +191,14 @@ OpenFileButton->setDown(TRUE); | |||
188 | name_file = name_file.left(name_file.length() - 4); | 191 | name_file = name_file.left(name_file.length() - 4); |
189 | 192 | ||
190 | qDebug("Setting doclink"); | 193 | odebug << "Setting doclink" << oendl; |
191 | DocLnk lnk; | 194 | DocLnk lnk; |
192 | qDebug("name is " + name_file); | 195 | odebug << "name is " + name_file << oendl; |
193 | lnk.setName(name_file); //sets file name | 196 | lnk.setName(name_file); //sets file name |
194 | qDebug("Title is "+title); | 197 | odebug << "Title is "+title << oendl; |
195 | lnk.setComment(title); | 198 | lnk.setComment(title); |
196 | 199 | ||
197 | QListBox_1->clear(); | 200 | QListBox_1->clear(); |
198 | getTitles(); | 201 | getTitles(); |
199 | qDebug("Filename is "+fileName); | 202 | odebug << "Filename is "+fileName << oendl; |
200 | lnk.setFile(fileName); //sets File property | 203 | lnk.setFile(fileName); //sets File property |
201 | lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D | 204 | lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D |
@@ -203,5 +206,5 @@ OpenFileButton->setDown(TRUE); | |||
203 | lnk.setIcon("gutenbrowser/Gutenbrowser"); | 206 | lnk.setIcon("gutenbrowser/Gutenbrowser"); |
204 | if(!lnk.writeLink()) | 207 | if(!lnk.writeLink()) |
205 | qDebug("Writing doclink did not work"); | 208 | odebug << "Writing doclink did not work" << oendl; |
206 | 209 | ||
207 | } // end of for each file name.... | 210 | } // end of for each file name.... |
@@ -220,5 +223,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
220 | QFileInfo fi(filename); | 223 | QFileInfo fi(filename); |
221 | name = fi.fileName(); | 224 | name = fi.fileName(); |
222 | qDebug("filename to open is " + name); | 225 | odebug << "filename to open is " + name << oendl; |
223 | QFile indexLib( filename); | 226 | QFile indexLib( filename); |
224 | bool findCheck = FALSE; | 227 | bool findCheck = FALSE; |
@@ -226,5 +229,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
226 | 229 | ||
227 | if ( indexLib.open( IO_ReadOnly) ) { | 230 | if ( indexLib.open( IO_ReadOnly) ) { |
228 | qDebug("file opened successfully"); | 231 | odebug << "file opened successfully" << oendl; |
229 | QTextStream indexStream( &indexLib ); | 232 | QTextStream indexStream( &indexLib ); |
230 | QString target = "Project Gutenberg Etext of"; | 233 | QString target = "Project Gutenberg Etext of"; |
@@ -240,5 +243,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
240 | title = title.left( title.find( "*",0, TRUE)); | 243 | title = title.left( title.find( "*",0, TRUE)); |
241 | title = title.stripWhiteSpace (); | 244 | title = title.stripWhiteSpace (); |
242 | // qDebug("Found the title 1 and it is %s", title.latin1()); | 245 | // odebug << "Found the title 1 and it is " << title << "" << oendl; |
243 | // QListBox_1->insertItem ( title); | 246 | // QListBox_1->insertItem ( title); |
244 | } | 247 | } |
@@ -248,5 +251,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
248 | title = title.left( title.find( "*",0, TRUE)); | 251 | title = title.left( title.find( "*",0, TRUE)); |
249 | title = title.stripWhiteSpace (); | 252 | title = title.stripWhiteSpace (); |
250 | // qDebug("Found the title 2 and it is %s", title.latin1()); | 253 | // odebug << "Found the title 2 and it is " << title << "" << oendl; |
251 | // QListBox_1->insertItem ( title); | 254 | // QListBox_1->insertItem ( title); |
252 | } | 255 | } |
@@ -256,5 +259,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
256 | title = title.left( title.find( "*",0, TRUE)); | 259 | title = title.left( title.find( "*",0, TRUE)); |
257 | title = title.stripWhiteSpace (); | 260 | title = title.stripWhiteSpace (); |
258 | // qDebug("Found the title 3 and it is %s", title.latin1()); | 261 | // odebug << "Found the title 3 and it is " << title << "" << oendl; |
259 | } | 262 | } |
260 | if( indexLine.find( target4, 0, TRUE) > -1 && !findCheck) { | 263 | if( indexLine.find( target4, 0, TRUE) > -1 && !findCheck) { |
@@ -263,5 +266,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
263 | title = title.left( title.find( "*",0, TRUE)); | 266 | title = title.left( title.find( "*",0, TRUE)); |
264 | title = title.stripWhiteSpace (); | 267 | title = title.stripWhiteSpace (); |
265 | // qDebug("Found the title 4 and it is %s", title.latin1()); | 268 | // odebug << "Found the title 4 and it is " << title << "" << oendl; |
266 | } | 269 | } |
267 | } //endof file | 270 | } //endof file |
@@ -269,5 +272,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
269 | 272 | ||
270 | if( !findCheck || title.length() < 2) { | 273 | if( !findCheck || title.length() < 2) { |
271 | qDebug("Trying hard to find title from GUTINDEX.ALL"); | 274 | odebug << "Trying hard to find title from GUTINDEX.ALL" << oendl; |
272 | title = titleFromLibrary( filename); | 275 | title = titleFromLibrary( filename); |
273 | findCheck = TRUE; | 276 | findCheck = TRUE; |
@@ -294,5 +297,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
294 | } | 297 | } |
295 | if(title.length()<3) { | 298 | if(title.length()<3) { |
296 | // qDebug("title is empty"); | 299 | // odebug << "title is empty" << oendl; |
297 | title="Unknown"; | 300 | title="Unknown"; |
298 | } | 301 | } |
@@ -344,5 +347,5 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
344 | // title = indexLine.mid( 26, indexLine.length() ); | 347 | // title = indexLine.mid( 26, indexLine.length() ); |
345 | title = title.stripWhiteSpace (); | 348 | title = title.stripWhiteSpace (); |
346 | // qDebug("Finally Found the title and it is\n %s", title.latin1()); | 349 | // odebug << "Finally Found the title and it is\n " << title << "" << oendl; |
347 | // QListBox_1->insertItem ( title); | 350 | // QListBox_1->insertItem ( title); |
348 | } | 351 | } |
@@ -350,5 +353,5 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
350 | } | 353 | } |
351 | else | 354 | else |
352 | qDebug("Error opening library index "+ local_index); | 355 | odebug << "Error opening library index "+ local_index << oendl; |
353 | return title; | 356 | return title; |
354 | } | 357 | } |
@@ -415,5 +418,5 @@ void OpenEtext::removeSelection() | |||
415 | if(title_text == file_title) { | 418 | if(title_text == file_title) { |
416 | rem=i; | 419 | rem=i; |
417 | //qDebug("file title to remove is "+file_title); | 420 | //odebug << "file title to remove is "+file_title << oendl; |
418 | selFile = s_filename; | 421 | selFile = s_filename; |
419 | config.removeEntry( s_filename); //removes file=title | 422 | config.removeEntry( s_filename); //removes file=title |
@@ -483,5 +486,5 @@ void OpenEtext::editTitle() { | |||
483 | int currentItem=QListBox_1->currentItem(); | 486 | int currentItem=QListBox_1->currentItem(); |
484 | QString title_text = QListBox_1->text( currentItem); | 487 | QString title_text = QListBox_1->text( currentItem); |
485 | //qDebug("Selected "+title_text); | 488 | //odebug << "Selected "+title_text << oendl; |
486 | 489 | ||
487 | Config config("Gutenbrowser"); | 490 | Config config("Gutenbrowser"); |
@@ -497,13 +500,13 @@ void OpenEtext::editTitle() { | |||
497 | config.setGroup( "Titles" ); | 500 | config.setGroup( "Titles" ); |
498 | QString file_title = config.readEntry( s_filename, ""); | 501 | QString file_title = config.readEntry( s_filename, ""); |
499 | //qDebug("file_title is "+file_title); | 502 | //odebug << "file_title is "+file_title << oendl; |
500 | if(title_text == file_title ) { | 503 | if(title_text == file_title ) { |
501 | selFile = s_filename; | 504 | selFile = s_filename; |
502 | //qDebug("Edit: "+ file_title ); | 505 | //odebug << "Edit: "+ file_title << oendl; |
503 | i=i_numofFiles+1; | 506 | i=i_numofFiles+1; |
504 | Edit_Title *titleEdit; | 507 | Edit_Title *titleEdit; |
505 | titleEdit = new Edit_Title(this,file_title ,TRUE); | 508 | titleEdit = new Edit_Title(this,file_title ,TRUE); |
506 | if(titleEdit->exec() !=0) { | 509 | if(titleEdit->exec() !=0) { |
507 | //qDebug(titleEdit->newTitle); | 510 | //odebug << titleEdit->newTitle << oendl; |
508 | config.writeEntry( s_filename, titleEdit->newTitle); | 511 | config.writeEntry( s_filename, titleEdit->newTitle); |
509 | QListBox_1->removeItem(currentItem); | 512 | QListBox_1->removeItem(currentItem); |
diff --git a/noncore/apps/opie-gutenbrowser/optionsDialog.cpp b/noncore/apps/opie-gutenbrowser/optionsDialog.cpp index bfd9c26..8cc83da 100644 --- a/noncore/apps/opie-gutenbrowser/optionsDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/optionsDialog.cpp | |||
@@ -14,15 +14,17 @@ | |||
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | #include "optionsDialog.h" | ||
17 | #include <qpe/config.h> | ||
18 | #include "fontDialog.h" | ||
19 | 16 | ||
20 | // #include <unistd.h> | ||
21 | // #include <stdio.h> | ||
22 | // #include <stdlib.h> | ||
23 | 17 | ||
18 | #include "optionsDialog.h" | ||
19 | #include "fontDialog.h" | ||
24 | //#include "ftpsitedlg.h" | 20 | //#include "ftpsitedlg.h" |
25 | //#include "browserDialog.h" | 21 | //#include "browserDialog.h" |
26 | //#define Inherited QDialog | 22 | //#define Inherited QDialog |
23 | |||
24 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
26 | #include <qpe/config.h> | ||
27 | |||
28 | /* QT */ | ||
27 | #include <qfont.h> | 29 | #include <qfont.h> |
28 | #include <qcheckbox.h> | 30 | #include <qcheckbox.h> |
@@ -39,4 +41,10 @@ | |||
39 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
40 | #endif | 42 | #endif |
43 | |||
44 | /* STD */ | ||
45 | // #include <unistd.h> | ||
46 | // #include <stdio.h> | ||
47 | // #include <stdlib.h> | ||
48 | |||
41 | /* | 49 | /* |
42 | * The dialog will by default be modeless, unless you set 'modal' to | 50 | * The dialog will by default be modeless, unless you set 'modal' to |
@@ -61,5 +69,5 @@ optionsDialog::optionsDialog( QWidget* parent, const char* name, bool modal, WF | |||
61 | optionsDialog::~optionsDialog() | 69 | optionsDialog::~optionsDialog() |
62 | { | 70 | { |
63 | //qDebug("OnExit()"); | 71 | //odebug << "OnExit()" << oendl; |
64 | // writeConfig(); | 72 | // writeConfig(); |
65 | } | 73 | } |
@@ -126,9 +134,9 @@ void optionsDialog::getConfig() | |||
126 | if(qExit=="TRUE") { | 134 | if(qExit=="TRUE") { |
127 | cb_queryExit->setChecked(TRUE); | 135 | cb_queryExit->setChecked(TRUE); |
128 | qDebug("Config Setting b_qExit=TRUE;"); | 136 | odebug << "Config Setting b_qExit=TRUE;" << oendl; |
129 | b_qExit=TRUE; | 137 | b_qExit=TRUE; |
130 | } else { | 138 | } else { |
131 | cb_queryExit->setChecked(FALSE); | 139 | cb_queryExit->setChecked(FALSE); |
132 | qDebug("ConfigSetting b_qExit=FALSE;"); | 140 | odebug << "ConfigSetting b_qExit=FALSE;" << oendl; |
133 | b_qExit=FALSE; | 141 | b_qExit=FALSE; |
134 | } | 142 | } |
@@ -142,5 +150,5 @@ void optionsDialog::getConfig() | |||
142 | // // void optionsDialog::setStyle( int index) { | 150 | // // void optionsDialog::setStyle( int index) { |
143 | 151 | ||
144 | // // qDebug("Set style%d",index); | 152 | // // odebug << "Set style" << index << "" << oendl; |
145 | // // //int styleInt= index; | 153 | // // //int styleInt= index; |
146 | // // styleChanged=TRUE; | 154 | // // styleChanged=TRUE; |
@@ -168,13 +176,13 @@ void optionsDialog::slotQueryExit() | |||
168 | Config config("Gutenbrowser"); | 176 | Config config("Gutenbrowser"); |
169 | config.setGroup("General"); | 177 | config.setGroup("General"); |
170 | qDebug("writing queryExit"); | 178 | odebug << "writing queryExit" << oendl; |
171 | if(cb_queryExit->isChecked()) { | 179 | if(cb_queryExit->isChecked()) { |
172 | b_qExit=TRUE; | 180 | b_qExit=TRUE; |
173 | config.writeEntry("queryExit","TRUE"); | 181 | config.writeEntry("queryExit","TRUE"); |
174 | qDebug("WritingConfig queryExit=TRUE"); | 182 | odebug << "WritingConfig queryExit=TRUE" << oendl; |
175 | } else { | 183 | } else { |
176 | b_qExit=FALSE; | 184 | b_qExit=FALSE; |
177 | config.writeEntry("queryExit","FALSE"); | 185 | config.writeEntry("queryExit","FALSE"); |
178 | qDebug("WritingConfig queryExit=FALSE"); | 186 | odebug << "WritingConfig queryExit=FALSE" << oendl; |
179 | } | 187 | } |
180 | config.write(); | 188 | config.write(); |
@@ -188,5 +196,5 @@ void optionsDialog::slotQueryExit() | |||
188 | 196 | ||
189 | // void optionsDialog::lineEditChanged(const QString &editText) { | 197 | // void optionsDialog::lineEditChanged(const QString &editText) { |
190 | // qDebug(editText); | 198 | // odebug << editText << oendl; |
191 | // } | 199 | // } |
192 | 200 | ||
diff --git a/noncore/apps/opie-reader/Aportis.cpp b/noncore/apps/opie-reader/Aportis.cpp index 2f8cdc3..06f44a4 100644 --- a/noncore/apps/opie-reader/Aportis.cpp +++ b/noncore/apps/opie-reader/Aportis.cpp | |||
@@ -29,5 +29,5 @@ CList<Bkmk>* Aportis::getbkmklist() | |||
29 | char name[17]; | 29 | char name[17]; |
30 | name[16] = '\0'; | 30 | name[16] = '\0'; |
31 | // qDebug("Record:%d, Length:%u",i,recordlength(i)); | 31 | // odebug << "Record:" << i << ", Length:" << recordlength(i) << "" << oendl; |
32 | gotorecordnumber(i); | 32 | gotorecordnumber(i); |
33 | fread(name,1,16,fin); | 33 | fread(name,1,16,fin); |
@@ -36,5 +36,5 @@ CList<Bkmk>* Aportis::getbkmklist() | |||
36 | lcn ^= 0xa5a5a5a5; | 36 | lcn ^= 0xa5a5a5a5; |
37 | lcn = SwapLong(lcn); | 37 | lcn = SwapLong(lcn); |
38 | // qDebug("Bookmark:%s:%u", name,lcn); | 38 | // odebug << "Bookmark:" << name << ":" << lcn << "" << oendl; |
39 | tchar tname[17]; | 39 | tchar tname[17]; |
40 | memset(tname, 0, sizeof(tname)); | 40 | memset(tname, 0, sizeof(tname)); |
@@ -122,5 +122,5 @@ int Aportis::OpenFile(const char *src) | |||
122 | gotorecordnumber(0); | 122 | gotorecordnumber(0); |
123 | fread(&hdr0, sizeof(hdr0), 1, fin); | 123 | fread(&hdr0, sizeof(hdr0), 1, fin); |
124 | // qDebug("Version:%x", ntohs(hdr0.Version)); | 124 | // odebug << "Version:" << ntohs(hdr0.Version) << "" << oendl; |
125 | if (hdr0.Version && 0x0200) | 125 | if (hdr0.Version && 0x0200) |
126 | { | 126 | { |
@@ -183,5 +183,5 @@ int Aportis::OpenFile(const char *src) | |||
183 | outptr = 0; | 183 | outptr = 0; |
184 | refreshbuffer(); | 184 | refreshbuffer(); |
185 | // qDebug("Number of records:[%u,%u]", nRecs, nRecs2); | 185 | // odebug << "Number of records:[" << nRecs << "," << nRecs2 << "]" << oendl; |
186 | return ret; | 186 | return ret; |
187 | } | 187 | } |
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index 16bc1f1..480c240 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp | |||
@@ -218,13 +218,13 @@ CList<Bkmk>* BkmkFile::readall() | |||
218 | isUpgraded = false; | 218 | isUpgraded = false; |
219 | bl = readall00(read06); | 219 | bl = readall00(read06); |
220 | // qDebug("Correct version!"); | 220 | // odebug << "Correct version!" << oendl; |
221 | break; | 221 | break; |
222 | case 5: | 222 | case 5: |
223 | isUpgraded = true; | 223 | isUpgraded = true; |
224 | bl = readall00(read05); | 224 | bl = readall00(read05); |
225 | // qDebug("Known version!"); | 225 | // odebug << "Known version!" << oendl; |
226 | break; | 226 | break; |
227 | default: | 227 | default: |
228 | // qDebug("Unknown version!"); | 228 | // odebug << "Unknown version!" << oendl; |
229 | isUpgraded = true; | 229 | isUpgraded = true; |
230 | bl = readall00(read05); | 230 | bl = readall00(read05); |
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp index 4fbab93..68391b8 100644 --- a/noncore/apps/opie-reader/BuffDoc.cpp +++ b/noncore/apps/opie-reader/BuffDoc.cpp | |||
@@ -33,5 +33,5 @@ linkType BuffDoc::hyperlink(unsigned int n, QString& wrd) | |||
33 | void BuffDoc::locate(unsigned int n) | 33 | void BuffDoc::locate(unsigned int n) |
34 | { | 34 | { |
35 | // //qDebug("BuffDoc:locating:%u",n); | 35 | // //odebug << "BuffDoc:locating:" << n << "" << oendl; |
36 | lastword.empty(); | 36 | lastword.empty(); |
37 | lastsizes[0] = laststartline = n; | 37 | lastsizes[0] = laststartline = n; |
@@ -43,5 +43,5 @@ void BuffDoc::locate(unsigned int n) | |||
43 | // tchar linebuf[1024]; | 43 | // tchar linebuf[1024]; |
44 | if (exp != NULL) exp->locate(n); | 44 | if (exp != NULL) exp->locate(n); |
45 | // //qDebug("BuffDoc:Located"); | 45 | // //odebug << "BuffDoc:Located" << oendl; |
46 | } | 46 | } |
47 | 47 | ||
@@ -189,5 +189,5 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border) | |||
189 | } | 189 | } |
190 | else buff->empty(); | 190 | else buff->empty(); |
191 | // //qDebug("Buff:%s Lastword:%s", (const char*)toQString(buff->data()), (const char*)toQString(lastword.data())); | 191 | // //odebug << "Buff:" << toQString(buff->data()) << " Lastword:" << toQString(lastword.data()) << "" << oendl; |
192 | lastcheck = len = buff->length(); | 192 | lastcheck = len = buff->length(); |
193 | unsigned int slen = buff->width(len); | 193 | unsigned int slen = buff->width(len); |
@@ -323,6 +323,6 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, int cw, unsigned char _border) | |||
323 | int BuffDoc::openfile(QWidget* _parent, const char *src) | 323 | int BuffDoc::openfile(QWidget* _parent, const char *src) |
324 | { | 324 | { |
325 | // //qDebug("BuffDoc:Openfile:%s", src); | 325 | // //odebug << "BuffDoc:Openfile:" << src << "" << oendl; |
326 | // //qDebug("Trying aportis %x",exp); | 326 | // //odebug << "Trying aportis " << exp << "" << oendl; |
327 | if (exp != NULL) delete exp; | 327 | if (exp != NULL) delete exp; |
328 | lastword.empty(); | 328 | lastword.empty(); |
@@ -379,5 +379,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
379 | { | 379 | { |
380 | delete exp; | 380 | delete exp; |
381 | //qDebug("Trying ppms"); | 381 | //odebug << "Trying ppms" << oendl; |
382 | exp = new ppm_expander; | 382 | exp = new ppm_expander; |
383 | ret = exp->openfile(src); | 383 | ret = exp->openfile(src); |
@@ -387,5 +387,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
387 | delete exp; | 387 | delete exp; |
388 | exp = new Text; | 388 | exp = new Text; |
389 | // //qDebug("Trying text"); | 389 | // //odebug << "Trying text" << oendl; |
390 | ret = exp->openfile(src); | 390 | ret = exp->openfile(src); |
391 | } | 391 | } |
@@ -397,5 +397,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
397 | return ret; | 397 | return ret; |
398 | } | 398 | } |
399 | // //qDebug("Doing final open:%x:%x",exp,filt); | 399 | // //odebug << "Doing final open:" << exp << ":" << filt << "" << oendl; |
400 | 400 | ||
401 | lastword.empty(); | 401 | lastword.empty(); |
@@ -408,5 +408,5 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
408 | exp->locate(0); | 408 | exp->locate(0); |
409 | filt->setsource(exp); | 409 | filt->setsource(exp); |
410 | // //qDebug("BuffDoc:file opened"); | 410 | // //odebug << "BuffDoc:file opened" << oendl; |
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp index ec36fb2..b137ac3 100644 --- a/noncore/apps/opie-reader/CDrawBuffer.cpp +++ b/noncore/apps/opie-reader/CDrawBuffer.cpp | |||
@@ -41,5 +41,5 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) | |||
41 | { | 41 | { |
42 | int i; | 42 | int i; |
43 | // //qDebug("Trying 2"); | 43 | // //odebug << "Trying 2" << oendl; |
44 | len = rhs.len; | 44 | len = rhs.len; |
45 | m_maxstyle = rhs.m_maxstyle; | 45 | m_maxstyle = rhs.m_maxstyle; |
@@ -59,5 +59,5 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) | |||
59 | (*this)[i] = '\0'; | 59 | (*this)[i] = '\0'; |
60 | len = i; | 60 | len = i; |
61 | // //qDebug("Tried 2"); | 61 | // //odebug << "Tried 2" << oendl; |
62 | return *this; | 62 | return *this; |
63 | } | 63 | } |
@@ -209,5 +209,5 @@ int CDrawBuffer::width(int numchars, bool onscreen, int scwidth, unsigned char _ | |||
209 | { | 209 | { |
210 | QString nstr = str.mid(lastspace+1, nsp-lastspace); | 210 | QString nstr = str.mid(lastspace+1, nsp-lastspace); |
211 | // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); | 211 | // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; |
212 | int lw = fm.width(nstr); | 212 | int lw = fm.width(nstr); |
213 | cx += lw; | 213 | cx += lw; |
@@ -318,5 +318,5 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
318 | QFont f((currentstyle.isMono() && fc->hasCourier()) ? fc->fixedfontname() : fc->name(), fc->getsize(currentstyle), (currentstyle.isBold()) ? QFont::Bold : QFont::Normal, (currentstyle.isItalic()) ); | 318 | QFont f((currentstyle.isMono() && fc->hasCourier()) ? fc->fixedfontname() : fc->name(), fc->getsize(currentstyle), (currentstyle.isBold()) ? QFont::Bold : QFont::Normal, (currentstyle.isItalic()) ); |
319 | //f.setUnderline(currentstyle.isUnderline()); | 319 | //f.setUnderline(currentstyle.isUnderline()); |
320 | //if (currentstyle.isUnderline()) qDebug("UNDERLINE"); | 320 | //if (currentstyle.isUnderline()) odebug << "UNDERLINE" << oendl; |
321 | _p->setFont(f); | 321 | _p->setFont(f); |
322 | QString str = text.mid(textstart->start, end-textstart->start); | 322 | QString str = text.mid(textstart->start, end-textstart->start); |
@@ -409,5 +409,5 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
409 | int nexttoadd = (extraspace*spacenumber+spaces/2)/spaces - spacesofar; | 409 | int nexttoadd = (extraspace*spacenumber+spaces/2)/spaces - spacesofar; |
410 | QString nstr = str.mid(lastspace+1, nsp-lastspace); | 410 | QString nstr = str.mid(lastspace+1, nsp-lastspace); |
411 | // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); | 411 | // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; |
412 | int lw = fm.width(nstr); | 412 | int lw = fm.width(nstr); |
413 | _p->drawText( cx, _y+voffset, nstr); | 413 | _p->drawText( cx, _y+voffset, nstr); |
@@ -419,5 +419,5 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
419 | { | 419 | { |
420 | QString nstr = str.mid(lastspace+1, nsp-lastspace); | 420 | QString nstr = str.mid(lastspace+1, nsp-lastspace); |
421 | // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); | 421 | // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; |
422 | int lw = fm.width(nstr); | 422 | int lw = fm.width(nstr); |
423 | _p->drawText( cx, _y+voffset, nstr); | 423 | _p->drawText( cx, _y+voffset, nstr); |
@@ -471,12 +471,12 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) | |||
471 | currentstyle = textstart->style; | 471 | currentstyle = textstart->style; |
472 | /* | 472 | /* |
473 | if (currentstyle.isPicture()) qDebug("Passed thru picture"); | 473 | if (currentstyle.isPicture()) odebug << "Passed thru picture" << oendl; |
474 | if (currentstyle.getLink()) qDebug("Passed thru link"); | 474 | if (currentstyle.getLink()) odebug << "Passed thru link" << oendl; |
475 | //qDebug("islink:%d - %d", numchars, end); | 475 | //odebug << "islink:" << numchars << " - " << end << "" << oendl; |
476 | */ | 476 | */ |
477 | textstart = textend; | 477 | textstart = textend; |
478 | } | 478 | } |
479 | while (textend != segs.end() && end <= numchars); | 479 | while (textend != segs.end() && end <= numchars); |
480 | // if (currentstyle.isPicture()) qDebug("Clicked on picture"); | 480 | // if (currentstyle.isPicture()) odebug << "Clicked on picture" << oendl; |
481 | if (currentstyle.getPictureLink()) | 481 | if (currentstyle.getPictureLink()) |
482 | { | 482 | { |
@@ -540,5 +540,5 @@ void CDrawBuffer::resize() | |||
540 | { | 540 | { |
541 | int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10; | 541 | int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10; |
542 | //qDebug("ExtraSpace:%d", xt); | 542 | //odebug << "ExtraSpace:" << xt << "" << oendl; |
543 | m_ascent += xt; | 543 | m_ascent += xt; |
544 | m_lineSpacing += xt; | 544 | m_lineSpacing += xt; |
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp index d64abb4..b356ba5 100644 --- a/noncore/apps/opie-reader/QTReader.cpp +++ b/noncore/apps/opie-reader/QTReader.cpp | |||
@@ -81,5 +81,5 @@ QTReader::QTReader( const QString& filename, QWidget *parent=0, const tchar *nam | |||
81 | { | 81 | { |
82 | init(); | 82 | init(); |
83 | // // qDebug("Load_file(1)"); | 83 | // // odebug << "Load_file(1)" << oendl; |
84 | load_file((const tchar*)filename); | 84 | load_file((const tchar*)filename); |
85 | } | 85 | } |
@@ -92,5 +92,5 @@ void QTReader::mouseMoveEvent(QMouseEvent* _e) | |||
92 | mouseUpOn = !(_e->pos().x() == -1); | 92 | mouseUpOn = !(_e->pos().x() == -1); |
93 | 93 | ||
94 | qDebug("MouseMove:[%d, %d]", _e->pos().x(), _e->pos().y()); | 94 | odebug << "MouseMove:[" << _e->pos().x() << ", " << _e->pos().y() << "]" << oendl; |
95 | } | 95 | } |
96 | */ | 96 | */ |
@@ -105,5 +105,5 @@ void QTReader::mousePressEvent( QMouseEvent* _e ) | |||
105 | if (_e->button() == RightButton) | 105 | if (_e->button() == RightButton) |
106 | { | 106 | { |
107 | //qDebug("MousePress"); | 107 | //odebug << "MousePress" << oendl; |
108 | mouseUpOn = false; | 108 | mouseUpOn = false; |
109 | if (m_swapmouse) | 109 | if (m_swapmouse) |
@@ -318,5 +318,5 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse | |||
318 | { | 318 | { |
319 | wrd = toQString(t->data()+first, i - first); | 319 | wrd = toQString(t->data()+first, i - first); |
320 | // qDebug("Got %s", (const char *)wrd); | 320 | // odebug << "Got " << (const char *)wrd << "" << oendl; |
321 | break; | 321 | break; |
322 | } | 322 | } |
@@ -328,5 +328,5 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse | |||
328 | if (!wrd.isEmpty()) | 328 | if (!wrd.isEmpty()) |
329 | { | 329 | { |
330 | //qDebug("Selected:%s", (const char*)wrd); | 330 | //odebug << "Selected:" << wrd << "" << oendl; |
331 | emit OnWordSelected(wrd, locnarray[lineno], (m_twotouch) ? wrd : toQString(textarray[lineno]->data())); | 331 | emit OnWordSelected(wrd, locnarray[lineno], (m_twotouch) ? wrd : toQString(textarray[lineno]->data())); |
332 | } | 332 | } |
@@ -340,5 +340,5 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
340 | if (mouseUpOn) | 340 | if (mouseUpOn) |
341 | { | 341 | { |
342 | // qDebug("MouseRelease"); | 342 | // odebug << "MouseRelease" << oendl; |
343 | if (_e->x() > width() - m_border) | 343 | if (_e->x() > width() - m_border) |
344 | { | 344 | { |
@@ -395,5 +395,5 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
395 | case ePicture: | 395 | case ePicture: |
396 | { | 396 | { |
397 | // qDebug("Picture:%x", tgt); | 397 | // odebug << "Picture:" << tgt << "" << oendl; |
398 | QImage* pm = buffdoc.getPicture(tgt); | 398 | QImage* pm = buffdoc.getPicture(tgt); |
399 | if (pm != NULL) | 399 | if (pm != NULL) |
@@ -411,5 +411,5 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
411 | break; | 411 | break; |
412 | default: | 412 | default: |
413 | // qDebug("Unknown linktype"); | 413 | // odebug << "Unknown linktype" << oendl; |
414 | return; | 414 | return; |
415 | } | 415 | } |
@@ -697,5 +697,5 @@ void QTReader::setautoscroll(bool _sc) | |||
697 | if (!m_pipetarget.isEmpty()) | 697 | if (!m_pipetarget.isEmpty()) |
698 | { | 698 | { |
699 | // qDebug("Opening pipe to %s", (const char*)m_pipetarget); | 699 | // odebug << "Opening pipe to " << m_pipetarget << "" << oendl; |
700 | m_pipeout = popen((const char*)m_pipetarget, "w"); | 700 | m_pipeout = popen((const char*)m_pipetarget, "w"); |
701 | m_isPaused = false; | 701 | m_isPaused = false; |
@@ -824,15 +824,15 @@ void QTReader::drawFonts( QPainter *p ) | |||
824 | if (bDoUpdates) | 824 | if (bDoUpdates) |
825 | { | 825 | { |
826 | //qDebug("How refreshing..."); | 826 | //odebug << "How refreshing..." << oendl; |
827 | if (buffdoc.empty()) return; | 827 | if (buffdoc.empty()) return; |
828 | setfont(); | 828 | setfont(); |
829 | if (m_lastwidth != width()) | 829 | if (m_lastwidth != width()) |
830 | { | 830 | { |
831 | // qDebug("Not Optimised %d", m_lastwidth); | 831 | // odebug << "Not Optimised " << m_lastwidth << "" << oendl; |
832 | m_lastwidth = width(); | 832 | m_lastwidth = width(); |
833 | m_lastheight = height(); | 833 | m_lastheight = height(); |
834 | buffdoc.setwidth(m_lastwidth-2*m_border); | 834 | buffdoc.setwidth(m_lastwidth-2*m_border); |
835 | locate(pagelocate()); | 835 | locate(pagelocate()); |
836 | // qDebug("Not Optimised %d", m_lastwidth); | 836 | // odebug << "Not Optimised " << m_lastwidth << "" << oendl; |
837 | } | 837 | } |
838 | else | 838 | else |
@@ -841,5 +841,5 @@ void QTReader::drawFonts( QPainter *p ) | |||
841 | if (m_lastheight > newht) | 841 | if (m_lastheight > newht) |
842 | { | 842 | { |
843 | // qDebug("Optimised < %d %d %d", numlines, m_lastheight, newht); | 843 | // odebug << "Optimised < " << numlines << " " << m_lastheight << " " << newht << "" << oendl; |
844 | int ypos = 0; | 844 | int ypos = 0; |
845 | for (int i = 0; i < numlines; i++) | 845 | for (int i = 0; i < numlines; i++) |
@@ -852,10 +852,10 @@ void QTReader::drawFonts( QPainter *p ) | |||
852 | } | 852 | } |
853 | } | 853 | } |
854 | // qDebug("Optimised < %d", numlines); | 854 | // odebug << "Optimised < " << numlines << "" << oendl; |
855 | m_lastheight = newht; | 855 | m_lastheight = newht; |
856 | } | 856 | } |
857 | else if (m_lastheight < newht) | 857 | else if (m_lastheight < newht) |
858 | { | 858 | { |
859 | // qDebug("Optimised > %d", numlines); | 859 | // odebug << "Optimised > " << numlines << "" << oendl; |
860 | int ypos = 0; | 860 | int ypos = 0; |
861 | for (int i = 0; i <= numlines; i++) | 861 | for (int i = 0; i <= numlines; i++) |
@@ -864,5 +864,5 @@ void QTReader::drawFonts( QPainter *p ) | |||
864 | } | 864 | } |
865 | fillbuffer(numlines+1, ypos, newht); | 865 | fillbuffer(numlines+1, ypos, newht); |
866 | // qDebug("Optimised > %d", numlines); | 866 | // odebug << "Optimised > " << numlines << "" << oendl; |
867 | } | 867 | } |
868 | if (numlines > 0) | 868 | if (numlines > 0) |
@@ -898,5 +898,5 @@ void QTReader::drawFonts( QPainter *p ) | |||
898 | else | 898 | else |
899 | { | 899 | { |
900 | qDebug("Not so refreshing..."); | 900 | odebug << "Not so refreshing..." << oendl; |
901 | } | 901 | } |
902 | */ | 902 | */ |
@@ -1029,5 +1029,5 @@ void QTReader::paintEvent( QPaintEvent * ) | |||
1029 | void QTReader::resizeEvent( QResizeEvent * ) | 1029 | void QTReader::resizeEvent( QResizeEvent * ) |
1030 | { | 1030 | { |
1031 | // // qDebug("resize:(%u,%u)", width(), height()); | 1031 | // // odebug << "resize:(" << width() << "," << height() << ")" << oendl; |
1032 | // bgroup->move( width()-bgroup->width(), 0 ); | 1032 | // bgroup->move( width()-bgroup->width(), 0 ); |
1033 | } | 1033 | } |
@@ -1054,9 +1054,9 @@ bool QTReader::locate(unsigned long n) { | |||
1054 | buffdoc.unsuspend(); | 1054 | buffdoc.unsuspend(); |
1055 | buffdoc.locate(n); | 1055 | buffdoc.locate(n); |
1056 | // // qDebug("&buffdoc.located"); | 1056 | // // odebug << "&buffdoc.located" << oendl; |
1057 | fillbuffer(); | 1057 | fillbuffer(); |
1058 | // // qDebug("&Buffer filled"); | 1058 | // // odebug << "&Buffer filled" << oendl; |
1059 | update(); | 1059 | update(); |
1060 | // // qDebug("&Located"); | 1060 | // // odebug << "&Located" << oendl; |
1061 | return true; | 1061 | return true; |
1062 | } | 1062 | } |
@@ -1118,10 +1118,10 @@ bool QTReader::fillbuffer(int reuse, int ht, int newht) | |||
1118 | void QTReader::dopagedn() | 1118 | void QTReader::dopagedn() |
1119 | { | 1119 | { |
1120 | // qDebug("HEIGHT(2):%d", m_lastheight); | 1120 | // odebug << "HEIGHT(2):" << m_lastheight << "" << oendl; |
1121 | buffdoc.unsuspend(); | 1121 | buffdoc.unsuspend(); |
1122 | int skip = 0, ypos = 0; | 1122 | int skip = 0, ypos = 0; |
1123 | if (locate() != mylastpos) | 1123 | if (locate() != mylastpos) |
1124 | { | 1124 | { |
1125 | ////qDebug("Jumping to %u", mylastpos); | 1125 | ////odebug << "Jumping to " << mylastpos << "" << oendl; |
1126 | jumpto(mylastpos); | 1126 | jumpto(mylastpos); |
1127 | } | 1127 | } |
@@ -1314,11 +1314,11 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn) | |||
1314 | bRC = true; | 1314 | bRC = true; |
1315 | buffdoc.setContinuous(m_continuousDocument); | 1315 | buffdoc.setContinuous(m_continuousDocument); |
1316 | // // qDebug("buffdoc.openfile done"); | 1316 | // // odebug << "buffdoc.openfile done" << oendl; |
1317 | locate(lcn); | 1317 | locate(lcn); |
1318 | // // qDebug("buffdoc.locate done"); | 1318 | // // odebug << "buffdoc.locate done" << oendl; |
1319 | } | 1319 | } |
1320 | setfilter(getfilter()); | 1320 | setfilter(getfilter()); |
1321 | update(); | 1321 | update(); |
1322 | // // qDebug("Updated"); | 1322 | // // odebug << "Updated" << oendl; |
1323 | return bRC; | 1323 | return bRC; |
1324 | } | 1324 | } |
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index b072854..f18cb59 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp | |||
@@ -18,18 +18,46 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #include "useqpe.h" | 21 | #include "useqpe.h" |
21 | #include <qregexp.h> | 22 | #include "QTReader.h" |
22 | #include <qclipboard.h> | 23 | #include "GraphicWin.h" |
23 | #include <qwidgetstack.h> | 24 | #include "Bkmks.h" |
25 | #include "cbkmkselector.h" | ||
26 | #include "infowin.h" | ||
27 | #include "ToolbarPrefs.h" | ||
28 | #include "Prefs.h" | ||
29 | #include "CAnnoEdit.h" | ||
30 | #include "QFloatBar.h" | ||
31 | #include "FixedFont.h" | ||
32 | #include "URLDialog.h" | ||
33 | #include "QTReaderApp.h" | ||
34 | #include "CDrawBuffer.h" | ||
35 | #include "Filedata.h" | ||
36 | #include "opie.h" | ||
37 | #include "names.h" | ||
38 | #include "CEncoding_tables.h" | ||
39 | #include "CloseDialog.h" | ||
40 | |||
41 | /* OPIE */ | ||
42 | #include <opie2/odebug.h> | ||
43 | #ifdef USEQPE | ||
44 | #include <qpe/menubutton.h> | ||
45 | #include <qpe/fontdatabase.h> | ||
46 | #include <qpe/global.h> | ||
47 | #include <qpe/applnk.h> | ||
48 | #include <qpe/config.h> | ||
49 | #include <qpe/qcopenvelope_qws.h> | ||
50 | #endif | ||
51 | |||
52 | /* QT */ | ||
24 | #ifdef USEQPE | 53 | #ifdef USEQPE |
25 | #include <qmenubar.h> | 54 | #include <qmenubar.h> |
26 | #include <qtoolbar.h> | 55 | #include <qtoolbar.h> |
27 | #endif | 56 | #endif |
57 | #include <qregexp.h> | ||
58 | #include <qclipboard.h> | ||
59 | #include <qwidgetstack.h> | ||
28 | #include <qmenubar.h> | 60 | #include <qmenubar.h> |
29 | #include <qtoolbar.h> | 61 | #include <qtoolbar.h> |
30 | #ifdef USEQPE | ||
31 | #include <qpe/menubutton.h> | ||
32 | #include <qpe/fontdatabase.h> | ||
33 | #endif | ||
34 | #include <qcombobox.h> | 62 | #include <qcombobox.h> |
35 | #include <qpopupmenu.h> | 63 | #include <qpopupmenu.h> |
@@ -40,31 +68,12 @@ | |||
40 | #include <qspinbox.h> | 68 | #include <qspinbox.h> |
41 | #include <qobjectlist.h> | 69 | #include <qobjectlist.h> |
42 | #ifdef USEQPE | ||
43 | #include <qpe/global.h> | ||
44 | #include <qpe/applnk.h> | ||
45 | #endif | ||
46 | #include <qfileinfo.h> | 70 | #include <qfileinfo.h> |
47 | #include <stdlib.h> //getenv | ||
48 | #include <qprogressbar.h> | 71 | #include <qprogressbar.h> |
49 | #ifdef USEQPE | ||
50 | #include <qpe/config.h> | ||
51 | #endif | ||
52 | #include <qbuttongroup.h> | 72 | #include <qbuttongroup.h> |
53 | #include <qradiobutton.h> | 73 | #include <qradiobutton.h> |
54 | #ifdef USEQPE | 74 | |
55 | #include <qpe/qcopenvelope_qws.h> | 75 | /* STD */ |
56 | #endif | 76 | #include <stdlib.h> //getenv |
57 | #include "QTReader.h" | 77 | |
58 | #include "GraphicWin.h" | ||
59 | #include "Bkmks.h" | ||
60 | #include "cbkmkselector.h" | ||
61 | #include "infowin.h" | ||
62 | #include "ToolbarPrefs.h" | ||
63 | #include "Prefs.h" | ||
64 | #include "CAnnoEdit.h" | ||
65 | #include "QFloatBar.h" | ||
66 | #include "FixedFont.h" | ||
67 | #include "URLDialog.h" | ||
68 | //#include <qpe/fontdatabase.h> | ||
69 | 78 | ||
70 | #ifdef USEQPE | 79 | #ifdef USEQPE |
@@ -76,12 +85,4 @@ | |||
76 | #endif | 85 | #endif |
77 | 86 | ||
78 | #include "QTReaderApp.h" | ||
79 | #include "CDrawBuffer.h" | ||
80 | #include "Filedata.h" | ||
81 | #include "opie.h" | ||
82 | #include "names.h" | ||
83 | #include "CEncoding_tables.h" | ||
84 | #include "CloseDialog.h" | ||
85 | |||
86 | bool CheckVersion(int&, int&, char&); | 87 | bool CheckVersion(int&, int&, char&); |
87 | 88 | ||
@@ -126,5 +127,5 @@ void QTReaderApp::listBkmkFiles() | |||
126 | QDir d = QDir::home(); // "/" | 127 | QDir d = QDir::home(); // "/" |
127 | if ( !d.cd(APPDIR) ) { // "/tmp" | 128 | if ( !d.cd(APPDIR) ) { // "/tmp" |
128 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 129 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
129 | d = QDir::home(); | 130 | d = QDir::home(); |
130 | d.mkdir(APPDIR); | 131 | d.mkdir(APPDIR); |
@@ -147,5 +148,5 @@ void QTReaderApp::listBkmkFiles() | |||
147 | cnt++; | 148 | cnt++; |
148 | 149 | ||
149 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); | 150 | //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; |
150 | ++it; // goto next list element | 151 | ++it; // goto next list element |
151 | } | 152 | } |
@@ -215,6 +216,6 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
215 | m_url_globalfile = false; | 216 | m_url_globalfile = false; |
216 | ftime(&m_lastkeytime); | 217 | ftime(&m_lastkeytime); |
217 | //// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); | 218 | //// odebug << "Application directory = " << (const tchar *)QPEApplication::documentDir() << "" << oendl; |
218 | //// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); | 219 | //// odebug << "Application directory = " << (const tchar *)Global::applicationFileName("uqtreader" << "" << oendl; |
219 | 220 | ||
220 | m_bcloseDisabled = true; | 221 | m_bcloseDisabled = true; |
@@ -244,5 +245,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
244 | } | 245 | } |
245 | 246 | ||
246 | // qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); | 247 | // odebug << "Initial Rotation(" << m_rot << "):" << rot << "" << oendl; |
247 | */ | 248 | */ |
248 | m_autogenstr = "^ *[A-Z].*[a-z] *$"; | 249 | m_autogenstr = "^ *[A-Z].*[a-z] *$"; |
@@ -261,5 +262,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
261 | QDir d = QDir::home(); // "/" | 262 | QDir d = QDir::home(); // "/" |
262 | if ( !d.cd(APPDIR) ) { // "/tmp" | 263 | if ( !d.cd(APPDIR) ) { // "/tmp" |
263 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 264 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
264 | d = QDir::home(); | 265 | d = QDir::home(); |
265 | d.mkdir(APPDIR); | 266 | d.mkdir(APPDIR); |
@@ -267,5 +268,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
267 | } | 268 | } |
268 | QFileInfo fi(d, INIFILE); | 269 | QFileInfo fi(d, INIFILE); |
269 | // qDebug("Path:%s", (const char*)fi.absFilePath()); | 270 | // odebug << "Path:" << fi.absFilePath() << "" << oendl; |
270 | Config config(fi.absFilePath()); | 271 | Config config(fi.absFilePath()); |
271 | #endif | 272 | #endif |
@@ -357,5 +358,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
357 | importSelector->setCloseVisible( FALSE ); | 358 | importSelector->setCloseVisible( FALSE ); |
358 | */ | 359 | */ |
359 | // qDebug("Reading file list"); | 360 | // odebug << "Reading file list" << oendl; |
360 | readfilelist(); | 361 | readfilelist(); |
361 | 362 | ||
@@ -368,5 +369,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
368 | #endif | 369 | #endif |
369 | 370 | ||
370 | // qDebug("Reading config"); | 371 | // odebug << "Reading config" << oendl; |
371 | // Config config( APPDIR ); | 372 | // Config config( APPDIR ); |
372 | config.setGroup( "View" ); | 373 | config.setGroup( "View" ); |
@@ -770,5 +771,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
770 | m_fontBar->setHorizontalStretchable( TRUE ); | 771 | m_fontBar->setHorizontalStretchable( TRUE ); |
771 | 772 | ||
772 | // qDebug("Font selector"); | 773 | // odebug << "Font selector" << oendl; |
773 | m_fontSelector = new QComboBox(false, m_fontBar); | 774 | m_fontSelector = new QComboBox(false, m_fontBar); |
774 | m_fontBar->setStretchableWidget( m_fontSelector ); | 775 | m_fontBar->setStretchableWidget( m_fontSelector ); |
@@ -802,15 +803,15 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
802 | this, SLOT( msgHandler(const QCString&,const QByteArray&) ) ); | 803 | this, SLOT( msgHandler(const QCString&,const QByteArray&) ) ); |
803 | #endif | 804 | #endif |
804 | // qDebug("Initing"); | 805 | // odebug << "Initing" << oendl; |
805 | reader->init(); | 806 | reader->init(); |
806 | // qDebug("Inited"); | 807 | // odebug << "Inited" << oendl; |
807 | // m_buttonAction[m_spaceTarget]->setOn(true); | 808 | // m_buttonAction[m_spaceTarget]->setOn(true); |
808 | // qDebug("fonting"); | 809 | // odebug << "fonting" << oendl; |
809 | do_setfont(reader->m_fontname); | 810 | do_setfont(reader->m_fontname); |
810 | if (!reader->m_lastfile.isEmpty()) | 811 | if (!reader->m_lastfile.isEmpty()) |
811 | { | 812 | { |
812 | //qDebug("doclnk"); | 813 | // odebug << "doclnk" << oendl; |
813 | //doc = new DocLnk(reader->m_lastfile); | 814 | //doc = new DocLnk(reader->m_lastfile); |
814 | //qDebug("doclnk done"); | 815 | // odebug << "doclnk done" << oendl; |
815 | if (pOpenlist != NULL) | 816 | if (pOpenlist != NULL) |
816 | { | 817 | { |
@@ -832,10 +833,10 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
832 | break; | 833 | break; |
833 | } | 834 | } |
834 | // qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name())); | 835 | // odebug << "Item:" << toQString(CFiledata(p->anno()).name()) << "" << oendl; |
835 | p = NULL; | 836 | p = NULL; |
836 | } | 837 | } |
837 | if (p != NULL) | 838 | if (p != NULL) |
838 | { | 839 | { |
839 | //qDebug("openfrombkmk"); | 840 | // odebug << "openfrombkmk" << oendl; |
840 | if (!openfrombkmk(p)) | 841 | if (!openfrombkmk(p)) |
841 | showEditTools(); | 842 | showEditTools(); |
@@ -843,5 +844,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
843 | else | 844 | else |
844 | { | 845 | { |
845 | //qDebug("openfile"); | 846 | // odebug << "openfile" << oendl; |
846 | openFile( reader->m_lastfile ); | 847 | openFile( reader->m_lastfile ); |
847 | } | 848 | } |
@@ -849,5 +850,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
849 | else | 850 | else |
850 | { | 851 | { |
851 | // qDebug("Openfile 2"); | 852 | // odebug << "Openfile 2" << oendl; |
852 | if (!reader->m_lastfile.isEmpty()) | 853 | if (!reader->m_lastfile.isEmpty()) |
853 | openFile( reader->m_lastfile ); | 854 | openFile( reader->m_lastfile ); |
@@ -871,5 +872,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
871 | config.writeEntry("Minor", (int)minor); | 872 | config.writeEntry("Minor", (int)minor); |
872 | } | 873 | } |
873 | // qDebug("finished update"); | 874 | // odebug << "finished update" << oendl; |
874 | } | 875 | } |
875 | 876 | ||
@@ -1029,12 +1030,12 @@ QToolBar* QTReaderApp::filebar() | |||
1029 | { | 1030 | { |
1030 | case cesSingle: | 1031 | case cesSingle: |
1031 | // qDebug("Setting filebar to menubar"); | 1032 | // odebug << "Setting filebar to menubar" << oendl; |
1032 | fileBar = menubar; | 1033 | fileBar = menubar; |
1033 | break; | 1034 | break; |
1034 | default: | 1035 | default: |
1035 | qDebug("Incorrect toolbar policy set"); | 1036 | odebug << "Incorrect toolbar policy set" << oendl; |
1036 | case cesMenuTool: | 1037 | case cesMenuTool: |
1037 | case cesMultiple: | 1038 | case cesMultiple: |
1038 | // qDebug("Creating new file bar"); | 1039 | // odebug << "Creating new file bar" << oendl; |
1039 | fileBar = new QToolBar("File", this, m_tbposition); | 1040 | fileBar = new QToolBar("File", this, m_tbposition); |
1040 | break; | 1041 | break; |
@@ -1054,5 +1055,5 @@ QToolBar* QTReaderApp::viewbar() | |||
1054 | break; | 1055 | break; |
1055 | default: | 1056 | default: |
1056 | qDebug("Incorrect toolbar policy set"); | 1057 | odebug << "Incorrect toolbar policy set" << oendl; |
1057 | case cesSingle: | 1058 | case cesSingle: |
1058 | case cesMenuTool: | 1059 | case cesMenuTool: |
@@ -1070,13 +1071,13 @@ QToolBar* QTReaderApp::navbar() | |||
1070 | { | 1071 | { |
1071 | case cesMultiple: | 1072 | case cesMultiple: |
1072 | // qDebug("Creating new nav bar"); | 1073 | // odebug << "Creating new nav bar" << oendl; |
1073 | navBar = new QToolBar("Navigation", this, m_tbposition); | 1074 | navBar = new QToolBar("Navigation", this, m_tbposition); |
1074 | break; | 1075 | break; |
1075 | default: | 1076 | default: |
1076 | qDebug("Incorrect toolbar policy set"); | 1077 | odebug << "Incorrect toolbar policy set" << oendl; |
1077 | case cesSingle: | 1078 | case cesSingle: |
1078 | case cesMenuTool: | 1079 | case cesMenuTool: |
1079 | navBar = fileBar; | 1080 | navBar = fileBar; |
1080 | // qDebug("Setting navbar to filebar"); | 1081 | // odebug << "Setting navbar to filebar" << oendl; |
1081 | break; | 1082 | break; |
1082 | } | 1083 | } |
@@ -1094,5 +1095,5 @@ QToolBar* QTReaderApp::markbar() | |||
1094 | break; | 1095 | break; |
1095 | default: | 1096 | default: |
1096 | qDebug("Incorrect toolbar policy set"); | 1097 | odebug << "Incorrect toolbar policy set" << oendl; |
1097 | case cesSingle: | 1098 | case cesSingle: |
1098 | case cesMenuTool: | 1099 | case cesMenuTool: |
@@ -1128,5 +1129,5 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) | |||
1128 | QString msg = QString::fromUtf8(_msg); | 1129 | QString msg = QString::fromUtf8(_msg); |
1129 | 1130 | ||
1130 | //// qDebug("Received:%s", (const char*)msg); | 1131 | //// odebug << "Received:" << msg << "" << oendl; |
1131 | 1132 | ||
1132 | QDataStream stream( _data, IO_ReadOnly ); | 1133 | QDataStream stream( _data, IO_ReadOnly ); |
@@ -1482,5 +1483,5 @@ void QTReaderApp::setfullscreen(bool sfs) | |||
1482 | void QTReaderApp::buttonActionSelected(QAction* _a) | 1483 | void QTReaderApp::buttonActionSelected(QAction* _a) |
1483 | { | 1484 | { |
1484 | //// qDebug("es:%x : %s (%u)", _a, (const char *)(_a->text()), ActNameToInt(_a->text())); | 1485 | //// odebug << "es:" << _a << " : " << (const char *)(_a->text()) << " (" << ActNameToInt(_a->text()) << ")" << oendl; |
1485 | m_spaceTarget = ActNameToInt(_a->text()); | 1486 | m_spaceTarget = ActNameToInt(_a->text()); |
1486 | } | 1487 | } |
@@ -1564,5 +1565,5 @@ void QTReaderApp::updatefileinfo() | |||
1564 | tchar* nm = fromQString(reader->m_string); | 1565 | tchar* nm = fromQString(reader->m_string); |
1565 | tchar* fl = fromQString(reader->m_lastfile); | 1566 | tchar* fl = fromQString(reader->m_lastfile); |
1566 | // qDebug("Lastfile:%x", fl); | 1567 | // odebug << "Lastfile:" << fl << "" << oendl; |
1567 | bool notadded = true; | 1568 | bool notadded = true; |
1568 | if (pOpenlist == NULL) pOpenlist = new CList<Bkmk>; | 1569 | if (pOpenlist == NULL) pOpenlist = new CList<Bkmk>; |
@@ -1578,5 +1579,5 @@ void QTReaderApp::updatefileinfo() | |||
1578 | CFiledata fd(iter->anno()); | 1579 | CFiledata fd(iter->anno()); |
1579 | reader->setSaveData(data, dlen, fd.content(), fd.length()); | 1580 | reader->setSaveData(data, dlen, fd.content(), fd.length()); |
1580 | // qDebug("Filedata(1):%u, %u", fd.length(), dlen); | 1581 | // odebug << "Filedata(1):" << fd.length() << ", " << dlen << "" << oendl; |
1581 | // getstate(data, dlen); | 1582 | // getstate(data, dlen); |
1582 | iter->setAnno(data, dlen); | 1583 | iter->setAnno(data, dlen); |
@@ -1587,5 +1588,5 @@ void QTReaderApp::updatefileinfo() | |||
1587 | } | 1588 | } |
1588 | } | 1589 | } |
1589 | // qDebug("Added?:%x", notadded); | 1590 | // odebug << "Added?:" << notadded << "" << oendl; |
1590 | if (notadded) | 1591 | if (notadded) |
1591 | { | 1592 | { |
@@ -1597,5 +1598,5 @@ void QTReaderApp::updatefileinfo() | |||
1597 | reader->setSaveData(data, dlen, fd.content(), fd.length()); | 1598 | reader->setSaveData(data, dlen, fd.content(), fd.length()); |
1598 | pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); | 1599 | pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); |
1599 | //qDebug("Filedata(2):%u, %u", fd.length(), dlen); | 1600 | // odebug << "Filedata(2):" << fd.length() << ", " << dlen << "" << oendl; |
1600 | delete [] data; | 1601 | delete [] data; |
1601 | } | 1602 | } |
@@ -1612,5 +1613,5 @@ void QTReaderApp::fileOpen() | |||
1612 | if (searchVisible) searchBar->hide(); | 1613 | if (searchVisible) searchBar->hide(); |
1613 | */ | 1614 | */ |
1614 | // qDebug("fileOpen"); | 1615 | // odebug << "fileOpen" << oendl; |
1615 | // if (!reader->m_lastfile.isEmpty()) | 1616 | // if (!reader->m_lastfile.isEmpty()) |
1616 | updatefileinfo(); | 1617 | updatefileinfo(); |
@@ -1653,5 +1654,5 @@ void QTReaderApp::fileOpen2() | |||
1653 | } | 1654 | } |
1654 | // reader->refresh(); | 1655 | // reader->refresh(); |
1655 | // qDebug("HEIGHT:%d", reader->m_lastheight); | 1656 | // odebug << "HEIGHT:" << reader->m_lastheight << "" << oendl; |
1656 | } | 1657 | } |
1657 | 1658 | ||
@@ -1673,5 +1674,5 @@ QString QTReaderApp::usefilebrowser() | |||
1673 | fn = fb->getCurrentFile(); | 1674 | fn = fb->getCurrentFile(); |
1674 | } | 1675 | } |
1675 | // qDebug("Selected %s", (const char*)fn); | 1676 | // odebug << "Selected " << fn << "" << oendl; |
1676 | delete fb; | 1677 | delete fb; |
1677 | showEditTools(); | 1678 | showEditTools(); |
@@ -1804,5 +1805,5 @@ void QTReaderApp::showprefs() | |||
1804 | break; | 1805 | break; |
1805 | default: | 1806 | default: |
1806 | qDebug("Format out of range"); | 1807 | odebug << "Format out of range" << oendl; |
1807 | } | 1808 | } |
1808 | reader->bdepluck = prefwin->Depluck(); | 1809 | reader->bdepluck = prefwin->Depluck(); |
@@ -1864,5 +1865,5 @@ void QTReaderApp::showtoolbarprefs() | |||
1864 | if ( !d.cd(APPDIR) ) | 1865 | if ( !d.cd(APPDIR) ) |
1865 | { // "/tmp" | 1866 | { // "/tmp" |
1866 | qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); | 1867 | owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; |
1867 | d = QDir::home(); | 1868 | d = QDir::home(); |
1868 | d.mkdir(APPDIR); | 1869 | d.mkdir(APPDIR); |
@@ -1901,5 +1902,5 @@ void QTReaderApp::showtoolbarprefs() | |||
1901 | if ( !d.cd(APPDIR) ) | 1902 | if ( !d.cd(APPDIR) ) |
1902 | { // "/tmp" | 1903 | { // "/tmp" |
1903 | qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); | 1904 | owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; |
1904 | d = QDir::home(); | 1905 | d = QDir::home(); |
1905 | d.mkdir(APPDIR); | 1906 | d.mkdir(APPDIR); |
@@ -2176,5 +2177,5 @@ void QTReaderApp::editFind() | |||
2176 | void QTReaderApp::findNext() | 2177 | void QTReaderApp::findNext() |
2177 | { | 2178 | { |
2178 | // // qDebug("findNext called\n"); | 2179 | // // odebug << "findNext called\n" << oendl; |
2179 | #ifdef __ISEARCH | 2180 | #ifdef __ISEARCH |
2180 | QString arg = searchEdit->text(); | 2181 | QString arg = searchEdit->text(); |
@@ -2272,10 +2273,10 @@ bool QTReaderApp::dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg) | |||
2272 | } | 2273 | } |
2273 | } | 2274 | } |
2274 | // qDebug("Found it at %u:%u", pos, offset); | 2275 | // odebug << "Found it at " << pos << ":" << offset << "" << oendl; |
2275 | pbar->hide(); | 2276 | pbar->hide(); |
2276 | // qDebug("Hid"); | 2277 | // odebug << "Hid" << oendl; |
2277 | reader->locate(pos+offset); | 2278 | reader->locate(pos+offset); |
2278 | // qDebug("Loacted"); | 2279 | // odebug << "Loacted" << oendl; |
2279 | // qDebug("page up"); | 2280 | // odebug << "page up" << oendl; |
2280 | ret = true; | 2281 | ret = true; |
2281 | } | 2282 | } |
@@ -2334,5 +2335,5 @@ void QTReaderApp::search() | |||
2334 | void QTReaderApp::openFile( const QString &f ) | 2335 | void QTReaderApp::openFile( const QString &f ) |
2335 | { | 2336 | { |
2336 | // qDebug("File:%s", (const char*)f); | 2337 | // odebug << "File:" << f << "" << oendl; |
2337 | // openFile(DocLnk(f)); | 2338 | // openFile(DocLnk(f)); |
2338 | //} | 2339 | //} |
@@ -2381,5 +2382,5 @@ void QTReaderApp::resizeEvent(QResizeEvent* e) | |||
2381 | void QTReaderApp::handlekey(QKeyEvent* e) | 2382 | void QTReaderApp::handlekey(QKeyEvent* e) |
2382 | { | 2383 | { |
2383 | // qDebug("Keypress event"); | 2384 | // odebug << "Keypress event" << oendl; |
2384 | timeb now; | 2385 | timeb now; |
2385 | ftime(&now); | 2386 | ftime(&now); |
@@ -2393,5 +2394,5 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2393 | { | 2394 | { |
2394 | case Key_Escape: | 2395 | case Key_Escape: |
2395 | // qDebug("escape event"); | 2396 | // odebug << "escape event" << oendl; |
2396 | if (m_disableesckey) | 2397 | if (m_disableesckey) |
2397 | { | 2398 | { |
@@ -2408,5 +2409,5 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2408 | else | 2409 | else |
2409 | { | 2410 | { |
2410 | // qDebug("escape action"); | 2411 | // odebug << "escape action" << oendl; |
2411 | doAction(m_escapeTarget, e); | 2412 | doAction(m_escapeTarget, e); |
2412 | } | 2413 | } |
@@ -2507,9 +2508,9 @@ void QTReaderApp::showEditTools() | |||
2507 | else | 2508 | else |
2508 | { | 2509 | { |
2509 | //qDebug("him"); | 2510 | // odebug << "him" << oendl; |
2510 | #ifdef USEQPE | 2511 | #ifdef USEQPE |
2511 | Global::hideInputMethod(); | 2512 | Global::hideInputMethod(); |
2512 | #endif | 2513 | #endif |
2513 | //qDebug("eb"); | 2514 | // odebug << "eb" << oendl; |
2514 | menubar->show(); | 2515 | menubar->show(); |
2515 | if (fileBar != NULL) fileBar->show(); | 2516 | if (fileBar != NULL) fileBar->show(); |
@@ -2533,7 +2534,7 @@ void QTReaderApp::showEditTools() | |||
2533 | } | 2534 | } |
2534 | if (m_fontVisible) m_fontBar->show(); | 2535 | if (m_fontVisible) m_fontBar->show(); |
2535 | //qDebug("sn"); | 2536 | // odebug << "sn" << oendl; |
2536 | showNormal(); | 2537 | showNormal(); |
2537 | //qDebug("sm"); | 2538 | // odebug << "sm" << oendl; |
2538 | #ifdef USEQPE | 2539 | #ifdef USEQPE |
2539 | showMaximized(); | 2540 | showMaximized(); |
@@ -2542,9 +2543,9 @@ void QTReaderApp::showEditTools() | |||
2542 | } | 2543 | } |
2543 | 2544 | ||
2544 | // qDebug("uc"); | 2545 | // odebug << "uc" << oendl; |
2545 | updateCaption(); | 2546 | updateCaption(); |
2546 | // qDebug("rw"); | 2547 | // odebug << "rw" << oendl; |
2547 | editorStack->raiseWidget( reader ); | 2548 | editorStack->raiseWidget( reader ); |
2548 | // qDebug("sf"); | 2549 | // odebug << "sf" << oendl; |
2549 | reader->setFocus(); | 2550 | reader->setFocus(); |
2550 | reader->refresh(); | 2551 | reader->refresh(); |
@@ -2615,5 +2616,5 @@ void QTReaderApp::setDocument(const QString& fileref) | |||
2615 | void QTReaderApp::closeEvent( QCloseEvent *e ) | 2616 | void QTReaderApp::closeEvent( QCloseEvent *e ) |
2616 | { | 2617 | { |
2617 | // qDebug("Close event"); | 2618 | // odebug << "Close event" << oendl; |
2618 | if (m_fullscreen) | 2619 | if (m_fullscreen) |
2619 | { | 2620 | { |
@@ -2632,5 +2633,5 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) | |||
2632 | if ((m_escapeTarget != cesNone) && m_bcloseDisabled) | 2633 | if ((m_escapeTarget != cesNone) && m_bcloseDisabled) |
2633 | { | 2634 | { |
2634 | //qDebug("Close disabled"); | 2635 | // odebug << "Close disabled" << oendl; |
2635 | m_bcloseDisabled = false; | 2636 | m_bcloseDisabled = false; |
2636 | e->ignore(); | 2637 | e->ignore(); |
@@ -2710,5 +2711,5 @@ bool QTReaderApp::listbkmk(CList<Bkmk>* plist, const QString& _lab) | |||
2710 | { | 2711 | { |
2711 | #ifdef _UNICODE | 2712 | #ifdef _UNICODE |
2712 | // qDebug("Item:%s", (const char*)toQString(i->name())); | 2713 | // odebug << "Item:" << toQString(i->name()) << "" << oendl; |
2713 | bkmkselector->insertItem(toQString(i->name())); | 2714 | bkmkselector->insertItem(toQString(i->name())); |
2714 | #else | 2715 | #else |
@@ -2739,7 +2740,7 @@ void QTReaderApp::do_regedit() | |||
2739 | // fileBar->hide(); | 2740 | // fileBar->hide(); |
2740 | reader->bDoUpdates = false; | 2741 | reader->bDoUpdates = false; |
2741 | // qDebug("Showing regbar"); | 2742 | // odebug << "Showing regbar" << oendl; |
2742 | regBar->show(); | 2743 | regBar->show(); |
2743 | // qDebug("Showing kbd"); | 2744 | // odebug << "Showing kbd" << oendl; |
2744 | #ifdef USEQPE | 2745 | #ifdef USEQPE |
2745 | Global::showInputMethod(); | 2746 | Global::showInputMethod(); |
@@ -2757,8 +2758,8 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
2757 | CFiledata(bk->anno()).name() | 2758 | CFiledata(bk->anno()).name() |
2758 | ); | 2759 | ); |
2759 | //qDebug("fileinfo"); | 2760 | // odebug << "fileinfo" << oendl; |
2760 | if (!fn.isEmpty() && QFileInfo(fn).isFile()) | 2761 | if (!fn.isEmpty() && QFileInfo(fn).isFile()) |
2761 | { | 2762 | { |
2762 | //qDebug("Opening"); | 2763 | // odebug << "Opening" << oendl; |
2763 | openFile(fn); | 2764 | openFile(fn); |
2764 | struct stat fnstat; | 2765 | struct stat fnstat; |
@@ -2782,5 +2783,5 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
2782 | QMessageBox::warning(this, PROGNAME, "Not all file data used\nNew version?"); | 2783 | QMessageBox::warning(this, PROGNAME, "Not all file data used\nNew version?"); |
2783 | } | 2784 | } |
2784 | // qDebug("updating"); | 2785 | // odebug << "updating" << oendl; |
2785 | // showEditTools(); | 2786 | // showEditTools(); |
2786 | reader->locate(bk->value()); | 2787 | reader->locate(bk->value()); |
@@ -2813,5 +2814,5 @@ void QTReaderApp::gotobkmk(int ind) | |||
2813 | break; | 2814 | break; |
2814 | case cDelBkmk: | 2815 | case cDelBkmk: |
2815 | //// qDebug("Deleting:%s\n",(*pBkmklist)[ind]->name()); | 2816 | //// odebug << "Deleting:" << (*pBkmklist)[ind]->name() << "\n" << oendl; |
2816 | pBkmklist->erase(ind); | 2817 | pBkmklist->erase(ind); |
2817 | m_fBkmksChanged = true; | 2818 | m_fBkmksChanged = true; |
@@ -2913,5 +2914,5 @@ void QTReaderApp::gotobkmk(int ind) | |||
2913 | CFileSelector *f = new CFileSelector("text/html", this, NULL, !m_bFloatingDialog, TRUE, TRUE ); | 2914 | CFileSelector *f = new CFileSelector("text/html", this, NULL, !m_bFloatingDialog, TRUE, TRUE ); |
2914 | int ret = f->exec(); | 2915 | int ret = f->exec(); |
2915 | qDebug("Return:%d", ret); | 2916 | odebug << "Return:" << ret << "" << oendl; |
2916 | DocLnk* doc = f->getDoc(); | 2917 | DocLnk* doc = f->getDoc(); |
2917 | if (doc != NULL) | 2918 | if (doc != NULL) |
@@ -2933,9 +2934,9 @@ void QTReaderApp::gotobkmk(int ind) | |||
2933 | FileManager fm; | 2934 | FileManager fm; |
2934 | fm.saveFile( *doc, rt ); | 2935 | fm.saveFile( *doc, rt ); |
2935 | qDebug("YES"); | 2936 | odebug << "YES" << oendl; |
2936 | } | 2937 | } |
2937 | else | 2938 | else |
2938 | { | 2939 | { |
2939 | qDebug("NO"); | 2940 | odebug << "NO" << oendl; |
2940 | } | 2941 | } |
2941 | delete f; | 2942 | delete f; |
@@ -3010,5 +3011,5 @@ void QTReaderApp::do_regaction() | |||
3010 | #endif | 3011 | #endif |
3011 | case cSetConfigName: | 3012 | case cSetConfigName: |
3012 | // qDebug("Saving config"); | 3013 | // odebug << "Saving config" << oendl; |
3013 | do_saveconfig(regEdit->text(), false); | 3014 | do_saveconfig(regEdit->text(), false); |
3014 | break; | 3015 | break; |
@@ -3102,5 +3103,5 @@ void QTReaderApp::setfontHelper(const QString& lcn, int size) | |||
3102 | void QTReaderApp::do_setencoding(int i) | 3103 | void QTReaderApp::do_setencoding(int i) |
3103 | { | 3104 | { |
3104 | // qDebug("setencoding:%d", i); | 3105 | // odebug << "setencoding:" << i << "" << oendl; |
3105 | if (m_fontAction == cChooseEncoding) | 3106 | if (m_fontAction == cChooseEncoding) |
3106 | { | 3107 | { |
@@ -3110,7 +3111,7 @@ void QTReaderApp::do_setencoding(int i) | |||
3110 | m_fontBar->hide(); | 3111 | m_fontBar->hide(); |
3111 | m_fontVisible = false; | 3112 | m_fontVisible = false; |
3112 | // qDebug("showedit"); | 3113 | // odebug << "showedit" << oendl; |
3113 | if (reader->isVisible()) showEditTools(); | 3114 | if (reader->isVisible()) showEditTools(); |
3114 | // qDebug("showeditdone"); | 3115 | // odebug << "showeditdone" << oendl; |
3115 | } | 3116 | } |
3116 | 3117 | ||
@@ -3124,8 +3125,8 @@ void QTReaderApp::do_setfont(const QString& lcn) | |||
3124 | m_fontBar->hide(); | 3125 | m_fontBar->hide(); |
3125 | m_fontVisible = false; | 3126 | m_fontVisible = false; |
3126 | // qDebug("showedit"); | 3127 | // odebug << "showedit" << oendl; |
3127 | //if (reader->isVisible()) | 3128 | //if (reader->isVisible()) |
3128 | showEditTools(); | 3129 | showEditTools(); |
3129 | // qDebug("showeditdone"); | 3130 | // odebug << "showeditdone" << oendl; |
3130 | } | 3131 | } |
3131 | 3132 | ||
@@ -3134,5 +3135,5 @@ void QTReaderApp::do_autogen(const QString& regText) | |||
3134 | unsigned long fs, ts; | 3135 | unsigned long fs, ts; |
3135 | reader->sizes(fs,ts); | 3136 | reader->sizes(fs,ts); |
3136 | // // qDebug("Reg:%s\n", (const tchar*)(regEdit->text())); | 3137 | // // odebug << "Reg:" << (const tchar*)(regEdit->text()) << "\n" << oendl; |
3137 | m_autogenstr = regText; | 3138 | m_autogenstr = regText; |
3138 | QRegExp re(regText); | 3139 | QRegExp re(regText); |
@@ -3181,5 +3182,5 @@ void QTReaderApp::do_autogen(const QString& regText) | |||
3181 | void QTReaderApp::saveprefs() | 3182 | void QTReaderApp::saveprefs() |
3182 | { | 3183 | { |
3183 | // qDebug("saveprefs"); | 3184 | // odebug << "saveprefs" << oendl; |
3184 | // reader->saveprefs("uqtreader"); | 3185 | // reader->saveprefs("uqtreader"); |
3185 | // if (!m_loadedconfig) | 3186 | // if (!m_loadedconfig) |
@@ -3262,9 +3263,9 @@ void QTReaderApp::saveprefs() | |||
3262 | void QTReaderApp::oldFile() | 3263 | void QTReaderApp::oldFile() |
3263 | { | 3264 | { |
3264 | // qDebug("oldFile called"); | 3265 | // odebug << "oldFile called" << oendl; |
3265 | reader->setText(true); | 3266 | reader->setText(true); |
3266 | // qDebug("settext called"); | 3267 | // odebug << "settext called" << oendl; |
3267 | showEditTools(); | 3268 | showEditTools(); |
3268 | // qDebug("showedit called"); | 3269 | // odebug << "showedit called" << oendl; |
3269 | } | 3270 | } |
3270 | */ | 3271 | */ |
@@ -3342,8 +3343,8 @@ void QTReaderApp::readfilelist() | |||
3342 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles")); | 3343 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles")); |
3343 | #endif /* USEQPE */ | 3344 | #endif /* USEQPE */ |
3344 | // qDebug("Reading open files"); | 3345 | // odebug << "Reading open files" << oendl; |
3345 | pOpenlist = bf.readall(); | 3346 | pOpenlist = bf.readall(); |
3346 | // if (pOpenlist != NULL) qDebug("...with success"); | 3347 | // if (pOpenlist != NULL) odebug << "...with success" << oendl; |
3347 | // else qDebug("...without success!"); | 3348 | // else odebug << "...without success!" << oendl; |
3348 | } | 3349 | } |
3349 | 3350 | ||
@@ -3360,5 +3361,5 @@ void QTReaderApp::savefilelist() | |||
3360 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles"), true); | 3361 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles"), true); |
3361 | #endif /* USEQPE */ | 3362 | #endif /* USEQPE */ |
3362 | //qDebug("Writing open files"); | 3363 | // odebug << "Writing open files" << oendl; |
3363 | bf.write(*pOpenlist); | 3364 | bf.write(*pOpenlist); |
3364 | } | 3365 | } |
@@ -3470,5 +3471,5 @@ void QTReaderApp::showAnnotation() | |||
3470 | void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& line) | 3471 | void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& line) |
3471 | { | 3472 | { |
3472 | //// qDebug("OnWordSelected(%u):%s", posn, (const char*)wrd); | 3473 | //// odebug << "OnWordSelected(" << posn << "):" << wrd << "" << oendl; |
3473 | 3474 | ||
3474 | if (m_doClipboard) | 3475 | if (m_doClipboard) |
@@ -3520,5 +3521,5 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3520 | { | 3521 | { |
3521 | e->accept(); | 3522 | e->accept(); |
3522 | //qDebug("Accepted"); | 3523 | // odebug << "Accepted" << oendl; |
3523 | switch (a) | 3524 | switch (a) |
3524 | { | 3525 | { |
@@ -3583,5 +3584,5 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3583 | break; | 3584 | break; |
3584 | default: | 3585 | default: |
3585 | qDebug("Unknown ActionType:%u", a); | 3586 | odebug << "Unknown ActionType:" << a << "" << oendl; |
3586 | break; | 3587 | break; |
3587 | } | 3588 | } |
@@ -3601,5 +3602,5 @@ void QTReaderApp::SaveConfig() | |||
3601 | void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | 3602 | void QTReaderApp::do_saveconfig(const QString& _txt, bool full) |
3602 | { | 3603 | { |
3603 | // qDebug("do_saveconfig:%s", (const char*)_txt); | 3604 | // odebug << "do_saveconfig:" << _txt << "" << oendl; |
3604 | #ifdef USEQPE | 3605 | #ifdef USEQPE |
3605 | QString configname; | 3606 | QString configname; |
@@ -3624,9 +3625,9 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3624 | if (full) | 3625 | if (full) |
3625 | { | 3626 | { |
3626 | // qDebug("full:%s", (const char*)_txt); | 3627 | // odebug << "full:" << _txt << "" << oendl; |
3627 | QDir d = QDir::home(); // "/" | 3628 | QDir d = QDir::home(); // "/" |
3628 | if ( !d.cd(_txt) ) | 3629 | if ( !d.cd(_txt) ) |
3629 | { // "/tmp" | 3630 | { // "/tmp" |
3630 | qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); | 3631 | owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; |
3631 | d = QDir::home(); | 3632 | d = QDir::home(); |
3632 | d.mkdir(_txt); | 3633 | d.mkdir(_txt); |
@@ -3640,5 +3641,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3640 | if ( !d.cd(APPDIR) ) | 3641 | if ( !d.cd(APPDIR) ) |
3641 | { // "/tmp" | 3642 | { // "/tmp" |
3642 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 3643 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
3643 | d = QDir::home(); | 3644 | d = QDir::home(); |
3644 | d.mkdir(APPDIR); | 3645 | d.mkdir(APPDIR); |
@@ -3647,5 +3648,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3647 | if ( !d.cd("configs") ) | 3648 | if ( !d.cd("configs") ) |
3648 | { // "/tmp" | 3649 | { // "/tmp" |
3649 | qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); | 3650 | owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; |
3650 | d = QDir::home(); | 3651 | d = QDir::home(); |
3651 | d.cd(APPDIR); | 3652 | d.cd(APPDIR); |
@@ -3655,5 +3656,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3655 | fi.setFile(d, _txt); | 3656 | fi.setFile(d, _txt); |
3656 | } | 3657 | } |
3657 | //qDebug("Path:%s", (const char*)fi.absFilePath()); | 3658 | // odebug << "Path:" << fi.absFilePath() << "" << oendl; |
3658 | Config config(fi.absFilePath()); | 3659 | Config config(fi.absFilePath()); |
3659 | #endif | 3660 | #endif |
@@ -3935,5 +3936,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3935 | if ( !d.cd(_txt) ) | 3936 | if ( !d.cd(_txt) ) |
3936 | { // "/tmp" | 3937 | { // "/tmp" |
3937 | qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); | 3938 | owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; |
3938 | d = QDir::home(); | 3939 | d = QDir::home(); |
3939 | d.mkdir(_txt); | 3940 | d.mkdir(_txt); |
@@ -3947,5 +3948,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3947 | if ( !d.cd(APPDIR) ) | 3948 | if ( !d.cd(APPDIR) ) |
3948 | { // "/tmp" | 3949 | { // "/tmp" |
3949 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 3950 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
3950 | d = QDir::home(); | 3951 | d = QDir::home(); |
3951 | d.mkdir(APPDIR); | 3952 | d.mkdir(APPDIR); |
@@ -3954,5 +3955,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3954 | if ( !d.cd("configs") ) | 3955 | if ( !d.cd("configs") ) |
3955 | { // "/tmp" | 3956 | { // "/tmp" |
3956 | qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); | 3957 | owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; |
3957 | d = QDir::home(); | 3958 | d = QDir::home(); |
3958 | d.mkdir("configs"); | 3959 | d.mkdir("configs"); |
@@ -4062,5 +4063,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4062 | QDir d = QDir::home(); // "/" | 4063 | QDir d = QDir::home(); // "/" |
4063 | if ( !d.cd(APPDIR) ) { // "/tmp" | 4064 | if ( !d.cd(APPDIR) ) { // "/tmp" |
4064 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 4065 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
4065 | d = QDir::home(); | 4066 | d = QDir::home(); |
4066 | d.mkdir(APPDIR); | 4067 | d.mkdir(APPDIR); |
@@ -4068,5 +4069,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4068 | } | 4069 | } |
4069 | if ( !d.cd(tgtdir) ) { // "/tmp" | 4070 | if ( !d.cd(tgtdir) ) { // "/tmp" |
4070 | qWarning( "Cannot find the \"~/" APPDIR "/%s\" directory", tgtdir ); | 4071 | owarn << "Cannot find the \"~/" APPDIR "/" << tgtdir << "\" directory" << oendl; |
4071 | d = QDir::home(); | 4072 | d = QDir::home(); |
4072 | d.mkdir(tgtdir); | 4073 | d.mkdir(tgtdir); |
@@ -4085,5 +4086,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4085 | cnt++; | 4086 | cnt++; |
4086 | 4087 | ||
4087 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); | 4088 | //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; |
4088 | ++it; // goto next list element | 4089 | ++it; // goto next list element |
4089 | } | 4090 | } |
@@ -4169,5 +4170,5 @@ void QTReaderApp::OnURLSelected(const QString& href) | |||
4169 | QClipboard* cb = QApplication::clipboard(); | 4170 | QClipboard* cb = QApplication::clipboard(); |
4170 | cb->setText(href); | 4171 | cb->setText(href); |
4171 | qDebug("<a href=\"%s\">%s</a>", (const char*)href, (const char*)href); | 4172 | odebug << "<a href=\"" << href << "\">" << href << "</a>" << oendl; |
4172 | } | 4173 | } |
4173 | if (m_url_localfile) | 4174 | if (m_url_localfile) |
@@ -4193,5 +4194,5 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
4193 | if ( !d.cd(APPDIR) ) | 4194 | if ( !d.cd(APPDIR) ) |
4194 | { // "/tmp" | 4195 | { // "/tmp" |
4195 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 4196 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
4196 | d = QDir::home(); | 4197 | d = QDir::home(); |
4197 | d.mkdir(APPDIR); | 4198 | d.mkdir(APPDIR); |
@@ -4200,5 +4201,5 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
4200 | if ( !d.cd("urls") ) | 4201 | if ( !d.cd("urls") ) |
4201 | { // "/tmp" | 4202 | { // "/tmp" |
4202 | qWarning( "Cannot find the \"~/" APPDIR "/urls\" directory" ); | 4203 | owarn << "Cannot find the \"~/" APPDIR "/urls\" directory" << oendl; |
4203 | d = QDir::home(); | 4204 | d = QDir::home(); |
4204 | d.cd(APPDIR); | 4205 | d.cd(APPDIR); |
diff --git a/noncore/apps/opie-reader/StyleConsts.cpp b/noncore/apps/opie-reader/StyleConsts.cpp index 9fb56b7..f47acee 100644 --- a/noncore/apps/opie-reader/StyleConsts.cpp +++ b/noncore/apps/opie-reader/StyleConsts.cpp | |||
@@ -7,5 +7,5 @@ GraphicLink::~GraphicLink() { delete graphic; } | |||
7 | pmstore::~pmstore() | 7 | pmstore::~pmstore() |
8 | { | 8 | { |
9 | //// qDebug("Deleting image"); | 9 | //// odebug << "Deleting image" << oendl; |
10 | delete graphic; | 10 | delete graphic; |
11 | } | 11 | } |
diff --git a/noncore/apps/opie-reader/fileBrowser.cpp b/noncore/apps/opie-reader/fileBrowser.cpp index e1cde6c..72a1222 100644 --- a/noncore/apps/opie-reader/fileBrowser.cpp +++ b/noncore/apps/opie-reader/fileBrowser.cpp | |||
@@ -133,5 +133,5 @@ void fileBrowser::populateList() | |||
133 | { | 133 | { |
134 | ListView->clear(); | 134 | ListView->clear(); |
135 | ////qDebug(currentDir.canonicalPath()); | 135 | ////odebug << currentDir.canonicalPath() << oendl; |
136 | // currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); | 136 | // currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); |
137 | currentDir.setFilter( filterspec ); | 137 | currentDir.setFilter( filterspec ); |
@@ -157,5 +157,5 @@ void fileBrowser::populateList() | |||
157 | else | 157 | else |
158 | { | 158 | { |
159 | //// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); | 159 | //// odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; |
160 | } | 160 | } |
161 | new QListViewItem( ListView,fileL,fileS ); | 161 | new QListViewItem( ListView,fileL,fileS ); |
@@ -170,5 +170,5 @@ void fileBrowser::populateList() | |||
170 | void fileBrowser::upDir() | 170 | void fileBrowser::upDir() |
171 | { | 171 | { |
172 | //// qDebug(currentDir.canonicalPath()); | 172 | //// odebug << currentDir.canonicalPath() << oendl; |
173 | } | 173 | } |
174 | 174 | ||
@@ -178,5 +178,5 @@ void fileBrowser::listClicked(QListViewItem *selectedItem) | |||
178 | QString strItem=selectedItem->text(0); | 178 | QString strItem=selectedItem->text(0); |
179 | 179 | ||
180 | //// qDebug("%s", (const char*)strItem); | 180 | //// odebug << "" << strItem << "" << oendl; |
181 | 181 | ||
182 | 182 | ||
diff --git a/noncore/apps/opie-reader/opie-reader.pro b/noncore/apps/opie-reader/opie-reader.pro index e42204a..dbf6964 100644 --- a/noncore/apps/opie-reader/opie-reader.pro +++ b/noncore/apps/opie-reader/opie-reader.pro | |||
@@ -86,5 +86,5 @@ TARGET = reader | |||
86 | INCLUDEPATH+= $(OPIEDIR)/include | 86 | INCLUDEPATH+= $(OPIEDIR)/include |
87 | DEPENDPATH+= $(OPIEDIR)/include | 87 | DEPENDPATH+= $(OPIEDIR)/include |
88 | LIBS += -lqpe | 88 | LIBS += -lqpe -lopiecore2 |
89 | 89 | ||
90 | include ( $(OPIEDIR)/include.pro ) | 90 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/apps/opie-reader/plucker.cpp b/noncore/apps/opie-reader/plucker.cpp index e52fd6a..a8e688f 100644 --- a/noncore/apps/opie-reader/plucker.cpp +++ b/noncore/apps/opie-reader/plucker.cpp | |||
@@ -58,5 +58,5 @@ int CPlucker::bgetch() | |||
58 | if (!m_continuous) return EOF; | 58 | if (!m_continuous) return EOF; |
59 | if (bufferrec >= ntohs(head.recordList.numRecords) - 1) return EOF; | 59 | if (bufferrec >= ntohs(head.recordList.numRecords) - 1) return EOF; |
60 | ////qDebug("Passing through %u", currentpos); | 60 | ////odebug << "Passing through " << currentpos << "" << oendl; |
61 | if (!expand(bufferrec+1)) return EOF; | 61 | if (!expand(bufferrec+1)) return EOF; |
62 | mystyle.unset(); | 62 | mystyle.unset(); |
@@ -65,10 +65,10 @@ int CPlucker::bgetch() | |||
65 | while (m_ParaOffsets[m_nextParaIndex+1] == 0) | 65 | while (m_ParaOffsets[m_nextParaIndex+1] == 0) |
66 | { | 66 | { |
67 | // qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); | 67 | // odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; |
68 | m_nextParaIndex++; | 68 | m_nextParaIndex++; |
69 | } | 69 | } |
70 | } | 70 | } |
71 | mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); | 71 | mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); |
72 | //qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); | 72 | //odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; |
73 | ch = 10; | 73 | ch = 10; |
74 | EOPPhase = 4; | 74 | EOPPhase = 4; |
@@ -80,5 +80,5 @@ int CPlucker::bgetch() | |||
80 | UInt16 attr = m_ParaAttrs[m_nextParaIndex]; | 80 | UInt16 attr = m_ParaAttrs[m_nextParaIndex]; |
81 | m_nextParaIndex++; | 81 | m_nextParaIndex++; |
82 | // qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); | 82 | // odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; |
83 | if (m_nextParaIndex == m_nParas) | 83 | if (m_nextParaIndex == m_nParas) |
84 | { | 84 | { |
@@ -92,5 +92,5 @@ int CPlucker::bgetch() | |||
92 | mystyle.unset(); | 92 | mystyle.unset(); |
93 | mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); | 93 | mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); |
94 | //qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); | 94 | //odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; |
95 | if (m_lastBreak == locate()) | 95 | if (m_lastBreak == locate()) |
96 | { | 96 | { |
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp index caa945d..b523a54 100644 --- a/noncore/apps/opie-reader/plucker_base.cpp +++ b/noncore/apps/opie-reader/plucker_base.cpp | |||
@@ -1,14 +1,16 @@ | |||
1 | |||
2 | |||
1 | #include "useqpe.h" | 3 | #include "useqpe.h" |
2 | #include <stdio.h> | 4 | #include "plucker_base.h" |
3 | #include <string.h> | 5 | #include "Aportis.h" |
6 | #include "Palm2QImage.h" | ||
7 | |||
8 | /* OPIE */ | ||
9 | #include <opie2/odebug.h> | ||
4 | #ifdef USEQPE | 10 | #ifdef USEQPE |
5 | #include <qpe/qcopenvelope_qws.h> | 11 | #include <qpe/qcopenvelope_qws.h> |
6 | #endif /* USEQPE */ | ||
7 | #ifdef LOCALPICTURES | ||
8 | #include <qscrollview.h> | ||
9 | #endif | ||
10 | #ifdef USEQPE | ||
11 | #include <qpe/global.h> | 12 | #include <qpe/global.h> |
12 | #endif /* USEQPE */ | 13 | #endif /* USEQPE */ |
14 | |||
13 | #ifndef USEQPE | 15 | #ifndef USEQPE |
14 | #include <qapplication.h> | 16 | #include <qapplication.h> |
@@ -17,7 +19,13 @@ | |||
17 | #endif /* USEQPE */ | 19 | #endif /* USEQPE */ |
18 | 20 | ||
19 | #include "plucker_base.h" | 21 | /* QT */ |
20 | #include "Aportis.h" | 22 | #ifdef LOCALPICTURES |
21 | #include "Palm2QImage.h" | 23 | #include <qscrollview.h> |
24 | #endif | ||
25 | |||
26 | /* STD */ | ||
27 | #include <stdio.h> | ||
28 | #include <string.h> | ||
29 | |||
22 | 30 | ||
23 | CPlucker_base::CPlucker_base() : | 31 | CPlucker_base::CPlucker_base() : |
@@ -94,5 +102,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
94 | fread(&hdr0, 1, 6, fin); | 102 | fread(&hdr0, 1, 6, fin); |
95 | unsigned int nrecs = ntohs(hdr0.nRecords); | 103 | unsigned int nrecs = ntohs(hdr0.nRecords); |
96 | //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); | 104 | //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl; |
97 | UInt16 urlid = 0; | 105 | UInt16 urlid = 0; |
98 | bool urlsfound = false; | 106 | bool urlsfound = false; |
@@ -104,12 +112,12 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
104 | fread(&name, 1, sizeof(name), fin); | 112 | fread(&name, 1, sizeof(name), fin); |
105 | fread(&id, 1, sizeof(id), fin); | 113 | fread(&id, 1, sizeof(id), fin); |
106 | //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); | 114 | //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl; |
107 | if (ntohs(name) == 2) | 115 | if (ntohs(name) == 2) |
108 | { | 116 | { |
109 | urlsfound = true; | 117 | urlsfound = true; |
110 | urlid = id; | 118 | urlid = id; |
111 | //qDebug("Found url index:%d", ntohs(urlid)); | 119 | //odebug << "Found url index:" << ntohs(urlid) << "" << oendl; |
112 | } | 120 | } |
113 | ////qDebug("%x", id); | 121 | // //odebug << "" << id << "" << oendl; |
114 | } | 122 | } |
115 | if (urlsfound) | 123 | if (urlsfound) |
@@ -130,5 +138,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
130 | fread(&urlid, 1, sizeof(urlid), fin); | 138 | fread(&urlid, 1, sizeof(urlid), fin); |
131 | tctr = ntohs(tctr); | 139 | tctr = ntohs(tctr); |
132 | //qDebug("tgt:%u urlctr:%u tctr:%u", tgt, urlctr, tctr); | 140 | //odebug << "tgt:" << tgt << " urlctr:" << urlctr << " tctr:" << tctr << "" << oendl; |
133 | if (tctr >= tgt) | 141 | if (tctr >= tgt) |
134 | { | 142 | { |
@@ -137,5 +145,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
137 | urlctr = tctr; | 145 | urlctr = tctr; |
138 | } | 146 | } |
139 | //qDebug("urls are in %d", ntohs(urlid)); | 147 | //odebug << "urls are in " << ntohs(urlid) << "" << oendl; |
140 | recptr = finduid(ntohs(urlid)); | 148 | recptr = finduid(ntohs(urlid)); |
141 | if (recptr != 0) | 149 | if (recptr != 0) |
@@ -144,5 +152,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
144 | gotorecordnumber(recptr); | 152 | gotorecordnumber(recptr); |
145 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 153 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
146 | //qDebug("Found urls:%x",thishdr_type); | 154 | //odebug << "Found urls:" << thishdr_type << "" << oendl; |
147 | urlsize = thishdr_size; | 155 | urlsize = thishdr_size; |
148 | urls = new char[urlsize]; | 156 | urls = new char[urlsize]; |
@@ -154,5 +162,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
154 | if (rn == tgt) | 162 | if (rn == tgt) |
155 | { | 163 | { |
156 | //qDebug("URL:%s", ptr); | 164 | //odebug << "URL:" << ptr << "" << oendl; |
157 | int len = strlen(ptr)+1; | 165 | int len = strlen(ptr)+1; |
158 | pRet = new char[len]; | 166 | pRet = new char[len]; |
@@ -251,5 +259,5 @@ void CPlucker_base::locate(unsigned int n) | |||
251 | recptr--; | 259 | recptr--; |
252 | gotorecordnumber(recptr); | 260 | gotorecordnumber(recptr); |
253 | //qDebug("recptr:%u", recptr); | 261 | //odebug << "recptr:" << recptr << "" << oendl; |
254 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 262 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
255 | if (thishdr_type < 2) | 263 | if (thishdr_type < 2) |
@@ -276,5 +284,5 @@ void CPlucker_base::locate(unsigned int n) | |||
276 | } | 284 | } |
277 | } | 285 | } |
278 | // qDebug("Time(1): %u", clock()-start); | 286 | // odebug << "Time(1): " << clock()-start << "" << oendl; |
279 | /* | 287 | /* |
280 | expand(recptr); | 288 | expand(recptr); |
@@ -322,8 +330,8 @@ void CPlucker_base::locate(unsigned int n) | |||
322 | } while (locpos + bs <= n); | 330 | } while (locpos + bs <= n); |
323 | 331 | ||
324 | // qDebug("Time(2): %u", clock()-start); | 332 | // odebug << "Time(2): " << clock()-start << "" << oendl; |
325 | if (recptr != thisrec) | 333 | if (recptr != thisrec) |
326 | { | 334 | { |
327 | qDebug("Disaster:recptr:%u thisrec:%u", recptr, thisrec); | 335 | odebug << "Disaster:recptr:" << recptr << " thisrec:" << thisrec << "" << oendl; |
328 | UInt16 thishdr_uid, thishdr_nParagraphs; | 336 | UInt16 thishdr_uid, thishdr_nParagraphs; |
329 | UInt32 thishdr_size = buffercontent; | 337 | UInt32 thishdr_size = buffercontent; |
@@ -333,5 +341,5 @@ void CPlucker_base::locate(unsigned int n) | |||
333 | gotorecordnumber(recptr); | 341 | gotorecordnumber(recptr); |
334 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 342 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
335 | // qDebug("UID:%u Paras:%u Size:%u Type:%u Reserved:%u", thishdr_uid, thishdr_nParagraphs, thishdr_size, (unsigned int)thishdr_type, (unsigned int)thishdr_reserved); | 343 | // odebug << "UID:" << thishdr_uid << " Paras:" << thishdr_nParagraphs << " Size:" << thishdr_size << " Type:" << (unsigned int)thishdr_type << " Reserved:" << (unsigned int)thishdr_reserved << "" << oendl; |
336 | } | 344 | } |
337 | //QApplication::exit ( 100 ); | 345 | //QApplication::exit ( 100 ); |
@@ -372,7 +380,7 @@ bool CPlucker_base::expand(int thisrec) | |||
372 | { | 380 | { |
373 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 381 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
374 | //qDebug("This (%d) type is %d, uid is %u", thisrec, thishdr_type, thishdr_uid); | 382 | //odebug << "This (" << thisrec << ") type is " << thishdr_type << ", uid is " << thishdr_uid << "" << oendl; |
375 | if (thishdr_type < 2) break; | 383 | if (thishdr_type < 2) break; |
376 | //qDebug("Skipping paragraph of type %d", thishdr_type); | 384 | //odebug << "Skipping paragraph of type " << thishdr_type << "" << oendl; |
377 | if (++thisrec >= ntohs(head.recordList.numRecords) - 1) return false; | 385 | if (++thisrec >= ntohs(head.recordList.numRecords) - 1) return false; |
378 | reclen = recordlength(thisrec); | 386 | reclen = recordlength(thisrec); |
@@ -381,5 +389,5 @@ bool CPlucker_base::expand(int thisrec) | |||
381 | m_nParas = thishdr_nParagraphs; | 389 | m_nParas = thishdr_nParagraphs; |
382 | m_bufferisreserved = (thishdr_reserved != 0); | 390 | m_bufferisreserved = (thishdr_reserved != 0); |
383 | //qDebug("It has %u paragraphs and is %u bytes", thishdr_nParagraphs, thishdr_size); | 391 | //odebug << "It has " << thishdr_nParagraphs << " paragraphs and is " << thishdr_size << " bytes" << oendl; |
384 | uid = thishdr_uid; | 392 | uid = thishdr_uid; |
385 | // gotorecordnumber(thisrec); | 393 | // gotorecordnumber(thisrec); |
@@ -392,10 +400,10 @@ bool CPlucker_base::expand(int thisrec) | |||
392 | m_ParaOffsets[i] = ntohs(ubytes); | 400 | m_ParaOffsets[i] = ntohs(ubytes); |
393 | m_ParaAttrs[i] = ntohs(attrs); | 401 | m_ParaAttrs[i] = ntohs(attrs); |
394 | ////qDebug("Bytes %u, Attr %x", ntohs(ubytes), ntohs(attrs)); | 402 | // //odebug << "Bytes " << ntohs(ubytes) << ", Attr " << ntohs(attrs) << "" << oendl; |
395 | } | 403 | } |
396 | if (m_nParas > 0) | 404 | if (m_nParas > 0) |
397 | { | 405 | { |
398 | m_nextPara = m_ParaOffsets[0]; | 406 | m_nextPara = m_ParaOffsets[0]; |
399 | //qDebug("First offset = %u", m_nextPara); | 407 | //odebug << "First offset = " << m_nextPara << "" << oendl; |
400 | m_nextParaIndex = 0; | 408 | m_nextParaIndex = 0; |
401 | } | 409 | } |
@@ -419,5 +427,5 @@ bool CPlucker_base::expand(int thisrec) | |||
419 | bufferpos = 0; | 427 | bufferpos = 0; |
420 | bufferrec = thisrec; | 428 | bufferrec = thisrec; |
421 | //qDebug("BC:%u, HS:%u", buffercontent, thishdr_size); | 429 | //odebug << "BC:" << buffercontent << ", HS:" << thishdr_size << "" << oendl; |
422 | return true; | 430 | return true; |
423 | } | 431 | } |
@@ -453,5 +461,5 @@ void CPlucker_base::UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuff | |||
453 | err = inflate( &zstream, Z_SYNC_FLUSH ); | 461 | err = inflate( &zstream, Z_SYNC_FLUSH ); |
454 | 462 | ||
455 | ////qDebug("err:%d - %u", err, zstream.avail_in); | 463 | // //odebug << "err:" << err << " - " << zstream.avail_in << "" << oendl; |
456 | 464 | ||
457 | } while ( err == Z_OK ); | 465 | } while ( err == Z_OK ); |
@@ -535,7 +543,7 @@ CList<Bkmk>* CPlucker_base::getbkmklist() | |||
535 | fread(&n, 1, sizeof(n), fin); | 543 | fread(&n, 1, sizeof(n), fin); |
536 | n = ntohs(n); | 544 | n = ntohs(n); |
537 | //qDebug("Found %u bookmarks", n); | 545 | //odebug << "Found " << n << " bookmarks" << oendl; |
538 | } | 546 | } |
539 | //qDebug("Found:%d, %u", i , thishdr_type); | 547 | //odebug << "Found:" << i << ", " << thishdr_type << "" << oendl; |
540 | } | 548 | } |
541 | */ | 549 | */ |
@@ -593,5 +601,5 @@ QImage* CPlucker_base::getPicture(unsigned long tgt) | |||
593 | void CPlucker_base::showimg(UInt16 tgt) | 601 | void CPlucker_base::showimg(UInt16 tgt) |
594 | { | 602 | { |
595 | //qDebug("Crassssssh!"); | 603 | //odebug << "Crassssssh!" << oendl; |
596 | QPixmap* qimage = expandimg(tgt); | 604 | QPixmap* qimage = expandimg(tgt); |
597 | m_picture->setFixedSize(qimage->size()); | 605 | m_picture->setFixedSize(qimage->size()); |
@@ -604,5 +612,5 @@ void CPlucker_base::showimg(UInt16 tgt) | |||
604 | QImage* qimage = getimg(tgt); | 612 | QImage* qimage = getimg(tgt); |
605 | QPixmap* image = new QPixmap(0,0); | 613 | QPixmap* image = new QPixmap(0,0); |
606 | // //qDebug("New image"); | 614 | // //odebug << "New image" << oendl; |
607 | image->convertFromImage(*qimage); | 615 | image->convertFromImage(*qimage); |
608 | delete qimage; | 616 | delete qimage; |
@@ -611,5 +619,5 @@ void CPlucker_base::showimg(UInt16 tgt) | |||
611 | int f = mkstemp(tmpfile); | 619 | int f = mkstemp(tmpfile); |
612 | close(f); | 620 | close(f); |
613 | //qDebug("TMPFILE:%s", tmpfile); | 621 | //odebug << "TMPFILE:" << tmpfile << "" << oendl; |
614 | if (image->save(tmpfile,"PNG")) | 622 | if (image->save(tmpfile,"PNG")) |
615 | { | 623 | { |
@@ -628,5 +636,5 @@ void CPlucker_base::showimg(UInt16 tgt) | |||
628 | unsigned short CPlucker_base::finduid(unsigned short urlid) | 636 | unsigned short CPlucker_base::finduid(unsigned short urlid) |
629 | { | 637 | { |
630 | // //qDebug("Finding %u", urlid); | 638 | // //odebug << "Finding " << urlid << "" << oendl; |
631 | unsigned short jmin = 1, jmax = ntohs(head.recordList.numRecords); | 639 | unsigned short jmin = 1, jmax = ntohs(head.recordList.numRecords); |
632 | unsigned short jmid = (jmin+jmax) >> 1; | 640 | unsigned short jmid = (jmin+jmax) >> 1; |
@@ -639,5 +647,5 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
639 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 647 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
640 | unsigned short luid = thishdr_uid; | 648 | unsigned short luid = thishdr_uid; |
641 | ////qDebug("%u %u %u : %u", jmin, jmid, jmax, urlid); | 649 | // //odebug << "" << jmin << " " << jmid << " " << jmax << " : " << urlid << "" << oendl; |
642 | if (luid == urlid) | 650 | if (luid == urlid) |
643 | { | 651 | { |
@@ -660,5 +668,5 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
660 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 668 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
661 | unsigned short luid = thishdr_uid; | 669 | unsigned short luid = thishdr_uid; |
662 | //qDebug("jmin at end:%u,%u", jmin, luid); | 670 | //odebug << "jmin at end:" << jmin << "," << luid << "" << oendl; |
663 | if (luid == urlid) | 671 | if (luid == urlid) |
664 | { | 672 | { |
@@ -668,10 +676,10 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
668 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); | 676 | GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); |
669 | luid = thishdr_uid; | 677 | luid = thishdr_uid; |
670 | //qDebug("jmax at end:%u,%u", jmax, luid); | 678 | //odebug << "jmax at end:" << jmax << "," << luid << "" << oendl; |
671 | if (luid == urlid) | 679 | if (luid == urlid) |
672 | { | 680 | { |
673 | return jmax; | 681 | return jmax; |
674 | } | 682 | } |
675 | //qDebug("Couldn't find %u", urlid); | 683 | //odebug << "Couldn't find " << urlid << "" << oendl; |
676 | return 0; // Not found! | 684 | return 0; // Not found! |
677 | } | 685 | } |
@@ -699,5 +707,5 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig | |||
699 | { | 707 | { |
700 | unsigned long t = *it; | 708 | unsigned long t = *it; |
701 | //qDebug("[%u]", t); | 709 | // odebug << "[" << t << "]" << oendl; |
702 | memcpy(newdata, &t, sizeof(t)); | 710 | memcpy(newdata, &t, sizeof(t)); |
703 | newdata += sizeof(t); | 711 | newdata += sizeof(t); |
@@ -722,5 +730,5 @@ void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen) | |||
722 | { | 730 | { |
723 | memcpy(&t, src, sizeof(t)); | 731 | memcpy(&t, src, sizeof(t)); |
724 | // qDebug("[%u]", t); | 732 | // odebug << "[" << t << "]" << oendl; |
725 | visited.push_front(t); | 733 | visited.push_front(t); |
726 | src += sizeof(t); | 734 | src += sizeof(t); |
@@ -752,8 +760,8 @@ int CPlucker_base::OpenFile(const char *src) | |||
752 | expandedtextbuffer = new UInt8[buffersize]; | 760 | expandedtextbuffer = new UInt8[buffersize]; |
753 | 761 | ||
754 | //qDebug("Total number of records:%u", ntohs(head.recordList.numRecords)); | 762 | //odebug << "Total number of records:" << ntohs(head.recordList.numRecords) << "" << oendl; |
755 | 763 | ||
756 | unsigned int nrecs = ntohs(hdr0.nRecords); | 764 | unsigned int nrecs = ntohs(hdr0.nRecords); |
757 | //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); | 765 | //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl; |
758 | UInt16 homerecid = 1; | 766 | UInt16 homerecid = 1; |
759 | for (unsigned int i = 0; i < nrecs; i++) | 767 | for (unsigned int i = 0; i < nrecs; i++) |
@@ -762,5 +770,5 @@ int CPlucker_base::OpenFile(const char *src) | |||
762 | fread(&name, 1, sizeof(name), fin); | 770 | fread(&name, 1, sizeof(name), fin); |
763 | fread(&id, 1, sizeof(id), fin); | 771 | fread(&id, 1, sizeof(id), fin); |
764 | //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); | 772 | //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl; |
765 | if (ntohs(name) == 0) homerecid = ntohs(id); | 773 | if (ntohs(name) == 0) homerecid = ntohs(id); |
766 | } | 774 | } |
@@ -820,5 +828,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
820 | UInt16 tuid = (n >> 16); | 828 | UInt16 tuid = (n >> 16); |
821 | n &= 0xffff; | 829 | n &= 0xffff; |
822 | // //qDebug("Hyper:<%u,%u>", tuid, n); | 830 | // //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl; |
823 | UInt16 thisrec = 1; | 831 | UInt16 thisrec = 1; |
824 | currentpos = 0; | 832 | currentpos = 0; |
@@ -832,5 +840,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
832 | if (tuid == thishdr_uid) break; | 840 | if (tuid == thishdr_uid) break; |
833 | if (thishdr_type < 2) currentpos += thishdr_size; | 841 | if (thishdr_type < 2) currentpos += thishdr_size; |
834 | ////qDebug("hyper-cp:%u", currentpos); | 842 | // //odebug << "hyper-cp:" << currentpos << "" << oendl; |
835 | thisrec++; | 843 | thisrec++; |
836 | if (thisrec >= ntohs(head.recordList.numRecords)) | 844 | if (thisrec >= ntohs(head.recordList.numRecords)) |
@@ -858,5 +866,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
858 | #else | 866 | #else |
859 | #endif /* USEQPE */ | 867 | #endif /* USEQPE */ |
860 | //qDebug("Link:%s", (const char*)wrd); | 868 | //odebug << "Link:" << wrd << "" << oendl; |
861 | // setlink(fn, wrd); | 869 | // setlink(fn, wrd); |
862 | delete [] turl; | 870 | delete [] turl; |
@@ -927,5 +935,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
927 | return eNone; | 935 | return eNone; |
928 | } | 936 | } |
929 | //qDebug("Hyper:<%u,%u>", tuid, n); | 937 | //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl; |
930 | while (bufferpos < n && bufferpos < buffercontent) getch_base(true); | 938 | while (bufferpos < n && bufferpos < buffercontent) getch_base(true); |
931 | /* // This is faster but the alignment doesn't get set | 939 | /* // This is faster but the alignment doesn't get set |
@@ -957,9 +965,9 @@ tchar CPlucker_base::getch_base(bool fast) | |||
957 | { | 965 | { |
958 | ch = bgetch(); | 966 | ch = bgetch(); |
959 | ////qDebug("Function:%x", ch); | 967 | // //odebug << "Function:" << ch << "" << oendl; |
960 | switch (ch) | 968 | switch (ch) |
961 | { | 969 | { |
962 | case 0x38: | 970 | case 0x38: |
963 | // //qDebug("Break:%u", locate()); | 971 | // //odebug << "Break:" << locate() << "" << oendl; |
964 | if (m_lastBreak == locate()) | 972 | if (m_lastBreak == locate()) |
965 | { | 973 | { |
@@ -981,5 +989,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
981 | int ch = bgetch(); | 989 | int ch = bgetch(); |
982 | ln = (ln << 8) + ch; | 990 | ln = (ln << 8) + ch; |
983 | // //qDebug("ch:%d, ln:%u", ch, ln); | 991 | // //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl; |
984 | } | 992 | } |
985 | if (skip == 2) | 993 | if (skip == 2) |
@@ -993,8 +1001,8 @@ tchar CPlucker_base::getch_base(bool fast) | |||
993 | int ch = bgetch(); | 1001 | int ch = bgetch(); |
994 | ln = (ln << 8) + ch; | 1002 | ln = (ln << 8) + ch; |
995 | // //qDebug("ch:%d, ln:%u", ch, ln); | 1003 | // //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl; |
996 | } | 1004 | } |
997 | } | 1005 | } |
998 | // //qDebug("ln:%u", ln); | 1006 | // //odebug << "ln:" << ln << "" << oendl; |
999 | mystyle.setLink(true); | 1007 | mystyle.setLink(true); |
1000 | mystyle.setData(ln); | 1008 | mystyle.setData(ln); |
@@ -1039,5 +1047,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1039 | { | 1047 | { |
1040 | ch = bgetch(); | 1048 | ch = bgetch(); |
1041 | // //qDebug("Font:%d",ch); | 1049 | // //odebug << "Font:" << ch << "" << oendl; |
1042 | mystyle.setVOffset(0); | 1050 | mystyle.setVOffset(0); |
1043 | mystyle.unsetMono(); | 1051 | mystyle.unsetMono(); |
@@ -1073,5 +1081,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1073 | break; | 1081 | break; |
1074 | case 8: // should be fixed width | 1082 | case 8: // should be fixed width |
1075 | //qDebug("Trying fixed width"); | 1083 | //odebug << "Trying fixed width" << oendl; |
1076 | mystyle.setMono(); | 1084 | mystyle.setMono(); |
1077 | break; | 1085 | break; |
@@ -1088,5 +1096,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1088 | break; | 1096 | break; |
1089 | default: | 1097 | default: |
1090 | qDebug("Unrecognised font"); | 1098 | odebug << "Unrecognised font" << oendl; |
1091 | break; | 1099 | break; |
1092 | } | 1100 | } |
@@ -1100,17 +1108,17 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1100 | case 0: | 1108 | case 0: |
1101 | mystyle.setLeftJustify(); | 1109 | mystyle.setLeftJustify(); |
1102 | // //qDebug("left"); | 1110 | // //odebug << "left" << oendl; |
1103 | break; | 1111 | break; |
1104 | case 1: | 1112 | case 1: |
1105 | mystyle.setRightJustify(); | 1113 | mystyle.setRightJustify(); |
1106 | // //qDebug("right"); | 1114 | // //odebug << "right" << oendl; |
1107 | break; | 1115 | break; |
1108 | case 2: | 1116 | case 2: |
1109 | mystyle.setCentreJustify(); | 1117 | mystyle.setCentreJustify(); |
1110 | // //qDebug("centre"); | 1118 | // //odebug << "centre" << oendl; |
1111 | break; | 1119 | break; |
1112 | case 3: | 1120 | case 3: |
1113 | mystyle.setFullJustify(); | 1121 | mystyle.setFullJustify(); |
1114 | // //qDebug("full"); | 1122 | // //odebug << "full" << oendl; |
1115 | break; | 1123 | break; |
1116 | 1124 | ||
@@ -1135,5 +1143,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1135 | if (hasalternate) | 1143 | if (hasalternate) |
1136 | { | 1144 | { |
1137 | //qDebug("Alternate image:%x", ir); | 1145 | //odebug << "Alternate image:" << ir << "" << oendl; |
1138 | UInt16 ir2 = bgetch(); | 1146 | UInt16 ir2 = bgetch(); |
1139 | ir2 = (ir2 << 8) + bgetch(); | 1147 | ir2 = (ir2 << 8) + bgetch(); |
@@ -1150,5 +1158,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1150 | if (!fast) mystyle.setPicture(true, expandimg(ir)); | 1158 | if (!fast) mystyle.setPicture(true, expandimg(ir)); |
1151 | } | 1159 | } |
1152 | // if (mystyle.getLink()) qDebug("Picture link!"); | 1160 | // if (mystyle.getLink()) odebug << "Picture link!" << oendl; |
1153 | ch = '#'; | 1161 | ch = '#'; |
1154 | } | 1162 | } |
@@ -1161,5 +1169,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1161 | UInt8 pc = bgetch(); | 1169 | UInt8 pc = bgetch(); |
1162 | UInt16 w = wc; | 1170 | UInt16 w = wc; |
1163 | // //qDebug("h,w,pc [%u, %u, %u]", h, w, pc); | 1171 | // //odebug << "h,w,pc [" << h << ", " << w << ", " << pc << "]" << oendl; |
1164 | if (w == 0) | 1172 | if (w == 0) |
1165 | { | 1173 | { |
@@ -1168,5 +1176,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1168 | if (w == 0) w = m_scrWidth; | 1176 | if (w == 0) w = m_scrWidth; |
1169 | mystyle.setPicture(false, hRule(w,h,mystyle.Red(),mystyle.Green(),mystyle.Blue())); | 1177 | mystyle.setPicture(false, hRule(w,h,mystyle.Red(),mystyle.Green(),mystyle.Blue())); |
1170 | // if (mystyle.getLink()) //qDebug("hRule link!"); | 1178 | // if (mystyle.getLink()) //odebug << "hRule link!" << oendl; |
1171 | ch = '#'; | 1179 | ch = '#'; |
1172 | } | 1180 | } |
@@ -1183,8 +1191,8 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1183 | ch = bgetch(); | 1191 | ch = bgetch(); |
1184 | mystyle.setLeftMargin(ch); | 1192 | mystyle.setLeftMargin(ch); |
1185 | // //qDebug("Left margin:%d", ch); | 1193 | // //odebug << "Left margin:" << ch << "" << oendl; |
1186 | ch = bgetch(); | 1194 | ch = bgetch(); |
1187 | mystyle.setRightMargin(ch); | 1195 | mystyle.setRightMargin(ch); |
1188 | // //qDebug("Right margin:%d", ch); | 1196 | // //odebug << "Right margin:" << ch << "" << oendl; |
1189 | ch = bgetch(); | 1197 | ch = bgetch(); |
1190 | break; | 1198 | break; |
@@ -1204,10 +1212,10 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1204 | ch |= (tchar)bgetch(); | 1212 | ch |= (tchar)bgetch(); |
1205 | for (int i = 0; i < tlen; i++) bgetch(); | 1213 | for (int i = 0; i < tlen; i++) bgetch(); |
1206 | //qDebug("Function 83"); | 1214 | //odebug << "Function 83" << oendl; |
1207 | } | 1215 | } |
1208 | break; | 1216 | break; |
1209 | case 0x85: | 1217 | case 0x85: |
1210 | default: | 1218 | default: |
1211 | qDebug("Function:%x NOT IMPLEMENTED", ch); | 1219 | odebug << "Function:" << ch << " NOT IMPLEMENTED" << oendl; |
1212 | { | 1220 | { |
1213 | int skip = ch & 7; | 1221 | int skip = ch & 7; |
@@ -1215,5 +1223,5 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1215 | { | 1223 | { |
1216 | ch = bgetch(); | 1224 | ch = bgetch(); |
1217 | //qDebug("Arg %d, %d", i, ch); | 1225 | //odebug << "Arg " << i << ", " << ch << "" << oendl; |
1218 | } | 1226 | } |
1219 | ch = bgetch(); | 1227 | ch = bgetch(); |
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp index 22a4917..4c15fd0 100644 --- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp +++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp | |||
@@ -23,22 +23,23 @@ | |||
23 | 23 | ||
24 | #include "katebuffer.h" | 24 | #include "katebuffer.h" |
25 | #include "kdebug.h" | ||
25 | 26 | ||
26 | // Includes for reading file | 27 | /* OPIE */ |
27 | #include <sys/types.h> | 28 | #include <opie2/odebug.h> |
28 | #include <sys/stat.h> | ||
29 | #include <fcntl.h> | ||
30 | #include <errno.h> | ||
31 | #include <unistd.h> | ||
32 | 29 | ||
30 | /* QT */ | ||
33 | #include <qfile.h> | 31 | #include <qfile.h> |
34 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
35 | |||
36 | #include <qtimer.h> | 33 | #include <qtimer.h> |
37 | #include <qtextcodec.h> | 34 | #include <qtextcodec.h> |
38 | 35 | ||
39 | // | 36 | /* STD */ |
40 | 37 | // Includes for reading file | |
38 | #include <sys/types.h> | ||
39 | #include <sys/stat.h> | ||
40 | #include <fcntl.h> | ||
41 | #include <errno.h> | ||
42 | #include <unistd.h> | ||
41 | #include <assert.h> | 43 | #include <assert.h> |
42 | #include <kdebug.h> | ||
43 | 44 | ||
44 | /** | 45 | /** |
@@ -67,5 +68,5 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) | |||
67 | { | 68 | { |
68 | if (line) { | 69 | if (line) { |
69 | qDebug("insert File only supports insertion at line 0 == file opening"); | 70 | odebug << "insert File only supports insertion at line 0 == file opening" << oendl; |
70 | return; | 71 | return; |
71 | } | 72 | } |
@@ -122,5 +123,5 @@ int | |||
122 | KWBuffer::count() | 123 | KWBuffer::count() |
123 | { | 124 | { |
124 | qDebug("m_stringList.count %d",m_stringList.count()); | 125 | odebug << "m_stringList.count " << m_stringList.count() << "" << oendl; |
125 | return m_lineCount; | 126 | return m_lineCount; |
126 | //return m_stringList.count(); | 127 | //return m_stringList.count(); |
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp index 0c742d7..6dc4fd2 100644 --- a/noncore/apps/tinykate/libkate/document/katedocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp | |||
@@ -40,18 +40,29 @@ | |||
40 | 40 | ||
41 | #include "katedocument.h" | 41 | #include "katedocument.h" |
42 | #include "kmessagebox.h" | ||
43 | #include "kglobal.h" | ||
42 | 44 | ||
45 | //#include "kcharsets.h" | ||
46 | #include "kdebug.h" | ||
47 | //#include "kinstance.h" | ||
43 | 48 | ||
44 | #include <qfileinfo.h> | 49 | #include "kglobalsettings.h" |
45 | #include <qdatetime.h> | 50 | //#include "kaction.h" |
51 | //#include "kstdaction.h" | ||
46 | 52 | ||
47 | #include <kmessagebox.h> | 53 | #include "../view/kateview.h" |
48 | #include <qpe/config.h> | 54 | #include "katebuffer.h" |
49 | #include <qstring.h> | 55 | #include "katetextline.h" |
50 | 56 | ||
51 | #include <sys/time.h> | 57 | #include "katecmd.h" |
52 | #include <unistd.h> | ||
53 | 58 | ||
54 | #include <stdio.h> | 59 | /* OPIE */ |
60 | #include <opie2/odebug.h> | ||
61 | #include <qpe/config.h> | ||
55 | 62 | ||
63 | /* QT */ | ||
64 | #include <qfileinfo.h> | ||
65 | #include <qdatetime.h> | ||
66 | #include <qstring.h> | ||
56 | #include <qtimer.h> | 67 | #include <qtimer.h> |
57 | #include <qobject.h> | 68 | #include <qobject.h> |
@@ -63,19 +74,9 @@ | |||
63 | #include <qtextstream.h> | 74 | #include <qtextstream.h> |
64 | #include <qtextcodec.h> | 75 | #include <qtextcodec.h> |
65 | #include <kglobal.h> | ||
66 | |||
67 | //#include <kcharsets.h> | ||
68 | #include <kdebug.h> | ||
69 | //#include <kinstance.h> | ||
70 | |||
71 | #include <kglobalsettings.h> | ||
72 | //#include <kaction.h> | ||
73 | //#include <kstdaction.h> | ||
74 | |||
75 | #include "../view/kateview.h" | ||
76 | #include "katebuffer.h" | ||
77 | #include "katetextline.h" | ||
78 | 76 | ||
79 | #include "katecmd.h" | 77 | /* STD */ |
78 | #include <sys/time.h> | ||
79 | #include <unistd.h> | ||
80 | #include <stdio.h> | ||
80 | 81 | ||
81 | KateAction::KateAction(Action a, PointStruc &cursor, int len, const QString &text) | 82 | KateAction::KateAction(Action a, PointStruc &cursor, int len, const QString &text) |
@@ -299,5 +300,5 @@ void KateDocument::openURL(const QString &filename) | |||
299 | if (!fileInfo->exists() || !fileInfo->isReadable()) | 300 | if (!fileInfo->exists() || !fileInfo->isReadable()) |
300 | { | 301 | { |
301 | qDebug("File doesn't exit or couldn't be read"); | 302 | odebug << "File doesn't exit or couldn't be read" << oendl; |
302 | return ; | 303 | return ; |
303 | } | 304 | } |
@@ -306,5 +307,5 @@ void KateDocument::openURL(const QString &filename) | |||
306 | #warning fixme | 307 | #warning fixme |
307 | // buffer->insertFile(0, m_file, KGlobal::charsets()->codecForName(myEncoding)); | 308 | // buffer->insertFile(0, m_file, KGlobal::charsets()->codecForName(myEncoding)); |
308 | qDebug("Telling buffer to open file"); | 309 | odebug << "Telling buffer to open file" << oendl; |
309 | buffer->insertFile(0, m_file, QTextCodec::codecForLocale()); | 310 | buffer->insertFile(0, m_file, QTextCodec::codecForLocale()); |
310 | 311 | ||
@@ -684,5 +685,5 @@ void KateDocument::setHighlight(int n) { | |||
684 | 685 | ||
685 | void KateDocument::makeAttribs() { | 686 | void KateDocument::makeAttribs() { |
686 | qDebug("KateDocument::makeAttribs()"); | 687 | odebug << "KateDocument::makeAttribs()" << oendl; |
687 | m_numAttribs = hlManager->makeAttribs(m_highlight, m_attribs, maxAttribs); | 688 | m_numAttribs = hlManager->makeAttribs(m_highlight, m_attribs, maxAttribs); |
688 | updateFontData(); | 689 | updateFontData(); |
@@ -1924,5 +1925,5 @@ void KateDocument::updateLines(int startLine, int endLine, int flags, int cursor | |||
1924 | } | 1925 | } |
1925 | endCtx = textLine->getContext(); | 1926 | endCtx = textLine->getContext(); |
1926 | // qDebug("DOHIGHLIGHT"); | 1927 | // odebug << "DOHIGHLIGHT" << oendl; |
1927 | 1928 | ||
1928 | ctxNum = m_highlight->doHighlight(ctxNum,textLine); | 1929 | ctxNum = m_highlight->doHighlight(ctxNum,textLine); |
diff --git a/noncore/apps/tinykate/libkate/document/katehighlight.cpp b/noncore/apps/tinykate/libkate/document/katehighlight.cpp index 0d2c283..539d356 100644 --- a/noncore/apps/tinykate/libkate/document/katehighlight.cpp +++ b/noncore/apps/tinykate/libkate/document/katehighlight.cpp | |||
@@ -20,24 +20,28 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <string.h> | ||
23 | |||
24 | #include <qtextstream.h> | ||
25 | #include <qpe/config.h> | ||
26 | #include <kglobal.h> | ||
27 | //#include <kinstance.h> | ||
28 | //#include <kmimemagic.h> | ||
29 | #include <klocale.h> | ||
30 | //#include <kregexp.h> | ||
31 | #include <kglobalsettings.h> | ||
32 | #include <kdebug.h> | ||
33 | #include <kstddirs.h> | ||
34 | |||
35 | #include "katehighlight.h" | 22 | #include "katehighlight.h" |
36 | |||
37 | |||
38 | #include "katetextline.h" | 23 | #include "katetextline.h" |
39 | #include "katedocument.h" | 24 | #include "katedocument.h" |
40 | #include "katesyntaxdocument.h" | 25 | #include "katesyntaxdocument.h" |
41 | 26 | ||
27 | #include "kglobal.h" | ||
28 | //#include "kinstance.h" | ||
29 | //#include "kmimemagic.h" | ||
30 | #include "klocale.h" | ||
31 | //#include "kregexp.h" | ||
32 | #include "kglobalsettings.h" | ||
33 | #include "kdebug.h" | ||
34 | #include "kstddirs.h" | ||
35 | |||
36 | /* OPIE */ | ||
37 | #include <opie2/odebug.h> | ||
38 | #include <qpe/config.h> | ||
39 | |||
40 | /* QT */ | ||
41 | #include <qtextstream.h> | ||
42 | |||
43 | /* STD */ | ||
44 | #include <string.h> | ||
45 | |||
42 | 46 | ||
43 | HlManager *HlManager::s_pSelf = 0; | 47 | HlManager *HlManager::s_pSelf = 0; |
@@ -622,5 +626,5 @@ int Highlight::doHighlight(int ctxNum, TextLine *textLine) | |||
622 | if (s2 > s1) | 626 | if (s2 > s1) |
623 | { | 627 | { |
624 | qDebug("An item has been detected"); | 628 | odebug << "An item has been detected" << oendl; |
625 | textLine->setAttribs(item->attr,s1 - str,s2 - str); | 629 | textLine->setAttribs(item->attr,s1 - str,s2 - str); |
626 | ctxNum = item->ctx; | 630 | ctxNum = item->ctx; |
@@ -854,5 +858,5 @@ void Highlight::done() | |||
854 | void Highlight::createItemData(ItemDataList &list) | 858 | void Highlight::createItemData(ItemDataList &list) |
855 | { | 859 | { |
856 | qDebug("Highlight::createItemData"); | 860 | odebug << "Highlight::createItemData" << oendl; |
857 | 861 | ||
858 | // If no highlighting is selected we need only one default. | 862 | // If no highlighting is selected we need only one default. |
@@ -875,5 +879,5 @@ void Highlight::createItemData(ItemDataList &list) | |||
875 | syntaxContextData *data; | 879 | syntaxContextData *data; |
876 | 880 | ||
877 | qDebug("Trying to read itemData section"); | 881 | odebug << "Trying to read itemData section" << oendl; |
878 | 882 | ||
879 | //Tell the syntax document class which file we want to parse and which data group | 883 | //Tell the syntax document class which file we want to parse and which data group |
@@ -883,5 +887,5 @@ void Highlight::createItemData(ItemDataList &list) | |||
883 | while (HlManager::self()->syntax->nextGroup(data)) | 887 | while (HlManager::self()->syntax->nextGroup(data)) |
884 | { | 888 | { |
885 | qDebug("Setting up one itemData element"); | 889 | odebug << "Setting up one itemData element" << oendl; |
886 | // read all attributes | 890 | // read all attributes |
887 | color=HlManager::self()->syntax->groupData(data,QString("color")); | 891 | color=HlManager::self()->syntax->groupData(data,QString("color")); |
@@ -1313,5 +1317,5 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { | |||
1313 | int nAttribs, z; | 1317 | int nAttribs, z; |
1314 | 1318 | ||
1315 | qDebug("HlManager::makeAttribs"); | 1319 | odebug << "HlManager::makeAttribs" << oendl; |
1316 | 1320 | ||
1317 | defaultStyleList.setAutoDelete(true); | 1321 | defaultStyleList.setAutoDelete(true); |
@@ -1322,5 +1326,5 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { | |||
1322 | nAttribs = itemDataList.count(); | 1326 | nAttribs = itemDataList.count(); |
1323 | for (z = 0; z < nAttribs; z++) { | 1327 | for (z = 0; z < nAttribs; z++) { |
1324 | qDebug("HlManager::makeAttribs: createing one attribute definition"); | 1328 | odebug << "HlManager::makeAttribs: createing one attribute definition" << oendl; |
1325 | itemData = itemDataList.at(z); | 1329 | itemData = itemDataList.at(z); |
1326 | if (itemData->defStyle) { | 1330 | if (itemData->defStyle) { |
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp index 6059e9b..9fa4452 100644 --- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp | |||
@@ -17,13 +17,18 @@ | |||
17 | 17 | ||
18 | #include "katesyntaxdocument.h" | 18 | #include "katesyntaxdocument.h" |
19 | #include <kateconfig.h> | 19 | #include "kateconfig.h" |
20 | #include "kdebug.h" | ||
21 | #include "kstddirs.h" | ||
22 | #include "klocale.h" | ||
23 | #include "kmessagebox.h" | ||
24 | #include "kglobal.h" | ||
25 | |||
26 | /* OPIE */ | ||
27 | #include <opie2/odebug.h> | ||
28 | #include <qpe/qpeapplication.h> | ||
29 | |||
30 | /* QT */ | ||
20 | #include <qfile.h> | 31 | #include <qfile.h> |
21 | #include <kdebug.h> | ||
22 | #include <kstddirs.h> | ||
23 | #include <klocale.h> | ||
24 | #include <kmessagebox.h> | ||
25 | #include <qstringlist.h> | 32 | #include <qstringlist.h> |
26 | #include <kglobal.h> | ||
27 | #include <qpe/qpeapplication.h> | ||
28 | #include <qdir.h> | 33 | #include <qdir.h> |
29 | 34 | ||
@@ -77,5 +82,5 @@ void SyntaxDocument::setupModeList(bool force) | |||
77 | else | 82 | else |
78 | { | 83 | { |
79 | qDebug("Found a description file:"+path+(*it)); | 84 | odebug << "Found a description file:"+path+(*it) << oendl; |
80 | setIdentifier(path+(*it)); | 85 | setIdentifier(path+(*it)); |
81 | Opie::Core::XMLElement *e=m_root; | 86 | Opie::Core::XMLElement *e=m_root; |
@@ -83,5 +88,5 @@ void SyntaxDocument::setupModeList(bool force) | |||
83 | { | 88 | { |
84 | e=e->firstChild(); | 89 | e=e->firstChild(); |
85 | qDebug(e->tagName()); | 90 | odebug << e->tagName() << oendl; |
86 | if (e->tagName()=="language") | 91 | if (e->tagName()=="language") |
87 | { | 92 | { |
@@ -91,5 +96,5 @@ void SyntaxDocument::setupModeList(bool force) | |||
91 | mli->mimetype = e->attribute("mimetype"); | 96 | mli->mimetype = e->attribute("mimetype"); |
92 | mli->extension = e->attribute("extensions"); | 97 | mli->extension = e->attribute("extensions"); |
93 | qDebug(QString("valid description for: %1/%2").arg(mli->section).arg(mli->name)); | 98 | odebug << QString("valid description for: %1/%2").arg(mli->section).arg(mli->name) << oendl; |
94 | if (mli->section.isEmpty()) | 99 | if (mli->section.isEmpty()) |
95 | mli->section=i18n("Other"); | 100 | mli->section=i18n("Other"); |
@@ -293,5 +298,5 @@ QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& ty | |||
293 | for (Opie::Core::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild()) | 298 | for (Opie::Core::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild()) |
294 | { | 299 | { |
295 | qDebug("FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value()); | 300 | odebug << "FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value() << oendl; |
296 | m_data+=e2->firstChild()->value().stripWhiteSpace(); | 301 | m_data+=e2->firstChild()->value().stripWhiteSpace(); |
297 | } | 302 | } |
diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp index 96f91fb..782b629 100644 --- a/noncore/apps/tinykate/libkate/kateconfig.cpp +++ b/noncore/apps/tinykate/libkate/kateconfig.cpp | |||
@@ -19,4 +19,12 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_LANGLIST | ||
22 | #include "kateconfig.h" | ||
23 | |||
24 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
26 | #include <qpe/global.h> | ||
27 | |||
28 | /* QT */ | ||
21 | #include <qdir.h> | 29 | #include <qdir.h> |
22 | #include <qmessagebox.h> | 30 | #include <qmessagebox.h> |
@@ -26,4 +34,5 @@ | |||
26 | #include <qtextstream.h> | 34 | #include <qtextstream.h> |
27 | 35 | ||
36 | /* STD */ | ||
28 | #include <sys/stat.h> | 37 | #include <sys/stat.h> |
29 | #include <sys/types.h> | 38 | #include <sys/types.h> |
@@ -32,8 +41,4 @@ | |||
32 | #include <unistd.h> | 41 | #include <unistd.h> |
33 | 42 | ||
34 | #define QTOPIA_INTERNAL_LANGLIST | ||
35 | #include "kateconfig.h" | ||
36 | #include <qpe/global.h> | ||
37 | |||
38 | 43 | ||
39 | /*! | 44 | /*! |
@@ -94,5 +99,5 @@ KateConfig::KateConfig( const QString &name, Domain domain ) | |||
94 | : filename( configFilename(name,domain) ) | 99 | : filename( configFilename(name,domain) ) |
95 | { | 100 | { |
96 | qWarning("KateConfig constructor\n"); | 101 | owarn << "KateConfig constructor\n" << oendl; |
97 | git = groups.end(); | 102 | git = groups.end(); |
98 | read(); | 103 | read(); |
@@ -119,5 +124,5 @@ KateConfig::KateConfig ( const QString &name, bool what ) | |||
119 | KateConfig::~KateConfig() | 124 | KateConfig::~KateConfig() |
120 | { | 125 | { |
121 | qWarning("KateConfig destructor\n"); | 126 | owarn << "KateConfig destructor\n" << oendl; |
122 | if ( changed ) | 127 | if ( changed ) |
123 | write(); | 128 | write(); |
@@ -173,5 +178,5 @@ void KateConfig::writeEntry( const QString &key, const QString &value ) | |||
173 | { | 178 | { |
174 | if ( git == groups.end() ) { | 179 | if ( git == groups.end() ) { |
175 | qWarning( "no group set" ); | 180 | owarn << "no group set" << oendl; |
176 | return; | 181 | return; |
177 | } | 182 | } |
@@ -233,5 +238,5 @@ void KateConfig::writeEntryCrypt( const QString &key, const QString &value ) | |||
233 | { | 238 | { |
234 | if ( git == groups.end() ) { | 239 | if ( git == groups.end() ) { |
235 | qWarning( "no group set" ); | 240 | owarn << "no group set" << oendl; |
236 | return; | 241 | return; |
237 | } | 242 | } |
@@ -322,5 +327,5 @@ void KateConfig::removeEntry( const QString &key ) | |||
322 | { | 327 | { |
323 | if ( git == groups.end() ) { | 328 | if ( git == groups.end() ) { |
324 | qWarning( "no group set" ); | 329 | owarn << "no group set" << oendl; |
325 | return; | 330 | return; |
326 | } | 331 | } |
@@ -398,5 +403,5 @@ QString KateConfig::readEntryDirect( const QString &key, const QString &deflt ) | |||
398 | { | 403 | { |
399 | if ( git == groups.end() ) { | 404 | if ( git == groups.end() ) { |
400 | //qWarning( "no group set" ); | 405 | //owarn << "no group set" << oendl; |
401 | return deflt; | 406 | return deflt; |
402 | } | 407 | } |
@@ -501,5 +506,5 @@ void KateConfig::clearGroup() | |||
501 | { | 506 | { |
502 | if ( git == groups.end() ) { | 507 | if ( git == groups.end() ) { |
503 | qWarning( "no group set" ); | 508 | owarn << "no group set" << oendl; |
504 | return; | 509 | return; |
505 | } | 510 | } |
@@ -522,5 +527,5 @@ void KateConfig::write( const QString &fn ) | |||
522 | QFile f( strNewFile ); | 527 | QFile f( strNewFile ); |
523 | if ( !f.open( IO_WriteOnly|IO_Raw ) ) { | 528 | if ( !f.open( IO_WriteOnly|IO_Raw ) ) { |
524 | qWarning( "could not open for writing `%s'", strNewFile.latin1() ); | 529 | owarn << "could not open for writing `" << strNewFile << "'" << oendl; |
525 | git = groups.end(); | 530 | git = groups.end(); |
526 | return; | 531 | return; |
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index 3c9a637..9865c35 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp | |||
@@ -15,16 +15,21 @@ | |||
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #include <qaction.h> | ||
18 | #include <qtoolbutton.h> | ||
19 | #include <qmenubar.h> | ||
20 | #include <qpe/resource.h> | ||
21 | #include <qpe/qpeapplication.h> | ||
22 | 17 | ||
18 | #include "tinykate.h" | ||
19 | |||
20 | #include "katedocument.h" | ||
21 | #include "kglobal.h" | ||
22 | |||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
23 | #include <opie2/ofiledialog.h> | 25 | #include <opie2/ofiledialog.h> |
26 | #include <qpe/resource.h> | ||
27 | #include <qpe/qpeapplication.h> | ||
24 | 28 | ||
25 | #include "tinykate.h" | 29 | /* QT */ |
30 | #include <qaction.h> | ||
31 | #include <qtoolbutton.h> | ||
32 | #include <qmenubar.h> | ||
26 | 33 | ||
27 | #include <katedocument.h> | ||
28 | #include <kglobal.h> | ||
29 | 34 | ||
30 | using namespace Opie::Ui; | 35 | using namespace Opie::Ui; |
@@ -153,5 +158,5 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
153 | TinyKate::~TinyKate( ) | 158 | TinyKate::~TinyKate( ) |
154 | { | 159 | { |
155 | qWarning("TinyKate destructor\n"); | 160 | owarn << "TinyKate destructor\n" << oendl; |
156 | 161 | ||
157 | shutDown=true; | 162 | shutDown=true; |
@@ -161,5 +166,5 @@ TinyKate::~TinyKate( ) | |||
161 | 166 | ||
162 | if( KGlobal::config() != 0 ) { | 167 | if( KGlobal::config() != 0 ) { |
163 | qWarning("deleting KateConfig object..\n"); | 168 | owarn << "deleting KateConfig object..\n" << oendl; |
164 | delete KGlobal::config(); | 169 | delete KGlobal::config(); |
165 | } | 170 | } |
@@ -182,5 +187,5 @@ void TinyKate::open(const QString & filename) | |||
182 | QString filenamed = fi.fileName(); | 187 | QString filenamed = fi.fileName(); |
183 | tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed ); | 188 | tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed ); |
184 | qDebug(filename); | 189 | odebug << filename << oendl; |
185 | 190 | ||
186 | kd->setDocName( filenamed); | 191 | kd->setDocName( filenamed); |
@@ -250,5 +255,5 @@ void TinyKate::slotSave() { | |||
250 | // KateView *kv = (KateView*) currentView; | 255 | // KateView *kv = (KateView*) currentView; |
251 | KateDocument *kd = (KateDocument*) currentView->document(); | 256 | KateDocument *kd = (KateDocument*) currentView->document(); |
252 | // qDebug("saving file "+kd->docName()); | 257 | // odebug << "saving file "+kd->docName() << oendl; |
253 | if( kd->docName().isEmpty()) | 258 | if( kd->docName().isEmpty()) |
254 | slotSaveAs(); | 259 | slotSaveAs(); |
@@ -266,5 +271,5 @@ void TinyKate::slotSaveAs() { | |||
266 | QString::null); | 271 | QString::null); |
267 | if (!filename.isEmpty()) { | 272 | if (!filename.isEmpty()) { |
268 | qDebug("saving file "+filename); | 273 | odebug << "saving file "+filename << oendl; |
269 | QFileInfo fi(filename); | 274 | QFileInfo fi(filename); |
270 | QString filenamed = fi.fileName(); | 275 | QString filenamed = fi.fileName(); |