mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #655, Change signature (order) of setProperty/compareProperty
This commit is contained in:
committed by
Roland Winklmeier
parent
49094115b1
commit
0f5d2a29a8
@@ -233,12 +233,12 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CGlobalSetup::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
void CGlobalSetup::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (index.isMyself()) { (*this) = variant.to<CGlobalSetup>(); return; }
|
||||
if (ITimestampBased::canHandleIndex(index))
|
||||
{
|
||||
ITimestampBased::setPropertyByIndex(variant, index);
|
||||
ITimestampBased::setPropertyByIndex(index, variant);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace BlackCore
|
||||
switch (i)
|
||||
{
|
||||
case IndexDbRootDirectory:
|
||||
this->m_dbRootDirectoryUrl.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||
this->m_dbRootDirectoryUrl.setPropertyByIndex(index.copyFrontRemoved(), variant);
|
||||
break;
|
||||
case IndexDbHttpPort:
|
||||
this->m_dbHttpPort = variant.toInt();
|
||||
@@ -260,7 +260,7 @@ namespace BlackCore
|
||||
this->m_vatsimDataFileUrls = variant.value<CUrlList>();
|
||||
break;
|
||||
case IndexVatsimBookings:
|
||||
this->m_vatsimBookingsUrl.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||
this->m_vatsimBookingsUrl.setPropertyByIndex(index.copyFrontRemoved(), variant);
|
||||
break;
|
||||
case IndexVatsimMetars:
|
||||
this->m_vatsimMetarsUrls = variant.value<CUrlList>();
|
||||
@@ -272,7 +272,7 @@ namespace BlackCore
|
||||
this->m_wasLoaded = variant.toBool();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace BlackCore
|
||||
BlackMisc::CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||
void setPropertyByIndex(const BlackMisc::CVariant &variant, const BlackMisc::CPropertyIndex &index);
|
||||
void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const BlackMisc::CVariant &variant);
|
||||
|
||||
//! Schema version
|
||||
static const QString &versionString();
|
||||
|
||||
@@ -99,12 +99,12 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CUpdateInfo::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
void CUpdateInfo::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (index.isMyself()) { (*this) = variant.to<CUpdateInfo>(); return; }
|
||||
if (ITimestampBased::canHandleIndex(index))
|
||||
{
|
||||
ITimestampBased::setPropertyByIndex(variant, index);
|
||||
ITimestampBased::setPropertyByIndex(index, variant);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace BlackCore
|
||||
this->m_latestVersionBeta = variant.toQString();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BlackCore
|
||||
BlackMisc::CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||
void setPropertyByIndex(const BlackMisc::CVariant &variant, const BlackMisc::CPropertyIndex &index);
|
||||
void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const BlackMisc::CVariant &variant);
|
||||
|
||||
private:
|
||||
bool m_development = false; //!< for development
|
||||
|
||||
@@ -59,12 +59,12 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CVatsimSetup::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
void CVatsimSetup::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (index.isMyself()) { (*this) = variant.to<CVatsimSetup>(); return; }
|
||||
if (ITimestampBased::canHandleIndex(index))
|
||||
{
|
||||
ITimestampBased::setPropertyByIndex(variant, index);
|
||||
ITimestampBased::setPropertyByIndex(index, variant);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace BlackCore
|
||||
this->m_dataFileUrls = variant.value<CUrlList>();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace BlackCore
|
||||
BlackMisc::CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||
void setPropertyByIndex(const BlackMisc::CVariant &variant, const BlackMisc::CPropertyIndex &index);
|
||||
void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const BlackMisc::CVariant &variant);
|
||||
|
||||
private:
|
||||
BlackMisc::Network::CUrlList m_serverFileUrls; //!< only the FSD servers
|
||||
|
||||
Reference in New Issue
Block a user