summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2021-10-14 22:27:08 +0300
committerOrgad Shaneh <orgads@gmail.com>2021-10-20 15:03:51 +0000
commit3871e40f432c9a0d7cb072acba17273f113ccd59 (patch)
tree76cf47ebd1c57fad54fe45b338d7be2a8b093563
parent11c73adbe04c51b0cc3f52b4e057d5a83f203708 (diff)
downloadqt-creator-3871e40f432c9a0d7cb072acba17273f113ccd59.tar.gz
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>
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h11
-rw-r--r--src/libs/3rdparty/syntax-highlighting/src/indexer/katehighlightingindexer.cpp4
-rw-r--r--src/libs/cplusplus/LookupContext.cpp5
-rw-r--r--src/libs/cplusplus/LookupItem.cpp6
-rw-r--r--src/libs/cplusplus/LookupItem.h3
-rw-r--r--src/libs/extensionsystem/pluginspec.cpp2
-rw-r--r--src/libs/extensionsystem/pluginspec.h4
-rw-r--r--src/libs/modelinglib/qmt/infrastructure/handle.h2
-rw-r--r--src/libs/modelinglib/qmt/style/defaultstyleengine.cpp15
-rw-r--r--src/libs/modelinglib/qmt/style/objectvisuals.cpp2
-rw-r--r--src/libs/modelinglib/qmt/style/objectvisuals.h4
-rw-r--r--src/libs/qmljs/qmljsdialect.cpp4
-rw-r--r--src/libs/qmljs/qmljsdialect.h3
-rw-r--r--src/libs/qmljs/qmljsimportdependencies.cpp4
-rw-r--r--src/libs/qmljs/qmljsimportdependencies.h3
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp2
-rw-r--r--src/libs/qmljs/qmljsinterpreter.h3
-rw-r--r--src/libs/qmljs/qmljslink.cpp5
-rw-r--r--src/libs/utils/filepath.cpp2
-rw-r--r--src/libs/utils/filepath.h5
-rw-r--r--src/libs/utils/id.cpp2
-rw-r--r--src/libs/utils/id.h3
-rw-r--r--src/libs/utils/link.cpp2
-rw-r--r--src/libs/utils/link.h5
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnostic.cpp2
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnostic.h4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.h3
-rw-r--r--src/plugins/cmakeprojectmanager/fileapidataextractor.h2
-rw-r--r--src/plugins/cppcheck/cppcheckdiagnostic.cpp2
-rw-r--r--src/plugins/cppcheck/cppcheckdiagnostic.h3
-rw-r--r--src/plugins/fakevim/fakevimhandler.cpp2
-rw-r--r--src/plugins/ios/iosprobe.cpp4
-rw-r--r--src/plugins/ios/iosprobe.h7
-rw-r--r--src/plugins/modeleditor/modelindexer.cpp5
-rw-r--r--src/plugins/modeleditor/modelindexer.h4
-rw-r--r--src/plugins/projectexplorer/buildtargetinfo.h3
-rw-r--r--src/plugins/projectexplorer/deployablefile.cpp2
-rw-r--r--src/plugins/projectexplorer/deployablefile.h3
-rw-r--r--src/plugins/projectexplorer/expanddata.cpp2
-rw-r--r--src/plugins/projectexplorer/expanddata.h4
-rw-r--r--src/plugins/projectexplorer/task.cpp2
-rw-r--r--src/plugins/projectexplorer/task.h11
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp4
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeparsernodes.h5
-rw-r--r--src/plugins/qmldesigner/designercore/include/import.h4
-rw-r--r--src/plugins/qmldesigner/designercore/model/import.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceclient.cpp2
-rw-r--r--src/plugins/remotelinux/deploymenttimeinfo.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/genericproposalmodel.cpp2
-rw-r--r--src/plugins/texteditor/fontsettings.cpp4
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.h3
-rw-r--r--src/shared/proparser/proitems.cpp2
-rw-r--r--src/shared/proparser/proitems.h4
-rw-r--r--src/shared/proparser/qmakeevaluator.cpp2
-rw-r--r--src/shared/proparser/qmakeglobals.h3
58 files changed, 126 insertions, 85 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
index fc5118727b..97b5031260 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
@@ -517,7 +517,7 @@ QDebug operator <<(QDebug debug, const ServerNodeInstance &instance)
return debug.space();
}
-uint qHash(const ServerNodeInstance &instance)
+ServerNodeInstance::QHashValueType qHash(const ServerNodeInstance &instance)
{
return ::qHash(instance.instanceId());
}
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h
index 52ead77e12..7fd6453daa 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h
@@ -67,6 +67,13 @@ namespace Internal {
class ServerNodeInstance
{
+public:
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+using QHashValueType = uint;
+#else
+using QHashValueType = size_t;
+#endif
+
friend class NodeInstanceServer;
friend class Qt4NodeInstanceServer;
friend class Qt4PreviewNodeInstanceServer;
@@ -76,7 +83,7 @@ class ServerNodeInstance
friend class Qt5CapturePreviewNodeInstanceServer;
friend class Qt5TestNodeInstanceServer;
friend class QHash<qint32, ServerNodeInstance>;
- friend uint qHash(const ServerNodeInstance &instance);
+ friend QHashValueType qHash(const ServerNodeInstance &instance);
friend bool operator==(const ServerNodeInstance &first, const ServerNodeInstance &second);
friend QDebug operator<<(QDebug debug, const ServerNodeInstance &instance);
friend class NodeMetaInfo;
@@ -220,7 +227,7 @@ private: // variables
QSharedPointer<Internal::ObjectNodeInstance> m_nodeInstance;
};
-uint qHash(const ServerNodeInstance &instance);
+ServerNodeInstance::QHashValueType qHash(const ServerNodeInstance &instance);
bool operator ==(const ServerNodeInstance &first, const ServerNodeInstance &second);
bool operator <(const ServerNodeInstance &first, const ServerNodeInstance &second);
QDebug operator <<(QDebug debug, const ServerNodeInstance &instance);
diff --git a/src/libs/3rdparty/syntax-highlighting/src/indexer/katehighlightingindexer.cpp b/src/libs/3rdparty/syntax-highlighting/src/indexer/katehighlightingindexer.cpp
index 789089625b..4de51ba7c8 100644
--- a/src/libs/3rdparty/syntax-highlighting/src/indexer/katehighlightingindexer.cpp
+++ b/src/libs/3rdparty/syntax-highlighting/src/indexer/katehighlightingindexer.cpp
@@ -350,7 +350,7 @@ private:
friend uint qHash(const Item &item, uint seed = 0)
{
- return qHash(item.content, seed);
+ return uint(qHash(item.content, seed));
}
friend bool operator==(const Item &item0, const Item &item1)
@@ -719,7 +719,7 @@ private:
friend uint qHash(const Style &style, uint seed = 0)
{
- return qHash(style.name, seed);
+ return uint(qHash(style.name, seed));
}
friend bool operator==(const Style &style0, const Style &style1)
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 5eaa04baf4..3f7e791115 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -38,6 +38,7 @@
#include <cplusplus/Control.h>
#include <utils/algorithm.h>
+#include <utils/porting.h>
#include <QStack>
#include <QHash>
@@ -150,9 +151,9 @@ bool operator==(const FullyQualifiedName &left, const FullyQualifiedName &right)
return compareFullyQualifiedName(left.fqn, right.fqn);
}
-uint qHash(const FullyQualifiedName &fullyQualifiedName)
+Utils::QHashValueType qHash(const FullyQualifiedName &fullyQualifiedName)
{
- uint h = 0;
+ Utils::QHashValueType 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()) {
diff --git a/src/libs/cplusplus/LookupItem.cpp b/src/libs/cplusplus/LookupItem.cpp
index 7fc73ba240..f4fce6e4ed 100644
--- a/src/libs/cplusplus/LookupItem.cpp
+++ b/src/libs/cplusplus/LookupItem.cpp
@@ -33,10 +33,10 @@
using namespace CPlusPlus;
-uint CPlusPlus::qHash(const LookupItem &key)
+Utils::QHashValueType CPlusPlus::qHash(const LookupItem &key)
{
- const uint h1 = QT_PREPEND_NAMESPACE(qHash)(key.type().type());
- const uint h2 = QT_PREPEND_NAMESPACE(qHash)(key.scope());
+ const Utils::QHashValueType h1 = QT_PREPEND_NAMESPACE(qHash)(key.type().type());
+ const Utils::QHashValueType h2 = QT_PREPEND_NAMESPACE(qHash)(key.scope());
return ((h1 << 16) | (h1 >> 16)) ^ h2;
}
diff --git a/src/libs/cplusplus/LookupItem.h b/src/libs/cplusplus/LookupItem.h
index e2683c2877..bc760f8d8b 100644
--- a/src/libs/cplusplus/LookupItem.h
+++ b/src/libs/cplusplus/LookupItem.h
@@ -26,6 +26,7 @@
#pragma once
#include <cplusplus/FullySpecifiedType.h>
+#include <utils/porting.h>
#include <QHash>
@@ -70,6 +71,6 @@ private:
ClassOrNamespace *_binding;
};
-uint qHash(const CPlusPlus::LookupItem &result);
+Utils::QHashValueType qHash(const CPlusPlus::LookupItem &result);
} // namespace CPlusPlus
diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp
index ea83933b7e..e3b2b07080 100644
--- a/src/libs/extensionsystem/pluginspec.cpp
+++ b/src/libs/extensionsystem/pluginspec.cpp
@@ -155,7 +155,7 @@ using namespace ExtensionSystem::Internal;
\fn uint ExtensionSystem::qHash(const ExtensionSystem::PluginDependency &value)
\internal
*/
-uint ExtensionSystem::qHash(const PluginDependency &value)
+Utils::QHashValueType ExtensionSystem::qHash(const PluginDependency &value)
{
return qHash(value.name);
}
diff --git a/src/libs/extensionsystem/pluginspec.h b/src/libs/extensionsystem/pluginspec.h
index d8d85ba520..4b2bcc1306 100644
--- a/src/libs/extensionsystem/pluginspec.h
+++ b/src/libs/extensionsystem/pluginspec.h
@@ -27,6 +27,8 @@
#include "extensionsystem_global.h"
+#include <utils/porting.h>
+
#include <QString>
#include <QHash>
#include <QVector>
@@ -65,7 +67,7 @@ struct EXTENSIONSYSTEM_EXPORT PluginDependency
QString toString() const;
};
-uint qHash(const ExtensionSystem::PluginDependency &value);
+Utils::QHashValueType qHash(const ExtensionSystem::PluginDependency &value);
struct EXTENSIONSYSTEM_EXPORT PluginArgumentDescription
{
diff --git a/src/libs/modelinglib/qmt/infrastructure/handle.h b/src/libs/modelinglib/qmt/infrastructure/handle.h
index b7333a1146..7558ec9699 100644
--- a/src/libs/modelinglib/qmt/infrastructure/handle.h
+++ b/src/libs/modelinglib/qmt/infrastructure/handle.h
@@ -74,7 +74,7 @@ private:
};
template<class T>
-inline int qHash(const Handle<T> &handle)
+inline auto qHash(const Handle<T> &handle)
{
return qHash(handle.uid());
}
diff --git a/src/libs/modelinglib/qmt/style/defaultstyleengine.cpp b/src/libs/modelinglib/qmt/style/defaultstyleengine.cpp
index f2da9a9292..47706f91fc 100644
--- a/src/libs/modelinglib/qmt/style/defaultstyleengine.cpp
+++ b/src/libs/modelinglib/qmt/style/defaultstyleengine.cpp
@@ -38,6 +38,7 @@
#include "qmt/infrastructure/qmtassert.h"
#include <utils/algorithm.h>
+#include <utils/porting.h>
#include <QSet>
@@ -82,7 +83,7 @@ public:
ObjectVisuals m_objectVisuals;
};
-uint qHash(const ObjectStyleKey &styleKey)
+Utils::QHashValueType qHash(const ObjectStyleKey &styleKey)
{
return ::qHash(styleKey.m_elementType) ^ qHash(styleKey.m_objectVisuals);
}
@@ -106,7 +107,7 @@ public:
DObject::VisualPrimaryRole m_visualPrimaryRole = DObject::PrimaryRoleNormal;
};
-uint qHash(const RelationStyleKey &styleKey)
+Utils::QHashValueType qHash(const RelationStyleKey &styleKey)
{
return ::qHash(styleKey.m_elementType) ^ ::qHash(styleKey.m_visualPrimaryRole);
}
@@ -127,7 +128,7 @@ public:
DAnnotation::VisualRole m_visualRole = DAnnotation::RoleNormal;
};
-uint qHash(const AnnotationStyleKey &styleKey)
+Utils::QHashValueType qHash(const AnnotationStyleKey &styleKey)
{
return ::qHash(styleKey.m_visualRole);
}
@@ -142,11 +143,11 @@ class BoundaryStyleKey
{
};
-uint qHash(const BoundaryStyleKey &styleKey)
+Utils::QHashValueType qHash(const BoundaryStyleKey &styleKey)
{
Q_UNUSED(styleKey)
- return 1;
+ return ::qHash(1);
}
bool operator==(const BoundaryStyleKey &lhs, const BoundaryStyleKey &rhs)
@@ -162,11 +163,11 @@ class SwimlaneStyleKey
{
};
-uint qHash(const SwimlaneStyleKey &styleKey)
+Utils::QHashValueType qHash(const SwimlaneStyleKey &styleKey)
{
Q_UNUSED(styleKey)
- return 1;
+ return ::qHash(1);
}
bool operator==(const SwimlaneStyleKey &lhs, const SwimlaneStyleKey &rhs)
diff --git a/src/libs/modelinglib/qmt/style/objectvisuals.cpp b/src/libs/modelinglib/qmt/style/objectvisuals.cpp
index a4bdadc26e..7db69f6965 100644
--- a/src/libs/modelinglib/qmt/style/objectvisuals.cpp
+++ b/src/libs/modelinglib/qmt/style/objectvisuals.cpp
@@ -82,7 +82,7 @@ bool operator==(const ObjectVisuals &lhs, const ObjectVisuals &rhs)
&& lhs.depth() == rhs.depth();
}
-uint qHash(const ObjectVisuals &objectVisuals)
+Utils::QHashValueType qHash(const ObjectVisuals &objectVisuals)
{
return ::qHash(static_cast<int>(objectVisuals.visualPrimaryRole()))
^ ::qHash(static_cast<int>(objectVisuals.visualSecondaryRole()))
diff --git a/src/libs/modelinglib/qmt/style/objectvisuals.h b/src/libs/modelinglib/qmt/style/objectvisuals.h
index 0d708fe0a5..dcc4bee623 100644
--- a/src/libs/modelinglib/qmt/style/objectvisuals.h
+++ b/src/libs/modelinglib/qmt/style/objectvisuals.h
@@ -27,6 +27,8 @@
#include "qmt/diagram/dobject.h"
+#include <utils/porting.h>
+
#include <QColor>
namespace qmt {
@@ -60,6 +62,6 @@ private:
};
bool operator==(const ObjectVisuals &lhs, const ObjectVisuals &rhs);
-uint qHash(const ObjectVisuals &objectVisuals);
+Utils::QHashValueType qHash(const ObjectVisuals &objectVisuals);
} // namespace qmt
diff --git a/src/libs/qmljs/qmljsdialect.cpp b/src/libs/qmljs/qmljsdialect.cpp
index cfe71b2265..d0b922a720 100644
--- a/src/libs/qmljs/qmljsdialect.cpp
+++ b/src/libs/qmljs/qmljsdialect.cpp
@@ -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)
diff --git a/src/libs/qmljs/qmljsdialect.h b/src/libs/qmljs/qmljsdialect.h
index a2f2822599..e594164278 100644
--- a/src/libs/qmljs/qmljsdialect.h
+++ b/src/libs/qmljs/qmljsdialect.h
@@ -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);
diff --git a/src/libs/qmljs/qmljsimportdependencies.cpp b/src/libs/qmljs/qmljsimportdependencies.cpp
index 3cf94cb342..757ff2c388 100644
--- a/src/libs/qmljs/qmljsimportdependencies.cpp
+++ b/src/libs/qmljs/qmljsimportdependencies.cpp
@@ -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);
diff --git a/src/libs/qmljs/qmljsimportdependencies.h b/src/libs/qmljs/qmljsimportdependencies.h
index 41f8491551..a05bf1b408 100644
--- a/src/libs/qmljs/qmljsimportdependencies.h
+++ b/src/libs/qmljs/qmljsimportdependencies.h
@@ -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);
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 9ae98e3530..47951eeb28 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -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);
}
diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h
index 6929386785..7322541e1a 100644
--- a/src/libs/qmljs/qmljsinterpreter.h
+++ b/src/libs/qmljs/qmljsinterpreter.h
@@ -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
{
diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp
index 4fcdb0a748..58ead76afc 100644
--- a/src/libs/qmljs/qmljslink.cpp
+++ b/src/libs/qmljs/qmljslink.cpp
@@ -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);
diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp
index ce6d0cc2cd..065f96809e 100644
--- a/src/libs/utils/filepath.cpp
+++ b/src/libs/utils/filepath.cpp
@@ -1298,7 +1298,7 @@ FilePath FilePath::stringAppended(const QString &str) const
return fn;
}
-uint FilePath::hash(uint seed) const
+QHashValueType FilePath::hash(uint seed) const
{
if (Utils::HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
return qHash(m_data.toUpper(), seed);
diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h
index 474f2c1416..a83c0aa517 100644
--- a/src/libs/utils/filepath.h
+++ b/src/libs/utils/filepath.h
@@ -26,6 +26,7 @@
#pragma once
#include "utils_global.h"
+#include "porting.h"
#include "hostosinfo.h"
@@ -140,7 +141,7 @@ public:
void clear();
bool isEmpty() const;
- uint hash(uint seed) const;
+ QHashValueType hash(uint seed) const;
[[nodiscard]] FilePath resolvePath(const FilePath &tail) const;
[[nodiscard]] FilePath resolvePath(const QString &tail) const;
@@ -201,7 +202,7 @@ private:
using FilePaths = QList<FilePath>;
-inline uint qHash(const Utils::FilePath &a, uint seed = 0)
+inline QHashValueType qHash(const Utils::FilePath &a, uint seed = 0)
{
return a.hash(seed);
}
diff --git a/src/libs/utils/id.cpp b/src/libs/utils/id.cpp
index 26430a2938..1349dd8488 100644
--- a/src/libs/utils/id.cpp
+++ b/src/libs/utils/id.cpp
@@ -84,7 +84,7 @@ static bool operator==(const StringHolder &sh1, const StringHolder &sh2)
}
-static uint qHash(const StringHolder &sh)
+static auto qHash(const StringHolder &sh)
{
return QT_PREPEND_NAMESPACE(qHash)(sh.h, 0);
}
diff --git a/src/libs/utils/id.h b/src/libs/utils/id.h
index e0af61099c..5c6440bd56 100644
--- a/src/libs/utils/id.h
+++ b/src/libs/utils/id.h
@@ -26,6 +26,7 @@
#pragma once
#include "utils_global.h"
+#include "porting.h"
#include <QList>
#include <QMetaType>
@@ -79,7 +80,7 @@ private:
quintptr m_id = 0;
};
-inline uint qHash(Id id) { return static_cast<uint>(id.uniqueIdentifier()); }
+inline QHashValueType qHash(Id id) { return static_cast<QHashValueType>(id.uniqueIdentifier()); }
} // namespace Utils
diff --git a/src/libs/utils/link.cpp b/src/libs/utils/link.cpp
index 884936a7bb..1df67837b1 100644
--- a/src/libs/utils/link.cpp
+++ b/src/libs/utils/link.cpp
@@ -63,7 +63,7 @@ Link Link::fromFilePath(const FilePath &filePath, bool canContainLineNumber, QSt
return Link{filePath.withNewPath(fileName.left(postfixPos)), lineColumn.line, lineColumn.column};
}
-uint qHash(const Link &l)
+QHashValueType qHash(const Link &l)
{
QString s = l.targetFilePath.toString();
return qHash(s.append(':').append(QString::number(l.targetLine)).append(':')
diff --git a/src/libs/utils/link.h b/src/libs/utils/link.h
index 34c2c5a5cf..6d9fbb8ac1 100644
--- a/src/libs/utils/link.h
+++ b/src/libs/utils/link.h
@@ -25,7 +25,8 @@
#pragma once
-#include <utils/fileutils.h>
+#include "fileutils.h"
+#include "porting.h"
#include <QString>
#include <qmetatype.h>
@@ -75,7 +76,7 @@ public:
int targetColumn;
};
-uint QTCREATOR_UTILS_EXPORT qHash(const Link &l);
+QTCREATOR_UTILS_EXPORT QHashValueType qHash(const Link &l);
using ProcessLinkCallback = std::function<void(const Link &)>;
diff --git a/src/plugins/clangtools/clangtoolsdiagnostic.cpp b/src/plugins/clangtools/clangtoolsdiagnostic.cpp
index 7fe7098c22..42ec9f5f2a 100644
--- a/src/plugins/clangtools/clangtoolsdiagnostic.cpp
+++ b/src/plugins/clangtools/clangtoolsdiagnostic.cpp
@@ -62,7 +62,7 @@ QIcon Diagnostic::icon() const
return {};
}
-quint32 qHash(const Diagnostic &diagnostic)
+Utils::QHashValueType qHash(const Diagnostic &diagnostic)
{
return qHash(diagnostic.name)
^ qHash(diagnostic.description)
diff --git a/src/plugins/clangtools/clangtoolsdiagnostic.h b/src/plugins/clangtools/clangtoolsdiagnostic.h
index e64d91a29f..10534ff0b2 100644
--- a/src/plugins/clangtools/clangtoolsdiagnostic.h
+++ b/src/plugins/clangtools/clangtoolsdiagnostic.h
@@ -27,6 +27,8 @@
#include <debugger/analyzer/diagnosticlocation.h>
+#include <utils/porting.h>
+
#include <QMetaType>
#include <QString>
#include <QVector>
@@ -68,7 +70,7 @@ bool operator==(const Diagnostic &lhs, const Diagnostic &rhs);
using Diagnostics = QList<Diagnostic>;
-quint32 qHash(const Diagnostic &diagnostic);
+Utils::QHashValueType qHash(const Diagnostic &diagnostic);
} // namespace Internal
} // namespace ClangTools
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
index 93e6e6232a..bd5556d215 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
@@ -472,7 +472,7 @@ bool CMakeConfigItem::operator==(const CMakeConfigItem &o) const
return o.key == key && o.value == value && o.isUnset == isUnset;
}
-uint qHash(const CMakeConfigItem &it)
+Utils::QHashValueType qHash(const CMakeConfigItem &it)
{
return ::qHash(it.key) ^ ::qHash(it.value) ^ ::qHash(it.isUnset);
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
index dae93455d7..19bbbfd7d6 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
@@ -27,6 +27,7 @@
#include "cmake_global.h"
+#include <utils/porting.h>
#include <utils/optional.h>
#include <QByteArray>
@@ -78,7 +79,7 @@ public:
QStringList values;
};
-uint qHash(const CMakeConfigItem &it); // needed for MSVC
+Utils::QHashValueType qHash(const CMakeConfigItem &it); // needed for MSVC
class CMAKE_EXPORT CMakeConfig : public QList<CMakeConfigItem>
{
diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.h b/src/plugins/cmakeprojectmanager/fileapidataextractor.h
index 2b65c76e07..1bc99bf1a8 100644
--- a/src/plugins/cmakeprojectmanager/fileapidataextractor.h
+++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.h
@@ -56,7 +56,7 @@ public:
bool isGenerated = false;
};
-inline uint qHash(const CMakeFileInfo &info, uint seed = 0) { return info.path.hash(seed); }
+inline auto qHash(const CMakeFileInfo &info, uint seed = 0) { return info.path.hash(seed); }
class FileApiQtcData
{
diff --git a/src/plugins/cppcheck/cppcheckdiagnostic.cpp b/src/plugins/cppcheck/cppcheckdiagnostic.cpp
index 6534018fc5..a1b8235e82 100644
--- a/src/plugins/cppcheck/cppcheckdiagnostic.cpp
+++ b/src/plugins/cppcheck/cppcheckdiagnostic.cpp
@@ -34,7 +34,7 @@ bool Diagnostic::operator==(const Diagnostic &r) const
== std::tie(r.severity, r.message, r.fileName, r.lineNumber);
}
-quint32 qHash(const Diagnostic &diagnostic)
+Utils::QHashValueType qHash(const Diagnostic &diagnostic)
{
return qHash(diagnostic.message) ^ qHash(diagnostic.fileName) ^ diagnostic.lineNumber;
}
diff --git a/src/plugins/cppcheck/cppcheckdiagnostic.h b/src/plugins/cppcheck/cppcheckdiagnostic.h
index eea6ef430e..1983af68de 100644
--- a/src/plugins/cppcheck/cppcheckdiagnostic.h
+++ b/src/plugins/cppcheck/cppcheckdiagnostic.h
@@ -26,6 +26,7 @@
#pragma once
#include <utils/fileutils.h>
+#include <utils/porting.h>
namespace Cppcheck {
namespace Internal {
@@ -49,7 +50,7 @@ public:
int lineNumber = 0;
};
-quint32 qHash(const Diagnostic &diagnostic);
+Utils::QHashValueType qHash(const Diagnostic &diagnostic);
} // namespace Internal
} // namespace Cppcheck
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index f0ab3becb0..38ab02e0a9 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -1285,7 +1285,7 @@ public:
<< quoteUnprintable(m_text);
}
- friend uint qHash(const Input &i)
+ friend auto qHash(const Input &i)
{
return ::qHash(i.m_key);
}
diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp
index 79fddd3779..7fafba0ef4 100644
--- a/src/plugins/ios/iosprobe.cpp
+++ b/src/plugins/ios/iosprobe.cpp
@@ -160,12 +160,12 @@ bool XcodePlatform::operator==(const XcodePlatform &other) const
return developerPath == other.developerPath;
}
-uint qHash(const XcodePlatform &platform)
+Utils::QHashValueType qHash(const XcodePlatform &platform)
{
return qHash(platform.developerPath);
}
-uint qHash(const XcodePlatform::ToolchainTarget &target)
+Utils::QHashValueType qHash(const XcodePlatform::ToolchainTarget &target)
{
return qHash(target.name);
}
diff --git a/src/plugins/ios/iosprobe.h b/src/plugins/ios/iosprobe.h
index 52cf3015c5..966f669d08 100644
--- a/src/plugins/ios/iosprobe.h
+++ b/src/plugins/ios/iosprobe.h
@@ -24,6 +24,9 @@
****************************************************************************/
#pragma once
+
+#include <utils/porting.h>
+
#include <QSettings>
#include <QSharedPointer>
#include <QString>
@@ -61,8 +64,8 @@ public:
bool operator==(const XcodePlatform &other) const;
};
-uint qHash(const XcodePlatform &platform);
-uint qHash(const XcodePlatform::ToolchainTarget &target);
+Utils::QHashValueType qHash(const XcodePlatform &platform);
+Utils::QHashValueType qHash(const XcodePlatform::ToolchainTarget &target);
class XcodeProbe
{
diff --git a/src/plugins/modeleditor/modelindexer.cpp b/src/plugins/modeleditor/modelindexer.cpp
index be4e49d9cd..d05cf9ecb3 100644
--- a/src/plugins/modeleditor/modelindexer.cpp
+++ b/src/plugins/modeleditor/modelindexer.cpp
@@ -46,6 +46,7 @@
#include <utils/mimetypes/mimetype.h>
#include <utils/mimetypes/mimedatabase.h>
#include <utils/qtcassert.h>
+#include <utils/porting.h>
#include <QQueue>
#include <QMutex>
@@ -62,7 +63,7 @@ namespace Internal {
class ModelIndexer::QueuedFile
{
- friend uint qHash(const ModelIndexer::QueuedFile &queuedFile);
+ friend Utils::QHashValueType qHash(const ModelIndexer::QueuedFile &queuedFile);
friend bool operator==(const ModelIndexer::QueuedFile &lhs,
const ModelIndexer::QueuedFile &rhs);
@@ -99,7 +100,7 @@ bool operator==(const ModelIndexer::QueuedFile &lhs, const ModelIndexer::QueuedF
return lhs.m_file == rhs.m_file && lhs.m_project == rhs.m_project;
}
-uint qHash(const ModelIndexer::QueuedFile &queuedFile)
+Utils::QHashValueType qHash(const ModelIndexer::QueuedFile &queuedFile)
{
return qHash(queuedFile.m_project) + qHash(queuedFile.m_project);
}
diff --git a/src/plugins/modeleditor/modelindexer.h b/src/plugins/modeleditor/modelindexer.h
index 708ec26e9b..e6df8bdeed 100644
--- a/src/plugins/modeleditor/modelindexer.h
+++ b/src/plugins/modeleditor/modelindexer.h
@@ -25,6 +25,8 @@
#pragma once
+#include <utils/porting.h>
+
#include <QObject>
namespace qmt { class Uid; }
@@ -50,7 +52,7 @@ class ModelIndexer :
class DiagramsCollectorVisitor;
class ModelIndexerPrivate;
- friend uint qHash(const ModelIndexer::QueuedFile &queuedFile);
+ friend Utils::QHashValueType qHash(const ModelIndexer::QueuedFile &queuedFile);
friend bool operator==(const ModelIndexer::QueuedFile &lhs,
const ModelIndexer::QueuedFile &rhs);
diff --git a/src/plugins/projectexplorer/buildtargetinfo.h b/src/plugins/projectexplorer/buildtargetinfo.h
index 7d786de3ca..34d5f19624 100644
--- a/src/plugins/projectexplorer/buildtargetinfo.h
+++ b/src/plugins/projectexplorer/buildtargetinfo.h
@@ -30,6 +30,7 @@
#include <utils/algorithm.h>
#include <utils/environment.h>
#include <utils/fileutils.h>
+#include <utils/porting.h>
#include <QList>
@@ -48,7 +49,7 @@ public:
bool isQtcRunnable = true;
bool usesTerminal = false;
- uint runEnvModifierHash = 0; // Make sure to update this when runEnvModifier changes!
+ Utils::QHashValueType runEnvModifierHash = 0; // Make sure to update this when runEnvModifier changes!
std::function<void(Utils::Environment &, bool)> runEnvModifier;
};
diff --git a/src/plugins/projectexplorer/deployablefile.cpp b/src/plugins/projectexplorer/deployablefile.cpp
index 78fbcb165e..7ecfb59409 100644
--- a/src/plugins/projectexplorer/deployablefile.cpp
+++ b/src/plugins/projectexplorer/deployablefile.cpp
@@ -53,7 +53,7 @@ bool DeployableFile::isExecutable() const
return m_type == TypeExecutable;
}
-uint qHash(const DeployableFile &d)
+Utils::QHashValueType qHash(const DeployableFile &d)
{
return qHash(qMakePair(d.localFilePath().toString(), d.remoteDirectory()));
}
diff --git a/src/plugins/projectexplorer/deployablefile.h b/src/plugins/projectexplorer/deployablefile.h
index 4709206b16..e3760e4a02 100644
--- a/src/plugins/projectexplorer/deployablefile.h
+++ b/src/plugins/projectexplorer/deployablefile.h
@@ -28,6 +28,7 @@
#include "projectexplorer_export.h"
#include <utils/fileutils.h>
+#include <utils/porting.h>
#include <QString>
@@ -71,6 +72,6 @@ inline bool operator!=(const DeployableFile &d1, const DeployableFile &d2)
return !(d1 == d2);
}
-PROJECTEXPLORER_EXPORT uint qHash(const DeployableFile &d);
+PROJECTEXPLORER_EXPORT Utils::QHashValueType qHash(const DeployableFile &d);
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/expanddata.cpp b/src/plugins/projectexplorer/expanddata.cpp
index bf3876475d..4b005b8fe5 100644
--- a/src/plugins/projectexplorer/expanddata.cpp
+++ b/src/plugins/projectexplorer/expanddata.cpp
@@ -50,7 +50,7 @@ QVariant ExpandData::toSettings() const
return QVariant::fromValue(QStringList({path, displayName}));
}
-int ProjectExplorer::Internal::qHash(const ExpandData &data)
+Utils::QHashValueType ProjectExplorer::Internal::qHash(const ExpandData &data)
{
return qHash(data.path) ^ qHash(data.displayName);
}
diff --git a/src/plugins/projectexplorer/expanddata.h b/src/plugins/projectexplorer/expanddata.h
index 9d6a656449..a7ff078680 100644
--- a/src/plugins/projectexplorer/expanddata.h
+++ b/src/plugins/projectexplorer/expanddata.h
@@ -25,6 +25,8 @@
#pragma once
+#include <utils/porting.h>
+
#include <QString>
#include <QHash>
#include <QDebug>
@@ -46,7 +48,7 @@ public:
QString displayName;
};
-int qHash(const ExpandData &data);
+Utils::QHashValueType qHash(const ExpandData &data);
} // namespace Internal
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index fe880442ba..3ef9e397a9 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -171,7 +171,7 @@ bool operator<(const Task &a, const Task &b)
}
-uint qHash(const Task &task)
+Utils::QHashValueType qHash(const Task &task)
{
return task.taskId;
}
diff --git a/src/plugins/projectexplorer/task.h b/src/plugins/projectexplorer/task.h
index a21332c708..b95d51d34e 100644
--- a/src/plugins/projectexplorer/task.h
+++ b/src/plugins/projectexplorer/task.h
@@ -29,6 +29,7 @@
#include <utils/id.h>
#include <utils/fileutils.h>
+#include <utils/porting.h>
#include <QIcon>
#include <QMetaType>
@@ -135,13 +136,13 @@ public:
using Tasks = QVector<Task>;
-bool PROJECTEXPLORER_EXPORT operator==(const Task &t1, const Task &t2);
-uint PROJECTEXPLORER_EXPORT qHash(const Task &task);
+PROJECTEXPLORER_EXPORT bool operator==(const Task &t1, const Task &t2);
+PROJECTEXPLORER_EXPORT Utils::QHashValueType qHash(const Task &task);
-bool PROJECTEXPLORER_EXPORT operator<(const Task &a, const Task &b);
+PROJECTEXPLORER_EXPORT bool operator<(const Task &a, const Task &b);
-QString PROJECTEXPLORER_EXPORT toHtml(const Tasks &issues);
-bool PROJECTEXPLORER_EXPORT containsType(const Tasks &issues, Task::TaskType);
+PROJECTEXPLORER_EXPORT QString toHtml(const Tasks &issues);
+PROJECTEXPLORER_EXPORT bool containsType(const Tasks &issues, Task::TaskType);
} //namespace ProjectExplorer
diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
index f64aecd296..b9c048764e 100644
--- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
@@ -69,8 +69,8 @@ namespace QmakeProjectManager {
static Q_LOGGING_CATEGORY(qmakeParse, "qtc.qmake.parsing", QtWarningMsg);
-uint qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); }
-uint qHash(FileOrigin fo) { return ::qHash(int(fo)); }
+Utils::QHashValueType qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); }
+Utils::QHashValueType qHash(FileOrigin fo) { return ::qHash(int(fo)); }
namespace Internal {
diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h
index cfa86b181f..9a4a22690e 100644
--- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h
+++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h
@@ -31,6 +31,7 @@
#include <coreplugin/idocument.h>
#include <cppeditor/generatedcodemodelsupport.h>
+#include <utils/porting.h>
#include <utils/textfileformat.h>
#include <QFutureWatcher>
@@ -109,7 +110,7 @@ enum class Variable {
QmakeCc,
QmakeCxx
};
-uint qHash(Variable key, uint seed = 0);
+Utils::QHashValueType qHash(Variable key, uint seed = 0);
namespace Internal {
Q_DECLARE_LOGGING_CATEGORY(qmakeNodesLog)
@@ -121,7 +122,7 @@ class QmakePriFileEvalResult;
class InstallsList;
enum class FileOrigin { ExactParse, CumulativeParse };
-uint qHash(FileOrigin fo);
+Utils::QHashValueType qHash(FileOrigin fo);
using SourceFile = QPair<Utils::FilePath, FileOrigin>;
using SourceFiles = QSet<SourceFile>;
diff --git a/src/plugins/qmldesigner/designercore/include/import.h b/src/plugins/qmldesigner/designercore/include/import.h
index 99612fa2ad..c797a19ae4 100644
--- a/src/plugins/qmldesigner/designercore/include/import.h
+++ b/src/plugins/qmldesigner/designercore/include/import.h
@@ -25,6 +25,8 @@
#pragma once
+#include <utils/porting.h>
+
#include <QString>
#include <QStringList>
#include <QMetaType>
@@ -74,7 +76,7 @@ private:
QStringList m_importPathList;
};
-QMLDESIGNERCORE_EXPORT uint qHash(const Import &import);
+QMLDESIGNERCORE_EXPORT Utils::QHashValueType qHash(const Import &import);
} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/model/import.cpp b/src/plugins/qmldesigner/designercore/model/import.cpp
index d895b07764..1c217bf47b 100644
--- a/src/plugins/qmldesigner/designercore/model/import.cpp
+++ b/src/plugins/qmldesigner/designercore/model/import.cpp
@@ -109,7 +109,7 @@ int Import::majorFromVersion(const QString &version)
return version.split('.').first().toInt();
}
-uint qHash(const Import &import)
+Utils::QHashValueType qHash(const Import &import)
{
return ::qHash(import.url()) ^ ::qHash(import.file()) ^ ::qHash(import.version()) ^ ::qHash(import.alias());
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
index 054cc31eae..8dcd41cbb4 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
@@ -36,7 +36,7 @@
namespace QmlProfiler {
-inline uint qHash(const QmlEventType &type)
+inline auto qHash(const QmlEventType &type)
{
return qHash(type.location())
^ (((type.message() << 12) & 0xf000) // 4 bits of message
diff --git a/src/plugins/remotelinux/deploymenttimeinfo.cpp b/src/plugins/remotelinux/deploymenttimeinfo.cpp
index 3130aadf20..81eb9417e3 100644
--- a/src/plugins/remotelinux/deploymenttimeinfo.cpp
+++ b/src/plugins/remotelinux/deploymenttimeinfo.cpp
@@ -61,7 +61,7 @@ public:
QString sysroot;
};
-uint qHash(const DeployParameters &p) {
+auto qHash(const DeployParameters &p) {
return qHash(qMakePair(qMakePair(p.file, p.host), p.sysroot));
}
diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
index 96492caadb..d0343b11bf 100644
--- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
+++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
@@ -41,7 +41,7 @@
using namespace TextEditor;
QT_BEGIN_NAMESPACE
-uint qHash(const AssistProposalItem &item)
+auto qHash(const AssistProposalItem &item)
{
return qHash(item.text());
}
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index e35ed5c3b2..4c6df391ce 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -141,7 +141,7 @@ bool FontSettings::equals(const FontSettings &f) const
&& m_scheme == f.m_scheme;
}
-uint qHash(const TextStyle &textStyle)
+auto qHash(const TextStyle &textStyle)
{
return ::qHash(quint8(textStyle));
}
@@ -202,7 +202,7 @@ QTextCharFormat FontSettings::toTextCharFormat(TextStyle category) const
return tf;
}
-uint qHash(TextStyles textStyles)
+auto qHash(TextStyles textStyles)
{
return ::qHash(reinterpret_cast<quint64&>(textStyles));
}
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 1d236b497f..90d141808a 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -8255,7 +8255,7 @@ IEditor *BaseTextEditor::duplicate()
QT_BEGIN_NAMESPACE
-uint qHash(const QColor &color)
+Utils::QHashValueType qHash(const QColor &color)
{
return color.rgba();
}
diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h
index 38cbdd01d3..5811f466e4 100644
--- a/src/plugins/texteditor/texteditor.h
+++ b/src/plugins/texteditor/texteditor.h
@@ -41,6 +41,7 @@
#include <utils/elidinglabel.h>
#include <utils/link.h>
#include <utils/multitextcursor.h>
+#include <utils/porting.h>
#include <utils/uncommentselection.h>
#include <QPlainTextEdit>
@@ -685,6 +686,6 @@ private:
QT_BEGIN_NAMESPACE
-uint qHash(const QColor &color);
+Utils::QHashValueType qHash(const QColor &color);
QT_END_NAMESPACE
diff --git a/src/shared/proparser/proitems.cpp b/src/shared/proparser/proitems.cpp
index 1f4a436115..8980e4c216 100644
--- a/src/shared/proparser/proitems.cpp
+++ b/src/shared/proparser/proitems.cpp
@@ -114,7 +114,7 @@ uint ProString::updatedHash() const
return (m_hash = hash(m_string.constData() + m_offset, m_length));
}
-uint qHash(const ProString &str)
+Utils::QHashValueType qHash(const ProString &str)
{
if (!(str.m_hash & 0x80000000))
return str.m_hash;
diff --git a/src/shared/proparser/proitems.h b/src/shared/proparser/proitems.h
index a16e0399d1..4da7e5444b 100644
--- a/src/shared/proparser/proitems.h
+++ b/src/shared/proparser/proitems.h
@@ -182,7 +182,7 @@ private:
int m_file;
mutable uint m_hash;
uint updatedHash() const;
- friend uint qHash(const ProString &str);
+ friend Utils::QHashValueType qHash(const ProString &str);
friend QString operator+(const ProString &one, const ProString &two);
friend class ProKey;
};
@@ -253,7 +253,7 @@ template <> struct QConcatenable<ProKey> : private QAbstractConcatenable
};
-uint qHash(const ProString &str);
+Utils::QHashValueType qHash(const ProString &str);
inline QString &operator+=(QString &that, const ProString &other)
{ return that += other.toStringView(); }
diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp
index ff87a1b8f4..b937037b1e 100644
--- a/src/shared/proparser/qmakeevaluator.cpp
+++ b/src/shared/proparser/qmakeevaluator.cpp
@@ -104,7 +104,7 @@ QMakeBaseKey::QMakeBaseKey(const QString &_root, const QString &_stash, bool _ho
{
}
-uint qHash(const QMakeBaseKey &key)
+Utils::QHashValueType qHash(const QMakeBaseKey &key)
{
return qHash(key.root) ^ qHash(key.stash) ^ (uint)key.hostBuild;
}
diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h
index 2baeab4bf5..36b1c08c41 100644
--- a/src/shared/proparser/qmakeglobals.h
+++ b/src/shared/proparser/qmakeglobals.h
@@ -27,6 +27,7 @@
#include "qmake_global.h"
#include "proitems.h"
+#include <utils/porting.h>
#ifdef QT_BUILD_QMAKE
# include <property.h>
@@ -58,7 +59,7 @@ public:
bool hostBuild;
};
-uint qHash(const QMakeBaseKey &key);
+Utils::QHashValueType qHash(const QMakeBaseKey &key);
bool operator==(const QMakeBaseKey &one, const QMakeBaseKey &two);
class QMakeBaseEnv