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

List:       kde-commits
Subject:    [analitza/aucahuasi/matrixctrs] analitza: When calculated a builtmethod, if it returns an expression
From:       Percy_Camilo_Triveño_Aucahuasi <percy.camilo.ta () gmail ! com>
Date:       2014-05-01 0:13:53
Message-ID: E1WfedN-0000lm-0v () scm ! kde ! org
[Download RAW message or body]

Git commit 2fb3337e698cabef89ea2735f7aa2a302a914cfe by Percy Camilo Triveño \
Aucahuasi. Committed on 30/04/2014 at 04:25.
Pushed by aucahuasi into branch 'aucahuasi/matrixctrs'.

When calculated a builtmethod, if it returns an expression with errors, then the user \
doesn't have to print anything. Since we have an error state in Analyzer, then (to \
have uniform behaviour) we will print an empty string instead of 0. This way, if we \
have an error and the user prints the calculated result (by a bad use of API) then we \
will show an empty string instead of 0 (0 can't be understood as a computation, \
basically we tend to avoid misunderstandings in the use of API)

M  +1    -1    analitza/analyzer.cpp

http://commits.kde.org/analitza/2fb3337e698cabef89ea2735f7aa2a302a914cfe

diff --git a/analitza/analyzer.cpp b/analitza/analyzer.cpp
index f07e7d7..3646d3b 100644
--- a/analitza/analyzer.cpp
+++ b/analitza/analyzer.cpp
@@ -1046,7 +1046,7 @@ Object* Analyzer::calcCallFunction(Container* function, const \
QVector<Object*>&  exp.setTree(0);
 		} else {
 			m_err += exp.error();
-			ret = new Cn;
+			ret = new Container(Container::math);
 		}
 	}
 #ifdef SCRIPT_PROFILER


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

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