Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix memory leak and pass ownership of py editor widgets to C++
- Loading branch information
|
@@ -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() |
|
|