mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
check if JsonDocument is null in JsonWrapper
This commit is contained in:
@@ -109,7 +109,7 @@ toJson( const QVariant &variant, bool* ok )
|
|||||||
QJsonDocument doc = QJsonDocument::fromVariant( variant );
|
QJsonDocument doc = QJsonDocument::fromVariant( variant );
|
||||||
if ( ok != NULL )
|
if ( ok != NULL )
|
||||||
{
|
{
|
||||||
*ok = true;
|
*ok = !doc.isNull();
|
||||||
}
|
}
|
||||||
return doc.toJson();
|
return doc.toJson();
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user