[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/krecipes/src/importers
From:       Jason Kivlighn <confederacy2 () excite ! com>
Date:       2003-11-17 4:02:47
[Download RAW message or body]

CVS commit by jkivlighn: 

-Don't require doctype tag
-Recognize ingredient amounts that are fractions


  M +4 -2      recipemlimporter.cpp   1.3


--- kdenonbeta/krecipes/src/importers/recipemlimporter.cpp  #1.2:1.3
@@ -26,4 +26,5 @@ Foundation, Inc., 59 Temple Place, Suite
 
 #include "recipe.h"
+#include "mixednumber.h"
 
 RecipeMLImporter::RecipeMLImporter( const QString& file ) : BaseImporter()
@@ -40,4 +41,5 @@ RecipeMLImporter::RecipeMLImporter( cons
                 }
 
+                /* I guess we won't make the doctype tag necessary.  I've found \
several RecipeML files without one.  if (doc.doctype().name() != "recipeml")
                 {
@@ -45,5 +47,5 @@ RecipeMLImporter::RecipeMLImporter( cons
                         setErrorMsg( i18n("This file does not appear to be a valid \
RecipeML archive.") );  return;
-                }
+                } */
 
                 QDomElement recipeml = doc.documentElement();
@@ -190,5 +192,5 @@ void RecipeMLImporter::readRecipemlIng(c
 
                                 if (amtChild.tagName() == "qty")
-                                        quantity = amtChild.text().toDouble();
+                                        quantity = \
MixedNumber::fromString(amtChild.text()).toDouble();  else if (amtChild.tagName() == \
                "unit")
                                         unit = amtChild.text().stripWhiteSpace();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic