D21212: Remove DBus from Python backend

Alexander Semke noreply at phabricator.kde.org
Sun Jun 2 18:02:14 BST 2019


asemke added inline comments.

INLINE COMMENTS

> pythonservermain.cpp:102
> +            if (ok)
> +                result = server.variables(val) + unitSep + QString();
> +            else

QString() is obsolete here.

> pythonservermain.cpp:104
> +            else
> +                result = QString() + unitSep + QLatin1String("Invalid argument %1 for 'model' command", val);
> +            result += QLatin1Char(messageEnd);

QString() is obsolete here.

> pythonservermain.cpp:117
> +    QCoreApplication app(argc, argv);
> +    appRef = &app;
> +

Qt has already qApp.

> pythonsession.cpp:222
>  
> -QString PythonSession::getError() const
> -{
> -    // TODO: T6113, T6114
> -    const QDBusReply<QString>& reply = m_pIface->call(QString::fromLatin1("getError"));
> -    if (reply.isValid())
> -        return reply.value();
> +    for (const QString message: packages)
> +    {

const QString&?

> pythonsession.h:53
>    private:
> -    PythonVariableModel* m_variableModel;
> -
> -    QList<PythonExpression*> m_runningExpressions;
> -    PythonExpression* m_currentExpression;
> -
> -    QDBusInterface* m_pIface;
> -    KProcess* m_pProcess;
> +    KProcess* m_process;
>      QString serverName;

KProcess or QProcess?

> pythonvariablemodel.cpp:70
> +                {
> +                    const QString& name = record.section(QChar(17), 0, 0);
> +                    const QString& value = record.section(QChar(17), 1, 1);

Please add some comments for the number 17 here.

> pythonvariablemodel.h:38
>    private:
> -    QDBusInterface* m_pIface;
> +    Cantor::Expression* m_expression;
> +

c++11 support the initialization in the header. Let's start using it for every new code:

  Cantor::Expression* m_expression{nullptr};

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/20190602/20d0b56e/attachment-0001.html>


More information about the kde-edu mailing list