From 563c333319324febf4d2d0609ba0e61196b2bb9e Mon Sep 17 00:00:00 2001 From: Stephen Knox Date: Tue, 7 Jan 2020 22:45:46 +0000 Subject: [PATCH] use String::isEmpty() --- src/gui/editorwidgets/qgstexteditwrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editorwidgets/qgstexteditwrapper.cpp b/src/gui/editorwidgets/qgstexteditwrapper.cpp index 36143fd3b660..f2894303ee27 100644 --- a/src/gui/editorwidgets/qgstexteditwrapper.cpp +++ b/src/gui/editorwidgets/qgstexteditwrapper.cpp @@ -82,7 +82,7 @@ QVariant QgsTextEditWrapper::value() const else if ( field().type() == QVariant::Map ) { // replace empty string (invalid) with quoted empty string - if ( v == "" ) + if ( v.isEmpty() ) { QVariant qjson = QgsJsonUtils::parseJson( std::string( "\"\"" ) ); mInvalidJSON = false;