mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Add in simulator info returns delta
This commit is contained in:
@@ -181,10 +181,15 @@ namespace BlackMisc
|
|||||||
return CValueObject::toIcon();
|
return CValueObject::toIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorInfo::add(const CSimulatorInfo &other)
|
CSimulatorInfo CSimulatorInfo::add(const CSimulatorInfo &other)
|
||||||
{
|
{
|
||||||
if (other.isUnspecified()) { return; }
|
// anything to add?
|
||||||
|
if (other.isUnspecified()) { return None; }
|
||||||
|
if (this->matchesAll(other)) { return None; }
|
||||||
|
|
||||||
this->setSimulator(this->getSimulator() | other.getSimulator());
|
this->setSimulator(this->getSimulator() | other.getSimulator());
|
||||||
|
const CSimulatorInfo delta(this->getSimulator() & other.getSimulator());
|
||||||
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSet<CSimulatorInfo> CSimulatorInfo::asSingleSimulatorSet() const
|
QSet<CSimulatorInfo> CSimulatorInfo::asSingleSimulatorSet() const
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ namespace BlackMisc
|
|||||||
CIcon toIcon() const;
|
CIcon toIcon() const;
|
||||||
|
|
||||||
//! Add simulator
|
//! Add simulator
|
||||||
void add(const CSimulatorInfo &other);
|
CSimulatorInfo add(const CSimulatorInfo &other);
|
||||||
|
|
||||||
//! As a set of single simulator info objects
|
//! As a set of single simulator info objects
|
||||||
QSet<CSimulatorInfo> asSingleSimulatorSet() const;
|
QSet<CSimulatorInfo> asSingleSimulatorSet() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user