summaryrefslogtreecommitdiff
path: root/client/formatparser.cc
diff options
context:
space:
mode:
authordeva <deva>2008-09-04 12:25:09 +0000
committerdeva <deva>2008-09-04 12:25:09 +0000
commit26dc58fb696ac1f96e018fbae7083d1ba2a1a55a (patch)
tree8fd6e55c2428c883d023677134b7a6e558246546 /client/formatparser.cc
parent4dd7add65ed2648e7c139df3138e489f8dbd8e43 (diff)
Made macrowindow clean up proprely when closed (thus terminating dangling db connections through dbwidget).
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;