Skip to content
Permalink
Browse files

Fix memory leak and pass ownership of py editor widgets to C++

  • Loading branch information
m-kuhn committed Aug 3, 2014
1 parent 44bed00 commit f63a01cc7c3309310a9bd674bcdd77e467447c1e
@@ -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()

0 comments on commit f63a01c

Please sign in to comment.
You can’t perform that action at this time.