Data in crud table wasn't shown as it was supposed to.

This commit is contained in:
eelke 2018-02-18 08:32:38 +01:00
parent 2ba68d4edc
commit c51bd7594d

View file

@ -129,10 +129,7 @@ QVariant CrudModel::data(const QModelIndex &index, int role) const
if (value) { if (value) {
Oid o = m_roData->type(index.column()); Oid o = m_roData->type(index.column());
if (o == Pgsql::bool_oid) { if (o == Pgsql::bool_oid) {
if (value)
v = *value == "t"; //s = (s == "t") ? "TRUE" : "FALSE"; v = *value == "t"; //s = (s == "t") ? "TRUE" : "FALSE";
else
v = "null";
} }
else { else {
QString s = QString::fromUtf8(value->c_str()); QString s = QString::fromUtf8(value->c_str());
@ -142,9 +139,6 @@ QVariant CrudModel::data(const QModelIndex &index, int role) const
v = s; v = s;
} }
} }
else {
v = "null";
}
} }
else if (role == Qt::UserRole) { else if (role == Qt::UserRole) {
v = getType(index.column()); v = getType(index.column());