diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-03-28 19:31:45 -0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 01:19:59 +0200 |
commit | 66df11f4d109ca3d97fed8985d6bbc6dcf90733d (patch) | |
tree | 0c514e0c7b03beea92403baaa380c6158cead84f /src/corelib/io/qurl_p.h | |
parent | 64a10879cb1f3a48b4b44c2e3a46694efb3bec0a (diff) |
Fix QUrl operator== and operator<
Don't crash when either side is null but not both sides.
Also make sure operator< is working properly and satisfies the basic
conditions of a type (such as that if A < B, then !(B < A)).
Change-Id: Idd9e9fc593e1a7781d9f4f2b13a1024b643926fd
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io/qurl_p.h')
-rw-r--r-- | src/corelib/io/qurl_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h index fb54d74260..2333809c12 100644 --- a/src/corelib/io/qurl_p.h +++ b/src/corelib/io/qurl_p.h @@ -107,6 +107,8 @@ public: void parse(const QString &url, QUrl::ParsingMode parsingMode); void clear(); + bool isEmpty() const + { return sectionIsPresent == 0 && port == -1 && path.isEmpty(); } // no QString scheme() const; void appendAuthority(QString &appendTo, QUrl::FormattingOptions options) const; |