[Marble-devel] Re: Review Request: Move painting methods from MarbleModel to MarbleMap

Dennis Nienhüser earthwings at gentoo.org
Wed Nov 24 21:43:33 CET 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5902/#review8966
-----------------------------------------------------------


Some of my comments may address code that was just moved, not added.
Do you plan to commit that to 4.6 or 4.7?
I haven't tested the code yet, will do that tomorrow.


/trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h
<http://svn.reviewboard.kde.org/r/5902/#comment9685>

    Preferably returning a pointer to a const object -- or the method shouldn't be const



/trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp
<http://svn.reviewboard.kde.org/r/5902/#comment9686>

    Is it safe with that little error checking? index may be invalid, internal pointer null, dynamic_cast may return 0. I'd prefer some Q_ASSERTs at least.



/trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp
<http://svn.reviewboard.kde.org/r/5902/#comment9687>

    Must be initialized. Not all code paths of propertyValue() ensure that the value is set, so you may end up using them unitialized later.
    



/trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp
<http://svn.reviewboard.kde.org/r/5902/#comment9688>

    What's the reason to use the timer here? Any threads involved?



/trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h
<http://svn.reviewboard.kde.org/r/5902/#comment9689>

    Foo const * const() or Foo * () as above



/trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h
<http://svn.reviewboard.kde.org/r/5902/#comment9690>

    Foo const * const() or Foo * () as above


- Dennis


On 2010-11-19 16:07:35, Bernhard Beschow wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5902/
> -----------------------------------------------------------
> 
> (Updated 2010-11-19 16:07:35)
> 
> 
> Review request for marble.
> 
> 
> Summary
> -------
> 
> Motivation
> ==========
> 
> The whole painting should be implemented in the view rather than in the model because it decouples data and its representation. This allows for having different graphics backends (hello OpenGL!) while having a common interface to the data.
> 
> 
> Implementation
> ==============
> 
> MarbleMap is now the owner of all painting objects, e.g. the MeasureTool, a new TextureLayer class, the LayerManager, and others. To see all painting objects owned by MarbleMap, see the modified MarbleMap_p.h.
> 
> Since the LayerManager object is now owned by MarbleMap, the layer-relevant methods, slots, and signals (such as addLayer(), removeLayer(), renderPluginsInitialized()) are now forwarded by MarbleMap and Marblewidget rather than by MarbleModel.
> 
> The DownloadRegionDialog has been modified to take a MarbleWidget instead of a MarbleModel. I wonder if it makes more sense to take a MarbleMap here.
> 
> Please test if the patch works for you as well. Since the patch changes some initializaton orders in the constructors and some re-initialization orders on theme change, it is important to test these code paths more extensively.
> 
> If you see that the patch violates some assumptions/invariants, please report as well.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdeedu/marble/src/ControlView.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleMap_p.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleModel.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetPopupMenu.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/PlacemarkLayout.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.h 1198738 
>   /trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/marble_part.cpp 1198738 
>   /trunk/KDE/kdeedu/marble/src/plasmoid/worldclock.cpp 1198738 
> 
> Diff: http://svn.reviewboard.kde.org/r/5902/diff
> 
> 
> Testing
> -------
> 
> Works for me using the KDE version in the majority of cases.
> 
> 
> Thanks,
> 
> Bernhard
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/marble-devel/attachments/20101124/edb5e512/attachment.htm 


More information about the Marble-devel mailing list