Skip to content
Snippets Groups Projects
Commit 941cdfa7 authored by Jarosław Staniek's avatar Jarosław Staniek
Browse files

Zero values are not displayed in integer columns

Summary:
(for byte/short/int/big int)

BUG:395189

Test Plan: See https://bugs.kde.org/show_bug.cgi?id=395189#c1

Reviewers: piggz

Reviewed By: piggz

Subscribers: Kexi-Devel-list

Tags: #kexi

Differential Revision: https://phabricator.kde.org/D13451
parent 54b2bcfb
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ QString KexiTextFormatter::toString(const QVariant& value, const QString& add,
*lengthExceeded = false;
}
if (d->field->isIntegerType()) {
if (value.toInt() == 0)
if (!add.isEmpty() && value.toInt() == 0)
return add; //eat 0
}
else if (d->field->isFPNumericType()) {
......@@ -166,10 +166,6 @@ QString KexiTextFormatter::toString(const QVariant& value, const QString& add,
return add;
return KexiDateTimeFormatter::toString(
*d->dateFormatter, *d->timeFormatter, value.toDateTime());
case KDbField::BigInteger:
if (value.toLongLong() == 0)
return add; //eat 0
break;
default:
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment