author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/applets/notesapplet/notes.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 13f7cf3..b3e72a7 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -17,6 +17,4 @@ -#include <qapplication.h> -#include <stdlib.h> -#include <qstringlist.h> - +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> @@ -28,5 +26,6 @@ #include <qpe/config.h> +using namespace Opie::Core; +using namespace Opie::Ui; -// #include <qsocket.h> -// #include <qclipboard.h> +/* QT */ #include <qmultilineedit.h> @@ -35,3 +34,3 @@ #include <qmessagebox.h> - +#include <qapplication.h> #include <qdir.h> @@ -45,6 +44,9 @@ #include <qstring.h> +#include <qstringlist.h> #include <qtimer.h> +/* STD */ +#include <stdlib.h> + /* XPM */ -using namespace Opie::Ui; static char * notes_xpm[] = { @@ -86,5 +88,5 @@ NotesControl::NotesControl( QWidget *, const char * ) if( !d.exists()) { - qDebug("make dir"); + odebug << "make dir" << oendl; if(!d.mkdir( QDir::homeDirPath()+"/notes", true)) - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed"); + odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl; } @@ -167,3 +169,3 @@ void NotesControl::slotDeleteButton() { QString selectedText = box->currentText(); - qDebug("deleting "+selectedText); + odebug << "deleting "+selectedText << oendl; @@ -178,3 +180,3 @@ void NotesControl::slotDeleteButton() { if(selectedText == cfg.readEntry( entryName )) { - qDebug("removing %s, %d", selectedText.latin1(), i); + odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl; for ( int j = i; j < noOfFiles; j++ ) { @@ -183,3 +185,3 @@ void NotesControl::slotDeleteButton() { QString temp = cfg.readEntry(entryName2); - qDebug("move "+temp); + odebug << "move "+temp << oendl; cfg.writeEntry(entryName, temp); @@ -194,6 +196,6 @@ void NotesControl::slotDeleteButton() { QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop"; - qDebug(fi); + odebug << fi << oendl; QFile f( fi); - if( !f.remove()) qDebug(".desktop file not removed"); + if( !f.remove()) odebug << ".desktop file not removed" << oendl; @@ -285,3 +287,3 @@ void NotesControl::save() { if( edited) { -// qDebug("is edited"); +// odebug << "is edited" << oendl; QString rt = view->text(); @@ -303,3 +305,3 @@ void NotesControl::save() { docname = "Empty Text"; -// qDebug(docname); +// odebug << docname << oendl; @@ -314,3 +316,3 @@ void NotesControl::save() { // else -// qDebug("oldname equals docname"); +// odebug << "oldname equals docname" << oendl; @@ -318,3 +320,3 @@ void NotesControl::save() { if(QFile(doc->linkFile()).exists()) - qDebug("puppie"); + odebug << "puppie" << oendl; doc->setType("text/plain"); @@ -329,3 +331,3 @@ void NotesControl::save() { edited=false; -// qDebug("save"); +// odebug << "save" << oendl; if (doPopulate) @@ -341,3 +343,3 @@ void NotesControl::populateBox() { box->clear(); -// qDebug("populate"); +// odebug << "populate" << oendl; Config cfg("Notes"); @@ -376,3 +378,3 @@ void NotesControl::load() { void NotesControl::load(const QString & file) { - qDebug("loading "+file); + odebug << "loading "+file << oendl; QString name = file; @@ -403,3 +405,3 @@ void NotesControl::loadDoc( const DocLnk &f) { if ( !fm.loadFile( f, txt ) ) { - qDebug("could not load file "+f.file()); + odebug << "could not load file "+f.file() << oendl; return; @@ -437,3 +439,3 @@ void NotesControl::slotSearch() { // if(e->key() == Key_C) { //copy -// qDebug("copy"); +// odebug << "copy" << oendl; // QClipboard *cb = QApplication::clipboard(); @@ -484,6 +486,6 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { if(vc->showMax) { - qDebug("show max"); + odebug << "show max" << oendl; vc->showMaximized(); } else { - qDebug("no show max"); + odebug << "no show max" << oendl; QWidget *wid = QPEApplication::desktop(); |