summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/openetext.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/openetext.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/openetext.cpp55
1 files changed, 29 insertions, 26 deletions
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);