Index: effectparameter.cpp =================================================================== --- effectparameter.cpp (revision 740499) +++ effectparameter.cpp (working copy) @@ -23,7 +23,7 @@ namespace Phonon { -uint qHash (const EffectParameter ¶m) +uint qHash(const Phonon::EffectParameter ¶m) { return param.id(); } @@ -95,7 +95,10 @@ QVariant::Type EffectParameter::type() const { - return d->defaultValue.type(); + if (d->possibleValues.isEmpty()) { + return d->defaultValue.type(); + } + return QVariant::List; } QVariantList EffectParameter::possibleValues() const Index: effectparameter.h =================================================================== --- effectparameter.h (revision 740499) +++ effectparameter.h (working copy) @@ -22,9 +22,8 @@ #include "phonon_export.h" - +#include #include -#include namespace Phonon { @@ -71,18 +70,18 @@ /** * Returns the parameter type. * - * usually it will be QVariant::Int or QVariant::Double or QVariant::Bool + * Common types are QVariant::Int, QVariant::Double, QVariant::Bool and QVariant::List. When + * QVariant::List is returned you get the possible values from possibleValues. */ QVariant::Type type() const; /** * Returns whether the parameter should be - * displayed in a logarithmic scale. This is particularly useful for + * displayed using a logarithmic scale. This is particularly useful for * frequencies and gains. */ bool isLogarithmicControl() const; - /** * The minimum value to be used for the control to edit the parameter. * @@ -210,10 +209,13 @@ QExplicitlySharedDataPointer d; }; -uint PHONON_EXPORT qHash (const EffectParameter ¶m); +uint PHONON_EXPORT qHash(const Phonon::EffectParameter ¶m); } // namespace Phonon +// will code outside of the Phonon namespace be able to make use of the above qHash function? +//inline uint qHash(const Phonon::EffectParameter ¶m) { return Phonon::qHash(param); } + Q_DECLARE_OPERATORS_FOR_FLAGS(Phonon::EffectParameter::Hints) #endif // PHONON_EFFECTPARAMETER_H