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:
hjk
2022-07-13 09:27:18 +02:00
parent 480da99508
commit 802de0eb5e
82 changed files with 206 additions and 256 deletions

View File

@@ -151,9 +151,9 @@ bool operator==(const FullyQualifiedName &left, const FullyQualifiedName &right)
return compareFullyQualifiedName(left.fqn, right.fqn);
}
Utils::QHashValueType qHash(const FullyQualifiedName &fullyQualifiedName)
size_t qHash(const FullyQualifiedName &fullyQualifiedName)
{
Utils::QHashValueType h = 0;
size_t h = 0;
for (int i = 0; i < fullyQualifiedName.fqn.size(); ++i) {
if (const Name *n = fullyQualifiedName.fqn.at(i)) {
if (const Identifier *id = n->identifier()) {

View File

@@ -33,10 +33,10 @@
using namespace CPlusPlus;
Utils::QHashValueType CPlusPlus::qHash(const LookupItem &key)
size_t CPlusPlus::qHash(const LookupItem &key)
{
const Utils::QHashValueType h1 = QT_PREPEND_NAMESPACE(qHash)(key.type().type());
const Utils::QHashValueType h2 = QT_PREPEND_NAMESPACE(qHash)(key.scope());
const size_t h1 = QT_PREPEND_NAMESPACE(qHash)(key.type().type());
const size_t h2 = QT_PREPEND_NAMESPACE(qHash)(key.scope());
return ((h1 << 16) | (h1 >> 16)) ^ h2;
}

View File

@@ -71,6 +71,6 @@ private:
ClassOrNamespace *_binding;
};
Utils::QHashValueType qHash(const CPlusPlus::LookupItem &result);
size_t qHash(const CPlusPlus::LookupItem &result);
} // namespace CPlusPlus