@@ -38,10 +38,11 @@ QList< QPair<QString, QString> > QgsGPSDetector::availablePorts()
38
38
#if defined(HAVE_QT_MOBILITY_LOCATION ) || defined(QT_POSITIONING_LIB)
39
39
devs << QPair<QString, QString>( " internalGPS" , tr ( " internal GPS" ) );
40
40
#endif
41
+
41
42
// try local gpsd first
42
43
devs << QPair<QString, QString>( " localhost:2947:" , tr ( " local gpsd" ) );
43
44
44
- #ifdef linux
45
+ #ifdef Q_OS_LINUX
45
46
// look for linux serial devices
46
47
foreach ( QString linuxDev, QStringList () << " /dev/ttyS%1" << " /dev/ttyUSB%1" << " /dev/rfcomm%1" << " /dev/ttyACM%1" )
47
48
{
@@ -55,7 +56,7 @@ QList< QPair<QString, QString> > QgsGPSDetector::availablePorts()
55
56
}
56
57
#endif
57
58
58
- #ifdef __FreeBSD__ // freebsd
59
+ #ifdef Q_OS_FREEBSD
59
60
// and freebsd devices (untested)
60
61
foreach ( QString freebsdDev, QStringList () << " /dev/cuaa%1" << " /dev/ucom%1" )
61
62
{
@@ -69,7 +70,7 @@ QList< QPair<QString, QString> > QgsGPSDetector::availablePorts()
69
70
}
70
71
#endif
71
72
72
- #ifdef sparc
73
+ #ifdef Q_OS_SOLARIS
73
74
// and solaris devices (also untested)
74
75
QString solarisDev ( " /dev/cua/%1" );
75
76
for ( char i = ' a' ; i < ' k' ; ++i )
@@ -161,7 +162,6 @@ void QgsGPSDetector::advance()
161
162
qWarning ( " QT_MOBILITY_LOCATION not found and mPortList matches internalGPS, this should never happen" );
162
163
#endif
163
164
}
164
-
165
165
else
166
166
{
167
167
QextSerialPort *serial = new QextSerialPort ( mPortList [ mPortIndex ].first , QextSerialPort::EventDriven );
0 commit comments