D21212: Remove DBus from Python backend
Alexander Semke
noreply at phabricator.kde.org
Sat May 18 16:14:15 BST 2019
asemke added inline comments.
INLINE COMMENTS
> pythonexpression.cpp:128
> {
> - addResult(new Cantor::ImageResult(QUrl::fromLocalFile(m_tempFile->fileName())));
> + Cantor::ImageResult* newResult = new Cantor::ImageResult(QUrl::fromLocalFile(m_tempFile->fileName()));
> + if (result() == nullptr)
MaximaExpression::imageChanged() has a different logic and implementation. Can we try to unify the handling here?
> pythonexpression.cpp:133
> + {
> + for (int i = 0; i < results().size(); i++)
> + if (results()[i]->type() == newResult->type())
what happens if we have two images from two expressions and they arrive at the wrong order (second image is faster than the first one)?
> pythonservermain.cpp:24
> +#include <QApplication>
> +#include <QTextStream>
> +#include <QTimer>
Are QTextStream and QChar really required in this file?
> pythonsession.cpp:141
> + }
> + foreach (Cantor::Expression* expression, expressionQueue())
> + expression->setStatus(Cantor::Expression::Interrupted);
use c++11 range based loop instead of the foreach macro.
> pythonvariablemodel.cpp:49
>
> - bool variableManagement = static_cast<PythonSession*>(session())->variableManagement();
> - const QString& data = QDBusReply<QString>(m_pIface->call(QString::fromLatin1("variables"), variableManagement)).value();
> - const QStringList& records = data.split(QChar(30), QString::SkipEmptyParts);
> + int variableManagement = static_cast<PythonSession*>(session())->variableManagement();
> + const QString command = QString::fromLatin1("%variables %1").arg(variableManagement);
is this int variable still required in the new code?
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D21212
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/20190518/59e09d61/attachment.html>
More information about the kde-edu
mailing list