-rw-r--r-- | noncore/apps/tableviewer/db/common.cpp | 28 | ||||
-rw-r--r-- | noncore/apps/tableviewer/db/datacache.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/tableviewer/db/xmlsource.cpp | 30 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.pro | 0 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvlistview.cpp | 9 |
6 files changed, 62 insertions, 31 deletions
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index dbf9370..6e544ba 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp @@ -17,15 +17,23 @@ ** not clear to you. ** **********************************************************************/ -#include <stdlib.h> +#include "common.h" +#include "datacache.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/timestring.h> +using namespace Opie::Core; + +/* QT */ #include <qstring.h> #include <qheader.h> #include <qvector.h> #include <qdatetime.h> -#include <qpe/timestring.h> -#include "common.h" -#include "datacache.h" + +/* STD */ #include <assert.h> +#include <stdlib.h> static const int del_flag = 0x1; static const int new_flag = 0x2; @@ -312,7 +320,7 @@ void TVVariant::load(QDataStream &s ) } break; default: - qFatal("Unrecognized data type"); + ofatal << "Unrecognized data type" << oendl; } } @@ -1078,7 +1086,7 @@ QDataStream &operator>>( QDataStream &s, DataElem &d) s >> size; /* redundent data but makes streaming easier */ if (size != d.getNumFields()) { - qWarning("DataSize mis-match"); + owarn << "DataSize mis-match" << oendl; return s; /* sanity check failed.. don't load */ } @@ -1377,7 +1385,7 @@ bool DataElem::contains(int i, TVVariant v) const case TVVariant::Date: break; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1403,7 +1411,7 @@ bool DataElem::startsWith(int i, TVVariant v) const case TVVariant::Date: return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1429,7 +1437,7 @@ bool DataElem::endsWith(int i, TVVariant v) const case TVVariant::Date: return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; } @@ -1461,7 +1469,7 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) if(d2) { if (type != d2->getField(column).type()) { /* can't do compare */ - qWarning("Tried to compare two incompatable types"); + owarn << "Tried to compare two incompatable types" << oendl; return FALSE; } return target.closer(d1->getField(column), d2->getField(column)); diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp index 7c14eef..6380e1b 100644 --- a/noncore/apps/tableviewer/db/datacache.cpp +++ b/noncore/apps/tableviewer/db/datacache.cpp @@ -26,9 +26,17 @@ #include "datacache.h" #include "xmlsource.h" #include "csvsource.h" -#include <stdlib.h> + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qheader.h> +/* STD */ +#include <stdlib.h> + #define INIT_TABLE_SIZE 128 /*! @@ -150,7 +158,7 @@ void DBStore::addItemInternal(DataElem *delem) { /* if already full, don't over fill, do a qWarning though */ if (full) { - qWarning("Attempted to add items to already full table"); + owarn << "Attempted to add items to already full table" << oendl; return; } diff --git a/noncore/apps/tableviewer/db/xmlsource.cpp b/noncore/apps/tableviewer/db/xmlsource.cpp index 94fec36..4ca6aee 100644 --- a/noncore/apps/tableviewer/db/xmlsource.cpp +++ b/noncore/apps/tableviewer/db/xmlsource.cpp @@ -18,12 +18,18 @@ ** **********************************************************************/ #include "xmlsource.h" -#include <qdict.h> -#include <stdlib.h> -#include <qtextstream.h> #include "../xmlencodeattr.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ +#include <qdict.h> +#include <qtextstream.h> + +/* STD */ +#include <stdlib.h> DBXml::DBXml(DBStore *d) { @@ -140,7 +146,7 @@ DBXmlHandler::~DBXmlHandler() QString DBXmlHandler::errorProtocol() { - qWarning("Error reading file"); + owarn << "Error reading file" << oendl; return errorProt; } @@ -172,7 +178,7 @@ bool DBXmlHandler::startElement(const QString&, const QString&, last_key_type = TVVariant::String; key = atts.value("name"); if (key.isEmpty()) { - qWarning("empty key name"); + owarn << "empty key name" << oendl; return FALSE; } if(!atts.value("type").isEmpty()) @@ -190,13 +196,13 @@ bool DBXmlHandler::startElement(const QString&, const QString&, /* the qName is the name of a key */ if (!keyIndexList[qName]) { /* invalid key, we failed */ - qWarning("Invalid key in record"); + owarn << "Invalid key in record" << oendl; return FALSE; } keyIndex = *keyIndexList[qName]; return TRUE; } - qWarning("Unable to determine tag type"); + owarn << "Unable to determine tag type" << oendl; return FALSE; } @@ -225,7 +231,7 @@ bool DBXmlHandler::endElement(const QString&, const QString&, break; default: // should only get a 'endElement' from one of the above states. - qWarning("Invalid end tag"); + owarn << "Invalid end tag" << oendl; return FALSE; break; } @@ -254,7 +260,7 @@ bool DBXmlHandler::characters(const QString& ch) return TRUE; } - qWarning("Junk characters found... ignored"); + owarn << "Junk characters found... ignored" << oendl; return TRUE; } @@ -270,7 +276,7 @@ bool DBXmlHandler::warning(const QXmlParseException& exception) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } @@ -281,7 +287,7 @@ bool DBXmlHandler::error(const QXmlParseException& exception) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } @@ -292,6 +298,6 @@ bool DBXmlHandler::fatalError(const QXmlParseException& exception) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp index 102b94c..9538cb3 100644 --- a/noncore/apps/tableviewer/tableviewer.cpp +++ b/noncore/apps/tableviewer/tableviewer.cpp @@ -18,7 +18,6 @@ ** **********************************************************************/ -/* local includes */ #include "tableviewer.h" #include "ui/tvbrowseview.h" #include "ui/tvfilterview.h" @@ -27,18 +26,21 @@ #include "ui/tvkeyedit.h" #include "db/datacache.h" -/* QPE includes */ +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/fileselector.h> #include <qpe/resource.h> -#include <qtoolbar.h> +using namespace Opie::Core; -/* QTE includes */ +/* QT */ #include <qmenubar.h> +#include <qtoolbar.h> #include <qpopupmenu.h> #include <qapplication.h> #include <qwidgetstack.h> #include <qlayout.h> #include <qbuffer.h> + /*! \class TableViewerWindow \brief The main window widget of the application @@ -201,7 +203,7 @@ void TableViewerWindow::saveDocument() QIODevice *dev = fm.saveFile(doc); if(!ds->saveSource(dev, doc.type())){ - qWarning("Save unsuccessful"); + owarn << "Save unsuccessful" << oendl; return; } dev->close(); @@ -288,7 +290,7 @@ void TableViewerWindow::openDocument(const DocLnk &f) dirty = FALSE; } else { - qWarning(tr("could not load Document")); + owarn << tr("could not load Document") << oendl; } dev->close(); } diff --git a/noncore/apps/tableviewer/tableviewer.pro b/noncore/apps/tableviewer/tableviewer.pro index 1de23bb..564f50f 100644 --- a/noncore/apps/tableviewer/tableviewer.pro +++ b/noncore/apps/tableviewer/tableviewer.pro diff --git a/noncore/apps/tableviewer/ui/tvlistview.cpp b/noncore/apps/tableviewer/ui/tvlistview.cpp index b10ff1d..c3e6432 100644 --- a/noncore/apps/tableviewer/ui/tvlistview.cpp +++ b/noncore/apps/tableviewer/ui/tvlistview.cpp @@ -17,8 +17,15 @@ ** not clear to you. ** **********************************************************************/ + #include "tvlistview.h" #include "../db/common.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qtoolbutton.h> #include <qlistview.h> #include <qlayout.h> @@ -163,7 +170,7 @@ void TVListView::first() void TVListView::last() { - qWarning("TVListView::last not yet implemented"); + owarn << "TVListView::last not yet implemented" << oendl; } void TVListView::next() |