It would be better if it took the view id as a parameter, like this:
void MirSurface::registerView(qintptr viewId)
That way MirSurfaceItem could simply do:
m_surface->registerView((qintptr)this);
and not have to bother storing any id at all. Afterall, MirSurface::m_views is already storing them. So no need to store on both ends.
Sorry, I should have clarified that when you sent me http://pastebin.ubuntu.com/12773655/. I thought had you simply overlooked the missing parameter in that draft (and I didn't notice it was returning an int).
""" :registerView( )
+int MirSurface:
"""
It would be better if it took the view id as a parameter, like this: :registerView( qintptr viewId)
void MirSurface:
That way MirSurfaceItem could simply do: >registerView( (qintptr) this);
m_surface-
and not have to bother storing any id at all. Afterall, MirSurface::m_views is already storing them. So no need to store on both ends.
Sorry, I should have clarified that when you sent me http:// pastebin. ubuntu. com/12773655/. I thought had you simply overlooked the missing parameter in that draft (and I didn't notice it was returning an int).