summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-01 21:12:01 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-02 14:03:04 (GMT)
commit67cd8cc97104e38f2e3bae03b2a4c3575c73c461 (patch)
tree1ead1221f00e6210a32ba868ba59822f3f5324ea /src
parenta62177874d961e0884e74ba7c7c8899fdb79fb09 (diff)
downloadQt-67cd8cc97104e38f2e3bae03b2a4c3575c73c461.zip
Qt-67cd8cc97104e38f2e3bae03b2a4c3575c73c461.tar.gz
Qt-67cd8cc97104e38f2e3bae03b2a4c3575c73c461.tar.bz2
Add a template specialisation for QArgument when T is a reference.
We can't form references to references, so this is the proper solution. Though apparently GCC figures out somehow to work without it... Task-number: QTBUG-8592 Reviewed-By: Olivier Goffart
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobjectdefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 8ed7f3f..b045c42 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -271,6 +271,14 @@ public:
: QGenericArgument(aName, static_cast<const void *>(&aData))
{}
};
+template <class T>
+class QArgument<T &>: public QGenericArgument
+{
+public:
+ inline QArgument(const char *aName, T &aData)
+ : QGenericArgument(aName, static_cast<const void *>(&aData))
+ {}
+};
template <typename T>