[Marble-commits] KDE/kdeedu/marble/src/plugins/positionprovider/gpsd
Dennis Nienhüser
earthwings at gentoo.org
Thu Jan 27 21:19:05 CET 2011
SVN commit 1217540 by nienhueser:
Work around gpsmm parsing gpsd output (C locale) with current locale.
CCBUG: 262330
REVIEW: 6327
M +8 -0 GpsdConnection.cpp
M +3 -0 GpsdConnection.h
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp #1217539:1217540
@@ -13,6 +13,7 @@
#include "MarbleDebug.h"
#include <errno.h>
+#include <clocale>
using namespace Marble;
/* TRANSLATOR Marble::GpsdConnection */
@@ -21,9 +22,16 @@
: QObject( parent ),
m_timer( 0 )
{
+ m_oldLocale = setlocale( LC_NUMERIC, NULL );
+ setlocale( LC_NUMERIC, "C" );
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
}
+GpsdConnection::~GpsdConnection()
+{
+ setlocale( LC_NUMERIC, m_oldLocale );
+}
+
void GpsdConnection::initialize()
{
m_timer.stop();
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.h #1217539:1217540
@@ -28,6 +28,8 @@
public:
GpsdConnection( QObject* parent = 0 );
+ ~GpsdConnection();
+
void initialize();
QString error() const;
@@ -44,6 +46,7 @@
QTimer m_timer;
PositionProviderStatus m_status;
QString m_error;
+ const char* m_oldLocale;
private slots:
void update();
More information about the Marble-commits
mailing list