Skip to content

Commit

Permalink
removed unused docs
Browse files Browse the repository at this point in the history
and unused db entry
  • Loading branch information
signedav authored and nyalldawson committed Sep 14, 2018
1 parent 75b9c66 commit 04d770d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/core/qgsfield.cpp
Expand Up @@ -24,7 +24,6 @@
#include <QIcon>
#include <QLocale>
#include <QJsonDocument>
#include <QJsonObject>

/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
Expand Down
5 changes: 1 addition & 4 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -4221,11 +4221,8 @@ static QVariant parseJson( const QString &txt )
{
QVariant result;
QJsonDocument jsonResponse = QJsonDocument::fromJson( txt.toUtf8() );
//it's null when no json format
//it's null if no json format
result = jsonResponse.toVariant();

//TODO json/jsonb convert toVariantMap from QJsonObject in case it's a map etc.
//we can check there with jsonResponse.isArray if it's an array etc.
return result;
}

Expand Down
3 changes: 1 addition & 2 deletions tests/testdata/provider/testdata_pg_json.sql
Expand Up @@ -11,5 +11,4 @@ CREATE TABLE qgis_test.json
INSERT INTO qgis_test.json(jvalue, jbvalue)
VALUES
('[1,2,3]', '[4,5,6]'),
('{"a":1,"b":2}', '{"c":4,"d":5}'),
('123', '456');
('{"a":1,"b":2}', '{"c":4,"d":5}');

0 comments on commit 04d770d

Please sign in to comment.