author | ar <ar> | 2004-05-03 21:35:18 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-03 21:35:18 (UTC) |
commit | 412619441fab46fc79c695a23ccf9e38135bdfad (patch) (side-by-side diff) | |
tree | 19d9b8af14cf6c345ef532bb32368b9c7b43c50f /noncore | |
parent | d1095d71394779557f446e2a67ba55bc62eec859 (diff) | |
download | opie-412619441fab46fc79c695a23ccf9e38135bdfad.zip opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.gz opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.bz2 |
- convert qDebug to odebug
29 files changed, 656 insertions, 585 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 5b22b00..270a4cf 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp @@ -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; // } 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() name[16] = '\0'; -// qDebug("Record:%d, Length:%u",i,recordlength(i)); +// odebug << "Record:" << i << ", Length:" << recordlength(i) << "" << oendl; gotorecordnumber(i); @@ -37,3 +37,3 @@ CList<Bkmk>* Aportis::getbkmklist() lcn = SwapLong(lcn); -// qDebug("Bookmark:%s:%u", name,lcn); +// odebug << "Bookmark:" << name << ":" << lcn << "" << oendl; tchar tname[17]; @@ -123,3 +123,3 @@ int Aportis::OpenFile(const char *src) fread(&hdr0, sizeof(hdr0), 1, fin); -// qDebug("Version:%x", ntohs(hdr0.Version)); +// odebug << "Version:" << ntohs(hdr0.Version) << "" << oendl; if (hdr0.Version && 0x0200) @@ -184,3 +184,3 @@ int Aportis::OpenFile(const char *src) refreshbuffer(); -// qDebug("Number of records:[%u,%u]", nRecs, nRecs2); +// odebug << "Number of records:[" << nRecs << "," << nRecs2 << "]" << oendl; 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() bl = readall00(read06); -// qDebug("Correct version!"); +// odebug << "Correct version!" << oendl; break; @@ -224,6 +224,6 @@ CList<Bkmk>* BkmkFile::readall() bl = readall00(read05); -// qDebug("Known version!"); +// odebug << "Known version!" << oendl; break; default: -// qDebug("Unknown version!"); +// odebug << "Unknown version!" << oendl; 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) { - // //qDebug("BuffDoc:locating:%u",n); + // //odebug << "BuffDoc:locating:" << n << "" << oendl; lastword.empty(); @@ -44,3 +44,3 @@ void BuffDoc::locate(unsigned int n) if (exp != NULL) exp->locate(n); - // //qDebug("BuffDoc:Located"); + // //odebug << "BuffDoc:Located" << oendl; } @@ -190,3 +190,3 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border) else buff->empty(); -// //qDebug("Buff:%s Lastword:%s", (const char*)toQString(buff->data()), (const char*)toQString(lastword.data())); +// //odebug << "Buff:" << toQString(buff->data()) << " Lastword:" << toQString(lastword.data()) << "" << oendl; lastcheck = len = buff->length(); @@ -324,4 +324,4 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) { - // //qDebug("BuffDoc:Openfile:%s", src); - // //qDebug("Trying aportis %x",exp); + // //odebug << "BuffDoc:Openfile:" << src << "" << oendl; + // //odebug << "Trying aportis " << exp << "" << oendl; if (exp != NULL) delete exp; @@ -380,3 +380,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) delete exp; - //qDebug("Trying ppms"); + //odebug << "Trying ppms" << oendl; exp = new ppm_expander; @@ -388,3 +388,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) exp = new Text; -// //qDebug("Trying text"); +// //odebug << "Trying text" << oendl; ret = exp->openfile(src); @@ -398,3 +398,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) } - // //qDebug("Doing final open:%x:%x",exp,filt); + // //odebug << "Doing final open:" << exp << ":" << filt << "" << oendl; @@ -409,3 +409,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) filt->setsource(exp); - // //qDebug("BuffDoc:file opened"); + // //odebug << "BuffDoc:file opened" << oendl; 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) int i; -// //qDebug("Trying 2"); +// //odebug << "Trying 2" << oendl; len = rhs.len; @@ -60,3 +60,3 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs) len = i; -// //qDebug("Tried 2"); +// //odebug << "Tried 2" << oendl; return *this; @@ -210,3 +210,3 @@ int CDrawBuffer::width(int numchars, bool onscreen, int scwidth, unsigned char _ QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); @@ -319,3 +319,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int // f.setUnderline(currentstyle.isUnderline()); -// if (currentstyle.isUnderline()) qDebug("UNDERLINE"); +// if (currentstyle.isUnderline()) odebug << "UNDERLINE" << oendl; _p->setFont(f); @@ -410,3 +410,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); @@ -420,3 +420,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int QString nstr = str.mid(lastspace+1, nsp-lastspace); -// qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); +// odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl; int lw = fm.width(nstr); @@ -472,5 +472,5 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) /* - if (currentstyle.isPicture()) qDebug("Passed thru picture"); - if (currentstyle.getLink()) qDebug("Passed thru link"); - //qDebug("islink:%d - %d", numchars, end); + if (currentstyle.isPicture()) odebug << "Passed thru picture" << oendl; + if (currentstyle.getLink()) odebug << "Passed thru link" << oendl; + //odebug << "islink:" << numchars << " - " << end << "" << oendl; */ @@ -479,3 +479,3 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt) while (textend != segs.end() && end <= numchars); -// if (currentstyle.isPicture()) qDebug("Clicked on picture"); +// if (currentstyle.isPicture()) odebug << "Clicked on picture" << oendl; if (currentstyle.getPictureLink()) @@ -541,3 +541,3 @@ void CDrawBuffer::resize() int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10; -// qDebug("ExtraSpace:%d", xt); +// odebug << "ExtraSpace:" << xt << "" << oendl; 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 init(); -// // qDebug("Load_file(1)"); +// // odebug << "Load_file(1)" << oendl; load_file((const tchar*)filename); @@ -93,3 +93,3 @@ void QTReader::mouseMoveEvent(QMouseEvent* _e) - qDebug("MouseMove:[%d, %d]", _e->pos().x(), _e->pos().y()); + odebug << "MouseMove:[" << _e->pos().x() << ", " << _e->pos().y() << "]" << oendl; } @@ -106,3 +106,3 @@ void QTReader::mousePressEvent( QMouseEvent* _e ) { -// qDebug("MousePress"); +// odebug << "MousePress" << oendl; mouseUpOn = false; @@ -319,3 +319,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse wrd = toQString(t->data()+first, i - first); -// qDebug("Got %s", (const char *)wrd); +// odebug << "Got " << (const char *)wrd << "" << oendl; break; @@ -329,3 +329,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse { -// qDebug("Selected:%s", (const char*)wrd); +// odebug << "Selected:" << wrd << "" << oendl; emit OnWordSelected(wrd, locnarray[lineno], (m_twotouch) ? wrd : toQString(textarray[lineno]->data())); @@ -341,3 +341,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) { -// qDebug("MouseRelease"); +// odebug << "MouseRelease" << oendl; if (_e->x() > width() - m_border) @@ -396,3 +396,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) { -// qDebug("Picture:%x", tgt); +// odebug << "Picture:" << tgt << "" << oendl; QImage* pm = buffdoc.getPicture(tgt); @@ -412,3 +412,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e ) default: -// qDebug("Unknown linktype"); +// odebug << "Unknown linktype" << oendl; return; @@ -698,3 +698,3 @@ void QTReader::setautoscroll(bool _sc) { -// qDebug("Opening pipe to %s", (const char*)m_pipetarget); +// odebug << "Opening pipe to " << m_pipetarget << "" << oendl; m_pipeout = popen((const char*)m_pipetarget, "w"); @@ -825,3 +825,3 @@ void QTReader::drawFonts( QPainter *p ) { -// qDebug("How refreshing..."); +// odebug << "How refreshing..." << oendl; if (buffdoc.empty()) return; @@ -830,3 +830,3 @@ void QTReader::drawFonts( QPainter *p ) { -// qDebug("Not Optimised %d", m_lastwidth); +// odebug << "Not Optimised " << m_lastwidth << "" << oendl; m_lastwidth = width(); @@ -835,3 +835,3 @@ void QTReader::drawFonts( QPainter *p ) locate(pagelocate()); -// qDebug("Not Optimised %d", m_lastwidth); +// odebug << "Not Optimised " << m_lastwidth << "" << oendl; } @@ -842,3 +842,3 @@ void QTReader::drawFonts( QPainter *p ) { -// qDebug("Optimised < %d %d %d", numlines, m_lastheight, newht); +// odebug << "Optimised < " << numlines << " " << m_lastheight << " " << newht << "" << oendl; int ypos = 0; @@ -853,3 +853,3 @@ void QTReader::drawFonts( QPainter *p ) } -// qDebug("Optimised < %d", numlines); +// odebug << "Optimised < " << numlines << "" << oendl; m_lastheight = newht; @@ -858,3 +858,3 @@ void QTReader::drawFonts( QPainter *p ) { -// qDebug("Optimised > %d", numlines); +// odebug << "Optimised > " << numlines << "" << oendl; int ypos = 0; @@ -865,3 +865,3 @@ void QTReader::drawFonts( QPainter *p ) fillbuffer(numlines+1, ypos, newht); -// qDebug("Optimised > %d", numlines); +// odebug << "Optimised > " << numlines << "" << oendl; } @@ -899,3 +899,3 @@ void QTReader::drawFonts( QPainter *p ) { - qDebug("Not so refreshing..."); + odebug << "Not so refreshing..." << oendl; } @@ -1030,3 +1030,3 @@ void QTReader::resizeEvent( QResizeEvent * ) { -// // qDebug("resize:(%u,%u)", width(), height()); +// // odebug << "resize:(" << width() << "," << height() << ")" << oendl; // bgroup->move( width()-bgroup->width(), 0 ); @@ -1055,7 +1055,7 @@ bool QTReader::locate(unsigned long n) { buffdoc.locate(n); -// // qDebug("&buffdoc.located"); +// // odebug << "&buffdoc.located" << oendl; fillbuffer(); -// // qDebug("&Buffer filled"); +// // odebug << "&Buffer filled" << oendl; update(); -// // qDebug("&Located"); +// // odebug << "&Located" << oendl; return true; @@ -1119,3 +1119,3 @@ void QTReader::dopagedn() { -// qDebug("HEIGHT(2):%d", m_lastheight); +// odebug << "HEIGHT(2):" << m_lastheight << "" << oendl; buffdoc.unsuspend(); @@ -1124,3 +1124,3 @@ void QTReader::dopagedn() { -//// qDebug("Jumping to %u", mylastpos); +//// odebug << "Jumping to " << mylastpos << "" << oendl; jumpto(mylastpos); @@ -1315,5 +1315,5 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn) buffdoc.setContinuous(m_continuousDocument); -// // qDebug("buffdoc.openfile done"); +// // odebug << "buffdoc.openfile done" << oendl; locate(lcn); -// // qDebug("buffdoc.locate done"); +// // odebug << "buffdoc.locate done" << oendl; } @@ -1321,3 +1321,3 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn) update(); -// // qDebug("Updated"); +// // odebug << "Updated" << oendl; 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 @@ **********************************************************************/ + #include "useqpe.h" -#include <qregexp.h> -#include <qclipboard.h> -#include <qwidgetstack.h> +#include "QTReader.h" +#include "GraphicWin.h" +#include "Bkmks.h" +#include "cbkmkselector.h" +#include "infowin.h" +#include "ToolbarPrefs.h" +#include "Prefs.h" +#include "CAnnoEdit.h" +#include "QFloatBar.h" +#include "FixedFont.h" +#include "URLDialog.h" +#include "QTReaderApp.h" +#include "CDrawBuffer.h" +#include "Filedata.h" +#include "opie.h" +#include "names.h" +#include "CEncoding_tables.h" +#include "CloseDialog.h" + +/* OPIE */ +#include <opie2/odebug.h> +#ifdef USEQPE +#include <qpe/menubutton.h> +#include <qpe/fontdatabase.h> +#include <qpe/global.h> +#include <qpe/applnk.h> +#include <qpe/config.h> +#include <qpe/qcopenvelope_qws.h> +#endif + +/* QT */ #ifdef USEQPE @@ -27,8 +56,7 @@ #endif +#include <qregexp.h> +#include <qclipboard.h> +#include <qwidgetstack.h> #include <qmenubar.h> #include <qtoolbar.h> -#ifdef USEQPE -#include <qpe/menubutton.h> -#include <qpe/fontdatabase.h> -#endif #include <qcombobox.h> @@ -41,29 +69,10 @@ #include <qobjectlist.h> -#ifdef USEQPE -#include <qpe/global.h> -#include <qpe/applnk.h> -#endif #include <qfileinfo.h> -#include <stdlib.h> //getenv #include <qprogressbar.h> -#ifdef USEQPE -#include <qpe/config.h> -#endif #include <qbuttongroup.h> #include <qradiobutton.h> -#ifdef USEQPE -#include <qpe/qcopenvelope_qws.h> -#endif -#include "QTReader.h" -#include "GraphicWin.h" -#include "Bkmks.h" -#include "cbkmkselector.h" -#include "infowin.h" -#include "ToolbarPrefs.h" -#include "Prefs.h" -#include "CAnnoEdit.h" -#include "QFloatBar.h" -#include "FixedFont.h" -#include "URLDialog.h" -//#include <qpe/fontdatabase.h> + +/* STD */ +#include <stdlib.h> //getenv + @@ -77,10 +86,2 @@ -#include "QTReaderApp.h" -#include "CDrawBuffer.h" -#include "Filedata.h" -#include "opie.h" -#include "names.h" -#include "CEncoding_tables.h" -#include "CloseDialog.h" - bool CheckVersion(int&, int&, char&); @@ -127,3 +128,3 @@ void QTReaderApp::listBkmkFiles() if ( !d.cd(APPDIR) ) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -148,3 +149,3 @@ void QTReaderApp::listBkmkFiles() - //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); + //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; ++it; // goto next list element @@ -216,4 +217,4 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) ftime(&m_lastkeytime); -//// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); -//// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); +//// odebug << "Application directory = " << (const tchar *)QPEApplication::documentDir() << "" << oendl; +//// odebug << "Application directory = " << (const tchar *)Global::applicationFileName("uqtreader" << "" << oendl; @@ -245,3 +246,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) -// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); +// odebug << "Initial Rotation(" << m_rot << "):" << rot << "" << oendl; */ @@ -262,3 +263,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) if ( !d.cd(APPDIR) ) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -268,3 +269,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) QFileInfo fi(d, INIFILE); -// qDebug("Path:%s", (const char*)fi.absFilePath()); +// odebug << "Path:" << fi.absFilePath() << "" << oendl; Config config(fi.absFilePath()); @@ -358,3 +359,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) */ -// qDebug("Reading file list"); +// odebug << "Reading file list" << oendl; readfilelist(); @@ -369,3 +370,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) -// qDebug("Reading config"); +// odebug << "Reading config" << oendl; // Config config( APPDIR ); @@ -771,3 +772,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) -// qDebug("Font selector"); +// odebug << "Font selector" << oendl; m_fontSelector = new QComboBox(false, m_fontBar); @@ -803,7 +804,7 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) #endif -// qDebug("Initing"); +// odebug << "Initing" << oendl; reader->init(); -// qDebug("Inited"); +// odebug << "Inited" << oendl; // m_buttonAction[m_spaceTarget]->setOn(true); -// qDebug("fonting"); +// odebug << "fonting" << oendl; do_setfont(reader->m_fontname); @@ -811,5 +812,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) { -// qDebug("doclnk"); +// odebug << "doclnk" << oendl; // doc = new DocLnk(reader->m_lastfile); -// qDebug("doclnk done"); +// odebug << "doclnk done" << oendl; if (pOpenlist != NULL) @@ -833,3 +834,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) } -// qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name())); +// odebug << "Item:" << toQString(CFiledata(p->anno()).name()) << "" << oendl; p = NULL; @@ -838,3 +839,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) { -// qDebug("openfrombkmk"); +// odebug << "openfrombkmk" << oendl; if (!openfrombkmk(p)) @@ -844,3 +845,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) { -// qDebug("openfile"); +// odebug << "openfile" << oendl; openFile( reader->m_lastfile ); @@ -850,3 +851,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) { -// qDebug("Openfile 2"); +// odebug << "Openfile 2" << oendl; if (!reader->m_lastfile.isEmpty()) @@ -872,3 +873,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) } -// qDebug("finished update"); +// odebug << "finished update" << oendl; } @@ -1030,3 +1031,3 @@ QToolBar* QTReaderApp::filebar() case cesSingle: -// qDebug("Setting filebar to menubar"); +// odebug << "Setting filebar to menubar" << oendl; fileBar = menubar; @@ -1034,6 +1035,6 @@ QToolBar* QTReaderApp::filebar() default: - qDebug("Incorrect toolbar policy set"); + odebug << "Incorrect toolbar policy set" << oendl; case cesMenuTool: case cesMultiple: -// qDebug("Creating new file bar"); +// odebug << "Creating new file bar" << oendl; fileBar = new QToolBar("File", this, m_tbposition); @@ -1055,3 +1056,3 @@ QToolBar* QTReaderApp::viewbar() default: - qDebug("Incorrect toolbar policy set"); + odebug << "Incorrect toolbar policy set" << oendl; case cesSingle: @@ -1071,3 +1072,3 @@ QToolBar* QTReaderApp::navbar() case cesMultiple: -// qDebug("Creating new nav bar"); +// odebug << "Creating new nav bar" << oendl; navBar = new QToolBar("Navigation", this, m_tbposition); @@ -1075,3 +1076,3 @@ QToolBar* QTReaderApp::navbar() default: - qDebug("Incorrect toolbar policy set"); + odebug << "Incorrect toolbar policy set" << oendl; case cesSingle: @@ -1079,3 +1080,3 @@ QToolBar* QTReaderApp::navbar() navBar = fileBar; -// qDebug("Setting navbar to filebar"); +// odebug << "Setting navbar to filebar" << oendl; break; @@ -1095,3 +1096,3 @@ QToolBar* QTReaderApp::markbar() default: - qDebug("Incorrect toolbar policy set"); + odebug << "Incorrect toolbar policy set" << oendl; case cesSingle: @@ -1129,3 +1130,3 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) -//// qDebug("Received:%s", (const char*)msg); +//// odebug << "Received:" << msg << "" << oendl; @@ -1483,3 +1484,3 @@ void QTReaderApp::buttonActionSelected(QAction* _a) { -//// qDebug("es:%x : %s (%u)", _a, (const char *)(_a->text()), ActNameToInt(_a->text())); +//// odebug << "es:" << _a << " : " << (const char *)(_a->text()) << " (" << ActNameToInt(_a->text()) << ")" << oendl; m_spaceTarget = ActNameToInt(_a->text()); @@ -1565,3 +1566,3 @@ void QTReaderApp::updatefileinfo() tchar* fl = fromQString(reader->m_lastfile); -// qDebug("Lastfile:%x", fl); +// odebug << "Lastfile:" << fl << "" << oendl; bool notadded = true; @@ -1579,3 +1580,3 @@ void QTReaderApp::updatefileinfo() reader->setSaveData(data, dlen, fd.content(), fd.length()); -// qDebug("Filedata(1):%u, %u", fd.length(), dlen); +// odebug << "Filedata(1):" << fd.length() << ", " << dlen << "" << oendl; // getstate(data, dlen); @@ -1588,3 +1589,3 @@ void QTReaderApp::updatefileinfo() } -// qDebug("Added?:%x", notadded); +// odebug << "Added?:" << notadded << "" << oendl; if (notadded) @@ -1598,3 +1599,3 @@ void QTReaderApp::updatefileinfo() pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); -// qDebug("Filedata(2):%u, %u", fd.length(), dlen); +// odebug << "Filedata(2):" << fd.length() << ", " << dlen << "" << oendl; delete [] data; @@ -1613,3 +1614,3 @@ void QTReaderApp::fileOpen() */ -// qDebug("fileOpen"); +// odebug << "fileOpen" << oendl; // if (!reader->m_lastfile.isEmpty()) @@ -1654,3 +1655,3 @@ void QTReaderApp::fileOpen2() // reader->refresh(); -// qDebug("HEIGHT:%d", reader->m_lastheight); +// odebug << "HEIGHT:" << reader->m_lastheight << "" << oendl; } @@ -1674,3 +1675,3 @@ QString QTReaderApp::usefilebrowser() } -// qDebug("Selected %s", (const char*)fn); +// odebug << "Selected " << fn << "" << oendl; delete fb; @@ -1805,3 +1806,3 @@ void QTReaderApp::showprefs() default: - qDebug("Format out of range"); + odebug << "Format out of range" << oendl; } @@ -1865,3 +1866,3 @@ void QTReaderApp::showtoolbarprefs() { // "/tmp" - qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); + owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; d = QDir::home(); @@ -1902,3 +1903,3 @@ void QTReaderApp::showtoolbarprefs() { // "/tmp" - qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); + owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; d = QDir::home(); @@ -2177,3 +2178,3 @@ void QTReaderApp::findNext() { -// // qDebug("findNext called\n"); +// // odebug << "findNext called\n" << oendl; #ifdef __ISEARCH @@ -2273,8 +2274,8 @@ bool QTReaderApp::dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg) } -// qDebug("Found it at %u:%u", pos, offset); +// odebug << "Found it at " << pos << ":" << offset << "" << oendl; pbar->hide(); -// qDebug("Hid"); +// odebug << "Hid" << oendl; reader->locate(pos+offset); -// qDebug("Loacted"); -// qDebug("page up"); +// odebug << "Loacted" << oendl; +// odebug << "page up" << oendl; ret = true; @@ -2335,3 +2336,3 @@ void QTReaderApp::openFile( const QString &f ) { -// qDebug("File:%s", (const char*)f); +// odebug << "File:" << f << "" << oendl; // openFile(DocLnk(f)); @@ -2382,3 +2383,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) { -// qDebug("Keypress event"); +// odebug << "Keypress event" << oendl; timeb now; @@ -2394,3 +2395,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) case Key_Escape: -// qDebug("escape event"); +// odebug << "escape event" << oendl; if (m_disableesckey) @@ -2409,3 +2410,3 @@ void QTReaderApp::handlekey(QKeyEvent* e) { -// qDebug("escape action"); +// odebug << "escape action" << oendl; doAction(m_escapeTarget, e); @@ -2508,3 +2509,3 @@ void QTReaderApp::showEditTools() { -// qDebug("him"); +// odebug << "him" << oendl; #ifdef USEQPE @@ -2512,3 +2513,3 @@ void QTReaderApp::showEditTools() #endif -// qDebug("eb"); +// odebug << "eb" << oendl; menubar->show(); @@ -2534,5 +2535,5 @@ void QTReaderApp::showEditTools() if (m_fontVisible) m_fontBar->show(); -// qDebug("sn"); +// odebug << "sn" << oendl; showNormal(); -// qDebug("sm"); +// odebug << "sm" << oendl; #ifdef USEQPE @@ -2543,7 +2544,7 @@ void QTReaderApp::showEditTools() -// qDebug("uc"); +// odebug << "uc" << oendl; updateCaption(); -// qDebug("rw"); +// odebug << "rw" << oendl; editorStack->raiseWidget( reader ); -// qDebug("sf"); +// odebug << "sf" << oendl; reader->setFocus(); @@ -2616,3 +2617,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) { -// qDebug("Close event"); +// odebug << "Close event" << oendl; if (m_fullscreen) @@ -2633,3 +2634,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) { -// qDebug("Close disabled"); +// odebug << "Close disabled" << oendl; m_bcloseDisabled = false; @@ -2711,3 +2712,3 @@ bool QTReaderApp::listbkmk(CList<Bkmk>* plist, const QString& _lab) #ifdef _UNICODE -// qDebug("Item:%s", (const char*)toQString(i->name())); +// odebug << "Item:" << toQString(i->name()) << "" << oendl; bkmkselector->insertItem(toQString(i->name())); @@ -2740,5 +2741,5 @@ void QTReaderApp::do_regedit() reader->bDoUpdates = false; -// qDebug("Showing regbar"); +// odebug << "Showing regbar" << oendl; regBar->show(); -// qDebug("Showing kbd"); +// odebug << "Showing kbd" << oendl; #ifdef USEQPE @@ -2758,6 +2759,6 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) ); -// qDebug("fileinfo"); +// odebug << "fileinfo" << oendl; if (!fn.isEmpty() && QFileInfo(fn).isFile()) { -// qDebug("Opening"); +// odebug << "Opening" << oendl; openFile(fn); @@ -2783,3 +2784,3 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) } -// qDebug("updating"); +// odebug << "updating" << oendl; // showEditTools(); @@ -2814,3 +2815,3 @@ void QTReaderApp::gotobkmk(int ind) case cDelBkmk: -//// qDebug("Deleting:%s\n",(*pBkmklist)[ind]->name()); +//// odebug << "Deleting:" << (*pBkmklist)[ind]->name() << "\n" << oendl; pBkmklist->erase(ind); @@ -2914,3 +2915,3 @@ void QTReaderApp::gotobkmk(int ind) int ret = f->exec(); - qDebug("Return:%d", ret); + odebug << "Return:" << ret << "" << oendl; DocLnk* doc = f->getDoc(); @@ -2934,3 +2935,3 @@ void QTReaderApp::gotobkmk(int ind) fm.saveFile( *doc, rt ); - qDebug("YES"); + odebug << "YES" << oendl; } @@ -2938,3 +2939,3 @@ void QTReaderApp::gotobkmk(int ind) { - qDebug("NO"); + odebug << "NO" << oendl; } @@ -3011,3 +3012,3 @@ void QTReaderApp::do_regaction() case cSetConfigName: -// qDebug("Saving config"); +// odebug << "Saving config" << oendl; do_saveconfig(regEdit->text(), false); @@ -3103,3 +3104,3 @@ void QTReaderApp::do_setencoding(int i) { -// qDebug("setencoding:%d", i); +// odebug << "setencoding:" << i << "" << oendl; if (m_fontAction == cChooseEncoding) @@ -3111,5 +3112,5 @@ void QTReaderApp::do_setencoding(int i) m_fontVisible = false; -// qDebug("showedit"); +// odebug << "showedit" << oendl; if (reader->isVisible()) showEditTools(); -// qDebug("showeditdone"); +// odebug << "showeditdone" << oendl; } @@ -3125,6 +3126,6 @@ void QTReaderApp::do_setfont(const QString& lcn) m_fontVisible = false; -// qDebug("showedit"); +// odebug << "showedit" << oendl; //if (reader->isVisible()) showEditTools(); -// qDebug("showeditdone"); +// odebug << "showeditdone" << oendl; } @@ -3135,3 +3136,3 @@ void QTReaderApp::do_autogen(const QString& regText) reader->sizes(fs,ts); -// // qDebug("Reg:%s\n", (const tchar*)(regEdit->text())); +// // odebug << "Reg:" << (const tchar*)(regEdit->text()) << "\n" << oendl; m_autogenstr = regText; @@ -3182,3 +3183,3 @@ void QTReaderApp::saveprefs() { -// qDebug("saveprefs"); +// odebug << "saveprefs" << oendl; // reader->saveprefs("uqtreader"); @@ -3263,7 +3264,7 @@ void QTReaderApp::oldFile() { -// qDebug("oldFile called"); +// odebug << "oldFile called" << oendl; reader->setText(true); -// qDebug("settext called"); +// odebug << "settext called" << oendl; showEditTools(); -// qDebug("showedit called"); +// odebug << "showedit called" << oendl; } @@ -3343,6 +3344,6 @@ void QTReaderApp::readfilelist() #endif /* USEQPE */ -// qDebug("Reading open files"); +// odebug << "Reading open files" << oendl; pOpenlist = bf.readall(); -// if (pOpenlist != NULL) qDebug("...with success"); -// else qDebug("...without success!"); +// if (pOpenlist != NULL) odebug << "...with success" << oendl; +// else odebug << "...without success!" << oendl; } @@ -3361,3 +3362,3 @@ void QTReaderApp::savefilelist() #endif /* USEQPE */ -// qDebug("Writing open files"); +// odebug << "Writing open files" << oendl; bf.write(*pOpenlist); @@ -3471,3 +3472,3 @@ void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& { -//// qDebug("OnWordSelected(%u):%s", posn, (const char*)wrd); +//// odebug << "OnWordSelected(" << posn << "):" << wrd << "" << oendl; @@ -3521,3 +3522,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) e->accept(); -// qDebug("Accepted"); +// odebug << "Accepted" << oendl; switch (a) @@ -3584,3 +3585,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) default: - qDebug("Unknown ActionType:%u", a); + odebug << "Unknown ActionType:" << a << "" << oendl; break; @@ -3602,3 +3603,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) { -// qDebug("do_saveconfig:%s", (const char*)_txt); +// odebug << "do_saveconfig:" << _txt << "" << oendl; #ifdef USEQPE @@ -3625,3 +3626,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) { -// qDebug("full:%s", (const char*)_txt); +// odebug << "full:" << _txt << "" << oendl; QDir d = QDir::home(); // "/" @@ -3629,3 +3630,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) { // "/tmp" - qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); + owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; d = QDir::home(); @@ -3641,3 +3642,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -3648,3 +3649,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; d = QDir::home(); @@ -3656,3 +3657,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) } -// qDebug("Path:%s", (const char*)fi.absFilePath()); +// odebug << "Path:" << fi.absFilePath() << "" << oendl; Config config(fi.absFilePath()); @@ -3936,3 +3937,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) { // "/tmp" - qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); + owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; d = QDir::home(); @@ -3948,3 +3949,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -3955,3 +3956,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; d = QDir::home(); @@ -4063,3 +4064,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) if ( !d.cd(APPDIR) ) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -4069,3 +4070,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) if ( !d.cd(tgtdir) ) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "/%s\" directory", tgtdir ); + owarn << "Cannot find the \"~/" APPDIR "/" << tgtdir << "\" directory" << oendl; d = QDir::home(); @@ -4086,3 +4087,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) - //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); + //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; ++it; // goto next list element @@ -4170,3 +4171,3 @@ void QTReaderApp::OnURLSelected(const QString& href) cb->setText(href); - qDebug("<a href=\"%s\">%s</a>", (const char*)href, (const char*)href); + odebug << "<a href=\"" << href << "\">" << href << "</a>" << oendl; } @@ -4194,3 +4195,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; d = QDir::home(); @@ -4201,3 +4202,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) { // "/tmp" - qWarning( "Cannot find the \"~/" APPDIR "/urls\" directory" ); + owarn << "Cannot find the \"~/" APPDIR "/urls\" directory" << oendl; 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() { -//// qDebug("Deleting image"); +//// odebug << "Deleting image" << oendl; 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() ListView->clear(); -////qDebug(currentDir.canonicalPath()); +////odebug << currentDir.canonicalPath() << oendl; // currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); @@ -158,3 +158,3 @@ void fileBrowser::populateList() { -//// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); +//// odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; } @@ -171,3 +171,3 @@ void fileBrowser::upDir() { -//// qDebug(currentDir.canonicalPath()); +//// odebug << currentDir.canonicalPath() << oendl; } @@ -179,3 +179,3 @@ void fileBrowser::listClicked(QListViewItem *selectedItem) -//// qDebug("%s", (const char*)strItem); +//// odebug << "" << strItem << "" << oendl; 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 DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 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() if (bufferrec >= ntohs(head.recordList.numRecords) - 1) return EOF; -//// qDebug("Passing through %u", currentpos); +//// odebug << "Passing through " << currentpos << "" << oendl; if (!expand(bufferrec+1)) return EOF; @@ -66,3 +66,3 @@ int CPlucker::bgetch() { -// qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); +// odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; m_nextParaIndex++; @@ -71,3 +71,3 @@ int CPlucker::bgetch() mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); -// qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); +// odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; ch = 10; @@ -81,3 +81,3 @@ int CPlucker::bgetch() m_nextParaIndex++; -// qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); +// odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; if (m_nextParaIndex == m_nParas) @@ -93,3 +93,3 @@ int CPlucker::bgetch() mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); -// qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); +// odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl; 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 @@ + + #include "useqpe.h" -#include <stdio.h> -#include <string.h> +#include "plucker_base.h" +#include "Aportis.h" +#include "Palm2QImage.h" + +/* OPIE */ +#include <opie2/odebug.h> #ifdef USEQPE #include <qpe/qcopenvelope_qws.h> -#endif /* USEQPE */ -#ifdef LOCALPICTURES -#include <qscrollview.h> -#endif -#ifdef USEQPE #include <qpe/global.h> #endif /* USEQPE */ + #ifndef USEQPE @@ -18,5 +20,11 @@ -#include "plucker_base.h" -#include "Aportis.h" -#include "Palm2QImage.h" +/* QT */ +#ifdef LOCALPICTURES +#include <qscrollview.h> +#endif + +/* STD */ +#include <stdio.h> +#include <string.h> + @@ -95,3 +103,3 @@ char* CPlucker_base::geturl(UInt16 tgt) unsigned int nrecs = ntohs(hdr0.nRecords); - //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); + //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl; UInt16 urlid = 0; @@ -105,3 +113,3 @@ char* CPlucker_base::geturl(UInt16 tgt) fread(&id, 1, sizeof(id), fin); - //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); + //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl; if (ntohs(name) == 2) @@ -110,5 +118,5 @@ char* CPlucker_base::geturl(UInt16 tgt) urlid = id; - //qDebug("Found url index:%d", ntohs(urlid)); + //odebug << "Found url index:" << ntohs(urlid) << "" << oendl; } -// //qDebug("%x", id); +// //odebug << "" << id << "" << oendl; } @@ -131,3 +139,3 @@ char* CPlucker_base::geturl(UInt16 tgt) tctr = ntohs(tctr); - //qDebug("tgt:%u urlctr:%u tctr:%u", tgt, urlctr, tctr); + //odebug << "tgt:" << tgt << " urlctr:" << urlctr << " tctr:" << tctr << "" << oendl; if (tctr >= tgt) @@ -138,3 +146,3 @@ char* CPlucker_base::geturl(UInt16 tgt) } - //qDebug("urls are in %d", ntohs(urlid)); + //odebug << "urls are in " << ntohs(urlid) << "" << oendl; recptr = finduid(ntohs(urlid)); @@ -145,3 +153,3 @@ char* CPlucker_base::geturl(UInt16 tgt) GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); - //qDebug("Found urls:%x",thishdr_type); + //odebug << "Found urls:" << thishdr_type << "" << oendl; urlsize = thishdr_size; @@ -155,3 +163,3 @@ char* CPlucker_base::geturl(UInt16 tgt) { - //qDebug("URL:%s", ptr); + //odebug << "URL:" << ptr << "" << oendl; int len = strlen(ptr)+1; @@ -252,3 +260,3 @@ void CPlucker_base::locate(unsigned int n) gotorecordnumber(recptr); - //qDebug("recptr:%u", recptr); + //odebug << "recptr:" << recptr << "" << oendl; GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); @@ -277,3 +285,3 @@ void CPlucker_base::locate(unsigned int n) } -// qDebug("Time(1): %u", clock()-start); +// odebug << "Time(1): " << clock()-start << "" << oendl; /* @@ -323,6 +331,6 @@ void CPlucker_base::locate(unsigned int n) -// qDebug("Time(2): %u", clock()-start); +// odebug << "Time(2): " << clock()-start << "" << oendl; if (recptr != thisrec) { - qDebug("Disaster:recptr:%u thisrec:%u", recptr, thisrec); + odebug << "Disaster:recptr:" << recptr << " thisrec:" << thisrec << "" << oendl; UInt16 thishdr_uid, thishdr_nParagraphs; @@ -334,3 +342,3 @@ void CPlucker_base::locate(unsigned int n) GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); -// 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); +// odebug << "UID:" << thishdr_uid << " Paras:" << thishdr_nParagraphs << " Size:" << thishdr_size << " Type:" << (unsigned int)thishdr_type << " Reserved:" << (unsigned int)thishdr_reserved << "" << oendl; } @@ -373,5 +381,5 @@ bool CPlucker_base::expand(int thisrec) GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); - //qDebug("This (%d) type is %d, uid is %u", thisrec, thishdr_type, thishdr_uid); + //odebug << "This (" << thisrec << ") type is " << thishdr_type << ", uid is " << thishdr_uid << "" << oendl; if (thishdr_type < 2) break; - //qDebug("Skipping paragraph of type %d", thishdr_type); + //odebug << "Skipping paragraph of type " << thishdr_type << "" << oendl; if (++thisrec >= ntohs(head.recordList.numRecords) - 1) return false; @@ -382,3 +390,3 @@ bool CPlucker_base::expand(int thisrec) m_bufferisreserved = (thishdr_reserved != 0); - //qDebug("It has %u paragraphs and is %u bytes", thishdr_nParagraphs, thishdr_size); + //odebug << "It has " << thishdr_nParagraphs << " paragraphs and is " << thishdr_size << " bytes" << oendl; uid = thishdr_uid; @@ -393,3 +401,3 @@ bool CPlucker_base::expand(int thisrec) m_ParaAttrs[i] = ntohs(attrs); -// //qDebug("Bytes %u, Attr %x", ntohs(ubytes), ntohs(attrs)); +// //odebug << "Bytes " << ntohs(ubytes) << ", Attr " << ntohs(attrs) << "" << oendl; } @@ -398,3 +406,3 @@ bool CPlucker_base::expand(int thisrec) m_nextPara = m_ParaOffsets[0]; - //qDebug("First offset = %u", m_nextPara); + //odebug << "First offset = " << m_nextPara << "" << oendl; m_nextParaIndex = 0; @@ -420,3 +428,3 @@ bool CPlucker_base::expand(int thisrec) bufferrec = thisrec; - //qDebug("BC:%u, HS:%u", buffercontent, thishdr_size); + //odebug << "BC:" << buffercontent << ", HS:" << thishdr_size << "" << oendl; return true; @@ -454,3 +462,3 @@ void CPlucker_base::UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuff -// //qDebug("err:%d - %u", err, zstream.avail_in); +// //odebug << "err:" << err << " - " << zstream.avail_in << "" << oendl; @@ -536,5 +544,5 @@ CList<Bkmk>* CPlucker_base::getbkmklist() n = ntohs(n); - //qDebug("Found %u bookmarks", n); + //odebug << "Found " << n << " bookmarks" << oendl; } - //qDebug("Found:%d, %u", i , thishdr_type); + //odebug << "Found:" << i << ", " << thishdr_type << "" << oendl; } @@ -594,3 +602,3 @@ void CPlucker_base::showimg(UInt16 tgt) { - //qDebug("Crassssssh!"); + //odebug << "Crassssssh!" << oendl; QPixmap* qimage = expandimg(tgt); @@ -605,3 +613,3 @@ void CPlucker_base::showimg(UInt16 tgt) QPixmap* image = new QPixmap(0,0); -// //qDebug("New image"); +// //odebug << "New image" << oendl; image->convertFromImage(*qimage); @@ -612,3 +620,3 @@ void CPlucker_base::showimg(UInt16 tgt) close(f); - //qDebug("TMPFILE:%s", tmpfile); + //odebug << "TMPFILE:" << tmpfile << "" << oendl; if (image->save(tmpfile,"PNG")) @@ -629,3 +637,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) { -// //qDebug("Finding %u", urlid); +// //odebug << "Finding " << urlid << "" << oendl; unsigned short jmin = 1, jmax = ntohs(head.recordList.numRecords); @@ -640,3 +648,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) unsigned short luid = thishdr_uid; -// //qDebug("%u %u %u : %u", jmin, jmid, jmax, urlid); +// //odebug << "" << jmin << " " << jmid << " " << jmax << " : " << urlid << "" << oendl; if (luid == urlid) @@ -661,3 +669,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) unsigned short luid = thishdr_uid; - //qDebug("jmin at end:%u,%u", jmin, luid); + //odebug << "jmin at end:" << jmin << "," << luid << "" << oendl; if (luid == urlid) @@ -669,3 +677,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) luid = thishdr_uid; - //qDebug("jmax at end:%u,%u", jmax, luid); + //odebug << "jmax at end:" << jmax << "," << luid << "" << oendl; if (luid == urlid) @@ -674,3 +682,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid) } - //qDebug("Couldn't find %u", urlid); + //odebug << "Couldn't find " << urlid << "" << oendl; return 0; // Not found! @@ -700,3 +708,3 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig unsigned long t = *it; -// qDebug("[%u]", t); +// odebug << "[" << t << "]" << oendl; memcpy(newdata, &t, sizeof(t)); @@ -723,3 +731,3 @@ void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen) memcpy(&t, src, sizeof(t)); -// qDebug("[%u]", t); +// odebug << "[" << t << "]" << oendl; visited.push_front(t); @@ -753,6 +761,6 @@ int CPlucker_base::OpenFile(const char *src) - //qDebug("Total number of records:%u", ntohs(head.recordList.numRecords)); + //odebug << "Total number of records:" << ntohs(head.recordList.numRecords) << "" << oendl; unsigned int nrecs = ntohs(hdr0.nRecords); - //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); + //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl; UInt16 homerecid = 1; @@ -763,3 +771,3 @@ int CPlucker_base::OpenFile(const char *src) fread(&id, 1, sizeof(id), fin); - //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); + //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl; if (ntohs(name) == 0) homerecid = ntohs(id); @@ -821,3 +829,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) n &= 0xffff; -// //qDebug("Hyper:<%u,%u>", tuid, n); +// //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl; UInt16 thisrec = 1; @@ -833,3 +841,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) if (thishdr_type < 2) currentpos += thishdr_size; -// //qDebug("hyper-cp:%u", currentpos); +// //odebug << "hyper-cp:" << currentpos << "" << oendl; thisrec++; @@ -859,3 +867,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) #endif /* USEQPE */ - //qDebug("Link:%s", (const char*)wrd); + //odebug << "Link:" << wrd << "" << oendl; // setlink(fn, wrd); @@ -928,3 +936,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd) } - //qDebug("Hyper:<%u,%u>", tuid, n); + //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl; while (bufferpos < n && bufferpos < buffercontent) getch_base(true); @@ -958,3 +966,3 @@ tchar CPlucker_base::getch_base(bool fast) ch = bgetch(); -// //qDebug("Function:%x", ch); +// //odebug << "Function:" << ch << "" << oendl; switch (ch) @@ -962,3 +970,3 @@ tchar CPlucker_base::getch_base(bool fast) case 0x38: -// //qDebug("Break:%u", locate()); +// //odebug << "Break:" << locate() << "" << oendl; if (m_lastBreak == locate()) @@ -982,3 +990,3 @@ tchar CPlucker_base::getch_base(bool fast) ln = (ln << 8) + ch; -// //qDebug("ch:%d, ln:%u", ch, ln); +// //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl; } @@ -994,6 +1002,6 @@ tchar CPlucker_base::getch_base(bool fast) ln = (ln << 8) + ch; -// //qDebug("ch:%d, ln:%u", ch, ln); +// //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl; } } -// //qDebug("ln:%u", ln); +// //odebug << "ln:" << ln << "" << oendl; mystyle.setLink(true); @@ -1040,3 +1048,3 @@ tchar CPlucker_base::getch_base(bool fast) ch = bgetch(); -// //qDebug("Font:%d",ch); +// //odebug << "Font:" << ch << "" << oendl; mystyle.setVOffset(0); @@ -1074,3 +1082,3 @@ tchar CPlucker_base::getch_base(bool fast) case 8: // should be fixed width - //qDebug("Trying fixed width"); + //odebug << "Trying fixed width" << oendl; mystyle.setMono(); @@ -1089,3 +1097,3 @@ tchar CPlucker_base::getch_base(bool fast) default: - qDebug("Unrecognised font"); + odebug << "Unrecognised font" << oendl; break; @@ -1101,3 +1109,3 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setLeftJustify(); -// //qDebug("left"); +// //odebug << "left" << oendl; break; @@ -1105,3 +1113,3 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setRightJustify(); -// //qDebug("right"); +// //odebug << "right" << oendl; break; @@ -1109,3 +1117,3 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setCentreJustify(); -// //qDebug("centre"); +// //odebug << "centre" << oendl; break; @@ -1113,3 +1121,3 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setFullJustify(); -// //qDebug("full"); +// //odebug << "full" << oendl; break; @@ -1136,3 +1144,3 @@ tchar CPlucker_base::getch_base(bool fast) { - //qDebug("Alternate image:%x", ir); + //odebug << "Alternate image:" << ir << "" << oendl; UInt16 ir2 = bgetch(); @@ -1151,3 +1159,3 @@ tchar CPlucker_base::getch_base(bool fast) } -// if (mystyle.getLink()) qDebug("Picture link!"); +// if (mystyle.getLink()) odebug << "Picture link!" << oendl; ch = '#'; @@ -1162,3 +1170,3 @@ tchar CPlucker_base::getch_base(bool fast) UInt16 w = wc; -// //qDebug("h,w,pc [%u, %u, %u]", h, w, pc); +// //odebug << "h,w,pc [" << h << ", " << w << ", " << pc << "]" << oendl; if (w == 0) @@ -1169,3 +1177,3 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setPicture(false, hRule(w,h,mystyle.Red(),mystyle.Green(),mystyle.Blue())); -// if (mystyle.getLink()) //qDebug("hRule link!"); +// if (mystyle.getLink()) //odebug << "hRule link!" << oendl; ch = '#'; @@ -1184,6 +1192,6 @@ tchar CPlucker_base::getch_base(bool fast) mystyle.setLeftMargin(ch); -// //qDebug("Left margin:%d", ch); +// //odebug << "Left margin:" << ch << "" << oendl; ch = bgetch(); mystyle.setRightMargin(ch); -// //qDebug("Right margin:%d", ch); +// //odebug << "Right margin:" << ch << "" << oendl; ch = bgetch(); @@ -1205,3 +1213,3 @@ tchar CPlucker_base::getch_base(bool fast) for (int i = 0; i < tlen; i++) bgetch(); - //qDebug("Function 83"); + //odebug << "Function 83" << oendl; } @@ -1210,3 +1218,3 @@ tchar CPlucker_base::getch_base(bool fast) default: - qDebug("Function:%x NOT IMPLEMENTED", ch); + odebug << "Function:" << ch << " NOT IMPLEMENTED" << oendl; { @@ -1216,3 +1224,3 @@ tchar CPlucker_base::getch_base(bool fast) ch = bgetch(); - //qDebug("Arg %d, %d", i, ch); + //odebug << "Arg " << i << ", " << ch << "" << oendl; } 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 @@ #include "katebuffer.h" +#include "kdebug.h" -// Includes for reading file -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <errno.h> -#include <unistd.h> +/* OPIE */ +#include <opie2/odebug.h> +/* QT */ #include <qfile.h> #include <qtextstream.h> - #include <qtimer.h> @@ -38,6 +35,10 @@ -// - +/* STD */ +// Includes for reading file +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <errno.h> +#include <unistd.h> #include <assert.h> -#include <kdebug.h> @@ -68,3 +69,3 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) if (line) { - qDebug("insert File only supports insertion at line 0 == file opening"); + odebug << "insert File only supports insertion at line 0 == file opening" << oendl; return; @@ -123,3 +124,3 @@ KWBuffer::count() { - qDebug("m_stringList.count %d",m_stringList.count()); + odebug << "m_stringList.count " << m_stringList.count() << "" << oendl; 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 @@ #include "katedocument.h" +#include "kmessagebox.h" +#include "kglobal.h" +//#include "kcharsets.h" +#include "kdebug.h" +//#include "kinstance.h" -#include <qfileinfo.h> -#include <qdatetime.h> +#include "kglobalsettings.h" +//#include "kaction.h" +//#include "kstdaction.h" -#include <kmessagebox.h> -#include <qpe/config.h> -#include <qstring.h> +#include "../view/kateview.h" +#include "katebuffer.h" +#include "katetextline.h" -#include <sys/time.h> -#include <unistd.h> +#include "katecmd.h" -#include <stdio.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +/* QT */ +#include <qfileinfo.h> +#include <qdatetime.h> +#include <qstring.h> #include <qtimer.h> @@ -64,17 +75,7 @@ #include <qtextcodec.h> -#include <kglobal.h> - -//#include <kcharsets.h> -#include <kdebug.h> -//#include <kinstance.h> - -#include <kglobalsettings.h> -//#include <kaction.h> -//#include <kstdaction.h> - -#include "../view/kateview.h" -#include "katebuffer.h" -#include "katetextline.h" -#include "katecmd.h" +/* STD */ +#include <sys/time.h> +#include <unistd.h> +#include <stdio.h> @@ -300,3 +301,3 @@ void KateDocument::openURL(const QString &filename) { - qDebug("File doesn't exit or couldn't be read"); + odebug << "File doesn't exit or couldn't be read" << oendl; return ; @@ -307,3 +308,3 @@ void KateDocument::openURL(const QString &filename) // buffer->insertFile(0, m_file, KGlobal::charsets()->codecForName(myEncoding)); - qDebug("Telling buffer to open file"); + odebug << "Telling buffer to open file" << oendl; buffer->insertFile(0, m_file, QTextCodec::codecForLocale()); @@ -685,3 +686,3 @@ void KateDocument::setHighlight(int n) { void KateDocument::makeAttribs() { - qDebug("KateDocument::makeAttribs()"); + odebug << "KateDocument::makeAttribs()" << oendl; m_numAttribs = hlManager->makeAttribs(m_highlight, m_attribs, maxAttribs); @@ -1925,3 +1926,3 @@ void KateDocument::updateLines(int startLine, int endLine, int flags, int cursor endCtx = textLine->getContext(); -// qDebug("DOHIGHLIGHT"); +// odebug << "DOHIGHLIGHT" << oendl; 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 @@ -#include <string.h> - -#include <qtextstream.h> -#include <qpe/config.h> -#include <kglobal.h> -//#include <kinstance.h> -//#include <kmimemagic.h> -#include <klocale.h> -//#include <kregexp.h> -#include <kglobalsettings.h> -#include <kdebug.h> -#include <kstddirs.h> - #include "katehighlight.h" - - #include "katetextline.h" @@ -41,2 +26,21 @@ +#include "kglobal.h" +//#include "kinstance.h" +//#include "kmimemagic.h" +#include "klocale.h" +//#include "kregexp.h" +#include "kglobalsettings.h" +#include "kdebug.h" +#include "kstddirs.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> + +/* QT */ +#include <qtextstream.h> + +/* STD */ +#include <string.h> + @@ -623,3 +627,3 @@ int Highlight::doHighlight(int ctxNum, TextLine *textLine) { - qDebug("An item has been detected"); + odebug << "An item has been detected" << oendl; textLine->setAttribs(item->attr,s1 - str,s2 - str); @@ -855,3 +859,3 @@ void Highlight::createItemData(ItemDataList &list) { - qDebug("Highlight::createItemData"); + odebug << "Highlight::createItemData" << oendl; @@ -876,3 +880,3 @@ void Highlight::createItemData(ItemDataList &list) - qDebug("Trying to read itemData section"); + odebug << "Trying to read itemData section" << oendl; @@ -884,3 +888,3 @@ void Highlight::createItemData(ItemDataList &list) { - qDebug("Setting up one itemData element"); + odebug << "Setting up one itemData element" << oendl; // read all attributes @@ -1314,3 +1318,3 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { - qDebug("HlManager::makeAttribs"); + odebug << "HlManager::makeAttribs" << oendl; @@ -1323,3 +1327,3 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { for (z = 0; z < nAttribs; z++) { - qDebug("HlManager::makeAttribs: createing one attribute definition"); + odebug << "HlManager::makeAttribs: createing one attribute definition" << oendl; 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 @@ #include "katesyntaxdocument.h" -#include <kateconfig.h> +#include "kateconfig.h" +#include "kdebug.h" +#include "kstddirs.h" +#include "klocale.h" +#include "kmessagebox.h" +#include "kglobal.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> + +/* QT */ #include <qfile.h> -#include <kdebug.h> -#include <kstddirs.h> -#include <klocale.h> -#include <kmessagebox.h> #include <qstringlist.h> -#include <kglobal.h> -#include <qpe/qpeapplication.h> #include <qdir.h> @@ -78,3 +83,3 @@ void SyntaxDocument::setupModeList(bool force) { - qDebug("Found a description file:"+path+(*it)); + odebug << "Found a description file:"+path+(*it) << oendl; setIdentifier(path+(*it)); @@ -84,3 +89,3 @@ void SyntaxDocument::setupModeList(bool force) e=e->firstChild(); - qDebug(e->tagName()); + odebug << e->tagName() << oendl; if (e->tagName()=="language") @@ -92,3 +97,3 @@ void SyntaxDocument::setupModeList(bool force) mli->extension = e->attribute("extensions"); - qDebug(QString("valid description for: %1/%2").arg(mli->section).arg(mli->name)); + odebug << QString("valid description for: %1/%2").arg(mli->section).arg(mli->name) << oendl; if (mli->section.isEmpty()) @@ -294,3 +299,3 @@ QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& ty { - qDebug("FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value()); + odebug << "FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value() << oendl; 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 @@ +#define QTOPIA_INTERNAL_LANGLIST +#include "kateconfig.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/global.h> + +/* QT */ #include <qdir.h> @@ -27,2 +35,3 @@ +/* STD */ #include <sys/stat.h> @@ -33,6 +42,2 @@ -#define QTOPIA_INTERNAL_LANGLIST -#include "kateconfig.h" -#include <qpe/global.h> - @@ -95,3 +100,3 @@ KateConfig::KateConfig( const QString &name, Domain domain ) { - qWarning("KateConfig constructor\n"); + owarn << "KateConfig constructor\n" << oendl; git = groups.end(); @@ -120,3 +125,3 @@ KateConfig::~KateConfig() { - qWarning("KateConfig destructor\n"); + owarn << "KateConfig destructor\n" << oendl; if ( changed ) @@ -174,3 +179,3 @@ void KateConfig::writeEntry( const QString &key, const QString &value ) if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; @@ -234,3 +239,3 @@ void KateConfig::writeEntryCrypt( const QString &key, const QString &value ) if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; @@ -323,3 +328,3 @@ void KateConfig::removeEntry( const QString &key ) if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; @@ -399,3 +404,3 @@ QString KateConfig::readEntryDirect( const QString &key, const QString &deflt ) if ( git == groups.end() ) { - //qWarning( "no group set" ); + //owarn << "no group set" << oendl; return deflt; @@ -502,3 +507,3 @@ void KateConfig::clearGroup() if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; @@ -523,3 +528,3 @@ void KateConfig::write( const QString &fn ) if ( !f.open( IO_WriteOnly|IO_Raw ) ) { - qWarning( "could not open for writing `%s'", strNewFile.latin1() ); + owarn << "could not open for writing `" << strNewFile << "'" << oendl; 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 @@ ***************************************************************************/ -#include <qaction.h> -#include <qtoolbutton.h> -#include <qmenubar.h> -#include <qpe/resource.h> -#include <qpe/qpeapplication.h> +#include "tinykate.h" + +#include "katedocument.h" +#include "kglobal.h" + +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/ofiledialog.h> +#include <qpe/resource.h> +#include <qpe/qpeapplication.h> -#include "tinykate.h" +/* QT */ +#include <qaction.h> +#include <qtoolbutton.h> +#include <qmenubar.h> -#include <katedocument.h> -#include <kglobal.h> @@ -154,3 +159,3 @@ TinyKate::~TinyKate( ) { - qWarning("TinyKate destructor\n"); + owarn << "TinyKate destructor\n" << oendl; @@ -162,3 +167,3 @@ TinyKate::~TinyKate( ) if( KGlobal::config() != 0 ) { - qWarning("deleting KateConfig object..\n"); + owarn << "deleting KateConfig object..\n" << oendl; delete KGlobal::config(); @@ -183,3 +188,3 @@ void TinyKate::open(const QString & filename) tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed ); - qDebug(filename); + odebug << filename << oendl; @@ -251,3 +256,3 @@ void TinyKate::slotSave() { KateDocument *kd = (KateDocument*) currentView->document(); - // qDebug("saving file "+kd->docName()); + // odebug << "saving file "+kd->docName() << oendl; if( kd->docName().isEmpty()) @@ -267,3 +272,3 @@ void TinyKate::slotSaveAs() { if (!filename.isEmpty()) { - qDebug("saving file "+filename); + odebug << "saving file "+filename << oendl; QFileInfo fi(filename); |