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
@@ -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());
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
@@ -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()) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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());
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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()))
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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(':')
|
||||
|
@@ -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 &)>;
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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>
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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()));
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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>;
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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());
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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));
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@
|
||||
using namespace TextEditor;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
uint qHash(const AssistProposalItem &item)
|
||||
auto qHash(const AssistProposalItem &item)
|
||||
{
|
||||
return qHash(item.text());
|
||||
}
|
||||
|
@@ -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));
|
||||
}
|
||||
|
@@ -8255,7 +8255,7 @@ IEditor *BaseTextEditor::duplicate()
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
uint qHash(const QColor &color)
|
||||
Utils::QHashValueType qHash(const QColor &color)
|
||||
{
|
||||
return color.rgba();
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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(); }
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user