From 7f3e3c1099f42cff46bbd267c70587bcf72024fc Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 8 Oct 2013 13:43:26 +0200 Subject: Compare QIcon QVariants by their cache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it so that two QVariants created from the same QIcon (or from QIcons that were assigned one from eachother) compare to true. Unfortunately creating two QIcons with the same path and comparing them still gives false as they have different cacheKeys Change-Id: Iafe2bc4082a830f9c6469f083c26a7abbe4b35c5 Reviewed-by: Jędrzej Nowacki --- src/gui/kernel/qguivariant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qguivariant.cpp') diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index 2842211e1d..65f57aed84 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -164,7 +164,7 @@ public: #ifndef QT_NO_ICON bool delegate(const QIcon *) { - return false; + return v_cast(Base::m_a)->cacheKey() == v_cast(Base::m_b)->cacheKey(); } #endif bool delegate(const void *p) { return Base::delegate(p); } -- cgit v1.2.3