[Marble-commits] branches/KDE/4.6/kdeedu/marble/src/plugins/positionprovider/gpsd
Dennis Nienhüser
earthwings at gentoo.org
Thu Jan 27 21:23:32 CET 2011
SVN commit 1217548 by nienhueser:
Work around gpsmm parsing gpsd output (C locale) with current locale.
BUG: 262330
REVIEW: 6327
FIXED-IN: 4.6.1
Backport of commit 1217540.
M +8 -0 GpsdConnection.cpp
M +3 -0 GpsdConnection.h
--- branches/KDE/4.6/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp #1217547:1217548
@@ -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();
--- branches/KDE/4.6/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.h #1217547:1217548
@@ -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