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 | |||
@@ -15,2 +15,6 @@ | |||
15 | 15 | ||
16 | #include "LibraryDialog.h" | ||
17 | #include "output.h" | ||
18 | |||
19 | /* OPIE */ | ||
16 | #include <qpe/applnk.h> | 20 | #include <qpe/applnk.h> |
@@ -18,6 +22,5 @@ | |||
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> |
@@ -26,2 +29,3 @@ | |||
26 | 29 | ||
30 | /* STD */ | ||
27 | #include <unistd.h> | 31 | #include <unistd.h> |
@@ -66,3 +70,3 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W | |||
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) ); |
@@ -79,3 +83,3 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W | |||
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); |
@@ -101,3 +105,3 @@ void LibraryDialog::Newlibrary() | |||
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) ) { |
@@ -123,3 +127,3 @@ void LibraryDialog::Newlibrary() | |||
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=""; |
@@ -182,3 +186,3 @@ void LibraryDialog::Library() | |||
182 | 186 | ||
183 | qDebug("opening GUTINDEX.ALL file"); | 187 | odebug << "opening GUTINDEX.ALL file" << oendl; |
184 | IDontKnowWhy = ""; | 188 | IDontKnowWhy = ""; |
@@ -202,3 +206,3 @@ void LibraryDialog::Library() | |||
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 ); |
@@ -209,6 +213,6 @@ void LibraryDialog::Library() | |||
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 |
@@ -399,4 +403,4 @@ void LibraryDialog::select_title( QListViewItem * item) | |||
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 | ||
@@ -406,3 +410,3 @@ void LibraryDialog::select_title( QListViewItem * item) | |||
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) { |
@@ -425,3 +429,3 @@ bool LibraryDialog::download_Etext() | |||
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; |
@@ -433,3 +437,3 @@ bool LibraryDialog::download_Etext() | |||
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 | } |
@@ -437,3 +441,3 @@ bool LibraryDialog::download_Etext() | |||
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) { |
@@ -449,4 +453,4 @@ bool LibraryDialog::download_Etext() | |||
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; |
@@ -464,4 +468,4 @@ bool LibraryDialog::download_Etext() | |||
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 | ||
@@ -470,3 +474,3 @@ bool LibraryDialog::download_Etext() | |||
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 | ||
@@ -475,3 +479,3 @@ bool LibraryDialog::download_Etext() | |||
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") { |
@@ -483,3 +487,3 @@ bool LibraryDialog::download_Etext() | |||
483 | 487 | ||
484 | qDebug("Filename is now "+File_Name); | 488 | odebug << "Filename is now "+File_Name << oendl; |
485 | 489 | ||
@@ -492,10 +496,10 @@ bool LibraryDialog::download_Etext() | |||
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 |
@@ -505,3 +509,3 @@ bool LibraryDialog::download_Etext() | |||
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 { |
@@ -572,4 +576,4 @@ bool LibraryDialog::setTitle() | |||
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 | ||
@@ -579,3 +583,3 @@ bool LibraryDialog::setTitle() | |||
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; |
@@ -740,3 +744,3 @@ void LibraryDialog::onButtonSearch() | |||
740 | texter = SearchResultsDialog->selText; | 744 | texter = SearchResultsDialog->selText; |
741 | // qDebug(texter); | 745 | // odebug << texter << oendl; |
742 | resultLs= SearchResultsDialog->resultsList; | 746 | resultLs= SearchResultsDialog->resultsList; |
@@ -751,3 +755,3 @@ void LibraryDialog::onButtonSearch() | |||
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) |
@@ -808,3 +812,3 @@ void LibraryDialog::parseSearchResults( QString resultStr) | |||
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_) |
@@ -842,3 +846,3 @@ bool LibraryDialog::getItem(QListViewItem *it) | |||
842 | { | 846 | { |
843 | // qDebug("selected getItem"); | 847 | // odebug << "selected getItem" << oendl; |
844 | 848 | ||
@@ -860,3 +864,3 @@ bool LibraryDialog::onButtonDownload() | |||
860 | { | 864 | { |
861 | // qDebug("selected onButtonDownloadz"); | 865 | // odebug << "selected onButtonDownloadz" << oendl; |
862 | 866 | ||
@@ -902,3 +906,3 @@ 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); |
@@ -932,3 +936,3 @@ void LibraryDialog::newList() | |||
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"; |
@@ -953,3 +957,3 @@ void LibraryDialog::newList() | |||
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); |
@@ -967,3 +971,3 @@ void LibraryDialog::newList() | |||
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 | // } |
@@ -1026,3 +1030,3 @@ bool LibraryDialog::moreInfo() | |||
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"); |
@@ -1050,3 +1054,3 @@ void LibraryDialog::FindLibrary() | |||
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(); |
@@ -1055,3 +1059,3 @@ void LibraryDialog::FindLibrary() | |||
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(); |
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 | |||
@@ -12,7 +12,3 @@ | |||
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 | ||
@@ -21,2 +17,6 @@ extern "C" { | |||
21 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
20 | |||
21 | /* QT */ | ||
22 | #include <qprogressbar.h> | 22 | #include <qprogressbar.h> |
@@ -32,2 +32,8 @@ extern "C" { | |||
32 | 32 | ||
33 | /* STD */ | ||
34 | #include <unistd.h> | ||
35 | extern "C" { | ||
36 | #include <ftplib.h> | ||
37 | } | ||
38 | |||
33 | QProgressBar* ProgressBar1; | 39 | QProgressBar* ProgressBar1; |
@@ -121,3 +127,3 @@ void NetworkDialog::initDialog() { | |||
121 | if(autoOk) { | 127 | if(autoOk) { |
122 | qWarning("XXXXXXXXXXXXXXXXXXXXXXXX"); | 128 | owarn << "XXXXXXXXXXXXXXXXXXXXXXXX" << oendl; |
123 | buttonOk->setDown(true); | 129 | buttonOk->setDown(true); |
@@ -145,3 +151,3 @@ void NetworkDialog::timeSlot() { | |||
145 | // } | 151 | // } |
146 | // // qDebug("timer event"); | 152 | // // odebug << "timer event" << oendl; |
147 | // qApp->processEvents(); | 153 | // qApp->processEvents(); |
@@ -151,3 +157,3 @@ void NetworkDialog::timeSlot() { | |||
151 | void NetworkDialog::connectionTimeSlot() { | 157 | void NetworkDialog::connectionTimeSlot() { |
152 | // qDebug("Connections timed out"); | 158 | // odebug << "Connections timed out" << oendl; |
153 | // ftpQuit(); | 159 | // ftpQuit(); |
@@ -169,4 +175,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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) { |
@@ -176,3 +182,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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; |
@@ -182,4 +188,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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 ); |
@@ -202,3 +208,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
202 | } | 208 | } |
203 | qDebug("Changing directories."); | 209 | odebug << "Changing directories." << oendl; |
204 | TextLabel3->setText("Changing directories."); | 210 | TextLabel3->setText("Changing directories."); |
@@ -219,3 +225,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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."); |
@@ -234,3 +240,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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()) { |
@@ -243,3 +249,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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; |
@@ -248,3 +254,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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; |
@@ -258,3 +264,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
258 | else | 264 | else |
259 | qDebug("Error opening temp file."); | 265 | odebug << "Error opening temp file." << oendl; |
260 | 266 | ||
@@ -265,4 +271,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
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; |
@@ -295,3 +301,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
295 | } | 301 | } |
296 | qDebug("Ftp session successful"); | 302 | odebug << "Ftp session successful" << oendl; |
297 | successDownload=TRUE; | 303 | successDownload=TRUE; |
@@ -304,3 +310,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) | |||
304 | void NetworkDialog::doOk() { | 310 | void NetworkDialog::doOk() { |
305 | qWarning("Do OK"); | 311 | owarn << "Do OK" << oendl; |
306 | QString loginStr; | 312 | QString loginStr; |
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 | |||
@@ -100,3 +100,3 @@ void SearchDialog::byeBye() | |||
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"); |
@@ -121,3 +121,3 @@ void SearchDialog::closed() | |||
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"); |
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 | |||
@@ -12,2 +12,3 @@ copyright 2001 by L.J. Potter ljp@llornkcor.com | |||
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; |
@@ -54,3 +55,3 @@ void optionsDialog::BrowseSelected() { | |||
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; |
@@ -78,3 +79,3 @@ void optionsDialog::setHttp(int index) { | |||
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) { |
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 | |||
@@ -92,3 +92,3 @@ void FontDialog::familyListBoxSlot(const QString & text) | |||
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 |
@@ -102,3 +102,3 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); | |||
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 )); |
@@ -153,3 +153,3 @@ void FontDialog::populateLists() | |||
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); |
@@ -211,3 +211,3 @@ void FontDialog::changeText() | |||
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) |
@@ -217,3 +217,3 @@ void FontDialog::changeText() | |||
217 | } | 217 | } |
218 | // qDebug("font style is "+style); | 218 | // odebug << "font style is "+style << oendl; |
219 | 219 | ||
@@ -225,3 +225,3 @@ void FontDialog::changeText() | |||
225 | 225 | ||
226 | // qDebug("Font size is "+size); | 226 | // odebug << "Font size is "+size << oendl; |
227 | bool ok; | 227 | bool ok; |
@@ -233,3 +233,3 @@ void FontDialog::changeText() | |||
233 | charSet = *s; | 233 | charSet = *s; |
234 | // qDebug(charSet); | 234 | // odebug << charSet << oendl; |
235 | } | 235 | } |
@@ -237,5 +237,5 @@ void FontDialog::changeText() | |||
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"); |
@@ -251,3 +251,3 @@ void FontDialog::changeText() | |||
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 |
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 | |||
@@ -13,2 +13,3 @@ | |||
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | |||
14 | #include "optionsDialog.h" | 15 | #include "optionsDialog.h" |
@@ -18,11 +19,15 @@ | |||
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 | ||
@@ -40,3 +45,3 @@ void optionsDialog::ftpSiteDlg( ) | |||
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() ) { |
@@ -78,3 +83,3 @@ void optionsDialog::getSite() | |||
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 | // } |
@@ -86,3 +91,3 @@ void optionsDialog::getSite() | |||
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; |
@@ -115,3 +120,3 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
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; |
@@ -154,3 +159,3 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
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; |
@@ -158,3 +163,3 @@ bool optionsDialog::parseFtpList( QString outputFile) | |||
158 | 163 | ||
159 | // qDebug("%s", s_location.latin1()); | 164 | // odebug << "" << s_location << "" << oendl; |
160 | // ftpList += ftpSite + "\n"; | 165 | // ftpList += ftpSite + "\n"; |
@@ -192,3 +197,3 @@ 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"; |
@@ -232,3 +237,3 @@ void optionsDialog::select_site( const char *index ) | |||
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); |
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 | |||
@@ -16,9 +16,3 @@ | |||
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 | ||
@@ -35,3 +29,13 @@ | |||
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> |
@@ -53,2 +57,3 @@ | |||
53 | 57 | ||
58 | /* STD */ | ||
54 | #include <stdio.h> | 59 | #include <stdio.h> |
@@ -133,3 +138,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
133 | if( index != -1) { | 138 | if( index != -1) { |
134 | // qDebug( tempTitle); | 139 | // odebug << tempTitle << oendl; |
135 | bookmarksMenu->insertItem( tempTitle); | 140 | bookmarksMenu->insertItem( tempTitle); |
@@ -156,3 +161,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
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]); |
@@ -171,3 +176,3 @@ Gutenbrowser::~Gutenbrowser() { | |||
171 | // QPEApplication::ungrabKeyboard(); | 176 | // QPEApplication::ungrabKeyboard(); |
172 | qDebug("Exit"); | 177 | odebug << "Exit" << oendl; |
173 | } | 178 | } |
@@ -201,3 +206,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
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/"; |
@@ -209,3 +214,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
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 |
@@ -213,3 +218,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
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 | ||
@@ -225,3 +230,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
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); |
@@ -258,3 +263,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
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); |
@@ -268,3 +273,3 @@ void Gutenbrowser::toggleButtonIcons( bool useEm) { | |||
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 | ||
@@ -383,3 +388,3 @@ 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(); |
@@ -406,3 +411,3 @@ void Gutenbrowser::ForwardBtn() { | |||
406 | Lview->insertLine( s, -1); | 411 | Lview->insertLine( s, -1); |
407 | // qDebug(s); | 412 | // odebug << s << oendl; |
408 | currentLine++; | 413 | currentLine++; |
@@ -425,3 +430,3 @@ void Gutenbrowser::ForwardBtn() { | |||
425 | } else { | 430 | } else { |
426 | // qDebug("bal"); | 431 | // odebug << "bal" << oendl; |
427 | // if( i_pageNum != pages) { | 432 | // if( i_pageNum != pages) { |
@@ -440,3 +445,3 @@ void Gutenbrowser::ForwardBtn() { | |||
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 | } |
@@ -459,3 +464,3 @@ void Gutenbrowser::BackBtn() { | |||
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 | } |
@@ -515,3 +520,3 @@ void Gutenbrowser::TopBtn() { | |||
515 | if( i_pageNum != 0) { | 520 | if( i_pageNum != 0) { |
516 | qDebug("top"); | 521 | odebug << "top" << oendl; |
517 | qApp->processEvents(); | 522 | qApp->processEvents(); |
@@ -573,3 +578,3 @@ void Gutenbrowser::BeginBtn() { | |||
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 | } |
@@ -577,3 +582,3 @@ void Gutenbrowser::BeginBtn() { | |||
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; |
@@ -623,3 +628,3 @@ void Gutenbrowser::setBookmark() { | |||
623 | qApp->processEvents(); | 628 | qApp->processEvents(); |
624 | qDebug("Settingbook mark "+file_name); | 629 | odebug << "Settingbook mark "+file_name << oendl; |
625 | 630 | ||
@@ -627,3 +632,3 @@ void Gutenbrowser::setBookmark() { | |||
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 | ||
@@ -656,3 +661,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
656 | 661 | ||
657 | // qDebug("<<<<<< %d, %d", Lview->PageSize(), Lview->lastRow() - Lview->topRow() ); | 662 | // odebug << "<<<<<< " << Lview->PageSize() << ", " << Lview->lastRow() - Lview->topRow() << "" << oendl; |
658 | 663 | ||
@@ -660,3 +665,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
660 | 665 | ||
661 | qDebug("menu item %d", itemId); | 666 | odebug << "menu item " << itemId << "" << oendl; |
662 | QString tempTitle; | 667 | QString tempTitle; |
@@ -702,3 +707,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
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 | } |
@@ -731,3 +736,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
731 | 736 | ||
732 | qDebug("bookmark loaded"); | 737 | odebug << "bookmark loaded" << oendl; |
733 | setCaption(title); | 738 | setCaption(title); |
@@ -739,4 +744,4 @@ bool Gutenbrowser::load( const char *fileName) { | |||
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) { |
@@ -746,3 +751,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
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) |
@@ -764,3 +769,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
764 | // } | 769 | // } |
765 | qDebug("ready to open "+o_file); | 770 | odebug << "ready to open "+o_file << oendl; |
766 | 771 | ||
@@ -800,3 +805,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
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); |
@@ -807,3 +812,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
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 | ||
@@ -824,3 +829,3 @@ void Gutenbrowser::Search() { | |||
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); |
@@ -960,5 +965,5 @@ void Gutenbrowser::LibraryBtn() { | |||
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)) { |
@@ -991,3 +996,3 @@ void Gutenbrowser::LibraryBtn() { | |||
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; |
@@ -1013,3 +1018,3 @@ void Gutenbrowser::LibraryBtn() { | |||
1013 | { | 1018 | { |
1014 | qDebug("Found zip file\n"); | 1019 | odebug << "Found zip file\n" << oendl; |
1015 | // QStringList args; | 1020 | // QStringList args; |
@@ -1021,3 +1026,3 @@ void Gutenbrowser::LibraryBtn() { | |||
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! |
@@ -1064,3 +1069,3 @@ void Gutenbrowser::OpenBtn() { | |||
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; |
@@ -1071,3 +1076,3 @@ void Gutenbrowser::OpenBtn() { | |||
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(); |
@@ -1080,3 +1085,3 @@ void Gutenbrowser::OpenBtn() { | |||
1080 | } else { | 1085 | } else { |
1081 | qDebug("file_name is empty!"); | 1086 | odebug << "file_name is empty!" << oendl; |
1082 | if(showMainList) { | 1087 | if(showMainList) { |
@@ -1246,3 +1251,3 @@ bool Gutenbrowser::getTitle( const char *file ) { | |||
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 | } |
@@ -1448,3 +1453,3 @@ void Gutenbrowser::keyPressEvent( QKeyEvent *e) { | |||
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 | ||
@@ -1478,3 +1483,3 @@ void Gutenbrowser::doOptions() { | |||
1478 | 1483 | ||
1479 | qDebug("writing library config"); | 1484 | odebug << "writing library config" << oendl; |
1480 | Config config("Gutenbrowser"); | 1485 | Config config("Gutenbrowser"); |
@@ -1495,3 +1500,3 @@ void Gutenbrowser::doOptions() { | |||
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)!="/") { |
@@ -1511,3 +1516,3 @@ void Gutenbrowser::doOptions() { | |||
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; |
@@ -1517,3 +1522,3 @@ void Gutenbrowser::doOptions() { | |||
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); |
@@ -1521,3 +1526,3 @@ void Gutenbrowser::doOptions() { | |||
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); |
@@ -1580,4 +1585,4 @@ void Gutenbrowser::OnNetworkDialog( const QString &/*networkUrl*/, const QString | |||
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 |
@@ -1714,3 +1719,3 @@ void Gutenbrowser::cleanUp( ) | |||
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(); |
@@ -1720,3 +1725,3 @@ void Gutenbrowser::fixKeys() | |||
1720 | { | 1725 | { |
1721 | qDebug("Attempting to fix keys"); | 1726 | odebug << "Attempting to fix keys" << oendl; |
1722 | 1727 | ||
@@ -1774,3 +1779,3 @@ void Gutenbrowser::listClickedSlot( QListBoxItem * index) { | |||
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()) |
@@ -1815,3 +1820,3 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { | |||
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(); |
@@ -1819,3 +1824,3 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { | |||
1819 | this->show(); | 1824 | this->show(); |
1820 | // qDebug(title); | 1825 | // odebug << title << oendl; |
1821 | // qApp->processEvents(); | 1826 | // qApp->processEvents(); |
@@ -1875,3 +1880,3 @@ void Gutenbrowser::menuEditTitle() | |||
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 | ||
@@ -1889,6 +1894,6 @@ void Gutenbrowser::menuEditTitle() | |||
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; |
@@ -1897,3 +1902,3 @@ void Gutenbrowser::menuEditTitle() | |||
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); |
@@ -1913,3 +1918,3 @@ void Gutenbrowser::menuEditTitle() | |||
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 |
@@ -1925,3 +1930,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
1925 | // } | 1930 | // } |
1926 | // qDebug((const char*)local_library.latin1()); | 1931 | // odebug << (const char*)local_library.latin1() << oendl; |
1927 | QString cmd; | 1932 | QString cmd; |
@@ -1929,3 +1934,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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; |
@@ -1935,3 +1940,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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; |
@@ -1944,3 +1949,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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); |
@@ -1950,6 +1955,6 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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 | } |
@@ -1957,3 +1962,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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); |
@@ -1963,6 +1968,6 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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 | } |
@@ -1973,3 +1978,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { | |||
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; |
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 | |||
@@ -13,2 +13,3 @@ | |||
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | |||
14 | //#include "gutenbrowserData.h" | 15 | //#include "gutenbrowserData.h" |
@@ -16,2 +17,4 @@ | |||
16 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
17 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
@@ -22,2 +25,3 @@ | |||
22 | 25 | ||
26 | /* QT */ | ||
23 | #include <qfontinfo.h> | 27 | #include <qfontinfo.h> |
@@ -41,3 +45,3 @@ void Gutenbrowser::initSlots() { | |||
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); |
@@ -59,3 +63,3 @@ void Gutenbrowser::initConfig() { | |||
59 | } | 63 | } |
60 | // qDebug( "init file is %s",iniFile.latin1()); | 64 | // odebug << "init file is " << iniFile << "" << oendl; |
61 | 65 | ||
@@ -149,5 +153,5 @@ void Gutenbrowser::initConfig() { | |||
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; |
@@ -163,3 +167,3 @@ void Gutenbrowser::initMenuBar() | |||
163 | { | 167 | { |
164 | // qDebug("Starting menu init."); | 168 | // odebug << "Starting menu init." << oendl; |
165 | // menuBar entry fileMenu | 169 | // menuBar entry fileMenu |
@@ -209,3 +213,3 @@ void Gutenbrowser::initButtonBar() | |||
209 | { | 213 | { |
210 | //qDebug("Starting buttonbar init."); | 214 | //odebug << "Starting buttonbar init." << oendl; |
211 | 215 | ||
@@ -243,3 +247,3 @@ void Gutenbrowser::initButtonBar() | |||
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) { |
@@ -295,3 +299,3 @@ void Gutenbrowser::initView() | |||
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 |
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 | |||
@@ -16,4 +16,2 @@ | |||
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #include <qpe/qcopenvelope_qws.h> | ||
18 | #include <qpe/qpeapplication.h> | ||
19 | 17 | ||
@@ -22,2 +20,8 @@ | |||
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> |
@@ -25,2 +29,3 @@ | |||
25 | 29 | ||
30 | /* STD */ | ||
26 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
@@ -113,3 +118,3 @@ void HelpMe::help() | |||
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; |
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 | |||
@@ -39,3 +39,3 @@ OPIE_EXPORT_APP( OApplicationFactory<Gutenbrowser> ) | |||
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; |
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 | |||
@@ -20,2 +20,3 @@ | |||
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> |
@@ -25,3 +26,3 @@ using namespace Opie::Ui; | |||
25 | 26 | ||
26 | #include <stdlib.h> | 27 | /* QT */ |
27 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
@@ -29,2 +30,3 @@ using namespace Opie::Ui; | |||
29 | 30 | ||
31 | /* STD */ | ||
30 | #if defined(_WS_WIN_) | 32 | #if defined(_WS_WIN_) |
@@ -33,3 +35,4 @@ using namespace Opie::Ui; | |||
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 |
@@ -136,3 +139,3 @@ OpenFileButton->setDown(TRUE); | |||
136 | 139 | ||
137 | qDebug("Open file: "+str); | 140 | odebug << "Open file: "+str << oendl; |
138 | 141 | ||
@@ -166,3 +169,3 @@ OpenFileButton->setDown(TRUE); | |||
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; |
@@ -173,3 +176,3 @@ OpenFileButton->setDown(TRUE); | |||
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; |
@@ -178,3 +181,3 @@ OpenFileButton->setDown(TRUE); | |||
178 | fileName = s_fileName; | 181 | fileName = s_fileName; |
179 | // qDebug("Filename is now "+fileName); | 182 | // odebug << "Filename is now "+fileName << oendl; |
180 | } | 183 | } |
@@ -189,7 +192,7 @@ OpenFileButton->setDown(TRUE); | |||
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); |
@@ -198,3 +201,3 @@ OpenFileButton->setDown(TRUE); | |||
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 |
@@ -204,3 +207,3 @@ OpenFileButton->setDown(TRUE); | |||
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 | ||
@@ -221,3 +224,3 @@ bool OpenEtext::FindTitle( QString 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); |
@@ -227,3 +230,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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 ); |
@@ -241,3 +244,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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); |
@@ -249,3 +252,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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); |
@@ -257,3 +260,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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 | } |
@@ -264,3 +267,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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 | } |
@@ -270,3 +273,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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); |
@@ -295,3 +298,3 @@ bool OpenEtext::FindTitle( QString filename) | |||
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"; |
@@ -345,3 +348,3 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
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); |
@@ -351,3 +354,3 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
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; |
@@ -416,3 +419,3 @@ void OpenEtext::removeSelection() | |||
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; |
@@ -484,3 +487,3 @@ void OpenEtext::editTitle() { | |||
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 | ||
@@ -498,6 +501,6 @@ void OpenEtext::editTitle() { | |||
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; |
@@ -506,3 +509,3 @@ void OpenEtext::editTitle() { | |||
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); |
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 | |||
@@ -15,10 +15,6 @@ | |||
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" |
@@ -26,2 +22,8 @@ | |||
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> |
@@ -40,2 +42,8 @@ | |||
40 | #endif | 42 | #endif |
43 | |||
44 | /* STD */ | ||
45 | // #include <unistd.h> | ||
46 | // #include <stdio.h> | ||
47 | // #include <stdlib.h> | ||
48 | |||
41 | /* | 49 | /* |
@@ -62,3 +70,3 @@ optionsDialog::~optionsDialog() | |||
62 | { | 70 | { |
63 | //qDebug("OnExit()"); | 71 | //odebug << "OnExit()" << oendl; |
64 | // writeConfig(); | 72 | // writeConfig(); |
@@ -127,3 +135,3 @@ void optionsDialog::getConfig() | |||
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; |
@@ -131,3 +139,3 @@ void optionsDialog::getConfig() | |||
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; |
@@ -143,3 +151,3 @@ void optionsDialog::getConfig() | |||
143 | 151 | ||
144 | // // qDebug("Set style%d",index); | 152 | // // odebug << "Set style" << index << "" << oendl; |
145 | // // //int styleInt= index; | 153 | // // //int styleInt= index; |
@@ -169,3 +177,3 @@ void optionsDialog::slotQueryExit() | |||
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()) { |
@@ -173,3 +181,3 @@ void optionsDialog::slotQueryExit() | |||
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 { |
@@ -177,3 +185,3 @@ void optionsDialog::slotQueryExit() | |||
177 | config.writeEntry("queryExit","FALSE"); | 185 | config.writeEntry("queryExit","FALSE"); |
178 | qDebug("WritingConfig queryExit=FALSE"); | 186 | odebug << "WritingConfig queryExit=FALSE" << oendl; |
179 | } | 187 | } |
@@ -189,3 +197,3 @@ void optionsDialog::slotQueryExit() | |||
189 | // void optionsDialog::lineEditChanged(const QString &editText) { | 197 | // void optionsDialog::lineEditChanged(const QString &editText) { |
190 | // qDebug(editText); | 198 | // odebug << editText << oendl; |
191 | // } | 199 | // } |
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 | |||
@@ -30,3 +30,3 @@ CList<Bkmk>* Aportis::getbkmklist() | |||
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); |
@@ -37,3 +37,3 @@ CList<Bkmk>* Aportis::getbkmklist() | |||
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]; |
@@ -123,3 +123,3 @@ int Aportis::OpenFile(const char *src) | |||
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) |
@@ -184,3 +184,3 @@ int Aportis::OpenFile(const char *src) | |||
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; |
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 | |||
@@ -219,3 +219,3 @@ CList<Bkmk>* BkmkFile::readall() | |||
219 | bl = readall00(read06); | 219 | bl = readall00(read06); |
220 | // qDebug("Correct version!"); | 220 | // odebug << "Correct version!" << oendl; |
221 | break; | 221 | break; |
@@ -224,6 +224,6 @@ CList<Bkmk>* BkmkFile::readall() | |||
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; |
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 | |||
@@ -34,3 +34,3 @@ 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(); |
@@ -44,3 +44,3 @@ void BuffDoc::locate(unsigned int n) | |||
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 | } |
@@ -190,3 +190,3 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border) | |||
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(); |
@@ -324,4 +324,4 @@ 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; |
@@ -380,3 +380,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
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; |
@@ -388,3 +388,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
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); |
@@ -398,3 +398,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
398 | } | 398 | } |
399 | // //qDebug("Doing final open:%x:%x",exp,filt); | 399 | // //odebug << "Doing final open:" << exp << ":" << filt << "" << oendl; |
400 | 400 | ||
@@ -409,3 +409,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) | |||
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; |
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 | |||
@@ -42,3 +42,3 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) | |||
42 | int i; | 42 | int i; |
43 | // //qDebug("Trying 2"); | 43 | // //odebug << "Trying 2" << oendl; |
44 | len = rhs.len; | 44 | len = rhs.len; |
@@ -60,3 +60,3 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) | |||
60 | len = i; | 60 | len = i; |
61 | // //qDebug("Tried 2"); | 61 | // //odebug << "Tried 2" << oendl; |
62 | return *this; | 62 | return *this; |
@@ -210,3 +210,3 @@ int CDrawBuffer::width(int numchars, bool onscreen, int scwidth, unsigned char _ | |||
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); |
@@ -319,3 +319,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
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); |
@@ -410,3 +410,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
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); |
@@ -420,3 +420,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int | |||
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); |
@@ -472,5 +472,5 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) | |||
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 | */ |
@@ -479,3 +479,3 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) | |||
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()) |
@@ -541,3 +541,3 @@ void CDrawBuffer::resize() | |||
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; |
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 | |||
@@ -82,3 +82,3 @@ QTReader::QTReader( const QString& filename, QWidget *parent=0, const tchar *nam | |||
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); |
@@ -93,3 +93,3 @@ void QTReader::mouseMoveEvent(QMouseEvent* _e) | |||
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 | } |
@@ -106,3 +106,3 @@ void QTReader::mousePressEvent( QMouseEvent* _e ) | |||
106 | { | 106 | { |
107 | //qDebug("MousePress"); | 107 | //odebug << "MousePress" << oendl; |
108 | mouseUpOn = false; | 108 | mouseUpOn = false; |
@@ -319,3 +319,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse | |||
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; |
@@ -329,3 +329,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse | |||
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())); |
@@ -341,3 +341,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
341 | { | 341 | { |
342 | // qDebug("MouseRelease"); | 342 | // odebug << "MouseRelease" << oendl; |
343 | if (_e->x() > width() - m_border) | 343 | if (_e->x() > width() - m_border) |
@@ -396,3 +396,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
396 | { | 396 | { |
397 | // qDebug("Picture:%x", tgt); | 397 | // odebug << "Picture:" << tgt << "" << oendl; |
398 | QImage* pm = buffdoc.getPicture(tgt); | 398 | QImage* pm = buffdoc.getPicture(tgt); |
@@ -412,3 +412,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) | |||
412 | default: | 412 | default: |
413 | // qDebug("Unknown linktype"); | 413 | // odebug << "Unknown linktype" << oendl; |
414 | return; | 414 | return; |
@@ -698,3 +698,3 @@ void QTReader::setautoscroll(bool _sc) | |||
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"); |
@@ -825,3 +825,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
825 | { | 825 | { |
826 | //qDebug("How refreshing..."); | 826 | //odebug << "How refreshing..." << oendl; |
827 | if (buffdoc.empty()) return; | 827 | if (buffdoc.empty()) return; |
@@ -830,3 +830,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
830 | { | 830 | { |
831 | // qDebug("Not Optimised %d", m_lastwidth); | 831 | // odebug << "Not Optimised " << m_lastwidth << "" << oendl; |
832 | m_lastwidth = width(); | 832 | m_lastwidth = width(); |
@@ -835,3 +835,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
835 | locate(pagelocate()); | 835 | locate(pagelocate()); |
836 | // qDebug("Not Optimised %d", m_lastwidth); | 836 | // odebug << "Not Optimised " << m_lastwidth << "" << oendl; |
837 | } | 837 | } |
@@ -842,3 +842,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
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; |
@@ -853,3 +853,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
853 | } | 853 | } |
854 | // qDebug("Optimised < %d", numlines); | 854 | // odebug << "Optimised < " << numlines << "" << oendl; |
855 | m_lastheight = newht; | 855 | m_lastheight = newht; |
@@ -858,3 +858,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
858 | { | 858 | { |
859 | // qDebug("Optimised > %d", numlines); | 859 | // odebug << "Optimised > " << numlines << "" << oendl; |
860 | int ypos = 0; | 860 | int ypos = 0; |
@@ -865,3 +865,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
865 | fillbuffer(numlines+1, ypos, newht); | 865 | fillbuffer(numlines+1, ypos, newht); |
866 | // qDebug("Optimised > %d", numlines); | 866 | // odebug << "Optimised > " << numlines << "" << oendl; |
867 | } | 867 | } |
@@ -899,3 +899,3 @@ void QTReader::drawFonts( QPainter *p ) | |||
899 | { | 899 | { |
900 | qDebug("Not so refreshing..."); | 900 | odebug << "Not so refreshing..." << oendl; |
901 | } | 901 | } |
@@ -1030,3 +1030,3 @@ 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 ); |
@@ -1055,7 +1055,7 @@ bool QTReader::locate(unsigned long n) { | |||
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; |
@@ -1119,3 +1119,3 @@ 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(); |
@@ -1124,3 +1124,3 @@ void QTReader::dopagedn() | |||
1124 | { | 1124 | { |
1125 | ////qDebug("Jumping to %u", mylastpos); | 1125 | ////odebug << "Jumping to " << mylastpos << "" << oendl; |
1126 | jumpto(mylastpos); | 1126 | jumpto(mylastpos); |
@@ -1315,5 +1315,5 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn) | |||
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 | } |
@@ -1321,3 +1321,3 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn) | |||
1321 | update(); | 1321 | update(); |
1322 | // // qDebug("Updated"); | 1322 | // // odebug << "Updated" << oendl; |
1323 | return bRC; | 1323 | return bRC; |
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 | |||
@@ -19,6 +19,35 @@ | |||
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 |
@@ -27,8 +56,7 @@ | |||
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> |
@@ -41,29 +69,10 @@ | |||
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 | ||
@@ -77,10 +86,2 @@ | |||
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&); |
@@ -127,3 +128,3 @@ void QTReaderApp::listBkmkFiles() | |||
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(); |
@@ -148,3 +149,3 @@ void QTReaderApp::listBkmkFiles() | |||
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 |
@@ -216,4 +217,4 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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 | ||
@@ -245,3 +246,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
245 | 246 | ||
246 | // qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); | 247 | // odebug << "Initial Rotation(" << m_rot << "):" << rot << "" << oendl; |
247 | */ | 248 | */ |
@@ -262,3 +263,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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(); |
@@ -268,3 +269,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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()); |
@@ -358,3 +359,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
358 | */ | 359 | */ |
359 | // qDebug("Reading file list"); | 360 | // odebug << "Reading file list" << oendl; |
360 | readfilelist(); | 361 | readfilelist(); |
@@ -369,3 +370,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
369 | 370 | ||
370 | // qDebug("Reading config"); | 371 | // odebug << "Reading config" << oendl; |
371 | // Config config( APPDIR ); | 372 | // Config config( APPDIR ); |
@@ -771,3 +772,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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); |
@@ -803,7 +804,7 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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); |
@@ -811,5 +812,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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) |
@@ -833,3 +834,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
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; |
@@ -838,3 +839,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
838 | { | 839 | { |
839 | //qDebug("openfrombkmk"); | 840 | // odebug << "openfrombkmk" << oendl; |
840 | if (!openfrombkmk(p)) | 841 | if (!openfrombkmk(p)) |
@@ -844,3 +845,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
844 | { | 845 | { |
845 | //qDebug("openfile"); | 846 | // odebug << "openfile" << oendl; |
846 | openFile( reader->m_lastfile ); | 847 | openFile( reader->m_lastfile ); |
@@ -850,3 +851,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
850 | { | 851 | { |
851 | // qDebug("Openfile 2"); | 852 | // odebug << "Openfile 2" << oendl; |
852 | if (!reader->m_lastfile.isEmpty()) | 853 | if (!reader->m_lastfile.isEmpty()) |
@@ -872,3 +873,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
872 | } | 873 | } |
873 | // qDebug("finished update"); | 874 | // odebug << "finished update" << oendl; |
874 | } | 875 | } |
@@ -1030,3 +1031,3 @@ QToolBar* QTReaderApp::filebar() | |||
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; |
@@ -1034,6 +1035,6 @@ QToolBar* QTReaderApp::filebar() | |||
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); |
@@ -1055,3 +1056,3 @@ QToolBar* QTReaderApp::viewbar() | |||
1055 | default: | 1056 | default: |
1056 | qDebug("Incorrect toolbar policy set"); | 1057 | odebug << "Incorrect toolbar policy set" << oendl; |
1057 | case cesSingle: | 1058 | case cesSingle: |
@@ -1071,3 +1072,3 @@ QToolBar* QTReaderApp::navbar() | |||
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); |
@@ -1075,3 +1076,3 @@ QToolBar* QTReaderApp::navbar() | |||
1075 | default: | 1076 | default: |
1076 | qDebug("Incorrect toolbar policy set"); | 1077 | odebug << "Incorrect toolbar policy set" << oendl; |
1077 | case cesSingle: | 1078 | case cesSingle: |
@@ -1079,3 +1080,3 @@ QToolBar* QTReaderApp::navbar() | |||
1079 | navBar = fileBar; | 1080 | navBar = fileBar; |
1080 | // qDebug("Setting navbar to filebar"); | 1081 | // odebug << "Setting navbar to filebar" << oendl; |
1081 | break; | 1082 | break; |
@@ -1095,3 +1096,3 @@ QToolBar* QTReaderApp::markbar() | |||
1095 | default: | 1096 | default: |
1096 | qDebug("Incorrect toolbar policy set"); | 1097 | odebug << "Incorrect toolbar policy set" << oendl; |
1097 | case cesSingle: | 1098 | case cesSingle: |
@@ -1129,3 +1130,3 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) | |||
1129 | 1130 | ||
1130 | //// qDebug("Received:%s", (const char*)msg); | 1131 | //// odebug << "Received:" << msg << "" << oendl; |
1131 | 1132 | ||
@@ -1483,3 +1484,3 @@ 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()); |
@@ -1565,3 +1566,3 @@ void QTReaderApp::updatefileinfo() | |||
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; |
@@ -1579,3 +1580,3 @@ void QTReaderApp::updatefileinfo() | |||
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); |
@@ -1588,3 +1589,3 @@ void QTReaderApp::updatefileinfo() | |||
1588 | } | 1589 | } |
1589 | // qDebug("Added?:%x", notadded); | 1590 | // odebug << "Added?:" << notadded << "" << oendl; |
1590 | if (notadded) | 1591 | if (notadded) |
@@ -1598,3 +1599,3 @@ void QTReaderApp::updatefileinfo() | |||
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; |
@@ -1613,3 +1614,3 @@ void QTReaderApp::fileOpen() | |||
1613 | */ | 1614 | */ |
1614 | // qDebug("fileOpen"); | 1615 | // odebug << "fileOpen" << oendl; |
1615 | // if (!reader->m_lastfile.isEmpty()) | 1616 | // if (!reader->m_lastfile.isEmpty()) |
@@ -1654,3 +1655,3 @@ void QTReaderApp::fileOpen2() | |||
1654 | // reader->refresh(); | 1655 | // reader->refresh(); |
1655 | // qDebug("HEIGHT:%d", reader->m_lastheight); | 1656 | // odebug << "HEIGHT:" << reader->m_lastheight << "" << oendl; |
1656 | } | 1657 | } |
@@ -1674,3 +1675,3 @@ QString QTReaderApp::usefilebrowser() | |||
1674 | } | 1675 | } |
1675 | // qDebug("Selected %s", (const char*)fn); | 1676 | // odebug << "Selected " << fn << "" << oendl; |
1676 | delete fb; | 1677 | delete fb; |
@@ -1805,3 +1806,3 @@ void QTReaderApp::showprefs() | |||
1805 | default: | 1806 | default: |
1806 | qDebug("Format out of range"); | 1807 | odebug << "Format out of range" << oendl; |
1807 | } | 1808 | } |
@@ -1865,3 +1866,3 @@ void QTReaderApp::showtoolbarprefs() | |||
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(); |
@@ -1902,3 +1903,3 @@ void QTReaderApp::showtoolbarprefs() | |||
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(); |
@@ -2177,3 +2178,3 @@ void QTReaderApp::findNext() | |||
2177 | { | 2178 | { |
2178 | // // qDebug("findNext called\n"); | 2179 | // // odebug << "findNext called\n" << oendl; |
2179 | #ifdef __ISEARCH | 2180 | #ifdef __ISEARCH |
@@ -2273,8 +2274,8 @@ bool QTReaderApp::dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg) | |||
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; |
@@ -2335,3 +2336,3 @@ 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)); |
@@ -2382,3 +2383,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2382 | { | 2383 | { |
2383 | // qDebug("Keypress event"); | 2384 | // odebug << "Keypress event" << oendl; |
2384 | timeb now; | 2385 | timeb now; |
@@ -2394,3 +2395,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
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) |
@@ -2409,3 +2410,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2409 | { | 2410 | { |
2410 | // qDebug("escape action"); | 2411 | // odebug << "escape action" << oendl; |
2411 | doAction(m_escapeTarget, e); | 2412 | doAction(m_escapeTarget, e); |
@@ -2508,3 +2509,3 @@ void QTReaderApp::showEditTools() | |||
2508 | { | 2509 | { |
2509 | //qDebug("him"); | 2510 | // odebug << "him" << oendl; |
2510 | #ifdef USEQPE | 2511 | #ifdef USEQPE |
@@ -2512,3 +2513,3 @@ void QTReaderApp::showEditTools() | |||
2512 | #endif | 2513 | #endif |
2513 | //qDebug("eb"); | 2514 | // odebug << "eb" << oendl; |
2514 | menubar->show(); | 2515 | menubar->show(); |
@@ -2534,5 +2535,5 @@ void QTReaderApp::showEditTools() | |||
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 |
@@ -2543,7 +2544,7 @@ void QTReaderApp::showEditTools() | |||
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(); |
@@ -2616,3 +2617,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) | |||
2616 | { | 2617 | { |
2617 | // qDebug("Close event"); | 2618 | // odebug << "Close event" << oendl; |
2618 | if (m_fullscreen) | 2619 | if (m_fullscreen) |
@@ -2633,3 +2634,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) | |||
2633 | { | 2634 | { |
2634 | //qDebug("Close disabled"); | 2635 | // odebug << "Close disabled" << oendl; |
2635 | m_bcloseDisabled = false; | 2636 | m_bcloseDisabled = false; |
@@ -2711,3 +2712,3 @@ bool QTReaderApp::listbkmk(CList<Bkmk>* plist, const QString& _lab) | |||
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())); |
@@ -2740,5 +2741,5 @@ void QTReaderApp::do_regedit() | |||
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 |
@@ -2758,6 +2759,6 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
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); |
@@ -2783,3 +2784,3 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
2783 | } | 2784 | } |
2784 | // qDebug("updating"); | 2785 | // odebug << "updating" << oendl; |
2785 | // showEditTools(); | 2786 | // showEditTools(); |
@@ -2814,3 +2815,3 @@ void QTReaderApp::gotobkmk(int ind) | |||
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); |
@@ -2914,3 +2915,3 @@ void QTReaderApp::gotobkmk(int ind) | |||
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(); |
@@ -2934,3 +2935,3 @@ void QTReaderApp::gotobkmk(int ind) | |||
2934 | fm.saveFile( *doc, rt ); | 2935 | fm.saveFile( *doc, rt ); |
2935 | qDebug("YES"); | 2936 | odebug << "YES" << oendl; |
2936 | } | 2937 | } |
@@ -2938,3 +2939,3 @@ void QTReaderApp::gotobkmk(int ind) | |||
2938 | { | 2939 | { |
2939 | qDebug("NO"); | 2940 | odebug << "NO" << oendl; |
2940 | } | 2941 | } |
@@ -3011,3 +3012,3 @@ void QTReaderApp::do_regaction() | |||
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); |
@@ -3103,3 +3104,3 @@ 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) |
@@ -3111,5 +3112,5 @@ void QTReaderApp::do_setencoding(int i) | |||
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 | } |
@@ -3125,6 +3126,6 @@ void QTReaderApp::do_setfont(const QString& lcn) | |||
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 | } |
@@ -3135,3 +3136,3 @@ void QTReaderApp::do_autogen(const QString& regText) | |||
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; |
@@ -3182,3 +3183,3 @@ void QTReaderApp::saveprefs() | |||
3182 | { | 3183 | { |
3183 | // qDebug("saveprefs"); | 3184 | // odebug << "saveprefs" << oendl; |
3184 | // reader->saveprefs("uqtreader"); | 3185 | // reader->saveprefs("uqtreader"); |
@@ -3263,7 +3264,7 @@ 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 | } |
@@ -3343,6 +3344,6 @@ void QTReaderApp::readfilelist() | |||
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 | } |
@@ -3361,3 +3362,3 @@ void QTReaderApp::savefilelist() | |||
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); |
@@ -3471,3 +3472,3 @@ void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& | |||
3471 | { | 3472 | { |
3472 | //// qDebug("OnWordSelected(%u):%s", posn, (const char*)wrd); | 3473 | //// odebug << "OnWordSelected(" << posn << "):" << wrd << "" << oendl; |
3473 | 3474 | ||
@@ -3521,3 +3522,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3521 | e->accept(); | 3522 | e->accept(); |
3522 | //qDebug("Accepted"); | 3523 | // odebug << "Accepted" << oendl; |
3523 | switch (a) | 3524 | switch (a) |
@@ -3584,3 +3585,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3584 | default: | 3585 | default: |
3585 | qDebug("Unknown ActionType:%u", a); | 3586 | odebug << "Unknown ActionType:" << a << "" << oendl; |
3586 | break; | 3587 | break; |
@@ -3602,3 +3603,3 @@ 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 |
@@ -3625,3 +3626,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool 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(); // "/" |
@@ -3629,3 +3630,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
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(); |
@@ -3641,3 +3642,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
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(); |
@@ -3648,3 +3649,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
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(); |
@@ -3656,3 +3657,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
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()); |
@@ -3936,3 +3937,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
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(); |
@@ -3948,3 +3949,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
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(); |
@@ -3955,3 +3956,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
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(); |
@@ -4063,3 +4064,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
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(); |
@@ -4069,3 +4070,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
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(); |
@@ -4086,3 +4087,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
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 |
@@ -4170,3 +4171,3 @@ void QTReaderApp::OnURLSelected(const QString& href) | |||
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 | } |
@@ -4194,3 +4195,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
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(); |
@@ -4201,3 +4202,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
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(); |
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 | |||
@@ -8,3 +8,3 @@ pmstore::~pmstore() | |||
8 | { | 8 | { |
9 | //// qDebug("Deleting image"); | 9 | //// odebug << "Deleting image" << oendl; |
10 | delete graphic; | 10 | delete graphic; |
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 | |||
@@ -134,3 +134,3 @@ void fileBrowser::populateList() | |||
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 ); |
@@ -158,3 +158,3 @@ void fileBrowser::populateList() | |||
158 | { | 158 | { |
159 | //// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); | 159 | //// odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; |
160 | } | 160 | } |
@@ -171,3 +171,3 @@ void fileBrowser::upDir() | |||
171 | { | 171 | { |
172 | //// qDebug(currentDir.canonicalPath()); | 172 | //// odebug << currentDir.canonicalPath() << oendl; |
173 | } | 173 | } |
@@ -179,3 +179,3 @@ void fileBrowser::listClicked(QListViewItem *selectedItem) | |||
179 | 179 | ||
180 | //// qDebug("%s", (const char*)strItem); | 180 | //// odebug << "" << strItem << "" << oendl; |
181 | 181 | ||
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 | |||
@@ -87,3 +87,3 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
87 | DEPENDPATH+= $(OPIEDIR)/include | 87 | DEPENDPATH+= $(OPIEDIR)/include |
88 | LIBS += -lqpe | 88 | LIBS += -lqpe -lopiecore2 |
89 | 89 | ||
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 | |||
@@ -59,3 +59,3 @@ int CPlucker::bgetch() | |||
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; |
@@ -66,3 +66,3 @@ int CPlucker::bgetch() | |||
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++; |
@@ -71,3 +71,3 @@ int CPlucker::bgetch() | |||
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; |
@@ -81,3 +81,3 @@ int CPlucker::bgetch() | |||
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) |
@@ -93,3 +93,3 @@ int CPlucker::bgetch() | |||
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()) |
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,13 +1,15 @@ | |||
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 |
@@ -18,5 +20,11 @@ | |||
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 | ||
@@ -95,3 +103,3 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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; |
@@ -105,3 +113,3 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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) |
@@ -110,5 +118,5 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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 | } |
@@ -131,3 +139,3 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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) |
@@ -138,3 +146,3 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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)); |
@@ -145,3 +153,3 @@ char* CPlucker_base::geturl(UInt16 tgt) | |||
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; |
@@ -155,3 +163,3 @@ char* CPlucker_base::geturl(UInt16 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; |
@@ -252,3 +260,3 @@ void CPlucker_base::locate(unsigned int n) | |||
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); |
@@ -277,3 +285,3 @@ void CPlucker_base::locate(unsigned int n) | |||
277 | } | 285 | } |
278 | // qDebug("Time(1): %u", clock()-start); | 286 | // odebug << "Time(1): " << clock()-start << "" << oendl; |
279 | /* | 287 | /* |
@@ -323,6 +331,6 @@ void CPlucker_base::locate(unsigned int 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; |
@@ -334,3 +342,3 @@ void CPlucker_base::locate(unsigned int n) | |||
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 | } |
@@ -373,5 +381,5 @@ bool CPlucker_base::expand(int thisrec) | |||
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; |
@@ -382,3 +390,3 @@ bool CPlucker_base::expand(int thisrec) | |||
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; |
@@ -393,3 +401,3 @@ bool CPlucker_base::expand(int thisrec) | |||
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 | } |
@@ -398,3 +406,3 @@ bool CPlucker_base::expand(int thisrec) | |||
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; |
@@ -420,3 +428,3 @@ bool CPlucker_base::expand(int thisrec) | |||
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; |
@@ -454,3 +462,3 @@ void CPlucker_base::UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuff | |||
454 | 462 | ||
455 | ////qDebug("err:%d - %u", err, zstream.avail_in); | 463 | // //odebug << "err:" << err << " - " << zstream.avail_in << "" << oendl; |
456 | 464 | ||
@@ -536,5 +544,5 @@ CList<Bkmk>* CPlucker_base::getbkmklist() | |||
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 | } |
@@ -594,3 +602,3 @@ 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); |
@@ -605,3 +613,3 @@ void CPlucker_base::showimg(UInt16 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); |
@@ -612,3 +620,3 @@ void CPlucker_base::showimg(UInt16 tgt) | |||
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")) |
@@ -629,3 +637,3 @@ 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); |
@@ -640,3 +648,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
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) |
@@ -661,3 +669,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
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) |
@@ -669,3 +677,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
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) |
@@ -674,3 +682,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) | |||
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! |
@@ -700,3 +708,3 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig | |||
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)); |
@@ -723,3 +731,3 @@ void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen) | |||
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); |
@@ -753,6 +761,6 @@ int CPlucker_base::OpenFile(const char *src) | |||
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; |
@@ -763,3 +771,3 @@ int CPlucker_base::OpenFile(const char *src) | |||
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); |
@@ -821,3 +829,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
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; |
@@ -833,3 +841,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
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++; |
@@ -859,3 +867,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
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); |
@@ -928,3 +936,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) | |||
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); |
@@ -958,3 +966,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
958 | ch = bgetch(); | 966 | ch = bgetch(); |
959 | ////qDebug("Function:%x", ch); | 967 | // //odebug << "Function:" << ch << "" << oendl; |
960 | switch (ch) | 968 | switch (ch) |
@@ -962,3 +970,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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()) |
@@ -982,3 +990,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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 | } |
@@ -994,6 +1002,6 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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); |
@@ -1040,3 +1048,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1040 | ch = bgetch(); | 1048 | ch = bgetch(); |
1041 | // //qDebug("Font:%d",ch); | 1049 | // //odebug << "Font:" << ch << "" << oendl; |
1042 | mystyle.setVOffset(0); | 1050 | mystyle.setVOffset(0); |
@@ -1074,3 +1082,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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(); |
@@ -1089,3 +1097,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1089 | default: | 1097 | default: |
1090 | qDebug("Unrecognised font"); | 1098 | odebug << "Unrecognised font" << oendl; |
1091 | break; | 1099 | break; |
@@ -1101,3 +1109,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1101 | mystyle.setLeftJustify(); | 1109 | mystyle.setLeftJustify(); |
1102 | // //qDebug("left"); | 1110 | // //odebug << "left" << oendl; |
1103 | break; | 1111 | break; |
@@ -1105,3 +1113,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1105 | mystyle.setRightJustify(); | 1113 | mystyle.setRightJustify(); |
1106 | // //qDebug("right"); | 1114 | // //odebug << "right" << oendl; |
1107 | break; | 1115 | break; |
@@ -1109,3 +1117,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1109 | mystyle.setCentreJustify(); | 1117 | mystyle.setCentreJustify(); |
1110 | // //qDebug("centre"); | 1118 | // //odebug << "centre" << oendl; |
1111 | break; | 1119 | break; |
@@ -1113,3 +1121,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1113 | mystyle.setFullJustify(); | 1121 | mystyle.setFullJustify(); |
1114 | // //qDebug("full"); | 1122 | // //odebug << "full" << oendl; |
1115 | break; | 1123 | break; |
@@ -1136,3 +1144,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1136 | { | 1144 | { |
1137 | //qDebug("Alternate image:%x", ir); | 1145 | //odebug << "Alternate image:" << ir << "" << oendl; |
1138 | UInt16 ir2 = bgetch(); | 1146 | UInt16 ir2 = bgetch(); |
@@ -1151,3 +1159,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1151 | } | 1159 | } |
1152 | // if (mystyle.getLink()) qDebug("Picture link!"); | 1160 | // if (mystyle.getLink()) odebug << "Picture link!" << oendl; |
1153 | ch = '#'; | 1161 | ch = '#'; |
@@ -1162,3 +1170,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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) |
@@ -1169,3 +1177,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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 = '#'; |
@@ -1184,6 +1192,6 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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(); |
@@ -1205,3 +1213,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
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 | } |
@@ -1210,3 +1218,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1210 | default: | 1218 | default: |
1211 | qDebug("Function:%x NOT IMPLEMENTED", ch); | 1219 | odebug << "Function:" << ch << " NOT IMPLEMENTED" << oendl; |
1212 | { | 1220 | { |
@@ -1216,3 +1224,3 @@ tchar CPlucker_base::getch_base(bool fast) | |||
1216 | ch = bgetch(); | 1224 | ch = bgetch(); |
1217 | //qDebug("Arg %d, %d", i, ch); | 1225 | //odebug << "Arg " << i << ", " << ch << "" << oendl; |
1218 | } | 1226 | } |
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 | |||
@@ -24,13 +24,10 @@ | |||
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> |
@@ -38,6 +35,10 @@ | |||
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 | ||
@@ -68,3 +69,3 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) | |||
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; |
@@ -123,3 +124,3 @@ 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; |
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 | |||
@@ -41,16 +41,27 @@ | |||
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> |
@@ -64,17 +75,7 @@ | |||
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 | ||
@@ -300,3 +301,3 @@ void KateDocument::openURL(const QString &filename) | |||
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 ; |
@@ -307,3 +308,3 @@ void KateDocument::openURL(const QString &filename) | |||
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()); |
@@ -685,3 +686,3 @@ void KateDocument::setHighlight(int n) { | |||
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); |
@@ -1925,3 +1926,3 @@ void KateDocument::updateLines(int startLine, int endLine, int flags, int cursor | |||
1925 | endCtx = textLine->getContext(); | 1926 | endCtx = textLine->getContext(); |
1926 | // qDebug("DOHIGHLIGHT"); | 1927 | // odebug << "DOHIGHLIGHT" << oendl; |
1927 | 1928 | ||
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 | |||
@@ -21,18 +21,3 @@ | |||
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" |
@@ -41,2 +26,21 @@ | |||
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 | ||
@@ -623,3 +627,3 @@ int Highlight::doHighlight(int ctxNum, TextLine *textLine) | |||
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); |
@@ -855,3 +859,3 @@ void Highlight::createItemData(ItemDataList &list) | |||
855 | { | 859 | { |
856 | qDebug("Highlight::createItemData"); | 860 | odebug << "Highlight::createItemData" << oendl; |
857 | 861 | ||
@@ -876,3 +880,3 @@ void Highlight::createItemData(ItemDataList &list) | |||
876 | 880 | ||
877 | qDebug("Trying to read itemData section"); | 881 | odebug << "Trying to read itemData section" << oendl; |
878 | 882 | ||
@@ -884,3 +888,3 @@ void Highlight::createItemData(ItemDataList &list) | |||
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 |
@@ -1314,3 +1318,3 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { | |||
1314 | 1318 | ||
1315 | qDebug("HlManager::makeAttribs"); | 1319 | odebug << "HlManager::makeAttribs" << oendl; |
1316 | 1320 | ||
@@ -1323,3 +1327,3 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { | |||
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); |
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 | |||
@@ -18,11 +18,16 @@ | |||
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> |
@@ -78,3 +83,3 @@ void SyntaxDocument::setupModeList(bool force) | |||
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)); |
@@ -84,3 +89,3 @@ void SyntaxDocument::setupModeList(bool force) | |||
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") |
@@ -92,3 +97,3 @@ void SyntaxDocument::setupModeList(bool force) | |||
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()) |
@@ -294,3 +299,3 @@ QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& ty | |||
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(); |
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 | |||
@@ -20,2 +20,10 @@ | |||
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> |
@@ -27,2 +35,3 @@ | |||
27 | 35 | ||
36 | /* STD */ | ||
28 | #include <sys/stat.h> | 37 | #include <sys/stat.h> |
@@ -33,6 +42,2 @@ | |||
33 | 42 | ||
34 | #define QTOPIA_INTERNAL_LANGLIST | ||
35 | #include "kateconfig.h" | ||
36 | #include <qpe/global.h> | ||
37 | |||
38 | 43 | ||
@@ -95,3 +100,3 @@ KateConfig::KateConfig( const QString &name, Domain domain ) | |||
95 | { | 100 | { |
96 | qWarning("KateConfig constructor\n"); | 101 | owarn << "KateConfig constructor\n" << oendl; |
97 | git = groups.end(); | 102 | git = groups.end(); |
@@ -120,3 +125,3 @@ KateConfig::~KateConfig() | |||
120 | { | 125 | { |
121 | qWarning("KateConfig destructor\n"); | 126 | owarn << "KateConfig destructor\n" << oendl; |
122 | if ( changed ) | 127 | if ( changed ) |
@@ -174,3 +179,3 @@ void KateConfig::writeEntry( const QString &key, const QString &value ) | |||
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; |
@@ -234,3 +239,3 @@ void KateConfig::writeEntryCrypt( const QString &key, const QString &value ) | |||
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; |
@@ -323,3 +328,3 @@ void KateConfig::removeEntry( const QString &key ) | |||
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; |
@@ -399,3 +404,3 @@ QString KateConfig::readEntryDirect( const QString &key, const QString &deflt ) | |||
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; |
@@ -502,3 +507,3 @@ void KateConfig::clearGroup() | |||
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; |
@@ -523,3 +528,3 @@ void KateConfig::write( const QString &fn ) | |||
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(); |
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 | |||
@@ -16,14 +16,19 @@ | |||
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 | ||
@@ -154,3 +159,3 @@ TinyKate::~TinyKate( ) | |||
154 | { | 159 | { |
155 | qWarning("TinyKate destructor\n"); | 160 | owarn << "TinyKate destructor\n" << oendl; |
156 | 161 | ||
@@ -162,3 +167,3 @@ TinyKate::~TinyKate( ) | |||
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(); |
@@ -183,3 +188,3 @@ void TinyKate::open(const QString & 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 | ||
@@ -251,3 +256,3 @@ void TinyKate::slotSave() { | |||
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()) |
@@ -267,3 +272,3 @@ void TinyKate::slotSaveAs() { | |||
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); |