Skip to content
Permalink
Browse files

Merge pull request #7768 from nyalldawson/assert

Throw an assert when using an unsupported variant type with QgsXmlUtils::writeVariant
  • Loading branch information
m-kuhn committed Sep 3, 2018
2 parents 74e6e15 + 309992b commit 3c58d0990bfda0478804aaa4f8bb31c5fe925a4a
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/core/qgsxmlutils.cpp
@@ -166,8 +166,7 @@ QDomElement QgsXmlUtils::writeVariant( const QVariant &value, QDomDocument &doc
}

default:
element.setAttribute( QStringLiteral( "type" ), QStringLiteral( "Unknown" ) );
element.setAttribute( QStringLiteral( "value" ), value.toString() );
Q_ASSERT_X( false, "QgsXmlUtils::writeVariant", "unsupported variant type" );
break;
}

0 comments on commit 3c58d09

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