mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +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:
@@ -26,7 +26,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (type() == QVariant::UserType)
|
||||
{
|
||||
const CValueObject *s = CValueObject::fromQVariant(m_v); // FIXME this will return garbage if value is not a CValueObject
|
||||
const CValueObject *s = CValueObject::convertFromQVariant(m_v); // FIXME this will return garbage if value is not a CValueObject
|
||||
Q_ASSERT(s);
|
||||
if (s)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ namespace BlackMisc
|
||||
{
|
||||
// value object?
|
||||
const QVariant qv = this->toQVariant();
|
||||
const CValueObject *cv = CValueObject::fromQVariant(qv);
|
||||
const CValueObject *cv = CValueObject::convertFromQVariant(qv);
|
||||
if (cv)
|
||||
{
|
||||
h = cv->getValueHash();
|
||||
@@ -171,6 +171,4 @@ namespace BlackMisc
|
||||
var = fixQVariantFromDbusArgument(dbusVar.variant(), QMetaType::type(qPrintable(typeName)));
|
||||
return arg;
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user