D24006: Remove the usage of "null backend"

Nikita Sirgienko noreply at phabricator.kde.org
Tue Sep 17 11:11:57 BST 2019


sirgienko requested changes to this revision.
sirgienko added a comment.
This revision now requires changes to proceed.


    QDEBUG : WorksheetTest::testMathRender() PythonSession(0x5637c2e29f80) Cantor::VariableManagementExtension(0x5637c272c020, name = "VariableManagementExtension")
    QDEBUG : WorksheetTest::testMathRender() PythonHighlighter constructor
    FAIL!  : WorksheetTest::testMathRender() Compared values are not the same
       Actual   (rendered): 0
       Expected (true)    : 1
       Loc: [/home/mmmm1998/Документы/Репозитории/cantor/src/test/worksheet_test.cpp(6887)]
    QDEBUG : WorksheetTest::testMathRender2() PythonSession(0x5637c3250fb0) Cantor::VariableManagementExtension(0x5637c272c020, name = "VariableManagementExtension")
    QDEBUG : WorksheetTest::testMathRender2() PythonHighlighter constructor
    FAIL!  : WorksheetTest::testMathRender2() Compared values are not the same
       Actual   (rendered): 0
       Expected (true)    : 1
       Loc: [/home/mmmm1998/Документы/Репозитории/cantor/src/test/worksheet_test.cpp(6920)]
  
  I don't fully understand, why the math render tests start to fail, but this occurs only with this patch, so the reason is the patch, i think.
  So, we need additional work on this patch.

INLINE COMMENTS

> cantor.cpp:188
>  {
> -    if (sender()->inherits("QAction"))
> +    QAction* a = dynamic_cast<QAction*>(sender());
> +    const QString& backendName = a->data().toString();

`dynamic_cast` without pointer validation - bad practise. Better use `static_cast` or check the poiter

REPOSITORY
  R55 Cantor

REVISION DETAIL
  https://phabricator.kde.org/D24006

To: asemke, sirgienko, filipesaraiva
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190917/bd8c9ec0/attachment.html>


More information about the kde-edu mailing list