diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2013-10-08 13:43:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-09 13:15:54 +0200 |
commit | 7f3e3c1099f42cff46bbd267c70587bcf72024fc (patch) | |
tree | 5114cf976cb2466fcd59d0d2ad0b42655b59f0de /src/gui/kernel/qguivariant.cpp | |
parent | 94abcf98175d927f8e483c8f207c51034fd3b9fc (diff) |
Compare QIcon QVariants by their cache key
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 <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/gui/kernel/qguivariant.cpp')
-rw-r--r-- | src/gui/kernel/qguivariant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QIcon>(Base::m_a)->cacheKey() == v_cast<QIcon>(Base::m_b)->cacheKey(); } #endif bool delegate(const void *p) { return Base::delegate(p); } |