From d223eb87214d6f1e3b5fec2743cfbe373610b6cf Mon Sep 17 00:00:00 2001 From: winland0704 Date: Wed, 13 Dec 2023 22:24:24 +0800 Subject: [PATCH] fix bug in example - persontoid --- QtProjects/ch09/persontoid/person.cpp | 4 ++-- ch09-04.htm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/QtProjects/ch09/persontoid/person.cpp b/QtProjects/ch09/persontoid/person.cpp index 90621dd..97668f9 100644 --- a/QtProjects/ch09/persontoid/person.cpp +++ b/QtProjects/ch09/persontoid/person.cpp @@ -1,4 +1,4 @@ -#include "person.h" +#include "person.h" //带参数的构造函数 Person::Person(QString strName, QString strGender, QDate birthDay) @@ -54,7 +54,7 @@ uint qHash(const Person &key, uint seed) uint nRet; nRet = qHash(key.name(), seed) ^ qHash(key.gender(), seed) - ^ qHash(key.gender(), seed); + ^ qHash(key.birthday(), seed); return nRet; } diff --git a/ch09-04.htm b/ch09-04.htm index 06f2f6b..0e3b885 100644 --- a/ch09-04.htm +++ b/ch09-04.htm @@ -811,9 +811,9 @@
            ^ qHash(key.gender(), seed);
+style=" color:#000000;">(key.birthday(), seed);
    return nRet;