From 1f0a5d513f5b94987036c1caa5d55b427c8a496e Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 24 Oct 2024 13:10:28 +0200 Subject: [PATCH] use TransferBack --- .../settings/qgssettingseditorwidgetregistry.sip.in | 2 +- .../settings/qgssettingseditorwidgetwrapper.sip.in | 4 ++-- .../settings/qgssettingseditorwidgetregistry.sip.in | 2 +- .../settings/qgssettingseditorwidgetwrapper.sip.in | 4 ++-- src/gui/settings/qgssettingseditorwidgetregistry.h | 2 +- src/gui/settings/qgssettingseditorwidgetwrapper.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in b/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in index deb66a55e3ca..b3af58e91d98 100644 --- a/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in +++ b/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in @@ -46,7 +46,7 @@ Adds an editor widget ``wrapper`` for a specific setting to the registry Returns a new instance of the editor widget for the given ``id`` %End - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = 0 ) const /KeepReference/; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = 0 ) const /TransferBack/; %Docstring Creates an editor widget for the given ``setting`` using the corresponding registered wrapper %End diff --git a/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in b/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in index dc68112f01de..7e6bbe1faaa9 100644 --- a/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in +++ b/python/PyQt6/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in @@ -49,7 +49,7 @@ This id of the type of settings it handles Creates a new instance of the editor wrapper so it can be configured for a widget and a setting %End - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = 0 ) /KeepReference/; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = 0 ) /TransferBack/; %Docstring Creates the editor widget for the given ``setting`` %End @@ -106,7 +106,7 @@ Returns the dynamic key parts protected: - virtual QWidget *createEditorPrivate( QWidget *parent = 0 ) const = 0 /KeepReference,Factory/; + virtual QWidget *createEditorPrivate( QWidget *parent = 0 ) const = 0 /TransferBack/; %Docstring Creates the widgets %End diff --git a/python/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in b/python/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in index deb66a55e3ca..b3af58e91d98 100644 --- a/python/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in +++ b/python/gui/auto_generated/settings/qgssettingseditorwidgetregistry.sip.in @@ -46,7 +46,7 @@ Adds an editor widget ``wrapper`` for a specific setting to the registry Returns a new instance of the editor widget for the given ``id`` %End - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = 0 ) const /KeepReference/; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = 0 ) const /TransferBack/; %Docstring Creates an editor widget for the given ``setting`` using the corresponding registered wrapper %End diff --git a/python/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in b/python/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in index dc68112f01de..7e6bbe1faaa9 100644 --- a/python/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in +++ b/python/gui/auto_generated/settings/qgssettingseditorwidgetwrapper.sip.in @@ -49,7 +49,7 @@ This id of the type of settings it handles Creates a new instance of the editor wrapper so it can be configured for a widget and a setting %End - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = 0 ) /KeepReference/; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = 0 ) /TransferBack/; %Docstring Creates the editor widget for the given ``setting`` %End @@ -106,7 +106,7 @@ Returns the dynamic key parts protected: - virtual QWidget *createEditorPrivate( QWidget *parent = 0 ) const = 0 /KeepReference,Factory/; + virtual QWidget *createEditorPrivate( QWidget *parent = 0 ) const = 0 /TransferBack/; %Docstring Creates the widgets %End diff --git a/src/gui/settings/qgssettingseditorwidgetregistry.h b/src/gui/settings/qgssettingseditorwidgetregistry.h index f0ad0372ff52..d42be8b12308 100644 --- a/src/gui/settings/qgssettingseditorwidgetregistry.h +++ b/src/gui/settings/qgssettingseditorwidgetregistry.h @@ -55,7 +55,7 @@ class GUI_EXPORT QgsSettingsEditorWidgetRegistry QgsSettingsEditorWidgetWrapper *createWrapper( const QString &id, QObject *parent ) const SIP_FACTORY; //! Creates an editor widget for the given \a setting using the corresponding registered wrapper - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = nullptr ) const SIP_KEEPREFERENCE; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList, QWidget *parent = nullptr ) const SIP_TRANSFERBACK; private: QMap mWrappers; diff --git a/src/gui/settings/qgssettingseditorwidgetwrapper.h b/src/gui/settings/qgssettingseditorwidgetwrapper.h index 67bcc0fcc3df..2561385cfc27 100644 --- a/src/gui/settings/qgssettingseditorwidgetwrapper.h +++ b/src/gui/settings/qgssettingseditorwidgetwrapper.h @@ -53,7 +53,7 @@ class GUI_EXPORT QgsSettingsEditorWidgetWrapper : public QObject virtual QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const = 0 SIP_FACTORY; //! Creates the editor widget for the given \a setting - QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = nullptr ) SIP_KEEPREFERENCE; + QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = nullptr ) SIP_TRANSFERBACK; //! Configures the \a editor according the setting bool configureEditor( QWidget *editor, const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList() ); @@ -103,7 +103,7 @@ class GUI_EXPORT QgsSettingsEditorWidgetWrapper : public QObject protected: //! Creates the widgets - virtual QWidget *createEditorPrivate( QWidget *parent = nullptr ) const = 0 SIP_KEEPREFERENCE SIP_FACTORY; + virtual QWidget *createEditorPrivate( QWidget *parent = nullptr ) const = 0 SIP_TRANSFERBACK; //! Configures an existing \a editor widget virtual bool configureEditorPrivate( QWidget *editor SIP_TRANSFERBACK, const QgsSettingsEntryBase *setting SIP_KEEPREFERENCE ) = 0;