Skip to content
Permalink
Browse files

Add handling of null value in value map to search widget

  • Loading branch information
dgoedkoop committed Jul 11, 2016
1 parent 63f9f71 commit 6b904e7368f38e1e61c1c31d622221d721528abf
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp
@@ -15,6 +15,7 @@

#include "qgsvaluemapsearchwidgetwrapper.h"
#include "qgstexteditconfigdlg.h"
#include "qgsvaluemapconfigdlg.h"

#include "qgsfield.h"
#include "qgsfieldvalidator.h"
@@ -95,6 +96,12 @@ QString QgsValueMapSearchWidgetWrapper::createExpression( QgsSearchWidgetWrapper

QString currentKey = mComboBox->itemData( mComboBox->currentIndex() ).toString();

if ( currentKey == QString( VALUEMAP_NULL_TEXT ) )
if ( flags & EqualTo )
return fieldName + " IS NULL";
if ( flags & NotEqualTo )
return fieldName + " IS NOT NULL";

switch ( fldType )
{
case QVariant::Int:

0 comments on commit 6b904e7

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