[Marble-commits] KDE/kdeedu/marble/src [POSSIBLY UNSAFE]
Dennis Nienhüser
earthwings at gentoo.org
Thu Dec 23 11:24:42 CET 2010
SVN commit 1208796 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.
M +5 -0 qtmain.cpp [POSSIBLY UNSAFE: system]
--- trunk/KDE/kdeedu/marble/src/qtmain.cpp #1208795:1208796
@@ -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