@@ -1109,8 +1109,15 @@ void AbstractMetaBuilder::traverseFunctions(ScopeModelItem scope_item, AbstractM
1109
1109
bool isInvalidDestructor = meta_function->isDestructor () && meta_function->isPrivate ();
1110
1110
bool isInvalidConstructor = meta_function->isConstructor ()
1111
1111
&& (meta_function->isPrivate () || meta_function->isInvalid ());
1112
+ if (isInvalidConstructor && meta_function->arguments ().size () == 1 &&
1113
+ meta_class->qualifiedCppName () == meta_function->arguments ().at (0 )->type ()->typeEntry ()->qualifiedCppName ())
1114
+ {
1115
+ // deleted or private copy constructor, it seems copying is not allowed
1116
+ meta_class->typeEntry ()->setNoCopy (true );
1117
+ }
1112
1118
if ((isInvalidDestructor || isInvalidConstructor)
1113
- && !meta_class->hasNonPrivateConstructor ()) {
1119
+ && !meta_class->hasNonPrivateConstructor ())
1120
+ {
1114
1121
*meta_class += AbstractMetaAttributes::Final;
1115
1122
} else if (meta_function->isConstructor () && !meta_function->isPrivate ()) {
1116
1123
*meta_class -= AbstractMetaAttributes::Final;
@@ -1434,11 +1441,6 @@ AbstractMetaFunction *AbstractMetaBuilder::traverseFunction(FunctionModelItem fu
1434
1441
meta_function->setFunctionType (AbstractMetaFunction::SlotFunction);
1435
1442
}
1436
1443
1437
- if (function_item->isDeleted ()) {
1438
- meta_function->setInvalid (true );
1439
- return meta_function;
1440
- }
1441
-
1442
1444
ArgumentList arguments = function_item->arguments ();
1443
1445
AbstractMetaArgumentList meta_arguments;
1444
1446
@@ -1494,7 +1496,7 @@ AbstractMetaFunction *AbstractMetaBuilder::traverseFunction(FunctionModelItem fu
1494
1496
}
1495
1497
}
1496
1498
1497
- // If we where not able to translate the default argument make it
1499
+ // If we were not able to translate the default argument make it
1498
1500
// reset all default arguments before this one too.
1499
1501
for (int i=0 ; i<first_default_argument; ++i) {
1500
1502
meta_arguments[i]->setDefaultValueExpression (QString ());
@@ -1506,6 +1508,11 @@ AbstractMetaFunction *AbstractMetaBuilder::traverseFunction(FunctionModelItem fu
1506
1508
}
1507
1509
}
1508
1510
1511
+ if (function_item->isDeleted ()) {
1512
+ meta_function->setInvalid (true );
1513
+ return meta_function;
1514
+ }
1515
+
1509
1516
return meta_function;
1510
1517
}
1511
1518
0 commit comments