Xcos MVC: Avoid leaking memory and pass the tests 27/15427/23
authorClément DAVID <clement.david@scilab-enterprises.com>
Wed, 29 Oct 2014 16:37:23 +0000 (17:37 +0100)
committerClément DAVID <clement.david@scilab-enterprises.com>
Mon, 10 Nov 2014 12:41:37 +0000 (13:41 +0100)
commit0d6e2c2c05eeaf88463207afa86f09bf8dd7b817
tree955d6cde61d9b2a199e024fe00c6b1fa269ab15c
parent7060be13796ee010583589e387c95453a421021c
Xcos MVC: Avoid leaking memory and pass the tests

 * Fixed empty 'context' and '*_implicit' properties returning empty string (of size 0)
 * Fixed empty Port signal not returning '0'
 * Use Link constructors to propagate connections on model modification
 * Delete ports on blocks deletion
 * Implement clone() as a copy constructor call
 * All tests pass on valgrind

Change-Id: Ie2a45462c9feb9194dba99f8d47b150b0e5f926c
40 files changed:
scilab/modules/scicos/includes/Controller.hxx
scilab/modules/scicos/includes/adapters_utilities.hxx [new file with mode: 0644]
scilab/modules/scicos/src/cpp/Controller.cpp
scilab/modules/scicos/src/cpp/model/Port.hxx
scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ports_management.hxx
scilab/modules/scicos/tests/unit_tests/model/Annotation.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Annotation.tst
scilab/modules/scicos/tests/unit_tests/model/Block.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Block.tst
scilab/modules/scicos/tests/unit_tests/model/Diagram.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Diagram.tst
scilab/modules/scicos/tests/unit_tests/model/Link.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Link.tst
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.dia.ref
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.tst
scilab/modules/scicos/tests/unit_tests/model/link_preservation.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/link_preservation.tst [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/simple_delete.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/model/simple_delete.tst [new file with mode: 0644]