Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0 RC
-
None
-
3
-
Foundation Sprint 127, Foundation Sprint 128, Foundation Sprint 129, Foundation Sprint 130
Description
The comparesEqual() function checks sectionIsPresent only for comparing that it's the same in lhs and rhs, not for whether it should compare a given section at all. So if a section contains stale data, such as other in QTBUG-134896, and setUrl() with a valid URL is called, then the resulting object will compare not equal to a QUrl object that was constructed with the same string passed to its ctor:
QUrl url1; url1.setFragment("meep"); // see QTBUG-134896 url1.setUrl("https://www.qt-project.org"); // does not overwrite d->fragment QUrl url2("https://www.qt-project.org"); QCOMPARE_EQ(url1, url2); // prints the same string, but claims they're different
QUrl url1("https://www.qt-project.org);
Attachments
Issue Links
- relates to
-
QTBUG-134896 QUrl's qHash() is inconsistent with its operator==
-
- In Review
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134900 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
632728,2 | tst_QUrl: add reproducer for relational operator bug | dev | qt/qtbase | Status: NEW | 0 | 0 |
632789,3 | QUrl: fix qHash()'s use of non-present sections | dev | qt/qtbase | Status: NEW | -1 | 0 |