Skip to content
Permalink
Browse files

Remove guard for unininitialized widgetFactory

meanwhile we can rely on one being initialized
  • Loading branch information
m-kuhn committed May 17, 2018
1 parent 2b95031 commit 44bb21d60485c12c9fa9c77162e7e6bd9469a094
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/gui/attributetable/qgsattributetablemodel.cpp
@@ -38,6 +38,7 @@
#include "qgsvectorlayerjoininfo.h"
#include "qgsvectorlayerjoinbuffer.h"
#include "qgsfieldmodel.h"
#include "qgstexteditwidgetfactory.h"

#include <QVariant>

@@ -375,15 +376,12 @@ void QgsAttributeTableModel::loadAttributes()
QgsEditorWidgetFactory *widgetFactory = QgsGui::editorWidgetRegistry()->factory( setup.type() );
QgsFieldFormatter *fieldFormatter = QgsApplication::fieldFormatterRegistry()->fieldFormatter( setup.type() );

if ( widgetFactory )
{
mWidgetFactories.append( widgetFactory );
mWidgetConfigs.append( setup.config() );
mAttributeWidgetCaches.append( fieldFormatter->createCache( layer(), idx, setup.config() ) );
mFieldFormatters.append( fieldFormatter );
mWidgetFactories.append( widgetFactory );
mWidgetConfigs.append( setup.config() );
mAttributeWidgetCaches.append( fieldFormatter->createCache( layer(), idx, setup.config() ) );
mFieldFormatters.append( fieldFormatter );

attributes << idx;
}
attributes << idx;
}

if ( mFieldCount + mExtraColumns < attributes.size() + mExtraColumns )

0 comments on commit 44bb21d

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