mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +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:
@@ -35,9 +35,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAudioDeviceList(const CSequence &other);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! Get output devices in that list
|
||||
CAudioDeviceList getOutputDevices() const;
|
||||
|
||||
@@ -47,6 +44,12 @@ namespace BlackMisc
|
||||
//! Count (as of type)
|
||||
int count(CAudioDevice::DeviceType type) const;
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \copydoc CValueObject::fromQVariant
|
||||
virtual void fromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant(this, variant); }
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user