summaryrefslogtreecommitdiff
path: root/client/formatparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/formatparser.cc')
-rw-r--r--client/formatparser.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/client/formatparser.cc b/client/formatparser.cc
index 233a694..0f04d0a 100644
--- a/client/formatparser.cc
+++ b/client/formatparser.cc
@@ -127,17 +127,12 @@ QString format_parser(QString format, QSqlQuery &query)
p++;
}
{
- int fieldNo = query.record().indexOf(var);
- resume += query.value(fieldNo).toString();
-
- /*
- QVector< Widget* >::iterator i = widgets.begin();
- while (i != widgets.end()) {
- Widget* w = *i;
- if(w->getName() == var) resume += w->getValue();
- i++;
+ int idx = query.record().indexOf(var);
+ if(idx == -1) {
+ printf("Unknown field in format string %s\n", var.toStdString().c_str());
+ } else {
+ resume += query.value(idx).toString();
}
- */
}
break;