mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix memory leak and pass ownership of py editor widgets to C++
This commit is contained in:
parent
44bed005f1
commit
f63a01cc7c
@ -44,7 +44,7 @@ class QgsEditorWidgetFactory
|
||||
*
|
||||
* @return A new widget wrapper
|
||||
*/
|
||||
virtual QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldIdx, QWidget* editor, QWidget* parent ) const = 0;
|
||||
virtual QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldIdx, QWidget* editor, QWidget* parent ) const = 0 /Factory/;
|
||||
|
||||
/**
|
||||
* Return The human readable identifier name of this widget type
|
||||
@ -63,7 +63,7 @@ class QgsEditorWidgetFactory
|
||||
*
|
||||
* @return A configuration widget
|
||||
*/
|
||||
virtual QgsEditorConfigWidget* configWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) const = 0;
|
||||
virtual QgsEditorConfigWidget* configWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) const = 0 /Factory/;
|
||||
|
||||
/**
|
||||
* Read the config from an XML file and map it to a proper {@link QgsEditorWidgetConfig}.
|
||||
|
@ -72,7 +72,7 @@ class QgsEditorWidgetWrapper : QObject
|
||||
static QgsEditorWidgetWrapper* fromWidget( QWidget* widget );
|
||||
|
||||
protected:
|
||||
virtual QWidget* createWidget( QWidget* parent ) = 0 /Factory/;
|
||||
virtual QWidget* createWidget( QWidget* parent ) = 0;
|
||||
|
||||
virtual void initWidget( QWidget* editor );
|
||||
|
||||
|
@ -77,6 +77,8 @@ QgsAttributeTypeDialog::~QgsAttributeTypeDialog()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue( "/Windows/QgsAttributeTypeDialog/geometry", saveGeometry() );
|
||||
|
||||
qDeleteAll( mEditorConfigWidgets.values() );
|
||||
}
|
||||
|
||||
const QString QgsAttributeTypeDialog::editorWidgetV2Type()
|
||||
|
Loading…
x
Reference in New Issue
Block a user