MCPcopy Create free account
hub / github.com/KDE/kdevelop / qHash

Method qHash

kdevplatform/vcs/vcsrevision.cpp:147–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147size_t KDevelop::qHash(const KDevelop::VcsRevision& rev)
148{
149 const auto revisionValue = rev.revisionValue();
150 switch (rev.revisionType()) {
151 case VcsRevision::GlobalNumber:
152 case VcsRevision::FileNumber:
153 return (revisionValue.typeId() == qMetaTypeId<QString>() ? ::qHash(revisionValue.toString())
154 : ::qHash(revisionValue.toULongLong()));
155 case VcsRevision::Special:
156 return ::qHash(static_cast<int>(revisionValue.value<KDevelop::VcsRevision::RevisionSpecialType>()));
157 case VcsRevision::Date:
158 return ::qHash(revisionValue.toDateTime());
159 default:
160 return ::qHash(revisionValue.toString());
161 }
162}
163

Callers

nothing calls this directly

Calls 5

revisionValueMethod · 0.80
revisionTypeMethod · 0.80
qHashFunction · 0.70
typeIdMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected