author | ar <ar> | 2004-05-31 15:26:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-31 15:26:50 (UTC) |
commit | 27dfc34d411dee76f09f5e516c60b0a64eb35948 (patch) (side-by-side diff) | |
tree | b7f7259497630390e352a1257cac5dc59f5399a6 /noncore/apps/tableviewer/db/datacache.cpp | |
parent | 27b09fe4f930b96e82cea9fb0eb1a9b87f7ec062 (diff) | |
download | opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.zip opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.gz opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.bz2 |
- convert qWarning to owarn
Diffstat (limited to 'noncore/apps/tableviewer/db/datacache.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tableviewer/db/datacache.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp index 6380e1b..de57961 100644 --- a/noncore/apps/tableviewer/db/datacache.cpp +++ b/noncore/apps/tableviewer/db/datacache.cpp @@ -18,3 +18,3 @@ ** -**********************************************************************/ +**********************************************************************/ /* @@ -65,6 +65,6 @@ DBStore::DBStore() -//TODO +//TODO /*! - Reinitializes the table to empty (include a resize of the master table, - which should free some memory) + Reinitializes the table to empty (include a resize of the master table, + which should free some memory) */ @@ -95,3 +95,3 @@ DBStore::~DBStore() /*! - This function opens the given xml file, loads it and sets up the + This function opens the given xml file, loads it and sets up the appropriate data structures. @@ -103,3 +103,3 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { - /* first check if db is already open, if contains data.. then clear */ + /* first check if db is already open, if contains data.. then clear */ if(number_elems > 0) { @@ -111,5 +111,5 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { } else if (source == "text/csv") { - archive = new DBCsv(this); + archive = new DBCsv(this); } else - return false; + return false; @@ -118,3 +118,3 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { -bool DBStore::saveSource(QIODevice *outDev, const QString &source) +bool DBStore::saveSource(QIODevice *outDev, const QString &source) { @@ -124,6 +124,6 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) archive = new DBXml(this); - } else if (source == "text/x-xml-tableviewer") { + } else if (source == "text/x-xml-tableviewer") { archive = new DBCsv(this); } else - return false; + return false; } @@ -135,6 +135,6 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) archive = new DBXml(this); - } else if (source == "text/x-xml-tableviewer") { + } else if (source == "text/x-xml-tableviewer") { archive = new DBCsv(this); - } else - return false; + } else + return false; } @@ -144,3 +144,3 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) -/*! +/*! This function is used to add new elements to the database. If the database @@ -158,5 +158,5 @@ void DBStore::addItemInternal(DataElem *delem) { - /* if already full, don't over fill, do a qWarning though */ + /* if already full, don't over fill, do a owarn though */ if (full) { - owarn << "Attempted to add items to already full table" << oendl; + owarn << "Attempted to add items to already full table" << oendl; return; @@ -187,9 +187,9 @@ void DBStore::removeItem(DataElem *r) int position = master_table.findRef(r); - if(position != -1) { - /* there is at least one item, this is it */ - /* replace this with the last element, decrease the element count */ - master_table.insert(position, master_table.at(--number_elems)); - master_table.remove(number_elems); - delete r; - } + if(position != -1) { + /* there is at least one item, this is it */ + /* replace this with the last element, decrease the element count */ + master_table.insert(position, master_table.at(--number_elems)); + master_table.remove(number_elems); + delete r; + } } @@ -203,3 +203,3 @@ void DBStore::setName(const QString &n) { - name = n; + name = n; } @@ -213,3 +213,3 @@ QString DBStore::getName() { - return name; + return name; } @@ -217,3 +217,3 @@ QString DBStore::getName() /*! - Retrieves a pointer to the key representation of the database for + Retrieves a pointer to the key representation of the database for other classes to use as reference. @@ -237,3 +237,3 @@ void DBStore::setKeys(KeyList *k) /*! - Sets the current element to the first element of the database + Sets the current element to the first element of the database */ @@ -245,3 +245,3 @@ void DBStore::first() /*! - Sets the current element to the last element of the database + Sets the current element to the last element of the database */ @@ -259,3 +259,3 @@ bool DBStore::next() unsigned int new_current_elem = current_elem + 1; - if (current_elem < number_elems) + if (current_elem < number_elems) /* was valid before inc (it is possible but unlikely that inc current @@ -280,3 +280,3 @@ bool DBStore::previous() if (new_current_elem < number_elems) { - /* still is (if was 0, then now -1, but as is unsigned will wrap + /* still is (if was 0, then now -1, but as is unsigned will wrap and hence be invalid */ @@ -290,3 +290,3 @@ bool DBStore::previous() Returns the current data element in the database. Which element is current - is affected by newly added items, findItem, next, previous, first and + is affected by newly added items, findItem, next, previous, first and last functions @@ -295,5 +295,5 @@ bool DBStore::previous() */ -DataElem *DBStore::getCurrentData() +DataElem *DBStore::getCurrentData() { - if (current_elem >= number_elems) + if (current_elem >= number_elems) return NULL; |