From 1fde91789de573683eaf1d6b1294eba7757ce11b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCri=20Valdmann?= <juri.valdmann@qt.io>
Date: Mon, 3 Sep 2018 10:09:49 +0200
Subject: [PATCH] Fix QWebEngineUrlScheme::operator== constness

Task-number: QTBUG-70247
Change-Id: Ic0898966d9a88a0bbcdf749c6ea7e80e054d68a3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 src/core/api/qwebengineurlscheme.cpp | 4 ++--
 src/core/api/qwebengineurlscheme.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/core/api/qwebengineurlscheme.cpp b/src/core/api/qwebengineurlscheme.cpp
index 24bcae195..59899769b 100644
--- a/src/core/api/qwebengineurlscheme.cpp
+++ b/src/core/api/qwebengineurlscheme.cpp
@@ -237,7 +237,7 @@ QWebEngineUrlScheme::~QWebEngineUrlScheme() = default;
 /*!
   Returns \c true if this and \a that object are equal.
 */
-bool QWebEngineUrlScheme::operator==(const QWebEngineUrlScheme &that)
+bool QWebEngineUrlScheme::operator==(const QWebEngineUrlScheme &that) const
 {
     return (d == that.d)
         || (d->name == that.d->name
@@ -247,7 +247,7 @@ bool QWebEngineUrlScheme::operator==(const QWebEngineUrlScheme &that)
 }
 
 /*!
-  \fn bool QWebEngineUrlScheme::operator!=(const QWebEngineUrlScheme &that)
+  \fn bool QWebEngineUrlScheme::operator!=(const QWebEngineUrlScheme &that) const
 
   Returns \c true if this and \a that object are not equal.
 */
diff --git a/src/core/api/qwebengineurlscheme.h b/src/core/api/qwebengineurlscheme.h
index ee5bf3c3c..dd936bd9d 100644
--- a/src/core/api/qwebengineurlscheme.h
+++ b/src/core/api/qwebengineurlscheme.h
@@ -84,8 +84,8 @@ public:
 
     ~QWebEngineUrlScheme();
 
-    bool operator==(const QWebEngineUrlScheme &that);
-    bool operator!=(const QWebEngineUrlScheme &that) { return !(*this == that); }
+    bool operator==(const QWebEngineUrlScheme &that) const;
+    bool operator!=(const QWebEngineUrlScheme &that) const { return !(*this == that); }
 
     QByteArray name() const;
     void setName(const QByteArray &newValue);
-- 
GitLab