D19095: Adding new Variable models for few backends
Alexander Semke
noreply at phabricator.kde.org
Sun Mar 3 16:26:43 GMT 2019
asemke added inline comments.
INLINE COMMENTS
> rhighlighter.cpp:84
>
> -void RHighlighter::updateHighlighting()
> +void RHighlighter::addUserDefinition(const QStringList& names, QVector<QRegExp>& vector)
> {
can the functions addUserDefinition(), removeUserDefinition(), addUserVariable(), removeUserVariable(), addUserFunction() and removeUserFunction() be moved to the base class DefaultHighlighter?
> rsession.cpp:79
>
> - m_variableModel->clearVariables();
> - m_variables.clear();
> - m_functions.clear();
> + RVariableModel* model = static_cast<RVariableModel*>(variableModel());
> + model->clearVariables();
why do you need to cast here?
> rsession.cpp:134
> RHighlighter *h=new RHighlighter(parent);
> - connect(h,SIGNAL(syntaxRegExps(QVector<QRegExp>&,QVector<QRegExp>&)),this,SLOT(fillSyntaxRegExps(QVector<QRegExp>&,QVector<QRegExp>&)));
> - connect(this,SIGNAL(symbolsChanged()),h,SLOT(refreshSyntaxRegExps()));
> - connect(this,SIGNAL(syntaxRegExpsFilled()), h, SLOT(updateHighlighting()));
> + RVariableModel* model = static_cast<RVariableModel*>(variableModel());
> + connect(model, &Cantor::DefaultVariableModel::variablesAdded, h, &RHighlighter::addUserVariable);
why do you need to cast here?
> juliasession.h:112
> /// Variable management model
> - Cantor::DefaultVariableModel *m_variableModel;
> - static const QRegularExpression typeVariableInfo;
> + JuliaVariableModel *m_variableModel;
> + bool m_needUpdate;
m_variablModel? Why not to use the model from the base class?
> maximasession.cpp:126
> m_process = nullptr;
> - m_variableModel->clear();
> + MaximaVariableModel* model = static_cast<MaximaVariableModel*>(variableModel());
> + model->clearVariables();
why this cast?
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D19095
To: sirgienko, asemke
Cc: kde-edu, asemke, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190303/2e31bfea/attachment-0001.html>
More information about the kde-edu
mailing list