summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/expression.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-11 16:53:26 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-11 16:53:26 -0600
commitc91e96258b6c127201397dd5309c4433655e63b2 (patch)
tree85682ed6f7056b51a95e85cf1711ffcc74588d34 /kexi/kexidb/expression.cpp
parent5ec453c2580654ef1d9c019964fa3b9cf3c601a9 (diff)
downloadkoffice-c91e96258b6c127201397dd5309c4433655e63b2.tar.gz
koffice-c91e96258b6c127201397dd5309c4433655e63b2.zip
Apply a number of kexi patches
This closes Bug 777
Diffstat (limited to 'kexi/kexidb/expression.cpp')
-rw-r--r--kexi/kexidb/expression.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp
index d9a33b4c..b60cd505 100644
--- a/kexi/kexidb/expression.cpp
+++ b/kexi/kexidb/expression.cpp
@@ -400,13 +400,9 @@ Field::Type BinaryExpr::type()
if (ltInt && rtInt)
return KexiDB::maximumForIntegerTypes(lt, rt);
- if (Field::isFPNumericType(lt) && rtInt)
+ if (Field::isFPNumericType(lt) && (rtInt || lt==rt))
return lt;
- if (Field::isFPNumericType(rt) && ltInt)
- return rt;
- if ((lt==Field::Double || lt==Field::Float) && rtInt)
- return lt;
- if ((rt==Field::Double || rt==Field::Float) && ltInt)
+ if (Field::isFPNumericType(rt) && (ltInt || lt==rt))
return rt;
return Field::Boolean;