Code review comment for lp:~dandrader/qtmir/improveSessionDebugLogging

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 01/06/2016 09:42, Nick Dedekind wrote:
>> +{
>> >+ auto surfaceList = const_cast<unityapp::MirSurfaceListInterface*>(&surfaceListConst);
> It seems strange to have to const cast, since we shouldn't be modifying the list.
> I notice you have a const get in the qtmir::MirSurfaceModel.
>

unity::shell::application::MirSurfaceListInterface::get is not const.
And that's the class/interface used here, not qtmir::MirSurfaceModel.

That way it works with both ProxySurfaceListModel and MirSurfaceListModel.

But yes, it would be good to have a const version of get() in
unity::shell::application::MirSurfaceListInterface so this cast would
not be needed.

« Back to merge proposal