summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/drinkdata.cpp9
-rw-r--r--noncore/apps/opie-bartender/drinkdata.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/noncore/apps/opie-bartender/drinkdata.cpp b/noncore/apps/opie-bartender/drinkdata.cpp
index 8856e46..53e7b8d 100644
--- a/noncore/apps/opie-bartender/drinkdata.cpp
+++ b/noncore/apps/opie-bartender/drinkdata.cpp
@@ -9,25 +9,24 @@
* (at your option) any later version. *
***************************************************************************/
/* QT */
#include <qfile.h>
#include <qtextstream.h>
#include <qvaluelist.h>
/* STD */
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
-#include <iostream>
#include <errno.h>
#include "drinkdata.h"
// ----- DrinkData -----
DrinkData::DrinkData() {
}
void DrinkData::setFile(const QString &filename) {
this->filename = filename;
}
@@ -57,32 +56,24 @@ bool DrinkData::read(void) {
else {
if(ingredients != "")
ingredients += '\n';
ingredients += s;
}
}
dbFile.close();
return true;
}
-void DrinkData::print(void) {
- DrinkList::Iterator it = items.begin();
- while ( it != items.end() ) {
- std::cout << (*it).getName() << '\n';
- ++it;
- }
-}
-
void DrinkData::addDrink(const QString &name, const QString &ingredients) {
DrinkItem item(name, ingredients);
items.append(item);
}
DrinkList::Iterator DrinkData::findDrink(const QString &name) {
DrinkList::Iterator it = items.begin();
while ( it != items.end() ) {
if((*it).getName() == name)
return it;
++it;
}
diff --git a/noncore/apps/opie-bartender/drinkdata.h b/noncore/apps/opie-bartender/drinkdata.h
index bcc3022..2b96d1d 100644
--- a/noncore/apps/opie-bartender/drinkdata.h
+++ b/noncore/apps/opie-bartender/drinkdata.h
@@ -16,25 +16,24 @@ class DrinkItem;
typedef QValueList<DrinkItem> DrinkList;
class DrinkData {
private:
DrinkList items;
QString filename;
public:
DrinkData(void);
void setFile(const QString &filename);
bool writeChanges(void);
bool read(void);
- void print(void);
void addDrink(const QString &name, const QString &ingredients);
DrinkList::Iterator getBegin(void);
DrinkList::Iterator getEnd(void);
DrinkList::Iterator findDrink(const QString &name);
};
class DrinkItem {
private:
QString name;
QString ingredients;
public:
DrinkItem(void);