Diffstat (limited to 'noncore/apps/opie-gutenbrowser') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 92 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | 50 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/SearchDialog.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/browserDialog.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/fontDialog.cpp | 20 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp | 27 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | 153 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | 20 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/helpme.cpp | 11 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/main.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/openetext.cpp | 55 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/optionsDialog.cpp | 36 |
12 files changed, 258 insertions, 217 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 @@ +#include "LibraryDialog.h" +#include "output.h" + +/* OPIE */ #include <qpe/applnk.h> @@ -18,6 +22,5 @@ #include <qpe/qpedialog.h> +#include <opie2/odebug.h> -#include "LibraryDialog.h" -#include "output.h" - +/* QT */ #include <qpushbutton.h> @@ -26,2 +29,3 @@ +/* STD */ #include <unistd.h> @@ -66,3 +70,3 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); - qDebug("Library Dialog: ftp_host is "+ftp_host); + odebug << "Library Dialog: ftp_host is "+ftp_host << oendl; // 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 downDir =config.readEntry( "DownloadDirectory",local_library); - qDebug("downDir is "+downDir); + odebug << "downDir is "+downDir << oendl; newindexLib.setName( old_index); @@ -101,3 +105,3 @@ void LibraryDialog::Newlibrary() #ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files - //qDebug("Opening new library index %s",newindexLib); + //odebug << "Opening new library index " << newindexLib << "" << oendl; if ( newindexLib.open( IO_ReadOnly) ) { @@ -123,3 +127,3 @@ void LibraryDialog::Newlibrary() if (authBox->isChecked()) { // this reverses the first name and last name of the author - // qDebug("Sorting last name first"); + // odebug << "Sorting last name first" << oendl; QString lastName, firstName=""; @@ -182,3 +186,3 @@ void LibraryDialog::Library() - qDebug("opening GUTINDEX.ALL file"); + odebug << "opening GUTINDEX.ALL file" << oendl; IDontKnowWhy = ""; @@ -202,3 +206,3 @@ void LibraryDialog::Library() file = file.left( file.find("]",0,TRUE)); - //qDebug("file is "+file); + //odebug << "file is "+file << oendl; /// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 ); @@ -209,6 +213,6 @@ void LibraryDialog::Library() title = title.stripWhiteSpace(); - //qDebug("title is "+title); + //odebug << "title is "+title << oendl; getAuthor(); // grok author author = author.stripWhiteSpace(); - //qDebug("author is "+author); + //odebug << "author is "+author << oendl; 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) item = 0; - qDebug( "string from librarydialog is:%s %s %s", DlglistItemYear.latin1(),DlglistItemFile.latin1(),DlglistItemNumber.latin1()); - qDebug("Title is "+DlglistItemTitle); + odebug << "string from librarydialog is:" << DlglistItemYear << " " << DlglistItemFile << " " << DlglistItemNumber << "" << oendl; + odebug << "Title is "+DlglistItemTitle << oendl; @@ -406,3 +410,3 @@ void LibraryDialog::select_title( QListViewItem * item) if(download_Etext()) { - // qDebug("get here 2"); + // odebug << "get here 2" << oendl; if(i_binary == 1) { @@ -425,3 +429,3 @@ bool LibraryDialog::download_Etext() - qDebug("about to network dialog"); + odebug << "about to network dialog" << oendl; QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile; @@ -433,3 +437,3 @@ bool LibraryDialog::download_Etext() NewlistItemFile.replace( 0,4, DlglistItemFile.left(4)); - qDebug("NewlistItemFile is now "+NewlistItemFile); + odebug << "NewlistItemFile is now "+NewlistItemFile << oendl; } @@ -437,3 +441,3 @@ bool LibraryDialog::download_Etext() int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10); - qDebug(NewlistItemYear); + odebug << NewlistItemYear << oendl; if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) { @@ -449,4 +453,4 @@ bool LibraryDialog::download_Etext() outputFile=local_library+".guten_temp"; - //qDebug("Download file:%s",NewlistItemFile.latin1() ); - qDebug("Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile); + //odebug << "Download file:" << NewlistItemFile << "" << oendl; + odebug << "Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile << oendl; QStringList networkList; @@ -464,4 +468,4 @@ bool LibraryDialog::download_Etext() File_Name= NetworkDlg->localFileName; - qDebug("back to Library from Network Dialog"); - qDebug("Just downloaded "+NetworkDlg->localFileName); + odebug << "back to Library from Network Dialog" << oendl; + odebug << "Just downloaded "+NetworkDlg->localFileName << oendl; @@ -470,3 +474,3 @@ bool LibraryDialog::download_Etext() // File_Name.replace(0,local_library.length(),downDir); - // qDebug("File_Name now is "+File_Name); + // odebug << "File_Name now is "+File_Name << oendl; @@ -475,3 +479,3 @@ bool LibraryDialog::download_Etext() if(NetworkDlg->successDownload) { - qDebug("Filename is "+File_Name); + odebug << "Filename is "+File_Name << oendl; if(File_Name.right(4)==".txt") { @@ -483,3 +487,3 @@ bool LibraryDialog::download_Etext() - qDebug("Filename is now "+File_Name); + odebug << "Filename is now "+File_Name << oendl; @@ -492,10 +496,10 @@ bool LibraryDialog::download_Etext() - qDebug("Setting doclink"); + odebug << "Setting doclink" << oendl; DocLnk lnk; - qDebug("name is "+name_file); + odebug << "name is "+name_file << oendl; lnk.setName(name_file); //sets file name - qDebug("Title is "+DlglistItemTitle); + odebug << "Title is "+DlglistItemTitle << oendl; lnk.setComment(DlglistItemTitle); - qDebug("Filename is "+File_Name); + odebug << "Filename is "+File_Name << oendl; lnk.setFile(File_Name); //sets File property @@ -505,3 +509,3 @@ bool LibraryDialog::download_Etext() if(!lnk.writeLink()) { - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } else { @@ -572,4 +576,4 @@ bool LibraryDialog::setTitle() Config config("Gutenbrowser"); - qDebug("setting title"); - qDebug(DlglistItemTitle); + odebug << "setting title" << oendl; + odebug << DlglistItemTitle << oendl; @@ -579,3 +583,3 @@ bool LibraryDialog::setTitle() DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" ); - qDebug("Title being set is "+DlglistItemTitle); + odebug << "Title being set is "+DlglistItemTitle << oendl; int test = 0; @@ -740,3 +744,3 @@ void LibraryDialog::onButtonSearch() texter = SearchResultsDialog->selText; - // qDebug(texter); + // odebug << texter << oendl; resultLs= SearchResultsDialog->resultsList; @@ -751,3 +755,3 @@ void LibraryDialog::onButtonSearch() texter.sprintf("%s \n",(*it).latin1()); - // qDebug(texter); + // odebug << texter << oendl; if( tester!=texter) @@ -808,3 +812,3 @@ void LibraryDialog::parseSearchResults( QString resultStr) // if (exit==QMessageBox::Yes) { - // qDebug("Issuing the command "+cmd); + // odebug << "Issuing the command "+cmd << oendl; // #if defined(_WS_WIN_) @@ -842,3 +846,3 @@ bool LibraryDialog::getItem(QListViewItem *it) { - // qDebug("selected getItem"); + // odebug << "selected getItem" << oendl; @@ -860,3 +864,3 @@ bool LibraryDialog::onButtonDownload() { - // qDebug("selected onButtonDownloadz"); + // odebug << "selected onButtonDownloadz" << oendl; @@ -902,3 +906,3 @@ void LibraryDialog::comboSelect(int index) { - // qDebug("we are sorting"); + // odebug << "we are sorting" << oendl; ListView1->setSorting( index, TRUE); @@ -932,3 +936,3 @@ void LibraryDialog::newList() if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) { - qDebug("changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser"); + odebug << "changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser" << oendl; QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; @@ -953,3 +957,3 @@ void LibraryDialog::newList() } else { - qDebug("Issuing the command\n"+cmd); + odebug << "Issuing the command\n"+cmd << oendl; // system(cmd); @@ -967,3 +971,3 @@ void LibraryDialog::newList() // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0) - // qDebug("renaming error"); + // odebug << "renaming error" << oendl; // } @@ -1026,3 +1030,3 @@ bool LibraryDialog::moreInfo() if(titleString.length()>2) { - qDebug( "Title is "+titleString ); + odebug << "Title is "+titleString << oendl; titleString.replace( QRegExp("\\s"), "%20"); @@ -1050,3 +1054,3 @@ void LibraryDialog::FindLibrary() indexLib.setName( new_index); - qDebug("index file is "+ new_index); + odebug << "index file is "+ new_index << oendl; Newlibrary(); @@ -1055,3 +1059,3 @@ void LibraryDialog::FindLibrary() indexLib.setName( old_index); - qDebug("new index nameis "+ old_index); + odebug << "new index nameis "+ old_index << oendl; 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 @@ // /* Created: Sun Aug 27 15:24:52 2000*/ -#include <unistd.h> -extern "C" { -#include <ftplib.h> -} @@ -21,2 +17,6 @@ extern "C" { +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ #include <qprogressbar.h> @@ -32,2 +32,8 @@ extern "C" { +/* STD */ +#include <unistd.h> +extern "C" { +#include <ftplib.h> +} + QProgressBar* ProgressBar1; @@ -121,3 +127,3 @@ void NetworkDialog::initDialog() { if(autoOk) { - qWarning("XXXXXXXXXXXXXXXXXXXXXXXX"); + owarn << "XXXXXXXXXXXXXXXXXXXXXXXX" << oendl; buttonOk->setDown(true); @@ -145,3 +151,3 @@ void NetworkDialog::timeSlot() { // } -// // qDebug("timer event"); +// // odebug << "timer event" << oendl; // qApp->processEvents(); @@ -151,3 +157,3 @@ void NetworkDialog::timeSlot() { void NetworkDialog::connectionTimeSlot() { -// qDebug("Connections timed out"); +// odebug << "Connections timed out" << oendl; // ftpQuit(); @@ -169,4 +175,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) qApp->processEvents(); - qDebug("Downloading: %s",networkUrl.latin1()); - qDebug("Into: %s",localFileName.latin1()); + odebug << "Downloading: " << networkUrl << "" << oendl; + odebug << "Into: " << localFileName << "" << oendl; if( networkUrl.length() > 5) { @@ -176,3 +182,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) if(ftp_host.length() < 2) { - qDebug("Please select an ftp host" ); + odebug << "Please select an ftp host" << oendl; successDownload=false; @@ -182,4 +188,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) QString msg; - qDebug(ftp_host); - qDebug("Opening ftp connection."); + odebug << ftp_host << oendl; + odebug << "Opening ftp connection." << oendl; warnLabel->setText("connecting to: "+ftp_host ); @@ -202,3 +208,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) } - qDebug("Changing directories."); + odebug << "Changing directories." << oendl; TextLabel3->setText("Changing directories."); @@ -219,3 +225,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) // } - qDebug("Requesting directory list."); + odebug << "Requesting directory list." << oendl; TextLabel3->setText("Getting directory list."); @@ -234,3 +240,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) QTextStream t( &tmp ); // use a text stream - qDebug("Finding partial filename "+s_partialFileName); + odebug << "Finding partial filename "+s_partialFileName << oendl; while ( !t.eof()) { @@ -243,3 +249,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) File_Name = str; - qDebug("Found file_name "+ File_Name); + odebug << "Found file_name "+ File_Name << oendl; break; @@ -248,3 +254,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) // File_Name = str; -// qDebug("Found file_name "+ File_Name); +// odebug << "Found file_name "+ File_Name << oendl; // break; @@ -258,3 +264,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) else - qDebug("Error opening temp file."); + odebug << "Error opening temp file." << oendl; @@ -265,4 +271,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) localFileName = temp+File_Name; - qDebug("Requesting file "+ File_Name); - qDebug( "Saving as "+localFileName); + odebug << "Requesting file "+ File_Name << oendl; + odebug << "Saving as "+localFileName << oendl; msg="Requesting file "+ File_Name; @@ -295,3 +301,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) } - qDebug("Ftp session successful"); + odebug << "Ftp session successful" << oendl; successDownload=TRUE; @@ -304,3 +310,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) void NetworkDialog::doOk() { - qWarning("Do OK"); + owarn << "Do OK" << oendl; 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() searchString = get_text(); -// qDebug("Search string is "+searchString); +// odebug << "Search string is "+searchString << oendl; Config cfg("Gutenbrowser"); @@ -121,3 +121,3 @@ void SearchDialog::closed() searchString = get_text(); -// qDebug("Search string is "+searchString); +// odebug << "Search string is "+searchString << oendl; 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 #include <opie2/ofiledialog.h> +#include <opie2/odebug.h> using namespace Opie::Ui; @@ -54,3 +55,3 @@ void optionsDialog::BrowseSelected() { // QStringList fileList=browseForFiles->fileList; -// qDebug(selFile); +// odebug << selFile << oendl; // QStringList::ConstIterator f; @@ -78,3 +79,3 @@ void optionsDialog::setHttp(int index) { config.setGroup( "HttpServer" ); - qDebug("writing http server"); + odebug << "writing http server" << oendl; 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) family = text; -// qDebug(family); +// odebug << family << oendl; 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) ); dstyle = QString::number( *points ); - qDebug(dstyle); + odebug << dstyle << oendl; sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); @@ -153,3 +153,3 @@ void FontDialog::populateLists() // if(family == defaultFont.family()) -// qDebug(family); +// odebug << family << oendl; familyListBox->insertItem( family); @@ -211,3 +211,3 @@ void FontDialog::changeText() } -// qDebug("Font family is "+family); +// odebug << "Font family is "+family << oendl; if( styleListBox->currentItem() == -1) @@ -217,3 +217,3 @@ void FontDialog::changeText() } -// qDebug("font style is "+style); +// odebug << "font style is "+style << oendl; @@ -225,3 +225,3 @@ void FontDialog::changeText() -// qDebug("Font size is "+size); +// odebug << "Font size is "+size << oendl; bool ok; @@ -233,3 +233,3 @@ void FontDialog::changeText() charSet = *s; -// qDebug(charSet); +// odebug << charSet << oendl; } @@ -237,5 +237,5 @@ void FontDialog::changeText() QFontInfo fontInfo( selectedFont); -// if(fontInfo.italic() ) qDebug("italic"); +// if(fontInfo.italic() ) odebug << "italic" << oendl; selectedFont.setWeight(fontInfo.weight() ); -// qDebug("Style are "+style+" %d ",fontInfo.weight()); +// odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl; Config cfg("Gutenbrowser"); @@ -251,3 +251,3 @@ void FontDialog::changeText() cfg.writeEntry("Italic","TRUE"); -// qDebug("Style is "+styleListBox->currentText()); +// odebug << "Style is "+styleListBox->currentText() << oendl; } 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 @@ ***************************************************************************/ + #include "optionsDialog.h" @@ -18,11 +19,15 @@ +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> + +/* QT */ #include <qprogressbar.h> -#include <stdlib.h> #include <qurloperator.h> -#include <qpe/config.h> #include <qlistbox.h> +/* STD */ +#include <stdlib.h> #include <unistd.h> #include <stdio.h> -#include <stdlib.h> @@ -40,3 +45,3 @@ void optionsDialog::ftpSiteDlg( ) ListFile+="/ftpList"; - qDebug("opening "+ListFile); + odebug << "opening "+ListFile << oendl; if ( QFile(ListFile).exists() ) { @@ -78,3 +83,3 @@ void optionsDialog::getSite() // { // use new, improved, *INSTANT* network-dialog-file-getterer -// qDebug("gitcha!"); +// odebug << "gitcha!" << oendl; // } @@ -86,3 +91,3 @@ void optionsDialog::getSite() QString cmd="wget -T 15 -O " +outputFile + " " + networkUrl + " 2>&1" ; - qDebug("Issuing the command "+cmd); + odebug << "Issuing the command "+cmd << oendl; Output *outDlg; @@ -115,3 +120,3 @@ bool optionsDialog::parseFtpList( QString outputFile) // TODO: add locations!! - qDebug("parse ftplist "+outputFile); + odebug << "parse ftplist "+outputFile << oendl; QString ftpList, s_location; @@ -154,3 +159,3 @@ bool optionsDialog::parseFtpList( QString outputFile) if(( start=s.find("<BR>(", 0, TRUE) ) != -1) { -// qDebug("%s",s.latin1()); +// odebug << "" << s << "" << oendl; end = s.find( ")", 0, TRUE)+1; @@ -158,3 +163,3 @@ bool optionsDialog::parseFtpList( QString outputFile) -// qDebug("%s", s_location.latin1()); +// odebug << "" << s_location << "" << oendl; // ftpList += ftpSite + "\n"; @@ -192,3 +197,3 @@ void optionsDialog::openSiteList() { - qDebug(" just opens the ftp site list"); + odebug << " just opens the ftp site list" << oendl; // ListFile = ( QDir::homeDirPath ()) +"/.gutenbrowser/ftpList"; @@ -232,3 +237,3 @@ void optionsDialog::select_site( const char *index ) s_site2=s_site.right( s_site.length()-(s_site.find(" ",0,TRUE)+4) ); -qDebug("Selected ftp site is "+ s_site2); +odebug << "Selected ftp site is "+ s_site2 << oendl; 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 @@ // donate@gutenberg.net -#include <qpe/qpeapplication.h> -#include <qpe/fontdatabase.h> -#include <qpe/config.h> -#include <qpe/qcopenvelope_qws.h> -#include <qpe/mimetype.h> -#include <qpe/resource.h> -#include <qpe/applnk.h> + @@ -35,3 +29,13 @@ +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> +#include <qpe/fontdatabase.h> +#include <qpe/config.h> +#include <qpe/qcopenvelope_qws.h> +#include <qpe/mimetype.h> +#include <qpe/resource.h> +#include <qpe/applnk.h> +/* QT */ #include <qregexp.h> @@ -53,2 +57,3 @@ +/* STD */ #include <stdio.h> @@ -133,3 +138,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) if( index != -1) { - // qDebug( tempTitle); + // odebug << tempTitle << oendl; bookmarksMenu->insertItem( tempTitle); @@ -156,3 +161,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) for (int i=1;i< qApp->argc();i++) { - qDebug("Suppose we open somethin"); + odebug << "Suppose we open somethin" << oendl; load(qApp->argv()[i]); @@ -171,3 +176,3 @@ Gutenbrowser::~Gutenbrowser() { // QPEApplication::ungrabKeyboard(); - qDebug("Exit"); + odebug << "Exit" << oendl; } @@ -201,3 +206,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { filename+="etc/gutenbrowser/"; - qDebug("filename "+filename); + odebug << "filename "+filename << oendl; // QString filename = QDir::homeDirPath()+"/Applications/gutenbrowser/"; @@ -209,3 +214,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { QString brow = config.readEntry("Preferred", "Opera"); - qDebug("Preferred browser is "+brow); + odebug << "Preferred browser is "+brow << oendl; if(!showMsg) { //if we just get the gutenindex.all @@ -213,3 +218,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { chdir(local_library); - qDebug("Issuing the system command: %s", cmd.latin1()); + odebug << "Issuing the system command: " << cmd << "" << oendl; @@ -225,3 +230,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { fp = popen( (const char *) cmd, "r"); - // qDebug("Issuing the command\n"+cmd); + // odebug << "Issuing the command\n"+cmd << oendl; // system(cmd); @@ -258,3 +263,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { chdir(local_library); - qDebug("Issuing the sys command: %s", cmd.latin1()); + odebug << "Issuing the sys command: " << cmd << "" << oendl; system(cmd); @@ -268,3 +273,3 @@ void Gutenbrowser::toggleButtonIcons( bool useEm) { pixDir=QPEApplication::qpeDir()+"pics/gutenbrowser"; - qDebug("Docdir is "+QPEApplication::documentDir()); + odebug << "Docdir is "+QPEApplication::documentDir() << oendl; @@ -383,3 +388,3 @@ void Gutenbrowser::SearchBtn() { if( loadCheck) { - qDebug("loadCheck: we have a loaded doc"); + odebug << "loadCheck: we have a loaded doc" << oendl; Search(); @@ -406,3 +411,3 @@ void Gutenbrowser::ForwardBtn() { Lview->insertLine( s, -1); - // qDebug(s); + // odebug << s << oendl; currentLine++; @@ -425,3 +430,3 @@ void Gutenbrowser::ForwardBtn() { } else { - // qDebug("bal"); + // odebug << "bal" << oendl; // if( i_pageNum != pages) { @@ -440,3 +445,3 @@ void Gutenbrowser::ForwardBtn() { - // qDebug("page number %d line number %d", i_pageNum, currentLine); + // odebug << "page number " << i_pageNum << " line number " << currentLine << "" << oendl; } @@ -459,3 +464,3 @@ void Gutenbrowser::BackBtn() { if(!f.at( pageStopArray[i_pageNum - 1] )) - qDebug("File positioned backward did not work"); + odebug << "File positioned backward did not work" << oendl; } @@ -515,3 +520,3 @@ void Gutenbrowser::TopBtn() { if( i_pageNum != 0) { - qDebug("top"); + odebug << "top" << oendl; qApp->processEvents(); @@ -573,3 +578,3 @@ void Gutenbrowser::BeginBtn() { pageStopArray[i_pageNum ] = currentFilePos; - // qDebug("new page number %d, found at %d", i_pageNum, currentFilePos); + // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; } @@ -577,3 +582,3 @@ void Gutenbrowser::BeginBtn() { if( LeftText.find( s_pattern, 0 , TRUE) != -1 || LeftText.find( sPattern2, 0 , TRUE) != -1 ) { - qDebug("<<<<<< FOUND IT!! new page number %d, found at %d", i_pageNum, currentFilePos); + odebug << "<<<<<< FOUND IT!! new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; break; @@ -623,3 +628,3 @@ void Gutenbrowser::setBookmark() { qApp->processEvents(); - qDebug("Settingbook mark "+file_name); + odebug << "Settingbook mark "+file_name << oendl; @@ -627,3 +632,3 @@ void Gutenbrowser::setBookmark() { title=cfg.readEntry(file_name,""); - qDebug("title is "+ title); + odebug << "title is "+ title << oendl; @@ -656,3 +661,3 @@ void Gutenbrowser::Bookmark( int itemId) { - // qDebug("<<<<<< %d, %d", Lview->PageSize(), Lview->lastRow() - Lview->topRow() ); + // odebug << "<<<<<< " << Lview->PageSize() << ", " << Lview->lastRow() - Lview->topRow() << "" << oendl; @@ -660,3 +665,3 @@ void Gutenbrowser::Bookmark( int itemId) { - qDebug("menu item %d", itemId); + odebug << "menu item " << itemId << "" << oendl; QString tempTitle; @@ -702,3 +707,3 @@ void Gutenbrowser::Bookmark( int itemId) { pageStopArray[i_pageNum ] = currentFilePos; - // qDebug("new page number %d, found at %d", i_pageNum, currentFilePos); + // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; } @@ -731,3 +736,3 @@ void Gutenbrowser::Bookmark( int itemId) { - qDebug("bookmark loaded"); + odebug << "bookmark loaded" << oendl; setCaption(title); @@ -739,4 +744,4 @@ bool Gutenbrowser::load( const char *fileName) { // QCopEnvelope ( "QPE/System", "busy()" ); - // qDebug("Title is already set as "+title); - qDebug("sizeHint %d pageSize %d", sizeHint().height(),Lview->PageSize() ); + // odebug << "Title is already set as "+title << oendl; + odebug << "sizeHint " << sizeHint().height() << " pageSize " << Lview->PageSize() << "" << oendl; if( Lview->PageSize() < 4) { @@ -746,3 +751,3 @@ bool Gutenbrowser::load( const char *fileName) { pointSize = Lview->fontInfo().pointSize(); - qDebug("sizeHint %d point size %d", sizeHint().height(), pointSize); + odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl; if(pointSize < 10) @@ -764,3 +769,3 @@ bool Gutenbrowser::load( const char *fileName) { // } - qDebug("ready to open "+o_file); + odebug << "ready to open "+o_file << oendl; @@ -800,3 +805,3 @@ bool Gutenbrowser::load( const char *fileName) { Lview->setMaxLines(Lview->PageSize()*2); - qDebug("Gulped %d", currentLine); + odebug << "Gulped " << currentLine << "" << oendl; setCaption(title); @@ -807,3 +812,3 @@ bool Gutenbrowser::load( const char *fileName) { // pages = (int)(( Lview->numLines() / Lview->editSize() ) / 2 ) +1; - //qDebug("number of pages %d", pages); + //odebug << "number of pages " << pages << "" << oendl; @@ -824,3 +829,3 @@ void Gutenbrowser::Search() { { - qDebug("Starting search dialog"); + odebug << "Starting search dialog" << oendl; searchDlg = new SearchDialog( this, "Etext Search", true); @@ -960,5 +965,5 @@ void Gutenbrowser::LibraryBtn() { QString zipFile; - // qDebug("Local Library is %s ", local_library.latin1()); + // odebug << "Local Library is " << local_library << " " << oendl; zipFile="/usr/bin/unzip"; - // qDebug("newestLibraryFile is %s ", newestLibraryFile.latin1()); + // odebug << "newestLibraryFile is " << newestLibraryFile << " " << oendl; if( QFile::exists( local_library+newestLibraryFile)) { @@ -991,3 +996,3 @@ void Gutenbrowser::LibraryBtn() { file_name = LibraryDlg->File_Name; - // qDebug("title is being set as "+title); + // odebug << "title is being set as "+title << oendl; title = listItemTitle; @@ -1013,3 +1018,3 @@ void Gutenbrowser::LibraryBtn() { { - qDebug("Found zip file\n"); + odebug << "Found zip file\n" << oendl; // QStringList args; @@ -1021,3 +1026,3 @@ void Gutenbrowser::LibraryBtn() { QString cmd = "/usr/bin/unzip -o " + local_library+file_name + " -d " + local_library; - qDebug("Issuing the command "+ cmd); + odebug << "Issuing the command "+ cmd << oendl; // unzipProc=new QProcess( this, "unzipProc" ); /// fark that idea! @@ -1064,3 +1069,3 @@ void Gutenbrowser::OpenBtn() { title = OpenDlg->openFileTitle; - qDebug("title open as "+title); + odebug << "title open as "+title << oendl; file_name = OpenDlg->file; @@ -1071,3 +1076,3 @@ void Gutenbrowser::OpenBtn() { showMainList=FALSE; - qDebug("ShowMainList is now false"); + odebug << "ShowMainList is now false" << oendl; mainList->hide(); @@ -1080,3 +1085,3 @@ void Gutenbrowser::OpenBtn() { } else { - qDebug("file_name is empty!"); + odebug << "file_name is empty!" << oendl; if(showMainList) { @@ -1246,3 +1251,3 @@ bool Gutenbrowser::getTitle( const char *file ) { title = config.readEntry(ramble, ""); - // qDebug("(getTitle)title is being set as "+title); + // odebug << "(getTitle)title is being set as "+title << oendl; } @@ -1448,3 +1453,3 @@ void Gutenbrowser::keyPressEvent( QKeyEvent *e) { void Gutenbrowser::resizeEvent( QResizeEvent *ev) { - // qDebug("resize: %d,%d\n",ev->size().width(),ev->size().height()); + // odebug << "resize: " << ev->size().width() << "," << ev->size().height() << "\n" << oendl; @@ -1478,3 +1483,3 @@ void Gutenbrowser::doOptions() { - qDebug("writing library config"); + odebug << "writing library config" << oendl; Config config("Gutenbrowser"); @@ -1495,3 +1500,3 @@ void Gutenbrowser::doOptions() { system(cmd); - qDebug("Making new dir "+cmd); + odebug << "Making new dir "+cmd << oendl; if(Ddir.right(1)!="/") { @@ -1511,3 +1516,3 @@ void Gutenbrowser::doOptions() { if(optDlg->fontDlg-> changedFonts) { - qDebug("Setting font"); + odebug << "Setting font" << oendl; myFont=optDlg->fontDlg->selectedFont; @@ -1517,3 +1522,3 @@ void Gutenbrowser::doOptions() { if(optDlg->useWordWrap_CheckBox->isChecked() ) { - qDebug("WORD WRAP is set"); + odebug << "WORD WRAP is set" << oendl; Lview->setWordWrap(QMultiLineEdit::WidgetWidth); @@ -1521,3 +1526,3 @@ void Gutenbrowser::doOptions() { } else { - qDebug("Word wrap is NOT set"); + odebug << "Word wrap is NOT set" << oendl; Lview->setWordWrap(QMultiLineEdit::NoWrap); @@ -1580,4 +1585,4 @@ void Gutenbrowser::OnNetworkDialog( const QString &/*networkUrl*/, const QString { - // qDebug(networkUrl); - // qDebug(output); + // odebug << networkUrl << oendl; + // odebug << output << oendl; // #ifndef Q_WS_QWS @@ -1714,3 +1719,3 @@ void Gutenbrowser::cleanUp( ) QPEApplication::ungrabKeyboard(); - // qDebug("Cleanup"); + // odebug << "Cleanup" << oendl; if(f.isOpen()) f.close(); @@ -1720,3 +1725,3 @@ void Gutenbrowser::fixKeys() { - qDebug("Attempting to fix keys"); + odebug << "Attempting to fix keys" << oendl; @@ -1774,3 +1779,3 @@ void Gutenbrowser::listClickedSlot( QListBoxItem * index) { QString file = config.readEntry(temp, ""); - qDebug("About to load"); + odebug << "About to load" << oendl; if( Lview->isVisible()) @@ -1815,3 +1820,3 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { lnk = DocLnk(frozenBoogers); - // qDebug(lnk.file() ); + // odebug << lnk.file() << oendl; title=lnk.comment(); @@ -1819,3 +1824,3 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { this->show(); - // qDebug(title); + // odebug << title << oendl; // qApp->processEvents(); @@ -1875,3 +1880,3 @@ void Gutenbrowser::menuEditTitle() QString title_text = mainList->text( currentItem); - //qDebug("Selected "+title_text); + //odebug << "Selected "+title_text << oendl; @@ -1889,6 +1894,6 @@ void Gutenbrowser::menuEditTitle() QString file_title = config.readEntry( s_filename, ""); - //qDebug("file_title is "+file_title); + //odebug << "file_title is "+file_title << oendl; if(title_text == file_title ) { // selFile = s_filename; - //qDebug("Edit: "+ file_title ); + //odebug << "Edit: "+ file_title << oendl; i=i_numofFiles+1; @@ -1897,3 +1902,3 @@ void Gutenbrowser::menuEditTitle() if(titleEdit->exec() !=0) { - //qDebug(titleEdit->newTitle); + //odebug << titleEdit->newTitle << oendl; config.writeEntry( s_filename, titleEdit->newTitle); @@ -1913,3 +1918,3 @@ void Gutenbrowser::menuEditTitle() bool Gutenbrowser::UnZipIt(const QString &zipFile) { - qDebug(zipFile); + odebug << zipFile << oendl; #ifndef Q_WS_QWS @@ -1925,3 +1930,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { // } - // qDebug((const char*)local_library.latin1()); + // odebug << (const char*)local_library.latin1() << oendl; QString cmd; @@ -1929,3 +1934,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { if( chdir((const char*)local_library.latin1())!=0) - qDebug("chdir failed."); + odebug << "chdir failed." << oendl; cmd = "gunzip -S .zip " + local_library+zipFile; @@ -1935,3 +1940,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { if( chdir((const char*)local_library.latin1())!=0) - qDebug("chdir failed."); + odebug << "chdir failed." << oendl; cmd = "unzip " + local_library+zipFile; @@ -1944,3 +1949,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { #if defined(_WS_X11_)// - qDebug("Issuing the command "+cmd); + odebug << "Issuing the command "+cmd << oendl; system( cmd); @@ -1950,6 +1955,6 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { if( rename("pgwhole","PGWHOLE.TXT") !=0) - qDebug("rename failed"); + odebug << "rename failed" << oendl; } else { if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) - qDebug("rename failed"); + odebug << "rename failed" << oendl; } @@ -1957,3 +1962,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { #ifdef Q_WS_QWS - qDebug("Issuing the command "+cmd); + odebug << "Issuing the command "+cmd << oendl; system( cmd); @@ -1963,6 +1968,6 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { if( rename("pgwhole","PGWHOLE.TXT") !=0) - qDebug("rename failed"); + odebug << "rename failed" << oendl; } else { if( rename(thatFile.left(4),thatFile.left(4)+".txt") !=0) - qDebug("rename failed"); + odebug << "rename failed" << oendl; } @@ -1973,3 +1978,3 @@ bool Gutenbrowser::UnZipIt(const QString &zipFile) { else if(exit==QMessageBox::No) { - // qDebug("unzip"); + // odebug << "unzip" << oendl; 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 @@ ***************************************************************************/ + //#include "gutenbrowserData.h" @@ -16,2 +17,4 @@ +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/config.h> @@ -22,2 +25,3 @@ +/* QT */ #include <qfontinfo.h> @@ -41,3 +45,3 @@ void Gutenbrowser::initSlots() { void Gutenbrowser::initConfig() { -//qDebug("Starting configuration."); +//odebug << "Starting configuration." << oendl; QDir library(local_library); @@ -59,3 +63,3 @@ void Gutenbrowser::initConfig() { } - // qDebug( "init file is %s",iniFile.latin1()); + // odebug << "init file is " << iniFile << "" << oendl; @@ -149,5 +153,5 @@ void Gutenbrowser::initConfig() { b_queryExit=TRUE; -// qDebug("Please query before leaving the library."); +// odebug << "Please query before leaving the library." << oendl; } else { -// qDebug("Please DO NOT query before leaving the library."); +// odebug << "Please DO NOT query before leaving the library." << oendl; b_queryExit=FALSE; @@ -163,3 +167,3 @@ void Gutenbrowser::initMenuBar() { -// qDebug("Starting menu init."); +// odebug << "Starting menu init." << oendl; // menuBar entry fileMenu @@ -209,3 +213,3 @@ void Gutenbrowser::initButtonBar() { -//qDebug("Starting buttonbar init."); +//odebug << "Starting buttonbar init." << oendl; @@ -243,3 +247,3 @@ void Gutenbrowser::initButtonBar() InfoBar = new QPushButton( this, "Info_Bar" ); -// qDebug("Infobar"); +// odebug << "Infobar" << oendl; // if(!useSplitter) { @@ -295,3 +299,3 @@ void Gutenbrowser::initView() if(italic=="TRUE") { - qDebug("Set Italic font"); + odebug << "Set Italic font" << oendl; 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 @@ ***************************************************************************/ -#include <qpe/qcopenvelope_qws.h> -#include <qpe/qpeapplication.h> @@ -22,2 +20,8 @@ +/* OPIE */ +#include <qpe/qcopenvelope_qws.h> +#include <qpe/qpeapplication.h> +#include <opie2/odebug.h> + +/* QT */ #include <qprogressdialog.h> @@ -25,2 +29,3 @@ +/* STD */ #include <sys/stat.h> @@ -113,3 +118,3 @@ void HelpMe::help() msg=QPEApplication::qpeDir()+"help/html/gutenbrowser-index.html"; // or where ever this ends up to be -qDebug(msg); +odebug << msg << oendl; 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> ) // // printf("Gutenbrowser: "VERSION"\n"); -// // // qDebug("Gutenbrowser: "VERSION); +// // // odebug << "Gutenbrowser: "VERSION << oendl; // // // 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 @@ #include <opie2/ofiledialog.h> +#include <opie2/odebug.h> #include <qpe/applnk.h> @@ -25,3 +26,3 @@ using namespace Opie::Ui; -#include <stdlib.h> +/* QT */ #include <qtextstream.h> @@ -29,2 +30,3 @@ using namespace Opie::Ui; +/* STD */ #if defined(_WS_WIN_) @@ -33,3 +35,4 @@ using namespace Opie::Ui; #include <unistd.h> -#include "sys/stat.h" +#include <stdlib.h> +#include <sys/stat.h> #endif @@ -136,3 +139,3 @@ OpenFileButton->setDown(TRUE); - qDebug("Open file: "+str); + odebug << "Open file: "+str << oendl; @@ -166,3 +169,3 @@ OpenFileButton->setDown(TRUE); if( chdir((const char*)local_library.latin1())!=0) - qDebug("chdir failed.");// QString cmd = "gunzip -d " + filer + " -d " + local_library; + odebug << "chdir failed." << oendl; // QString cmd = "gunzip -d " + filer + " -d " + local_library; cmd = "gunzip -S .zip " + filer; @@ -173,3 +176,3 @@ OpenFileButton->setDown(TRUE); else /*if( s_fileName.right(4) == ".txt" || if( s_fileName.right(4) == ".TXT"))*/ { -// qDebug("Filename is "+fileName); +// odebug << "Filename is "+fileName << oendl; s_fileName = fileName; @@ -178,3 +181,3 @@ OpenFileButton->setDown(TRUE); fileName = s_fileName; -// qDebug("Filename is now "+fileName); +// odebug << "Filename is now "+fileName << oendl; } @@ -189,7 +192,7 @@ OpenFileButton->setDown(TRUE); - qDebug("Setting doclink"); + odebug << "Setting doclink" << oendl; DocLnk lnk; - qDebug("name is " + name_file); + odebug << "name is " + name_file << oendl; lnk.setName(name_file); //sets file name - qDebug("Title is "+title); + odebug << "Title is "+title << oendl; lnk.setComment(title); @@ -198,3 +201,3 @@ OpenFileButton->setDown(TRUE); getTitles(); - qDebug("Filename is "+fileName); + odebug << "Filename is "+fileName << oendl; lnk.setFile(fileName); //sets File property @@ -204,3 +207,3 @@ OpenFileButton->setDown(TRUE); if(!lnk.writeLink()) - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; @@ -221,3 +224,3 @@ bool OpenEtext::FindTitle( QString filename) name = fi.fileName(); - qDebug("filename to open is " + name); + odebug << "filename to open is " + name << oendl; QFile indexLib( filename); @@ -227,3 +230,3 @@ bool OpenEtext::FindTitle( QString filename) if ( indexLib.open( IO_ReadOnly) ) { - qDebug("file opened successfully"); + odebug << "file opened successfully" << oendl; QTextStream indexStream( &indexLib ); @@ -241,3 +244,3 @@ bool OpenEtext::FindTitle( QString filename) title = title.stripWhiteSpace (); -// qDebug("Found the title 1 and it is %s", title.latin1()); +// odebug << "Found the title 1 and it is " << title << "" << oendl; // QListBox_1->insertItem ( title); @@ -249,3 +252,3 @@ bool OpenEtext::FindTitle( QString filename) title = title.stripWhiteSpace (); -// qDebug("Found the title 2 and it is %s", title.latin1()); +// odebug << "Found the title 2 and it is " << title << "" << oendl; // QListBox_1->insertItem ( title); @@ -257,3 +260,3 @@ bool OpenEtext::FindTitle( QString filename) title = title.stripWhiteSpace (); -// qDebug("Found the title 3 and it is %s", title.latin1()); +// odebug << "Found the title 3 and it is " << title << "" << oendl; } @@ -264,3 +267,3 @@ bool OpenEtext::FindTitle( QString filename) title = title.stripWhiteSpace (); -// qDebug("Found the title 4 and it is %s", title.latin1()); +// odebug << "Found the title 4 and it is " << title << "" << oendl; } @@ -270,3 +273,3 @@ bool OpenEtext::FindTitle( QString filename) if( !findCheck || title.length() < 2) { - qDebug("Trying hard to find title from GUTINDEX.ALL"); + odebug << "Trying hard to find title from GUTINDEX.ALL" << oendl; title = titleFromLibrary( filename); @@ -295,3 +298,3 @@ bool OpenEtext::FindTitle( QString filename) if(title.length()<3) { -// qDebug("title is empty"); +// odebug << "title is empty" << oendl; title="Unknown"; @@ -345,3 +348,3 @@ QString OpenEtext::titleFromLibrary( QString fileName) title = title.stripWhiteSpace (); -// qDebug("Finally Found the title and it is\n %s", title.latin1()); +// odebug << "Finally Found the title and it is\n " << title << "" << oendl; // QListBox_1->insertItem ( title); @@ -351,3 +354,3 @@ QString OpenEtext::titleFromLibrary( QString fileName) else - qDebug("Error opening library index "+ local_index); + odebug << "Error opening library index "+ local_index << oendl; return title; @@ -416,3 +419,3 @@ void OpenEtext::removeSelection() rem=i; -//qDebug("file title to remove is "+file_title); +//odebug << "file title to remove is "+file_title << oendl; selFile = s_filename; @@ -484,3 +487,3 @@ void OpenEtext::editTitle() { QString title_text = QListBox_1->text( currentItem); -//qDebug("Selected "+title_text); +//odebug << "Selected "+title_text << oendl; @@ -498,6 +501,6 @@ void OpenEtext::editTitle() { QString file_title = config.readEntry( s_filename, ""); -//qDebug("file_title is "+file_title); +//odebug << "file_title is "+file_title << oendl; if(title_text == file_title ) { selFile = s_filename; -//qDebug("Edit: "+ file_title ); +//odebug << "Edit: "+ file_title << oendl; i=i_numofFiles+1; @@ -506,3 +509,3 @@ void OpenEtext::editTitle() { if(titleEdit->exec() !=0) { -//qDebug(titleEdit->newTitle); +//odebug << titleEdit->newTitle << oendl; 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 @@ ***************************************************************************/ -#include "optionsDialog.h" -#include <qpe/config.h> -#include "fontDialog.h" -// #include <unistd.h> -// #include <stdio.h> -// #include <stdlib.h> +#include "optionsDialog.h" +#include "fontDialog.h" //#include "ftpsitedlg.h" @@ -26,2 +22,8 @@ //#define Inherited QDialog + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> + +/* QT */ #include <qfont.h> @@ -40,2 +42,8 @@ #endif + +/* STD */ +// #include <unistd.h> +// #include <stdio.h> +// #include <stdlib.h> + /* @@ -62,3 +70,3 @@ optionsDialog::~optionsDialog() { -//qDebug("OnExit()"); +//odebug << "OnExit()" << oendl; // writeConfig(); @@ -127,3 +135,3 @@ void optionsDialog::getConfig() cb_queryExit->setChecked(TRUE); - qDebug("Config Setting b_qExit=TRUE;"); + odebug << "Config Setting b_qExit=TRUE;" << oendl; b_qExit=TRUE; @@ -131,3 +139,3 @@ void optionsDialog::getConfig() cb_queryExit->setChecked(FALSE); - qDebug("ConfigSetting b_qExit=FALSE;"); + odebug << "ConfigSetting b_qExit=FALSE;" << oendl; b_qExit=FALSE; @@ -143,3 +151,3 @@ void optionsDialog::getConfig() -// // qDebug("Set style%d",index); +// // odebug << "Set style" << index << "" << oendl; // // //int styleInt= index; @@ -169,3 +177,3 @@ void optionsDialog::slotQueryExit() config.setGroup("General"); - qDebug("writing queryExit"); + odebug << "writing queryExit" << oendl; if(cb_queryExit->isChecked()) { @@ -173,3 +181,3 @@ void optionsDialog::slotQueryExit() config.writeEntry("queryExit","TRUE"); - qDebug("WritingConfig queryExit=TRUE"); + odebug << "WritingConfig queryExit=TRUE" << oendl; } else { @@ -177,3 +185,3 @@ void optionsDialog::slotQueryExit() config.writeEntry("queryExit","FALSE"); - qDebug("WritingConfig queryExit=FALSE"); + odebug << "WritingConfig queryExit=FALSE" << oendl; } @@ -189,3 +197,3 @@ void optionsDialog::slotQueryExit() // void optionsDialog::lineEditChanged(const QString &editText) { -// qDebug(editText); +// odebug << editText << oendl; // } |