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/apps/tableviewer/db | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-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 |
3 files changed, 46 insertions, 24 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 @@ -18,13 +18,21 @@ ** **********************************************************************/ -#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; @@ -313,5 +321,5 @@ void TVVariant::load(QDataStream &s ) break; default: - qFatal("Unrecognized data type"); + ofatal << "Unrecognized data type" << oendl; } } @@ -1079,5 +1087,5 @@ 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 */ } @@ -1378,5 +1386,5 @@ bool DataElem::contains(int i, TVVariant v) const break; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; @@ -1404,5 +1412,5 @@ bool DataElem::startsWith(int i, TVVariant v) const return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; @@ -1430,5 +1438,5 @@ bool DataElem::endsWith(int i, TVVariant v) const return FALSE; default: - qWarning("Tried to compare unknown data type"); + owarn << "Tried to compare unknown data type" << oendl; } return FALSE; @@ -1462,5 +1470,5 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) 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; } 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 @@ -27,7 +27,15 @@ #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 @@ -151,5 +159,5 @@ 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 @@ -19,10 +19,16 @@ **********************************************************************/ #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) @@ -141,5 +147,5 @@ DBXmlHandler::~DBXmlHandler() QString DBXmlHandler::errorProtocol() { - qWarning("Error reading file"); + owarn << "Error reading file" << oendl; return errorProt; } @@ -173,5 +179,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, key = atts.value("name"); if (key.isEmpty()) { - qWarning("empty key name"); + owarn << "empty key name" << oendl; return FALSE; } @@ -191,5 +197,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, if (!keyIndexList[qName]) { /* invalid key, we failed */ - qWarning("Invalid key in record"); + owarn << "Invalid key in record" << oendl; return FALSE; } @@ -197,5 +203,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, return TRUE; } - qWarning("Unable to determine tag type"); + owarn << "Unable to determine tag type" << oendl; return FALSE; } @@ -226,5 +232,5 @@ bool DBXmlHandler::endElement(const QString&, const QString&, default: // should only get a 'endElement' from one of the above states. - qWarning("Invalid end tag"); + owarn << "Invalid end tag" << oendl; return FALSE; break; @@ -255,5 +261,5 @@ bool DBXmlHandler::characters(const QString& ch) } - qWarning("Junk characters found... ignored"); + owarn << "Junk characters found... ignored" << oendl; return TRUE; } @@ -271,5 +277,5 @@ bool DBXmlHandler::warning(const QXmlParseException& exception) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } @@ -282,5 +288,5 @@ bool DBXmlHandler::error(const QXmlParseException& exception) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } @@ -293,5 +299,5 @@ bool DBXmlHandler::fatalError(const QXmlParseException& exception) .arg(exception.columnNumber()); - qWarning(errorProt); + owarn << errorProt << oendl; return QXmlDefaultHandler::fatalError(exception); } |