mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 22:55:41 +08:00
Ref T210, "local developer" distribution
This commit is contained in:
@@ -115,6 +115,17 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CDistribution &CDistribution::localDeveloperBuild()
|
||||||
|
{
|
||||||
|
static const CDistribution d = []
|
||||||
|
{
|
||||||
|
CDistribution ld("local developer", 0, true);
|
||||||
|
ld.setCurrentUtcTime();
|
||||||
|
return ld;
|
||||||
|
}();
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
CDistribution CDistribution::fromDatabaseJson(const QJsonObject &json, const QString &prefix)
|
CDistribution CDistribution::fromDatabaseJson(const QJsonObject &json, const QString &prefix)
|
||||||
{
|
{
|
||||||
Q_UNUSED(prefix); // not nested
|
Q_UNUSED(prefix); // not nested
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ namespace BlackMisc
|
|||||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||||
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||||
|
|
||||||
|
//! Pseudo distribution for local builds
|
||||||
|
const static CDistribution &localDeveloperBuild();
|
||||||
|
|
||||||
//! Object from database JSON format
|
//! Object from database JSON format
|
||||||
static CDistribution fromDatabaseJson(const QJsonObject &json, const QString &prefix = {});
|
static CDistribution fromDatabaseJson(const QJsonObject &json, const QString &prefix = {});
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace BlackMisc
|
|||||||
const CArtifact exactVersion = ownArtifacts.findFirstByVersionOrDefault(myVersion);
|
const CArtifact exactVersion = ownArtifacts.findFirstByVersionOrDefault(myVersion);
|
||||||
if (!exactVersion.isUnknown()) { return exactVersion.getDistributions().getMostStableOrDefault(); }
|
if (!exactVersion.isUnknown()) { return exactVersion.getDistributions().getMostStableOrDefault(); }
|
||||||
|
|
||||||
return CDistribution();
|
return CDistribution::localDeveloperBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList CUpdateInfo::anticipateMyDefaultChannelAndPlatform() const
|
QStringList CUpdateInfo::anticipateMyDefaultChannelAndPlatform() const
|
||||||
|
|||||||
Reference in New Issue
Block a user