Skip to content

Commit

Permalink
Re #9018. Changed all the names to existsProperty.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Feb 25, 2014
1 parent 960aa1b commit 27f6653
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/Algorithm.cpp
Expand Up @@ -536,7 +536,7 @@ namespace Mantid
// Log each issue
for (auto it = errors.begin(); it != errors.end(); it++)
{
if (this->hasProperty(it->first))
if (this->existsProperty(it->first))
g_log.error() << "Invalid value for " << it->first << ": " << it->second << "\n";
else
{
Expand Down
Expand Up @@ -89,8 +89,6 @@ class MANTID_KERNEL_DLL IPropertyManager

/// Get the list of managed properties.
virtual const std::vector< Property*>& getProperties() const = 0;
/// checks if the property exists
bool hasProperty(const std::string &name) const;

/** Templated method to set the value of a PropertyWithValue
* @param name :: The name of the property (case insensitive)
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Kernel/src/IPropertyManager.cpp
Expand Up @@ -57,7 +57,7 @@ namespace Mantid
* @param name The name of the property being looked for.
* @return True if the property is managed by this.
*/
bool IPropertyManager::hasProperty(const std::string &name) const
bool IPropertyManager::existsProperty(const std::string &name) const
{
auto props = this->getProperties();
for (std::vector< Property*>::const_iterator prop = props.begin(); prop != props.end(); ++prop)
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidQt/API/src/AlgorithmDialog.cpp
Expand Up @@ -351,7 +351,7 @@ bool AlgorithmDialog::setPropertyValues(const QStringList & skipList)
for (auto it = errs.begin(); it != errs.end(); it++)
{
// only count as an error if the named property exists
if (m_algorithm->hasProperty(it->first))
if (m_algorithm->existsProperty(it->first))
{
const QString pName = QString::fromStdString(it->first);
const QString value = QString::fromStdString(it->second);
Expand Down

0 comments on commit 27f6653

Please sign in to comment.