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/apps/opie-reader | |
parent | d1095d71394779557f446e2a67ba55bc62eec859 (diff) | |
download | opie-412619441fab46fc79c695a23ccf9e38135bdfad.zip opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.gz opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.bz2 |
- convert qDebug to odebug
-rw-r--r-- | noncore/apps/opie-reader/Aportis.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.cpp | 22 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReader.cpp | 52 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 279 | ||||
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/fileBrowser.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-reader/opie-reader.pro | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/plucker.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-reader/plucker_base.cpp | 148 |
11 files changed, 282 insertions, 273 deletions
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; } |