kdecore: add comment about the re-construction of the URL in KUrlTest::testHash()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-25 23:59:30 +03:00
parent 47d0b5a297
commit db7fb2a8ee

View file

@ -52,6 +52,7 @@ void KUrlTest::testHash()
QFETCH(KUrl, url);
{
// re-construction on purpose
KUrl testurl;
testurl.setScheme(url.scheme());
testurl.setAuthority(url.authority());
@ -70,6 +71,7 @@ void KUrlTest::testHash()
if (url.isLocalFile()) {
return;
}
KUrl testurl(url);
QCOMPARE(qHash(testurl), qHash(url));
QCOMPARE(qHash(testurl), qHash(testurl));