Skip to content

Commit 700bda6

Browse files
orgadsdantti
authored andcommitted
Make qHash compatible with Qt6 signature
1 parent 39f862f commit 700bda6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

QXlsx/header/xlsxrichstring.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
QT_BEGIN_NAMESPACE_XLSX
3636
class RichStringPrivate;
3737
class RichString;
38+
using QHashType = decltype(qHash(0));
3839
// qHash is a friend, but we can't use default arguments for friends (§8.3.6.4)
39-
uint qHash(const RichString &rs, uint seed = 0) Q_DECL_NOTHROW;
40+
QHashType qHash(const RichString &rs, QHashType seed = 0) Q_DECL_NOTHROW;
4041

4142
class QXLSX_EXPORT RichString
4243
{
@@ -63,7 +64,7 @@ class QXLSX_EXPORT RichString
6364
RichString &operator=(const RichString &other);
6465

6566
private:
66-
friend uint qHash(const RichString &rs, uint seed) Q_DECL_NOTHROW;
67+
friend QHashType qHash(const RichString &rs, QHashType seed) Q_DECL_NOTHROW;
6768
friend bool operator==(const RichString &rs1, const RichString &rs2);
6869
friend bool operator!=(const RichString &rs1, const RichString &rs2);
6970
friend bool operator<(const RichString &rs1, const RichString &rs2);

QXlsx/source/xlsxrichstring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ bool operator!=(const QString &rs1, const RichString &rs2)
309309
return rs2 != rs1;
310310
}
311311

312-
uint qHash(const RichString &rs, uint seed) Q_DECL_NOTHROW
312+
QHashType qHash(const RichString &rs, QHashType seed) Q_DECL_NOTHROW
313313
{
314314
return qHash(rs.d->idKey(), seed);
315315
}

0 commit comments

Comments
 (0)