mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Slip in a fix for Windows build warnings on mtc-generated code.
This commit is contained in:
parent
597d750af9
commit
94a7ded212
1 changed files with 15 additions and 11 deletions
|
@ -143,13 +143,15 @@ void generateOutput (QTextStream& out, const QList<Streamable>& streamables) {
|
|||
out << " }\n";
|
||||
out << " index = nextIndex;\n";
|
||||
}
|
||||
out << " switch (index) {\n";
|
||||
for (int i = 0; i < str.fields.size(); i++) {
|
||||
out << " case " << i << ":\n";
|
||||
out << " this->" << str.fields.at(i).name << " = value.value<" << str.fields.at(i).type << ">();\n";
|
||||
out << " break;\n";
|
||||
if (!str.fields.isEmpty()) {
|
||||
out << " switch (index) {\n";
|
||||
for (int i = 0; i < str.fields.size(); i++) {
|
||||
out << " case " << i << ":\n";
|
||||
out << " this->" << str.fields.at(i).name << " = value.value<" << str.fields.at(i).type << ">();\n";
|
||||
out << " break;\n";
|
||||
}
|
||||
out << " }\n";
|
||||
}
|
||||
out << " }\n";
|
||||
out << "}\n";
|
||||
|
||||
out << "QVariant " << name << "::getField(int index) const {\n";
|
||||
|
@ -162,12 +164,14 @@ void generateOutput (QTextStream& out, const QList<Streamable>& streamables) {
|
|||
out << " }\n";
|
||||
out << " index = nextIndex;\n";
|
||||
}
|
||||
out << " switch (index) {\n";
|
||||
for (int i = 0; i < str.fields.size(); i++) {
|
||||
out << " case " << i << ":\n";
|
||||
out << " return QVariant::fromValue(this->" << str.fields.at(i).name << ");\n";
|
||||
if (!str.fields.isEmpty()) {
|
||||
out << " switch (index) {\n";
|
||||
for (int i = 0; i < str.fields.size(); i++) {
|
||||
out << " case " << i << ":\n";
|
||||
out << " return QVariant::fromValue(this->" << str.fields.at(i).name << ");\n";
|
||||
}
|
||||
out << " }\n";
|
||||
}
|
||||
out << " }\n";
|
||||
out << " return QVariant();\n";
|
||||
out << "}\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue