mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #314, fromQVariant / location of toQVariant
* renamed fromQVariant to convertFromQVariant, the "from" methods imply the object is changed (fromJson, fromString ..) * implemented fromQVariant - changing the object by QVariant * moved toQVariant into PQ template * free function setFromQVariant
This commit is contained in:
@@ -192,6 +192,9 @@ namespace BlackMisc
|
||||
//! Virtual method to return CVariant
|
||||
virtual CVariant toCVariant() const { return CVariant(this->toQVariant()); }
|
||||
|
||||
//! Set from QVariant
|
||||
virtual void fromQVariant(const QVariant &variant) = 0;
|
||||
|
||||
//! Contribute to JSON object
|
||||
virtual QJsonObject toJson() const { QJsonObject json; return json;}
|
||||
|
||||
@@ -217,7 +220,7 @@ namespace BlackMisc
|
||||
virtual QString propertyByIndexAsString(const CPropertyIndex &index, bool i18n = false) const;
|
||||
|
||||
//! The stored object as CValueObject
|
||||
static const CValueObject *fromQVariant(const QVariant &qv);
|
||||
static const CValueObject *convertFromQVariant(const QVariant &variant);
|
||||
|
||||
protected:
|
||||
//! Default constructor
|
||||
|
||||
Reference in New Issue
Block a user