author | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
commit | 4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (side-by-side diff) | |
tree | 59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/documentlist.cpp | |
parent | 8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff) | |
download | opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2 |
use Opie debugging framework
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/documentlist.cpp | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 3e0a96c..92b8c25 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp @@ -22,6 +22,7 @@ #include "mediadlg.h" +/* OPIE */ #include <opie2/oglobal.h> - +#include <opie2/odebug.h> #include <qtopia/config.h> #include <qtopia/mimetype.h> @@ -34,5 +35,7 @@ #include <qtopia/qcopenvelope_qws.h> #endif +using namespace Opie::Core; +/* QT */ #include <qtimer.h> #include <qfileinfo.h> @@ -48,5 +51,4 @@ -using namespace Opie::Core; AppLnkSet *DocumentList::appLnkSet = 0; @@ -109,5 +111,5 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/, cfg.setGroup( "DocTab" ); d->scanDocs = cfg.readBoolEntry( "Enable", true ); - qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs ); + odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl; QTimer::singleShot( 10, this, SLOT( startInitialScan() ) ); @@ -142,5 +144,5 @@ void DocumentList::start() void DocumentList::pause() { - //qDebug("pause %i", d->tid); + //odebug << "pause " << d->tid << "" << oendl; killTimer( d->tid ); d->tid = 0; @@ -152,5 +154,5 @@ void DocumentList::resume() if ( d->tid == 0 ) { d->tid = startTimer( 20 ); - //qDebug("resumed %i", d->tid); + //odebug << "resumed " << d->tid << "" << oendl; } } @@ -178,5 +180,5 @@ void DocumentList::resendWorker() void DocumentList::rescan() { - //qDebug("rescan"); + //odebug << "rescan" << oendl; pause(); d->initialize(); @@ -233,5 +235,5 @@ void DocumentList::reloadAppLnks() } - //qDebug("adding type %s", (*ittypes).latin1()); + //odebug << "adding type " << (*ittypes) << "" << oendl; // ### our current launcher expects docs tab to be last @@ -242,5 +244,5 @@ void DocumentList::reloadAppLnks() } for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { - //qDebug("removing type %s", (*ittypes).latin1()); + //odebug << "removing type " << (*ittypes) << "" << oendl; d->serverGui->typeRemoved(*ittypes); } @@ -275,5 +277,5 @@ void DocumentList::reloadDocLnks() void DocumentList::linkChanged( QString arg ) { - //qDebug( "linkchanged( %s )", arg.latin1() ); + //odebug << "linkchanged( " << arg << " )" << oendl; if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) { @@ -288,5 +290,5 @@ void DocumentList::linkChanged( QString arg ) if ( ( doc->linkFileKnown() && doc->linkFile() == arg ) || ( doc->fileKnown() && doc->file() == arg ) ) { - //qDebug( "found old link" ); + //odebug << "found old link" << oendl; DocLnk* dl = new DocLnk( arg ); // add new one if it exists and matches the mimetype @@ -294,5 +296,5 @@ void DocumentList::linkChanged( QString arg ) // Existing link has been changed, send old link ref and a ref // to the new link - //qDebug( "change case" ); + //odebug << "change case" << oendl; if ( d->serverGui ) d->serverGui->documentChanged( *doc, *dl ); @@ -301,5 +303,5 @@ void DocumentList::linkChanged( QString arg ) // Link has been removed or doesn't match the mimetypes any more // so we aren't interested in it, so take it away from the list - //qDebug( "removal case" ); + //odebug << "removal case" << oendl; if ( d->serverGui ) d->serverGui->documentRemoved( *doc ); @@ -315,5 +317,5 @@ void DocumentList::linkChanged( QString arg ) if ( d->store( dl ) ) { // Add if it's a link we are interested in - //qDebug( "add case" ); + //odebug << "add case" << oendl; add( *dl ); } @@ -379,10 +381,10 @@ void DocumentList::sendAllDocLinks() } - //qDebug( "sending length %d", contents.length() ); + //odebug << "sending length " << contents.length() << "" << oendl; #ifndef QT_NO_COP QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); e << contents; #endif - //qDebug( "================ \n\n%s\n\n===============", contents.latin1() ); + //odebug << "================ \n\n" << contents << "\n\n===============" << oendl; d->needToSendAllDocLinks = false; @@ -537,5 +539,5 @@ void DocumentListPrivate::estimatedPercentScanned() } - // qDebug( "overallProgress: %f", overallProgress ); + // odebug << "overallProgress: " << overallProgress << "" << oendl; if ( serverGui ) @@ -554,5 +556,5 @@ const QString DocumentListPrivate::nextFile() } else { QDir dir( docPaths[docPathsSearched] ); - // qDebug("now using base path: %s", docPaths[docPathsSearched].latin1() ); + // odebug << "now using base path: " << docPaths[docPathsSearched] << "" << oendl; docPathsSearched++; if ( !dir.exists( ".Qtopia-ignore" ) ) { @@ -588,5 +590,5 @@ const QString DocumentListPrivate::nextFile() // go down a depth QDir dir( fi->filePath() ); - // qDebug("now going in to path: %s", bn.latin1() ); + // odebug << "now going in to path: " << bn << "" << oendl; if ( !dir.exists( ".Qtopia-ignore" ) ) { if ( searchDepth < MAX_SEARCH_DEPTH - 1) { @@ -629,5 +631,5 @@ const DocLnk *DocumentListPrivate::iterate() { if ( state == Find ) { - //qDebug("state Find"); + //odebug << "state Find" << oendl; QString file = nextFile(); while ( !file.isNull() ) { @@ -651,5 +653,5 @@ const DocLnk *DocumentListPrivate::iterate() if ( state == RemoveKnownFiles ) { - //qDebug("state RemoveKnownFiles"); + //odebug << "state RemoveKnownFiles" << oendl; const QList<DocLnk> &list = dls.children(); for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) { @@ -665,5 +667,5 @@ const DocLnk *DocumentListPrivate::iterate() if ( state == MakeUnknownFiles ) { - //qDebug("state MakeUnknownFiles"); + //odebug << "state MakeUnknownFiles" << oendl; for (void* c; (c=dit->current()); ++(*dit) ) { if ( c == MAGIC_NUMBER ) { @@ -688,5 +690,5 @@ const DocLnk *DocumentListPrivate::iterate() } - //qDebug("state Done"); + //odebug << "state Done" << oendl; return NULL; } |