summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generator/cppgenerator.cpp1
-rw-r--r--tests/libsample/objecttypebyvalue.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 3310ff23..0aa8cc8c 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2754,6 +2754,7 @@ void CppGenerator::writeMethodCall(QTextStream& s, const AbstractMetaFunction* f
} else {
int idx = arg->argumentIndex() - removedArgs;
bool deRef = isValueTypeWithCopyConstructorOnly(arg->type())
+ || isObjectTypeUsedAsValueType(arg->type())
|| (arg->type()->isReference() && isWrapperType(arg->type()) && !isPointer(arg->type()));
QString argName = hasConversionRule
? QString("%1"CONV_RULE_OUT_VAR_SUFFIX).arg(arg->name())
diff --git a/tests/libsample/objecttypebyvalue.h b/tests/libsample/objecttypebyvalue.h
index 0eb3bdd7..ce5d33ee 100644
--- a/tests/libsample/objecttypebyvalue.h
+++ b/tests/libsample/objecttypebyvalue.h
@@ -28,6 +28,7 @@ class ObjectTypeByValue
{
public:
ObjectTypeByValue returnSomeKindOfMe() { return ObjectTypeByValue(); }
+ void acceptKindOfMeAsValue(ObjectTypeByValue kindOfMe) {}
// prop used to check for segfaults
ProtectedProperty prop;