-rw-r--r-- | noncore/apps/tableviewer/db/common.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/tableviewer/db/csvsource.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index 71844a5..dbf9370 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp @@ -658,49 +658,49 @@ bool TVVariant::close(TVVariant n) return FALSE; return TRUE; } case Int: case Date: case Time: return TRUE; default: /* don't know how to do 'closer' on this type, hence never closer * or even close */ break; } return FALSE; } /*! \class Key \brief document me! document me! */ Key::Key() : kname(), kexample(), kflags(0) { } -Key::Key(QString name, TVVariant example, int flags = 0) : +Key::Key(QString name, TVVariant example, int flags) : kname(name), kexample(example), kflags(flags) { } Key::Key(const Key &other) { kname = other.kname; kexample = other.kexample; kflags = other.kflags; } Key& Key::operator=(const Key& key) { kname = key.kname; kexample = key.kexample; kflags = key.kflags; return *this; } QString Key::name() const { return QString(kname); } TVVariant Key::example() const { diff --git a/noncore/apps/tableviewer/db/csvsource.cpp b/noncore/apps/tableviewer/db/csvsource.cpp index 2561b4b..ea36300 100644 --- a/noncore/apps/tableviewer/db/csvsource.cpp +++ b/noncore/apps/tableviewer/db/csvsource.cpp @@ -77,48 +77,49 @@ QStringList readElem(QString in) } else { while(index < in.length() && in[index] != ',') { if (in[index] == '\\') { if (index++ < in.length()) { elem.append(in[index]); index++; } } else { elem.append(in[index]); index++; } } } /* we have our current elem */ out << elem.stripWhiteSpace(); firstChar = TRUE; quotedElem = FALSE; /* skip till a , or end of line */ while (index < in.length() && in[index] != ',') index++; if(index == in.length()) return out; else index++; } + return out; } bool DBCsv::openSource(QIODevice *inDev) { QTextStream tsIn(inDev); QString in = tsIn.readLine().stripWhiteSpace(); QStringList keys; keys = readElem(in); QMap<int,int> keyIndexes; KeyList *keyR = new KeyList(); QStringList::Iterator i = keys.begin(); uint fileIndex = 0; while(i != keys.end()) { if ((*i).isEmpty()) keyIndexes.insert(fileIndex, keyR->addKey("Unamed", TVVariant::String)); else keyIndexes.insert(fileIndex, keyR->addKey(*i, TVVariant::String)); i++; fileIndex++; } |