author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/tableviewer | |
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 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.pro | 8 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvlistview.cpp | 9 |
6 files changed, 66 insertions, 35 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 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <stdlib.h> | 20 | #include "common.h" |
21 | #include "datacache.h" | ||
22 | |||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
25 | #include <qpe/timestring.h> | ||
26 | using namespace Opie::Core; | ||
27 | |||
28 | /* QT */ | ||
21 | #include <qstring.h> | 29 | #include <qstring.h> |
22 | #include <qheader.h> | 30 | #include <qheader.h> |
23 | #include <qvector.h> | 31 | #include <qvector.h> |
24 | #include <qdatetime.h> | 32 | #include <qdatetime.h> |
25 | #include <qpe/timestring.h> | 33 | |
26 | #include "common.h" | 34 | /* STD */ |
27 | #include "datacache.h" | ||
28 | #include <assert.h> | 35 | #include <assert.h> |
36 | #include <stdlib.h> | ||
29 | 37 | ||
30 | static const int del_flag = 0x1; | 38 | static const int del_flag = 0x1; |
@@ -313,5 +321,5 @@ void TVVariant::load(QDataStream &s ) | |||
313 | break; | 321 | break; |
314 | default: | 322 | default: |
315 | qFatal("Unrecognized data type"); | 323 | ofatal << "Unrecognized data type" << oendl; |
316 | } | 324 | } |
317 | } | 325 | } |
@@ -1079,5 +1087,5 @@ QDataStream &operator>>( QDataStream &s, DataElem &d) | |||
1079 | s >> size; /* redundent data but makes streaming easier */ | 1087 | s >> size; /* redundent data but makes streaming easier */ |
1080 | if (size != d.getNumFields()) { | 1088 | if (size != d.getNumFields()) { |
1081 | qWarning("DataSize mis-match"); | 1089 | owarn << "DataSize mis-match" << oendl; |
1082 | return s; /* sanity check failed.. don't load */ | 1090 | return s; /* sanity check failed.. don't load */ |
1083 | } | 1091 | } |
@@ -1378,5 +1386,5 @@ bool DataElem::contains(int i, TVVariant v) const | |||
1378 | break; | 1386 | break; |
1379 | default: | 1387 | default: |
1380 | qWarning("Tried to compare unknown data type"); | 1388 | owarn << "Tried to compare unknown data type" << oendl; |
1381 | } | 1389 | } |
1382 | return FALSE; | 1390 | return FALSE; |
@@ -1404,5 +1412,5 @@ bool DataElem::startsWith(int i, TVVariant v) const | |||
1404 | return FALSE; | 1412 | return FALSE; |
1405 | default: | 1413 | default: |
1406 | qWarning("Tried to compare unknown data type"); | 1414 | owarn << "Tried to compare unknown data type" << oendl; |
1407 | } | 1415 | } |
1408 | return FALSE; | 1416 | return FALSE; |
@@ -1430,5 +1438,5 @@ bool DataElem::endsWith(int i, TVVariant v) const | |||
1430 | return FALSE; | 1438 | return FALSE; |
1431 | default: | 1439 | default: |
1432 | qWarning("Tried to compare unknown data type"); | 1440 | owarn << "Tried to compare unknown data type" << oendl; |
1433 | } | 1441 | } |
1434 | return FALSE; | 1442 | return FALSE; |
@@ -1462,5 +1470,5 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) | |||
1462 | if (type != d2->getField(column).type()) { | 1470 | if (type != d2->getField(column).type()) { |
1463 | /* can't do compare */ | 1471 | /* can't do compare */ |
1464 | qWarning("Tried to compare two incompatable types"); | 1472 | owarn << "Tried to compare two incompatable types" << oendl; |
1465 | return FALSE; | 1473 | return FALSE; |
1466 | } | 1474 | } |
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 @@ | |||
27 | #include "xmlsource.h" | 27 | #include "xmlsource.h" |
28 | #include "csvsource.h" | 28 | #include "csvsource.h" |
29 | #include <stdlib.h> | 29 | |
30 | /* OPIE */ | ||
31 | #include <opie2/odebug.h> | ||
32 | using namespace Opie::Core; | ||
33 | |||
34 | /* QT */ | ||
30 | #include <qheader.h> | 35 | #include <qheader.h> |
31 | 36 | ||
37 | /* STD */ | ||
38 | #include <stdlib.h> | ||
39 | |||
32 | #define INIT_TABLE_SIZE 128 | 40 | #define INIT_TABLE_SIZE 128 |
33 | 41 | ||
@@ -151,5 +159,5 @@ void DBStore::addItemInternal(DataElem *delem) | |||
151 | /* if already full, don't over fill, do a qWarning though */ | 159 | /* if already full, don't over fill, do a qWarning though */ |
152 | if (full) { | 160 | if (full) { |
153 | qWarning("Attempted to add items to already full table"); | 161 | owarn << "Attempted to add items to already full table" << oendl; |
154 | return; | 162 | return; |
155 | } | 163 | } |
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 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "xmlsource.h" | 20 | #include "xmlsource.h" |
21 | #include <qdict.h> | ||
22 | #include <stdlib.h> | ||
23 | #include <qtextstream.h> | ||
24 | #include "../xmlencodeattr.h" | 21 | #include "../xmlencodeattr.h" |
25 | 22 | ||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
25 | using namespace Opie::Core; | ||
26 | 26 | ||
27 | /* QT */ | ||
28 | #include <qdict.h> | ||
29 | #include <qtextstream.h> | ||
30 | |||
31 | /* STD */ | ||
32 | #include <stdlib.h> | ||
27 | 33 | ||
28 | DBXml::DBXml(DBStore *d) | 34 | DBXml::DBXml(DBStore *d) |
@@ -141,5 +147,5 @@ DBXmlHandler::~DBXmlHandler() | |||
141 | QString DBXmlHandler::errorProtocol() | 147 | QString DBXmlHandler::errorProtocol() |
142 | { | 148 | { |
143 | qWarning("Error reading file"); | 149 | owarn << "Error reading file" << oendl; |
144 | return errorProt; | 150 | return errorProt; |
145 | } | 151 | } |
@@ -173,5 +179,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, | |||
173 | key = atts.value("name"); | 179 | key = atts.value("name"); |
174 | if (key.isEmpty()) { | 180 | if (key.isEmpty()) { |
175 | qWarning("empty key name"); | 181 | owarn << "empty key name" << oendl; |
176 | return FALSE; | 182 | return FALSE; |
177 | } | 183 | } |
@@ -191,5 +197,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, | |||
191 | if (!keyIndexList[qName]) { | 197 | if (!keyIndexList[qName]) { |
192 | /* invalid key, we failed */ | 198 | /* invalid key, we failed */ |
193 | qWarning("Invalid key in record"); | 199 | owarn << "Invalid key in record" << oendl; |
194 | return FALSE; | 200 | return FALSE; |
195 | } | 201 | } |
@@ -197,5 +203,5 @@ bool DBXmlHandler::startElement(const QString&, const QString&, | |||
197 | return TRUE; | 203 | return TRUE; |
198 | } | 204 | } |
199 | qWarning("Unable to determine tag type"); | 205 | owarn << "Unable to determine tag type" << oendl; |
200 | return FALSE; | 206 | return FALSE; |
201 | } | 207 | } |
@@ -226,5 +232,5 @@ bool DBXmlHandler::endElement(const QString&, const QString&, | |||
226 | default: | 232 | default: |
227 | // should only get a 'endElement' from one of the above states. | 233 | // should only get a 'endElement' from one of the above states. |
228 | qWarning("Invalid end tag"); | 234 | owarn << "Invalid end tag" << oendl; |
229 | return FALSE; | 235 | return FALSE; |
230 | break; | 236 | break; |
@@ -255,5 +261,5 @@ bool DBXmlHandler::characters(const QString& ch) | |||
255 | } | 261 | } |
256 | 262 | ||
257 | qWarning("Junk characters found... ignored"); | 263 | owarn << "Junk characters found... ignored" << oendl; |
258 | return TRUE; | 264 | return TRUE; |
259 | } | 265 | } |
@@ -271,5 +277,5 @@ bool DBXmlHandler::warning(const QXmlParseException& exception) | |||
271 | .arg(exception.columnNumber()); | 277 | .arg(exception.columnNumber()); |
272 | 278 | ||
273 | qWarning(errorProt); | 279 | owarn << errorProt << oendl; |
274 | return QXmlDefaultHandler::fatalError(exception); | 280 | return QXmlDefaultHandler::fatalError(exception); |
275 | } | 281 | } |
@@ -282,5 +288,5 @@ bool DBXmlHandler::error(const QXmlParseException& exception) | |||
282 | .arg(exception.columnNumber()); | 288 | .arg(exception.columnNumber()); |
283 | 289 | ||
284 | qWarning(errorProt); | 290 | owarn << errorProt << oendl; |
285 | return QXmlDefaultHandler::fatalError(exception); | 291 | return QXmlDefaultHandler::fatalError(exception); |
286 | } | 292 | } |
@@ -293,5 +299,5 @@ bool DBXmlHandler::fatalError(const QXmlParseException& exception) | |||
293 | .arg(exception.columnNumber()); | 299 | .arg(exception.columnNumber()); |
294 | 300 | ||
295 | qWarning(errorProt); | 301 | owarn << errorProt << oendl; |
296 | return QXmlDefaultHandler::fatalError(exception); | 302 | return QXmlDefaultHandler::fatalError(exception); |
297 | } | 303 | } |
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 | |||
@@ -19,5 +19,4 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | /* local includes */ | ||
22 | #include "tableviewer.h" | 21 | #include "tableviewer.h" |
23 | #include "ui/tvbrowseview.h" | 22 | #include "ui/tvbrowseview.h" |
@@ -28,11 +27,13 @@ | |||
28 | #include "db/datacache.h" | 27 | #include "db/datacache.h" |
29 | 28 | ||
30 | /* QPE includes */ | 29 | /* OPIE */ |
30 | #include <opie2/odebug.h> | ||
31 | #include <qpe/fileselector.h> | 31 | #include <qpe/fileselector.h> |
32 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
33 | #include <qtoolbar.h> | 33 | using namespace Opie::Core; |
34 | 34 | ||
35 | /* QTE includes */ | 35 | /* QT */ |
36 | #include <qmenubar.h> | 36 | #include <qmenubar.h> |
37 | #include <qtoolbar.h> | ||
37 | #include <qpopupmenu.h> | 38 | #include <qpopupmenu.h> |
38 | #include <qapplication.h> | 39 | #include <qapplication.h> |
@@ -40,4 +41,5 @@ | |||
40 | #include <qlayout.h> | 41 | #include <qlayout.h> |
41 | #include <qbuffer.h> | 42 | #include <qbuffer.h> |
43 | |||
42 | /*! | 44 | /*! |
43 | \class TableViewerWindow | 45 | \class TableViewerWindow |
@@ -202,5 +204,5 @@ void TableViewerWindow::saveDocument() | |||
202 | 204 | ||
203 | if(!ds->saveSource(dev, doc.type())){ | 205 | if(!ds->saveSource(dev, doc.type())){ |
204 | qWarning("Save unsuccessful"); | 206 | owarn << "Save unsuccessful" << oendl; |
205 | return; | 207 | return; |
206 | } | 208 | } |
@@ -289,5 +291,5 @@ void TableViewerWindow::openDocument(const DocLnk &f) | |||
289 | dirty = FALSE; | 291 | dirty = FALSE; |
290 | } else { | 292 | } else { |
291 | qWarning(tr("could not load Document")); | 293 | owarn << tr("could not load Document") << oendl; |
292 | } | 294 | } |
293 | dev->close(); | 295 | 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 | |||
@@ -1,3 +1,3 @@ | |||
1 | CONFIG = qt warn_on quick-app | 1 | CONFIG = qt warn_on quick-app |
2 | SUBDIRS = db ui | 2 | SUBDIRS = db ui |
3 | HEADERS = tableviewer.h \ | 3 | HEADERS = tableviewer.h \ |
@@ -32,7 +32,7 @@ SOURCES = main.cpp \ | |||
32 | INTERFACES= ui/tvkeyedit_gen.ui | 32 | INTERFACES= ui/tvkeyedit_gen.ui |
33 | TARGET = tableviewer | 33 | TARGET = tableviewer |
34 | INCLUDEPATH += $(OPIEDIR)/include | 34 | INCLUDEPATH+= $(OPIEDIR)/include |
35 | DEPENDPATH += $(OPIEDIR)/include | 35 | DEPENDPATH+= $(OPIEDIR)/include |
36 | LIBS += -lqpe -lopiecore2 | 36 | LIBS += -lqpe -lopiecore2 |
37 | 37 | ||
38 | include ( $(OPIEDIR)/include.pro ) | 38 | include ( $(OPIEDIR)/include.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 | |||
@@ -18,6 +18,13 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #include "tvlistview.h" | 21 | #include "tvlistview.h" |
21 | #include "../db/common.h" | 22 | #include "../db/common.h" |
23 | |||
24 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
26 | using namespace Opie::Core; | ||
27 | |||
28 | /* QT */ | ||
22 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
23 | #include <qlistview.h> | 30 | #include <qlistview.h> |
@@ -164,5 +171,5 @@ void TVListView::first() | |||
164 | void TVListView::last() | 171 | void TVListView::last() |
165 | { | 172 | { |
166 | qWarning("TVListView::last not yet implemented"); | 173 | owarn << "TVListView::last not yet implemented" << oendl; |
167 | } | 174 | } |
168 | 175 | ||