From 7e0d97a9608de1bcd79bd04461e2a0bb3dbafa4b Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Sun, 19 Jan 2014 16:47:03 +0100 Subject: [PATCH] changed private hing ahsh type --- src/core/hint.cpp | 8 ++++---- src/core/hint.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/hint.cpp b/src/core/hint.cpp index 41e6cac..dbbb297 100644 --- a/src/core/hint.cpp +++ b/src/core/hint.cpp @@ -60,16 +60,16 @@ bool Hint::contains(const QString &key) const void Hint::setPrivateValue(const void *owner, const QString &key, const QVariant &value) { - m_privateData[QString("%1-%2").arg(QString::number((quintptr)owner),key)] = value; + m_privateData.insert(QPair(owner,key), value); } QVariant Hint::privateValue(const void *owner, const QString &k, const QVariant &defaultValue) const { - QString key(QString("%1-%2").arg(QString::number((quintptr)owner),k)); + QPair key(owner,k); if(m_privateData.contains(key)) { - return m_privateData[key]; + return m_privateData.value(key); } else { @@ -80,5 +80,5 @@ QVariant Hint::privateValue(const void *owner, const QString &k, const QVariant bool Hint::containsPrivateValue(const void *owner, const QString &key) const { - return m_privateData.contains(QString("%1-%2").arg(QString::number((quintptr)owner),key)); + return m_privateData.contains(QPair(owner,key)); } diff --git a/src/core/hint.h b/src/core/hint.h index fa2b82e..7c56b17 100644 --- a/src/core/hint.h +++ b/src/core/hint.h @@ -45,7 +45,7 @@ public: private: QVariantHash m_data; - QVariantHash m_privateData; + QHash, QVariant> m_privateData; };