[Marble-commits] branches/KDE/4.6/kdeedu/marble/src [POSSIBLY UNSAFE]
Dennis Nienhüser
earthwings at gentoo.org
Thu Dec 23 16:41:17 CET 2010
SVN commit 1208875 by nienhueser:
Initialize measurement system in the qt application. Fixes wrong distance unit being shown in the mapscale float item and the toolbar. Note that you need to remove a previous View/distanceUnit config entry for this to take effect.
Backport of commit 1208796.
M +5 -0 qtmain.cpp [POSSIBLY UNSAFE: system]
--- branches/KDE/4.6/kdeedu/marble/src/qtmain.cpp #1208874:1208875
@@ -21,6 +21,7 @@
#include "MarbleDirs.h"
#include "MarbleDebug.h"
#include "MarbleTest.h"
+#include "MarbleLocale.h"
#ifdef STATIC_BUILD
#include <QtCore/QtPlugin>
@@ -120,6 +121,10 @@
}
MarbleGlobal::getInstance()->setProfiles( profiles );
+ QLocale::MeasurementSystem const measurement = QLocale::system().measurementSystem();
+ Marble::MeasureSystem const marbleMeasurement = measurement == QLocale::ImperialSystem ? Marble::Imperial : Marble::Metric;
+ MarbleGlobal::getInstance()->locale()->setMeasureSystem( marbleMeasurement );
+
MainWindow *window = new MainWindow( marbleDataPath );
window->setAttribute( Qt::WA_DeleteOnClose, true );
More information about the Marble-commits
mailing list