Skip to content

Commit

Permalink
fix bug in example - persontoid
Browse files Browse the repository at this point in the history
  • Loading branch information
winland0704 committed Dec 13, 2023
1 parent 3705ac2 commit d223eb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions QtProjects/ch09/persontoid/person.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "person.h"
#include "person.h"

//带参数的构造函数
Person::Person(QString strName, QString strGender, QDate birthDay)
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions ch09-04.htm
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,9 @@
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">^</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">qHash</span><span
style=" color:#000000;">(</span><span style=" color:#000000;">key</span><span style=" color:#000000;">.</span><span
style=" color:#000000;">gender</span><span style=" color:#000000;">(),</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">seed</span><span style=" color:#000000;">);</span></pre>
style=" color:#000000;">(</span><span style=" color:#000000;">key</span><span style=" color:#000000;">.birthday</span><span
style=" color:#000000;">(),</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">seed</span><span
style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#c0c0c0;"> </span><span style=" color:#808000;">return</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">nRet</span><span style=" color:#000000;">;</span></pre>
Expand Down

0 comments on commit d223eb8

Please sign in to comment.