[Marble-devel] Review Request 121875: Tweaking MarbleLocale & adding elevation widget to AnnotationPlugin

Torsten Rahn tackat at kde.org
Wed Jan 7 16:38:10 UTC 2015



> On Jan. 6, 2015, 11:02 nachm., Bernhard Beschow wrote:
> > tests/LocaleTest.cpp, line 77
> > <https://git.reviewboard.kde.org/r/121875/diff/2/?file=338571#file338571line77>
> >
> >     Did you try using QCOMPARE here? According to the documentation [1], qFuzzyCompare() is used for floats and doubles (i.e. qreals), so QCOMPARE should work.
> >     
> >     [1] http://qt-project.org/doc/qt-4.8/qtest.html#QCOMPARE
> 
> Illya Kovalevskyy wrote:
>     qFuzzyCompare works for 10^-8 or smth, but precision of our conversation constants is much much lower. It's around 10^-4 or 10^-4, so I'd like to compare these up to 0.3(3).

There is a QFUZZYCOMPARE macro which allows to specify the precision as a second parameter. Check the tests for the projection classes to see it in action.


> On Jan. 6, 2015, 11:02 nachm., Bernhard Beschow wrote:
> > src/lib/marble/MarbleLocale.cpp, line 54
> > <https://git.reviewboard.kde.org/r/121875/diff/2/?file=338569#file338569line54>
> >
> >     Please pass those by reference. You seem to depend on the existance of those variables anyway.
> 
> Illya Kovalevskyy wrote:
>     (13:33:56) tackat: I don't agree on the reference part
>     (13:37:30) tackat: it's easier to see in the written code that these parameters are supposed to be modified

I disagree on this one. In this case it's better and imho more Qt style to pass the parameters as pointers since this sets these parameters clearly apart as "writable" compared to the others. See e.g. http://qt-project.org/doc/qt-4.8/qcolor.html#getRgb


- Torsten


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121875/#review73308
-----------------------------------------------------------


On Jan. 7, 2015, 1:52 nachm., Illya Kovalevskyy wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121875/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 1:52 nachm.)
> 
> 
> Review request for Marble, Dennis Nienhüser and Torsten Rahn.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> This patch expands MarbleLocale API, so it covers measurement units and also does add elevation widget to annotation plugin.
> 
> Related GCI task: http://www.google-melange.com/gci/task/view/google/gci2014/5879562479075328
> 
> 
> Diffs
> -----
> 
>   src/plugins/render/photo/PhotoPluginModel.cpp 8b85af5 
>   tests/CMakeLists.txt 36ef40b 
>   tests/LocaleTest.cpp PRE-CREATION 
>   src/lib/marble/TourWidget.cpp c837f1d 
>   src/plugins/render/panoramio/PanoramioModel.cpp 439b6b3 
>   src/lib/marble/TourWidget.h 22a3325 
>   src/lib/marble/TourItemDelegate.h 25485a9 
>   src/lib/marble/TourItemDelegate.cpp c4c5b24 
>   CMakeLists.txt ace9a51 
>   src/lib/marble/CMakeLists.txt 807df82 
>   src/lib/marble/EditTextAnnotationDialog.h 4d812f1 
>   src/lib/marble/EditTextAnnotationDialog.cpp f3dd80b 
>   src/lib/marble/ElevationWidget.ui PRE-CREATION 
>   src/lib/marble/MarbleGlobal.h bd7d63f 
>   src/lib/marble/MarbleLocale.h 0b5414b 
>   src/lib/marble/MarbleLocale.cpp 653f69b 
>   src/lib/marble/PlacemarkEditHeader.h 77c8259 
>   src/lib/marble/PlacemarkEditHeader.cpp 9ca61b3 
>   src/lib/marble/PlacemarkEditHeader.ui 606a709 
> 
> Diff: https://git.reviewboard.kde.org/r/121875/diff/
> 
> 
> Testing
> -------
> 
> Positive
> 
> 
> Thanks,
> 
> Illya Kovalevskyy
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20150107/562dbe95/attachment.html>


More information about the Marble-devel mailing list