author | llornkcor <llornkcor> | 2002-03-09 20:00:31 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-09 20:00:31 (UTC) |
commit | 767f33638631d29bca260aab66c1224ab2108af7 (patch) (side-by-side diff) | |
tree | e8c66841e18a4f106e0650e1e29d21e706bcef14 /noncore/apps/tableviewer/db/common.cpp | |
parent | 3095bf47c523afcf5441057db23050767f69ebf9 (diff) | |
download | opie-767f33638631d29bca260aab66c1224ab2108af7.zip opie-767f33638631d29bca260aab66c1224ab2108af7.tar.gz opie-767f33638631d29bca260aab66c1224ab2108af7.tar.bz2 |
got tableviewer compiling to find out what the heck it is- and I still can't tell
Diffstat (limited to 'noncore/apps/tableviewer/db/common.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tableviewer/db/common.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index 4c70e54..71844a5 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp @@ -19,13 +19,13 @@ **********************************************************************/ #include <stdlib.h> #include <qstring.h> #include <qheader.h> #include <qvector.h> #include <qdatetime.h> -#include <timestring.h> +#include <qpe/timestring.h> #include "common.h" #include "datacache.h" #include <assert.h> static const int del_flag = 0x1; static const int new_flag = 0x2; @@ -307,15 +307,15 @@ void TVVariant::load(QDataStream &s ) case Int: { int x; s >> x; d->value.i = x; } - break; + break; default: - qFatal("Unrecognized data type"); + qFatal("Unrecognized data type"); } } void TVVariant::save( QDataStream &s ) const { s << type(); @@ -387,13 +387,13 @@ const QString TVVariant::toString() const int TVVariant::toInt() const { if(d->typ == Int) return d->value.i; if(d->typ == String) { - QString tmpq(*(QString *)d->value.ptr); + QString tmpq(*(QString *)d->value.ptr); return parseNextNumber(&tmpq); } return 0; } @@ -681,15 +681,15 @@ Key::Key() : kname(), kexample(), kflags(0) { } Key::Key(QString name, TVVariant example, int flags = 0) : kname(name), kexample(example), kflags(flags) { } Key::Key(const Key &other) { - kname = other.kname; - kexample = other.kexample; - kflags = other.kflags; + kname = other.kname; + kexample = other.kexample; + kflags = other.kflags; } Key& Key::operator=(const Key& key) { kname = key.kname; kexample = key.kexample; @@ -775,16 +775,16 @@ KeyList::KeyList() : QIntDict<Key>(20) } /* Should be deep copy, but isn't */ KeyList::KeyList(const KeyList &k) : QIntDict<Key>(k) { KeyListIterator it(k); - while(it.current()) { - replace(it.currentKey(), new Key(*it.current())); - ++it; - } + while(it.current()) { + replace(it.currentKey(), new Key(*it.current())); + ++it; + } setAutoDelete(TRUE); } /*! Destroys a KeyList @@ -795,21 +795,21 @@ KeyList::~KeyList() { /* Do a comparision base on Keys */ bool KeyList::operator!=(const KeyList &other) { KeyListIterator it(*this); if (other.getNumFields() != getNumFields()) - return TRUE; + return TRUE; while(it.current()) { - //it.currentKey(), it.current(); - if (other.getKeyName(it.currentKey()) != getKeyName(it.currentKey())) - return TRUE; - if (other.getKeyType(it.currentKey()) != getKeyType(it.currentKey())) - return TRUE; - ++it; + //it.currentKey(), it.current(); + if (other.getKeyName(it.currentKey()) != getKeyName(it.currentKey())) + return TRUE; + if (other.getKeyType(it.currentKey()) != getKeyType(it.currentKey())) + return TRUE; + ++it; } return FALSE; } /*! Returns the number of keys stored in the KeyList @@ -1179,13 +1179,13 @@ void DataElem::setField(int i, QString q) TVVariant t = TVVariant(q); switch(kt) { case TVVariant::Int: { t.asInt(); setField(i, t); - return; + return; } case TVVariant::String: { t.asString(); setField(i, t); return; } @@ -1267,13 +1267,13 @@ QString DataElem::toQString() const int i; QString scratch = ""; QIntDictIterator<TVVariant> it(values); while (it.current()) { - i = it.currentKey(); + i = it.currentKey(); if(hasValidValue(i)) { scratch += "<B>" + contained->getKeyName(i) + ":</B> "; scratch += getField(i).toString(); scratch += "<br>"; } ++it; |