Check function parameters and return type for use of QString and QByteArray
parent
cdc50304b3
commit
73b9c89b30
|
@ -779,6 +779,14 @@ void writeRustTypes(const Configuration& conf, QTextStream& r) {
|
|||
hasString |= p.type.type == BindingType::QString;
|
||||
hasByteArray |= p.type.type == BindingType::QByteArray;
|
||||
}
|
||||
for (auto f: o.functions) {
|
||||
hasString |= f.type.type == BindingType::QString;
|
||||
hasByteArray |= f.type.type == BindingType::QByteArray;
|
||||
for (auto a: f.args) {
|
||||
hasString |= a.type.type == BindingType::QString;
|
||||
hasByteArray |= a.type.type == BindingType::QByteArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasOption || hasListOrTree) {
|
||||
|
|
|
@ -149,6 +149,16 @@ struct Configuration {
|
|||
ops.append(ip.type.name);
|
||||
}
|
||||
}
|
||||
for (auto f: o.functions) {
|
||||
if (!ops.contains(f.type.name)) {
|
||||
ops.append(f.type.name);
|
||||
}
|
||||
for (auto a: f.args) {
|
||||
if (!ops.contains(a.type.name)) {
|
||||
ops.append(a.type.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ops;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue