mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Fix build with WITH_BINDINGS=yes and WITH_QTSERIALPORT=no
auto_generated/sensor/qgsabstractsensor.sip: In function ‘const sipTypeDef* sipSubClass_QgsAbstractSensor(void**)’: auto_generated/sensor/qgsabstractsensor.sip:35: error: ‘QgsSerialPortSensor’ does not name a type; did you mean ‘sipName_QgsSerialPortSensor’?
This commit is contained in:
parent
7df22c4d1e
commit
ecdb1e2989
@ -170,6 +170,10 @@ if(NOT WITH_GUI)
|
||||
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_GUI)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_QTSERIALPORT)
|
||||
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_QTSERIALPORT)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/core/project.py.in ${CMAKE_CURRENT_BINARY_DIR}/core/project.py @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/core/pyproject.toml.in ${CMAKE_CURRENT_BINARY_DIR}/core/pyproject.toml @ONLY)
|
||||
GENERATE_SIP_PYTHON_MODULE_CODE(qgis._core core/core.sip "${sip_files_core}" cpp_files)
|
||||
|
@ -32,10 +32,12 @@ An abstract base class for sensor classes
|
||||
{
|
||||
sipType = sipType_QgsUdpSocketSensor;
|
||||
}
|
||||
#if defined( HAVE_QTSERIALPORT )
|
||||
else if ( item->type() == QLatin1String( "serial_port" ) && dynamic_cast<QgsSerialPortSensor *>( item ) != NULL )
|
||||
{
|
||||
sipType = sipType_QgsSerialPortSensor;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
sipType = sipType_QgsAbstractSensor;
|
||||
|
@ -184,6 +184,7 @@ Sets the ``port`` the socket connects to.
|
||||
|
||||
};
|
||||
|
||||
%If (HAVE_QTSERIALPORT)
|
||||
|
||||
class QgsSerialPortSensor : QgsIODeviceSensor
|
||||
{
|
||||
@ -239,6 +240,7 @@ Sets the serial port the sensor connects to.
|
||||
|
||||
|
||||
};
|
||||
%End
|
||||
|
||||
|
||||
|
||||
|
@ -100,6 +100,7 @@ done:
|
||||
%Import QtPositioning/QtPositioningmod.sip
|
||||
|
||||
%Feature HAVE_GUI
|
||||
%Feature HAVE_QTSERIALPORT
|
||||
%Feature ANDROID
|
||||
%Feature VECTOR_MAPPED_TYPE
|
||||
|
||||
|
@ -50,10 +50,12 @@ class CORE_EXPORT QgsAbstractSensor : public QObject
|
||||
{
|
||||
sipType = sipType_QgsUdpSocketSensor;
|
||||
}
|
||||
#if defined( HAVE_QTSERIALPORT )
|
||||
else if ( item->type() == QLatin1String( "serial_port" ) && dynamic_cast<QgsSerialPortSensor *>( item ) != NULL )
|
||||
{
|
||||
sipType = sipType_QgsSerialPortSensor;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
sipType = sipType_QgsAbstractSensor;
|
||||
|
@ -220,6 +220,7 @@ class CORE_EXPORT QgsUdpSocketSensor : public QgsIODeviceSensor
|
||||
};
|
||||
|
||||
#if defined( HAVE_QTSERIALPORT )
|
||||
SIP_IF_FEATURE( HAVE_QTSERIALPORT )
|
||||
|
||||
/**
|
||||
* \ingroup core
|
||||
@ -279,6 +280,7 @@ class CORE_EXPORT QgsSerialPortSensor : public QgsIODeviceSensor
|
||||
QString mPortName;
|
||||
|
||||
};
|
||||
SIP_END
|
||||
#endif
|
||||
|
||||
#endif //QGSIODEVICESENSOR_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user