diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index 31abc348159..21a3705b46b 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -544,7 +544,10 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in #if (WITH_QWTPOLAR) if ( mStackedWidget->currentIndex() == 2 && info.satInfoComplete ) //satellites { - qDeleteAll( mMarkerList ); + while ( !mMarkerList.isEmpty() ) + { + delete mMarkerList.takeFirst(); + } } //satellites #endif if ( mStackedWidget->currentIndex() == 4 ) //debug diff --git a/src/core/gps/qgsgpsdetector.cpp b/src/core/gps/qgsgpsdetector.cpp index 852cd5b8c2e..9d56b1a56cf 100644 --- a/src/core/gps/qgsgpsdetector.cpp +++ b/src/core/gps/qgsgpsdetector.cpp @@ -38,10 +38,11 @@ QList< QPair > QgsGPSDetector::availablePorts() #if defined(HAVE_QT_MOBILITY_LOCATION ) || defined(QT_POSITIONING_LIB) devs << QPair( "internalGPS", tr( "internal GPS" ) ); #endif + // try local gpsd first devs << QPair( "localhost:2947:", tr( "local gpsd" ) ); -#ifdef linux +#ifdef Q_OS_LINUX // look for linux serial devices foreach ( QString linuxDev, QStringList() << "/dev/ttyS%1" << "/dev/ttyUSB%1" << "/dev/rfcomm%1" << "/dev/ttyACM%1" ) { @@ -55,7 +56,7 @@ QList< QPair > QgsGPSDetector::availablePorts() } #endif -#ifdef __FreeBSD__ // freebsd +#ifdef Q_OS_FREEBSD // and freebsd devices (untested) foreach ( QString freebsdDev, QStringList() << "/dev/cuaa%1" << "/dev/ucom%1" ) { @@ -69,7 +70,7 @@ QList< QPair > QgsGPSDetector::availablePorts() } #endif -#ifdef sparc +#ifdef Q_OS_SOLARIS // and solaris devices (also untested) QString solarisDev( "/dev/cua/%1" ); for ( char i = 'a'; i < 'k'; ++i ) @@ -161,7 +162,6 @@ void QgsGPSDetector::advance() qWarning( "QT_MOBILITY_LOCATION not found and mPortList matches internalGPS, this should never happen" ); #endif } - else { QextSerialPort *serial = new QextSerialPort( mPortList[ mPortIndex ].first, QextSerialPort::EventDriven );