QmlProfiler: Move qHash and operator== for QmlEventType

It makes more sense to have them in the same location as the actual
type.

Change-Id: Ia27970173d14cfe361d4fc007cb461f788350b21
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-06-07 12:48:57 +02:00
parent e10bc709bc
commit 69832a22d3
3 changed files with 29 additions and 16 deletions

View File

@@ -34,22 +34,6 @@
namespace QmlProfiler {
inline static uint qHash(const QmlEventType &type)
{
return qHash(type.location().filename()) ^
((type.location().line() & 0xfff) | // 12 bits of line number
((type.message() << 12) & 0xf000) | // 4 bits of message
((type.location().column() << 16) & 0xff0000) | // 8 bits of column
((type.rangeType() << 24) & 0xf000000) | // 4 bits of rangeType
((type.detailType() << 28) & 0xf0000000)); // 4 bits of detailType
}
inline static bool operator==(const QmlEventType &type1, const QmlEventType &type2)
{
return type1.message() == type2.message() && type1.rangeType() == type2.rangeType() &&
type1.detailType() == type2.detailType() && type1.location() == type2.location();
}
class QmlProfilerTraceClientPrivate {
public:
QmlProfilerTraceClientPrivate(QmlProfilerTraceClient *_q, QmlDebug::QmlDebugConnection *client,