View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025525 | Community | OCCT:Application Framework | public | 2014-11-27 16:00 | 2017-05-25 15:23 |
Reporter | Vico Liang | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 6.8.0 | ||||
Target Version | Unscheduled | ||||
Summary | 0025525: TObj_Model shoulde not call its virtual method GetApplication() in constructor. | ||||
Description | Code snippet: TObj_Model::TObj_Model () { myMessenger = GetApplication()->Messenger(); // VICO: Calling virtual method GetApplication(). } const Handle(TObj_Application) TObj_Model::GetApplication() { return TObj_Application::GetInstance(); } | ||||
Steps To Reproduce | Calling virtual method in constructor is not recommended. It might not work as expected. It make user failed to derive TObj_Application even if user overrides the GetApplication() method in TObj_Model. What about removing the codes in constructor? The Messenger can be set after model creation. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-11-27 16:00 | Vico Liang | New Issue | |
2014-11-27 16:00 | Vico Liang | Assigned To | => szy |
2015-12-15 14:06 |
|
Target Version | 7.0.0 => 7.1.0 |
2016-02-17 18:19 |
|
Assigned To | szy => mpv |
2016-10-25 16:10 |
|
Target Version | 7.1.0 => 7.2.0 |
2017-05-25 15:23 |
|
Target Version | 7.2.0 => Unscheduled |