Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix cmake var name
  • Loading branch information
3nids committed Jan 25, 2023
1 parent e3a0299 commit 980667a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .docker/docker-qgis-build.sh
Expand Up @@ -112,7 +112,7 @@ cmake \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=${WITH_QT5} \
-DWITH_ORACLE=${WITH_QT5} \
-DWITH_PDAL=ON \
-DWITH_QT5SERIALPORT=ON \
-DWITH_QTSERIALPORT=ON \
-DWITH_QTWEBKIT=${WITH_QT5} \
-DWITH_OAUTH2_PLUGIN=${WITH_QT5} \
-DORACLE_INCLUDEDIR=/instantclient_19_9/sdk/include/ \
Expand Down
2 changes: 1 addition & 1 deletion cmake_templates/qgsconfig.h.in
Expand Up @@ -94,7 +94,7 @@

#cmakedefine HAVE_QUICK

#cmakedefine HAVE_QT5SERIALPORT
#cmakedefine HAVE_QTSERIALPORT

#cmakedefine HAVE_STATIC_PROVIDERS

Expand Down
10 changes: 5 additions & 5 deletions src/core/gps/qgsgpsdetector.cpp
Expand Up @@ -23,7 +23,7 @@
#include "qgssettings.h"
#include "qgssettingsentryenumflag.h"

#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
const QgsSettingsEntryEnumFlag<QSerialPort::FlowControl> *QgsGpsDetector::settingsGpsFlowControl = new QgsSettingsEntryEnumFlag<QSerialPort::FlowControl>( QStringLiteral( "flow-control" ), QgsSettings::sTreeGps, QSerialPort::NoFlowControl );
const QgsSettingsEntryEnumFlag<QSerialPort::StopBits> *QgsGpsDetector::settingsGpsStopBits = new QgsSettingsEntryEnumFlag<QSerialPort::StopBits>( QStringLiteral( "stop-bits" ), QgsSettings::sTreeGps, QSerialPort::OneStop );
const QgsSettingsEntryEnumFlag<QSerialPort::DataBits> *QgsGpsDetector::settingsGpsDataBits = new QgsSettingsEntryEnumFlag<QSerialPort::DataBits>( QStringLiteral( "data-bits" ), QgsSettings::sTreeGps, QSerialPort::Data8 );
Expand All @@ -39,7 +39,7 @@ const QgsSettingsEntryEnumFlag<QSerialPort::Parity> *QgsGpsDetector::settingsGps
#include <QFileInfo>
#include <QTimer>

#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
#include <QSerialPortInfo>
#include <QSerialPort>
#endif
Expand All @@ -57,7 +57,7 @@ QList< QPair<QString, QString> > QgsGpsDetector::availablePorts()
devs << QPair<QString, QString>( QStringLiteral( "localhost:2947:" ), tr( "local gpsd" ) );

// try serial ports
#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
for ( const QSerialPortInfo &p : QSerialPortInfo::availablePorts() )
{
devs << QPair<QString, QString>( p.portName(), tr( "%1: %2" ).arg( p.portName(), p.description() ) );
Expand All @@ -69,7 +69,7 @@ QList< QPair<QString, QString> > QgsGpsDetector::availablePorts()

QgsGpsDetector::QgsGpsDetector( const QString &portName )
{
#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
mBaudList << QSerialPort::Baud4800 << QSerialPort::Baud9600 << QSerialPort::Baud38400 << QSerialPort::Baud57600 << QSerialPort::Baud115200; //add 57600 for SXBlueII GPS unit
#endif

Expand Down Expand Up @@ -127,7 +127,7 @@ void QgsGpsDetector::advance()
}
else
{
#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
std::unique_ptr< QSerialPort > serial = std::make_unique< QSerialPort >( mPortList.at( mPortIndex ).first );

serial->setBaudRate( mBaudList[ mBaudIndex ] );
Expand Down
4 changes: 2 additions & 2 deletions src/core/gps/qgsgpsdetector.h
Expand Up @@ -21,7 +21,7 @@
#include <QObject>
#include <QList>
#include <QPair>
#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
#include <QSerialPort>
#endif
#include <memory>
Expand All @@ -47,7 +47,7 @@ class CORE_EXPORT QgsGpsDetector : public QObject
public:
QgsGpsDetector( const QString &portName );

#if defined( HAVE_QT5SERIALPORT )
#if defined( HAVE_QTSERIALPORT )
static const QgsSettingsEntryEnumFlag<QSerialPort::StopBits> *settingsGpsStopBits SIP_SKIP;
static const QgsSettingsEntryEnumFlag<QSerialPort::DataBits> *settingsGpsDataBits SIP_SKIP;
static const QgsSettingsEntryEnumFlag<QSerialPort::Parity> *settingsGpsParity SIP_SKIP;
Expand Down

0 comments on commit 980667a

Please sign in to comment.