Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 367571 | Differences between
and this patch

Collapse All | Expand All

(-)kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp (+15 lines)
Lines 18-23 using namespace Marble; Link Here
18
18
19
GpsdConnection::GpsdConnection( QObject* parent )
19
GpsdConnection::GpsdConnection( QObject* parent )
20
    : QObject( parent ),
20
    : QObject( parent ),
21
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
22
      m_gpsd("localhost", DEFAULT_GPSD_PORT),
23
#endif
21
      m_timer( 0 )
24
      m_timer( 0 )
22
{
25
{
23
    connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
26
    connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
Lines 26-32 GpsdConnection::GpsdConnection( QObject* Link Here
26
void GpsdConnection::initialize()
29
void GpsdConnection::initialize()
27
{
30
{
28
    m_timer.stop();
31
    m_timer.stop();
32
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
33
    gps_data_t* data;
34
#else
29
    gps_data_t* data = m_gpsd.open();
35
    gps_data_t* data = m_gpsd.open();
36
#endif
30
    if ( data ) {
37
    if ( data ) {
31
        m_status = PositionProviderStatusAcquiring;
38
        m_status = PositionProviderStatusAcquiring;
32
        emit statusChanged( m_status );
39
        emit statusChanged( m_status );
Lines 73-80 void GpsdConnection::initialize() Link Here
73
void GpsdConnection::update()
80
void GpsdConnection::update()
74
{
81
{
75
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET )
82
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET )
83
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
84
    if ( m_gpsd.waiting(0) ) {
85
#else
76
    if ( m_gpsd.waiting() ) {
86
    if ( m_gpsd.waiting() ) {
87
#endif
88
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
89
        gps_data_t* data = m_gpsd.read();
90
#else
77
        gps_data_t* data = m_gpsd.poll();
91
        gps_data_t* data = m_gpsd.poll();
92
#endif
78
        if ( data && data->set & PACKET_SET ) {
93
        if ( data && data->set & PACKET_SET ) {
79
            emit gpsdInfo( *data );
94
            emit gpsdInfo( *data );
80
        }
95
        }

Return to bug 367571