MCPcopy Create free account
hub / github.com/LMMS/lmms / hasModel

Method hasModel

src/core/Controller.cpp:250–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248
249
250bool Controller::hasModel( const Model * m )
251{
252 QObjectList chldren = children();
253 for( int i = 0; i < chldren.size(); ++i )
254 {
255 QObject * c = chldren.at(i);
256 AutomatableModel * am = qobject_cast<AutomatableModel*>(c);
257 if( am != NULL )
258 {
259 if( am == m )
260 {
261 return true;
262 }
263
264 ControllerConnection * cc = am->controllerConnection();
265 if( cc != NULL )
266 {
267 if( cc->getController()->hasModel( m ) )
268 {
269 return true;
270 }
271 }
272 }
273 }
274
275 return false;
276}
277
278
279

Callers 1

selectControllerMethod · 0.80

Calls 2

getControllerMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected