comparing just on name, used with plugin checks

This commit is contained in:
Klaus Basan
2014-07-09 19:56:44 +02:00
parent 3077494cb7
commit cd88c79f7c
3 changed files with 24 additions and 6 deletions

View File

@@ -33,6 +33,12 @@ namespace BlackSim
this->m_simsetup = setup;
}
bool CSimulatorInfo::isSameSimulator(const CSimulatorInfo &otherSimulator) const
{
return this->getFullName() == otherSimulator.getFullName() &&
this->getShortName() == otherSimulator.getShortName();
}
QString CSimulatorInfo::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);

View File

@@ -46,6 +46,9 @@ namespace BlackSim
//! Short name
const QString &getFullName() const { return m_fullName; }
//! Compare on names only, ignore setup
bool isSameSimulator(const CSimulatorInfo &otherSimulator) const;
//! \copydoc CValueObject::toJson
virtual QJsonObject toJson() const override;