summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-02-24 22:27:32 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-01 17:03:29 +0100
commita1c75534a4bca417204725e77945e53059895726 (patch)
tree12887964db5e4628352fe8f18e162315097a2191 /src/corelib/global
parentd3eb877951b4fb295e1ddc35e5ee53c782784142 (diff)
QtGlobal: remove qIsDetached()
There's not a single in-tree user of this function, and the concept is a broken one in MT programs: By the time qIsDetached() returns, the result can already be different due to another thread taking a copy, or a copy in another thread being destroyed (note that this doesn't require mutex use by the user, since we promise (implicitly, if not explicitly) that you can copy from const objects without holding a lock). QTBUG-10813 talks about a use in QCache::trim(), but 677cf76340f88e0fe51c1f75aa512b6d835414ca removed it, so there's no reason to keep it anymore. Change-Id: I20380c12bdf00ac764b89d84392f0f34727b1971 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qtypeinfo.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index 815be935f7..1c08bbe1cf 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -49,15 +49,12 @@ QT_BEGIN_NAMESPACE
/*
QTypeInfo - type trait functionality
- qIsDetached - data sharing functionality
*/
/*
The catch-all template.
*/
-template <typename T> inline bool qIsDetached(T &) { return true; }
-
template <typename T>
class QTypeInfo
{
@@ -188,7 +185,6 @@ QT_BEGIN_NAMESPACE
#endif
#define Q_DECLARE_SHARED(TYPE) \
-template <> inline bool qIsDetached<TYPE>(TYPE &t) { return t.isDetached(); } \
template <> inline void qSwap<TYPE>(TYPE &value1, TYPE &value2) \
{ qSwap(value1.data_ptr(), value2.data_ptr()); } \
Q_DECLARE_SHARED_STL(TYPE)