forked from qt-creator/qt-creator
Utils: Collapse most of porting,h
Taking the Qt 6 branches, leaving some dummies until downstream adapted. Change-Id: Ib9b86568d73c341c8f740ba497c3cbfab830d8a1 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -221,9 +221,9 @@ QList<Dialect> Dialect::companionLanguages() const
|
||||
return langs;
|
||||
}
|
||||
|
||||
Utils::QHashValueType qHash(const Dialect &o)
|
||||
size_t qHash(const Dialect &o)
|
||||
{
|
||||
return Utils::QHashValueType(o.dialect());
|
||||
return size_t(o.dialect());
|
||||
}
|
||||
|
||||
QDebug operator << (QDebug &dbg, const Dialect &dialect)
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
Enum m_dialect;
|
||||
};
|
||||
|
||||
QMLJS_EXPORT Utils::QHashValueType qHash(const Dialect &o);
|
||||
QMLJS_EXPORT size_t qHash(const Dialect &o);
|
||||
|
||||
QMLJS_EXPORT QDebug operator << (QDebug &dbg, const Dialect &dialect);
|
||||
|
||||
|
||||
@@ -502,9 +502,9 @@ QString ImportKey::toString() const
|
||||
return res;
|
||||
}
|
||||
|
||||
Utils::QHashValueType qHash(const ImportKey &info)
|
||||
size_t qHash(const ImportKey &info)
|
||||
{
|
||||
Utils::QHashValueType res = ::qHash(info.type) ^
|
||||
size_t res = ::qHash(info.type) ^
|
||||
::qHash(info.majorVersion) ^ ::qHash(info.minorVersion);
|
||||
foreach (const QString &s, info.splitPath)
|
||||
res = res ^ ::qHash(s);
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
Utils::QHashValueType qHash(const ImportKey &info);
|
||||
size_t 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;
|
||||
}
|
||||
|
||||
Utils::QHashValueType qHash(const FakeMetaObjectWithOrigin &fmoo)
|
||||
size_t qHash(const FakeMetaObjectWithOrigin &fmoo)
|
||||
{
|
||||
return qHash(fmoo.fakeMetaObject);
|
||||
}
|
||||
|
||||
@@ -735,7 +735,7 @@ public:
|
||||
bool operator ==(const FakeMetaObjectWithOrigin &o) const;
|
||||
};
|
||||
|
||||
QMLJS_EXPORT Utils::QHashValueType qHash(const FakeMetaObjectWithOrigin &fmoo);
|
||||
QMLJS_EXPORT size_t qHash(const FakeMetaObjectWithOrigin &fmoo);
|
||||
|
||||
class QMLJS_EXPORT CppQmlTypes
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
{}
|
||||
|
||||
private:
|
||||
friend Utils::QHashValueType qHash(const ImportCacheKey &);
|
||||
friend size_t qHash(const ImportCacheKey &);
|
||||
friend bool operator==(const ImportCacheKey &, const ImportCacheKey &);
|
||||
|
||||
int m_type;
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
int m_minorVersion;
|
||||
};
|
||||
|
||||
Utils::QHashValueType qHash(const ImportCacheKey &info)
|
||||
size_t 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