Skip to content

Commit

Permalink
MER: Revert "Remove unused private api"
Browse files Browse the repository at this point in the history
This reverts commit 164a301.

Still needed for old QtDeclarative.
  • Loading branch information
rburchell committed Jun 3, 2015
1 parent dad4941 commit 9d44768
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/corelib/kernel/qmetatype.h
Expand Up @@ -743,6 +743,18 @@ ConverterFunctor<From, To, UnaryFunction>::~ConverterFunctor()
namespace QtMetaTypePrivate {
template <typename T, bool Accepted = true>
struct QMetaTypeFunctionHelper {
static void Delete(void *t)
{
delete static_cast<T*>(t);
}

static void *Create(const void *t)
{
if (t)
return new T(*static_cast<const T*>(t));
return new T();
}

static void Destruct(void *t)
{
Q_UNUSED(t) // Silence MSVC that warns for POD types.
Expand Down Expand Up @@ -770,6 +782,8 @@ struct QMetaTypeFunctionHelper {

template <typename T>
struct QMetaTypeFunctionHelper<T, /* Accepted */ false> {
static void Delete(void *) {}
static void *Create(const void *) { return 0; }
static void Destruct(void *) {}
static void *Construct(void *, const void *) { return 0; }
#ifndef QT_NO_DATASTREAM
Expand Down

0 comments on commit 9d44768

Please sign in to comment.