diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-01-22 14:29:12 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-01-22 14:29:12 +0200 |
commit | 9f3e54044fd1e0c26153195f91889342a8425b7f (patch) | |
tree | 71bcfde9546045b27d22a3c7265015ccec07ff22 /src/resource.cpp | |
parent | cfb16c2a93650ac2e0c9677bce11ed101aceffb0 (diff) |
added ResourceSet
Diffstat (limited to 'src/resource.cpp')
-rw-r--r-- | src/resource.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/resource.cpp b/src/resource.cpp index 3952c46..a54c8cf 100644 --- a/src/resource.cpp +++ b/src/resource.cpp @@ -73,16 +73,20 @@ void Resource::setId(quint32 newId) identifier = newId; } -bool Resource::operator==(const Resource &other) +bool Resource::operator==(const Resource &other) const { if(resourceType != other.resourceType) { return false; } - if((identifier != other.identifier) or - (shared != other.shared) or + if((shared != other.shared) or (optional != other.optional)) { return false; } return true; } + +uint ResourcePolicy::qHash(const Resource & key) +{ + return (((key.type()<<1) + key.isShared()) << 1) + key.isOptional(); +} |