Diffstat (limited to 'noncore/apps/checkbook/kmolcalc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/kmolcalc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/kmolcalc.cpp b/noncore/apps/checkbook/kmolcalc.cpp index e5ab736..50e1375 100644 --- a/noncore/apps/checkbook/kmolcalc.cpp +++ b/noncore/apps/checkbook/kmolcalc.cpp @@ -1,21 +1,23 @@ /* * kmolcalc.cpp * * Copyright (C) 2000 Tomislav Gountchev <tomi@idiom.com> + * Copyright (C) 2002 Carsten Niehaus <cniehaus@handhelds.org> */ /** * KMOLCALC is the calculation engine. It knows about a hashtable of user defined atomic * weights and group definitions ELSTABLE, and the currently processed formula, stored * as a list of elements and their coefficients, ELEMENTS. */ #include "kmolcalc.h" #include <qdict.h> #include <qdir.h> +#include <qfile.h> #include <iostream.h> /** * Construct a new calculator object. */ @@ -32,13 +34,13 @@ KMolCalc::~KMolCalc() { void KMolCalc::readElstable() { weight = -1; // not calculated yet if (elstable) delete elstable; elstable = new QDict<SubUnit> (197, TRUE); elstable->setAutoDelete(TRUE); QStringList files;// = // KGlobal::dirs()->findAllResources("appdata", "kmolweights"); -// mwfile = locateLocal("data", "kmol")+"/kmolweights"; + mwfile = "/home/opie/opie/noncore/apps/oxigen/kmolweights"; QFile f(mwfile); QString* latest_f = &mwfile; for (uint i=0; i<files.count(); i++) { if (QFileInfo(QFile(files[i])).lastModified() > QFileInfo(QFile(*latest_f)).lastModified()) { latest_f = &files[i]; } |