Changeset View
Changeset View
Standalone View
Standalone View
src/backends/qalculate/qalculateexpression.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 104 | { | |||
---|---|---|---|---|---|
112 | setStatus(Cantor::Expression::Done); | 112 | setStatus(Cantor::Expression::Done); | ||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | 115 | | |||
116 | void QalculateExpression::updateVariables() | 116 | void QalculateExpression::updateVariables() | ||
117 | { | 117 | { | ||
118 | QalculateSession* currentSession = dynamic_cast<QalculateSession*>(session()); | 118 | QalculateSession* currentSession = dynamic_cast<QalculateSession*>(session()); | ||
119 | QMap<QString,QString> &variables = currentSession->variables; | 119 | QMap<QString,QString> &variables = currentSession->variables; | ||
120 | Cantor::DefaultVariableModel* model = static_cast<Cantor::DefaultVariableModel*>(currentSession->variableModel()); | | |||
121 | QMap<QString, QString>::const_iterator it = variables.constBegin(); | 120 | QMap<QString, QString>::const_iterator it = variables.constBegin(); | ||
122 | while (it != variables.constEnd()) { | 121 | while (it != variables.constEnd()) { | ||
123 | model->addVariable(it.key(), it.value()); | 122 | currentSession->variableModel()->addVariable(it.key(), it.value()); | ||
124 | ++it; | 123 | ++it; | ||
125 | } | 124 | } | ||
126 | } | 125 | } | ||
127 | 126 | | |||
128 | void QalculateExpression::parseError(QString& error) | 127 | void QalculateExpression::parseError(QString& error) | ||
129 | { | 128 | { | ||
130 | error.remove(QLatin1String(">")); | 129 | error.remove(QLatin1String(">")); | ||
131 | error = error.trimmed(); | 130 | error = error.trimmed(); | ||
▲ Show 20 Lines • Show All 753 Lines • Show Last 20 Lines |