Slicer: 490-qMRMLSceneHierarchyModel-avoid-extra-scene-lookup 565a2dd7

Author Committer Branch Timestamp Parent
jcfr jcfr 490-qMRMLSceneHierarchyModel-avoid-extra-scene-lookup 2016-05-06 05:03:31 490-qMRMLSceneHierarchyModel-avoid-extra-scene-lookup 07ba895f
Changeset

COMP: qMRMLSceneModel: Fix -Woverloaded-virtual and add comment.

This commit follows up previous commit (PERF: qMRMLSceneModel: track and
reuse index during populateScene).

By introducing the previous commit, loading time of "NAC Brain Atlas 2015"
incluyding 0000776:0001600 nodes was reduced by 0000006:0000008%. Experiment consisted in
[Start Slicer, Load the atlas] three times. Loading time was the one
reported in the log.

It fixes the "-Woverloaded-virtual" warnings by moving the method
"insertNode(vtkMRMLNode*, int)" to the pimpl.

//----------------
In file included from /path/to/Slicer-Release/Slicer-build/Modules/Remote/OpenIGTLinkIF/GUI/moc_qMRMLIGTLIOModel.cxx:9:0:
/path/to/Slicer-Release/Slicer-build/Modules/Remote/OpenIGTLinkIF/GUI/../../../../../OpenIGTLinkIF/GUI/qMRMLIGTLIOModel.h:72:26: warning: by ‘qMRMLIGTLIOModel::insertNode’ [-Woverloaded-virtual]
virtual QStandardItem insertNode(vtkMRMLNode node);
^

             from /path/to/Slicer-Release/OpenIGTLinkIF/GUI/qMRMLIGTLIOModel.cxx:26:

/path/to/Slicer/Libs/MRML/Widgets/qMRMLSceneModel.h:272:26: warning: ‘virtual QStandardItem qMRMLSceneModel::insertNode(vtkMRMLNode, int)’ was hidden [-Woverloaded-virtual]
virtual QStandardItem insertNode(vtkMRMLNode node, int index);
^
In file included from /path/to/Slicer-Release/OpenIGTLinkIF/GUI/qMRMLIGTLIOModel.cxx:26:0:
/path/to/Slicer-Release/OpenIGTLinkIF/GUI/qMRMLIGTLIOModel.h:72:26: warning: by ‘qMRMLIGTLIOModel::insertNode’ [-Woverloaded-virtual]
virtual QStandardItem insertNode(vtkMRMLNode node);
//----------------

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25049 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Widgets/qMRMLSceneModel.cxx Diff File
mod - Libs/MRML/Widgets/qMRMLSceneModel.h Diff File
mod - Libs/MRML/Widgets/qMRMLSceneModel_p.h Diff File