Skip to content
Permalink
Browse files
Fixed uninitialized issue
  • Loading branch information
carolinux committed May 22, 2015
1 parent 43d5198 commit e015a7ec1f2116d3f46edded362eb2fe45445571
Showing with 7 additions and 6 deletions.
  1. +5 −4 src/app/qgsattributetabledialog.cpp
  2. +1 −1 src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
  3. +1 −1 src/gui/editorwidgets/core/qgseditorwidgetregistry.h
@@ -431,9 +431,9 @@ void QgsAttributeTableDialog::filterColumnChanged( QObject* filterAction )
return;
const QString widgetType = mLayer->editorWidgetV2( fldIdx );
const QgsEditorWidgetConfig widgetConfig = mLayer->editorWidgetV2Config( fldIdx );
//replace with createSearch or so
//go to registry and create a create Search method
mCurrentSearchWidgetWrapper= QgsEditorWidgetRegistry::instance()->createSearch( widgetType, mLayer, fldIdx, widgetConfig, mFilterContainer);
mCurrentSearchWidgetWrapper= QgsEditorWidgetRegistry::instance()->
createSearchWidget(widgetType, mLayer, fldIdx, widgetConfig, mFilterContainer);

replaceSearchWidget(mFilterQuery, mCurrentSearchWidgetWrapper->widget());

mApplyFilterButton->setVisible( true );
@@ -746,7 +746,8 @@ void QgsAttributeTableDialog::filterQueryChanged( const QString& query )
void QgsAttributeTableDialog::filterQueryAccepted()
{
if ( (mFilterQuery->isVisible() && mFilterQuery->text().isEmpty()) ||
(mCurrentSearchWidgetWrapper->widget()->isVisible() && mCurrentSearchWidgetWrapper->value().toString().isEmpty() ))
(mCurrentSearchWidgetWrapper!=0 && mCurrentSearchWidgetWrapper->widget()->isVisible()
&& mCurrentSearchWidgetWrapper->value().toString().isEmpty() ))
{
filterShowAll();
return;
@@ -100,7 +100,7 @@ QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::create( const QString& widgetId
return 0;
}

QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::createSearch( const QString& widgetId, QgsVectorLayer* vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* parent, const QgsAttributeEditorContext &context )
QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::createSearchWidget( const QString& widgetId, QgsVectorLayer* vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* parent, const QgsAttributeEditorContext &context )
{
if ( mWidgetFactories.contains( widgetId ) )
{
@@ -83,7 +83,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject
QWidget* parent,
const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

QgsEditorWidgetWrapper* createSearch( const QString& widgetId,
QgsEditorWidgetWrapper* createSearchWidget( const QString& widgetId,
QgsVectorLayer* vl,
int fieldIdx,
const QgsEditorWidgetConfig& config,

0 comments on commit e015a7e

Please sign in to comment.