forked from qt-creator/qt-creator
Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
11c73adbe0
commit
3871e40f43
@@ -221,9 +221,9 @@ QList<Dialect> Dialect::companionLanguages() const
|
||||
return langs;
|
||||
}
|
||||
|
||||
uint qHash(const Dialect &o)
|
||||
Utils::QHashValueType qHash(const Dialect &o)
|
||||
{
|
||||
return uint(o.dialect());
|
||||
return Utils::QHashValueType(o.dialect());
|
||||
}
|
||||
|
||||
QDebug operator << (QDebug &dbg, const Dialect &dialect)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "qmljs_global.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/porting.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
@@ -73,7 +74,7 @@ private:
|
||||
Enum m_dialect;
|
||||
};
|
||||
|
||||
QMLJS_EXPORT uint qHash(const Dialect &o);
|
||||
QMLJS_EXPORT Utils::QHashValueType qHash(const Dialect &o);
|
||||
|
||||
QMLJS_EXPORT QDebug operator << (QDebug &dbg, const Dialect &dialect);
|
||||
|
||||
|
||||
@@ -502,9 +502,9 @@ QString ImportKey::toString() const
|
||||
return res;
|
||||
}
|
||||
|
||||
uint qHash(const ImportKey &info)
|
||||
Utils::QHashValueType qHash(const ImportKey &info)
|
||||
{
|
||||
uint res = ::qHash(info.type) ^
|
||||
Utils::QHashValueType res = ::qHash(info.type) ^
|
||||
::qHash(info.majorVersion) ^ ::qHash(info.minorVersion);
|
||||
foreach (const QString &s, info.splitPath)
|
||||
res = res ^ ::qHash(s);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "qmljsdialect.h"
|
||||
|
||||
#include <languageutils/componentversion.h>
|
||||
#include <utils/porting.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
@@ -117,7 +118,7 @@ public:
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
uint qHash(const ImportKey &info);
|
||||
Utils::QHashValueType qHash(const ImportKey &info);
|
||||
bool operator ==(const ImportKey &i1, const ImportKey &i2);
|
||||
bool operator !=(const ImportKey &i1, const ImportKey &i2);
|
||||
bool operator <(const ImportKey &i1, const ImportKey &i2);
|
||||
|
||||
@@ -175,7 +175,7 @@ bool FakeMetaObjectWithOrigin::operator ==(const FakeMetaObjectWithOrigin &o) co
|
||||
return fakeMetaObject == o.fakeMetaObject;
|
||||
}
|
||||
|
||||
uint qHash(const FakeMetaObjectWithOrigin &fmoo)
|
||||
Utils::QHashValueType qHash(const FakeMetaObjectWithOrigin &fmoo)
|
||||
{
|
||||
return qHash(fmoo.fakeMetaObject);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <qmljs/parser/qmljsastfwd_p.h>
|
||||
|
||||
#include <languageutils/fakemetaobject.h>
|
||||
#include <utils/porting.h>
|
||||
|
||||
#include <QFileInfoList>
|
||||
#include <QHash>
|
||||
@@ -734,7 +735,7 @@ public:
|
||||
bool operator ==(const FakeMetaObjectWithOrigin &o) const;
|
||||
};
|
||||
|
||||
QMLJS_EXPORT uint qHash(const FakeMetaObjectWithOrigin &fmoo);
|
||||
QMLJS_EXPORT Utils::QHashValueType qHash(const FakeMetaObjectWithOrigin &fmoo);
|
||||
|
||||
class QMLJS_EXPORT CppQmlTypes
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "qmljsmodelmanagerinterface.h"
|
||||
#include "qmljsconstants.h"
|
||||
|
||||
#include <utils/porting.h>
|
||||
#include <utils/qrcparser.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -54,7 +55,7 @@ public:
|
||||
{}
|
||||
|
||||
private:
|
||||
friend uint qHash(const ImportCacheKey &);
|
||||
friend Utils::QHashValueType qHash(const ImportCacheKey &);
|
||||
friend bool operator==(const ImportCacheKey &, const ImportCacheKey &);
|
||||
|
||||
int m_type;
|
||||
@@ -63,7 +64,7 @@ private:
|
||||
int m_minorVersion;
|
||||
};
|
||||
|
||||
uint qHash(const ImportCacheKey &info)
|
||||
Utils::QHashValueType qHash(const ImportCacheKey &info)
|
||||
{
|
||||
return ::qHash(info.m_type) ^ ::qHash(info.m_path) ^
|
||||
::qHash(info.m_majorVersion) ^ ::qHash(info.m_minorVersion);
|
||||
|
||||
Reference in New Issue
Block a user