Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 9ee7984a authored by Kurt Hindenburg's avatar Kurt Hindenburg

fix variable shadowing; standardize parameter naming

parent 1e2a70d2
......@@ -268,13 +268,13 @@ QHash<Profile::Property, QVariant> Profile::setProperties() const
return _propertyValues;
void Profile::setProperty(Property property , const QVariant& value)
void Profile::setProperty(Property p, const QVariant& value)
_propertyValues.insert(property, value);
_propertyValues.insert(p, value);
bool Profile::isPropertySet(Property property) const
bool Profile::isPropertySet(Property p) const
return _propertyValues.contains(property);
return _propertyValues.contains(p);
Profile::Property Profile::lookupByName(const QString& name)
......@@ -371,14 +371,14 @@ void ProfileGroup::updateValues()
void ProfileGroup::setProperty(Property property, const QVariant& value)
void ProfileGroup::setProperty(Property p, const QVariant& value)
if (_profiles.count() > 1 && !canInheritProperty(property))
if (_profiles.count() > 1 && !canInheritProperty(p))
Profile::setProperty(property, value);
Profile::setProperty(p, value);
foreach(Profile::Ptr profile, _profiles) {
profile->setProperty(property, value);
profile->setProperty(p, value);
......@@ -319,14 +319,14 @@ public:
* the parent's value for @p property will be returned.
template<class T>
T property(Property property) const;
T property(Property p) const;
/** Sets the value of the specified @p property to @p value. */
virtual void setProperty(Property property, const QVariant &value);
virtual void setProperty(Property p, const QVariant &value);
/** Returns true if the specified property has been set in this Profile
* instance.
virtual bool isPropertySet(Property property) const;
virtual bool isPropertySet(Property p) const;
/** Returns a map of the properties set in this Profile instance. */
virtual QHash<Property, QVariant> setProperties() const;
......@@ -606,7 +606,7 @@ private:
static void fillTableWithDefaultNames();
// returns true if the property can be inherited
static bool canInheritProperty(Property property);
static bool canInheritProperty(Property p);
QHash<Property, QVariant> _propertyValues;
Ptr _parent;
......@@ -627,24 +627,24 @@ private:
static const PropertyInfo DefaultPropertyNames[];
inline bool Profile::canInheritProperty(Property aProperty)
inline bool Profile::canInheritProperty(Property p)
return aProperty != Name && aProperty != Path;
return p != Name && p != Path;
template<class T>
inline T Profile::property(Property aProperty) const
inline T Profile::property(Property p) const
return property<QVariant>(aProperty).value<T>();
return property<QVariant>(p).value<T>();
inline QVariant Profile::property(Property aProperty) const
inline QVariant Profile::property(Property p) const
if (_propertyValues.contains(aProperty)) {
return _propertyValues[aProperty];
} else if (_parent && canInheritProperty(aProperty)) {
return _parent->property<QVariant>(aProperty);
if (_propertyValues.contains(p)) {
return _propertyValues[p];
} else if (_parent && canInheritProperty(p)) {
return _parent->property<QVariant>(p);
} else {
return QVariant();
......@@ -710,7 +710,7 @@ public:
/** Sets the value of @p property in each of the group's profiles to
* @p value.
void setProperty(Property property, const QVariant &value) Q_DECL_OVERRIDE;
void setProperty(Property p, const QVariant &value) Q_DECL_OVERRIDE;
QList<Profile::Ptr> _profiles;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment