aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Semke <alexander.semke@web.de>2016-11-06 19:20:03 (GMT)
committerAlexander Semke <alexander.semke@web.de>2016-11-06 19:22:01 (GMT)
commit0dd2b9672369ebda020993fb2f583fe6c3c6f865 (patch)
tree0d0768190d39d1b3f51542547d006ade1621bcdb
parent3ef0e7ba639622d4f9e613043bb99adde5c19d05 (diff)
Remove line breaks in maxima's lists with many elements.
BUG: 363916 FIXED-IN: 16.12
-rw-r--r--src/backends/maxima/maximavariablemodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backends/maxima/maximavariablemodel.cpp b/src/backends/maxima/maximavariablemodel.cpp
index 41be83f..a87ebb4 100644
--- a/src/backends/maxima/maximavariablemodel.cpp
+++ b/src/backends/maxima/maximavariablemodel.cpp
@@ -42,8 +42,6 @@ MaximaVariableModel::~MaximaVariableModel()
}
-
-
void MaximaVariableModel::checkForNewVariables()
{
qDebug()<<"checking for new variables";
@@ -81,7 +79,6 @@ QList<Cantor::DefaultVariableModel::Variable> parse(MaximaExpression* expr)
return QList<Cantor::DefaultVariableModel::Variable>();
}
-
qDebug()<<"got "<<text;
const int nameIndex=text.indexOf(QLatin1Char(']'));
@@ -114,11 +111,14 @@ QList<Cantor::DefaultVariableModel::Variable> parse(MaximaExpression* expr)
Cantor::DefaultVariableModel::Variable var;
var.name=variableNames.at(i);;
if(variableValues.size()>i)
+ {
var.value=variableValues.at(i).trimmed();
+ var.value=var.value.remove(QLatin1String("\n")); //lists with many elements have line breaks, remove them
+ }
else
var.value=QLatin1String("unknown");
- variables<<var;
+ variables<<var;
}
return variables;