Initialize data members of QJsonParseError

Instantiated objects are typically passed as an out-parameter to
QJsonDocument::fromJson, but that might only happen conditionally (as in
the jsonconverter example).

Change-Id: I8d4719958b79b656070f085c58559bd97ac4bda2
Fixes: QTBUG-83880
Coverity-Id: 263796
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Volker Hilsheimer 2020-04-29 14:03:47 +02:00
parent 14c713e759
commit c6c84c8855

View File

@ -74,8 +74,8 @@ struct Q_CORE_EXPORT QJsonParseError
QString errorString() const;
int offset;
ParseError error;
int offset = -1;
ParseError error = NoError;
};
class QJsonDocumentPrivate;