mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
* utility function for CVariant * use CVariant for cut/copy/paste
This commit is contained in:
committed by
Mathew Sutcliffe
parent
5ba438699f
commit
08f8916344
@@ -117,8 +117,10 @@ namespace BlackGui
|
||||
{
|
||||
try
|
||||
{
|
||||
CLiveryList liveries;
|
||||
liveries.convertFromJson(Json::jsonObjectFromString(json));
|
||||
CVariant jsonVariant;
|
||||
jsonVariant.convertFromJson(Json::jsonObjectFromString(json));
|
||||
if (!jsonVariant.canConvert<CLiveryList>()) { return; }
|
||||
const CLiveryList liveries = jsonVariant.value<CLiveryList>();
|
||||
if (!liveries.isEmpty())
|
||||
{
|
||||
this->setValue(liveries.front());
|
||||
|
||||
Reference in New Issue
Block a user