From 1ccf0587c552cea785c820a9c6949e0bc0044a5f Mon Sep 17 00:00:00 2001 From: Julien Cabieces Date: Mon, 16 Dec 2024 17:07:51 +0100 Subject: [PATCH] build(QSci): fix build when python QSci is missing --- .../auto_generated/editorwidgets/qgsjsoneditwidget.sip.in | 1 + python/PyQt6/gui/gui.sip.in | 5 ++++- python/PyQt6/gui/gui_auto.sip | 2 ++ .../auto_generated/editorwidgets/qgsjsoneditwidget.sip.in | 1 + src/gui/editorwidgets/qgsjsoneditwidget.h | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python/PyQt6/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in b/python/PyQt6/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in index 0bba7cdd1d37..b746d075dc25 100644 --- a/python/PyQt6/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in +++ b/python/PyQt6/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in @@ -9,6 +9,7 @@ + class QgsJsonEditWidget : QWidget { %Docstring(signature="appended") diff --git a/python/PyQt6/gui/gui.sip.in b/python/PyQt6/gui/gui.sip.in index 6c334a7a753f..2e51503ba67a 100644 --- a/python/PyQt6/gui/gui.sip.in +++ b/python/PyQt6/gui/gui.sip.in @@ -12,6 +12,9 @@ ${DEFAULTDOCSTRINGSIGNATURE} %Import QtGui/QtGuimod.sip %Import QtXml/QtXmlmod.sip %Import QtMultimedia/QtMultimediamod.sip -%Import ${QSCI_SIP_MOD_NAME} + +%If (HAVE_QSCI_SIP) + %Import ${QSCI_SIP_MOD_NAME} +%End %Include gui_auto.sip diff --git a/python/PyQt6/gui/gui_auto.sip b/python/PyQt6/gui/gui_auto.sip index aecff104876f..136b33a3e15b 100644 --- a/python/PyQt6/gui/gui_auto.sip +++ b/python/PyQt6/gui/gui_auto.sip @@ -323,7 +323,9 @@ %Include auto_generated/editorwidgets/qgsdefaultsearchwidgetwrapper.sip %Include auto_generated/editorwidgets/qgsdoublespinbox.sip %Include auto_generated/editorwidgets/qgshtmlwidgetwrapper.sip +%If ( HAVE_QSCI_SIP ) %Include auto_generated/editorwidgets/qgsjsoneditwidget.sip +%End %Include auto_generated/editorwidgets/qgsmultiedittoolbutton.sip %Include auto_generated/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.sip %Include auto_generated/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip diff --git a/python/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in b/python/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in index 7c31afdae943..9095f4c82f7d 100644 --- a/python/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in +++ b/python/gui/auto_generated/editorwidgets/qgsjsoneditwidget.sip.in @@ -9,6 +9,7 @@ + class QgsJsonEditWidget : QWidget { %Docstring(signature="appended") diff --git a/src/gui/editorwidgets/qgsjsoneditwidget.h b/src/gui/editorwidgets/qgsjsoneditwidget.h index 23df6db6a8ce..e786093cccda 100644 --- a/src/gui/editorwidgets/qgsjsoneditwidget.h +++ b/src/gui/editorwidgets/qgsjsoneditwidget.h @@ -22,6 +22,8 @@ #include "qgis_sip.h" #include "qgis_gui.h" +SIP_IF_MODULE( HAVE_QSCI_SIP ) + /** * \ingroup gui * \class QgsJsonEditWidget