Re: [Qgis-developer] NULL handling and numeric data types

2014-09-24 Thread Matthias Kuhn
Just implemented it for text edit (when using QgsFilterLineEdit or
QLineEdit). [1]

Please let me know if it works and if you are missing it in other places
as well.

Matthias

[1]
https://github.com/qgis/QGIS/commit/3f8a860503c78689c981234f874771f8b1277c97

On 24.09.2014 16:59, Matthias Kuhn wrote:
 Hi Andreas,

 I think we can. It should be quite easy. Let me give it a try.

 Matthias

 On 24.09.2014 16:51, Andreas Neumann wrote:
 Hi,

 I frequently have data with NULL values and still have problems with
 QGIS correctly handling them.

 While QGIS displays NULL values of text types correctly as NULL, NULL
 values of numeric data types (e.g. smallint, double, numeric) just
 display as an empty string. I would rather like to see NULL instead of
 the empty string in the widget.

 Can we do something about that so that NULL values are correctly
 displayed as NULL also for numeric data types?

 QGIS server even displays numeric values with NULL values as 0 instead
 of NULL - which is wrong in my opinion. It is misleading as 0 and NULL
 are not the same.

 My data is in Postgis and I tested both with 2.4 and current master.

 Thanks,
 Andreas

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] NULL handling and numeric data types

2014-09-24 Thread Denis Rouzaud
It would be nice to use setSpecialValueText for spin boxes if possible 
too ;)


Adding a clear button could be done similarly to the the QgsDateTimeEdit.

Cheers,

Denis


On 24.09.2014 17:13, Matthias Kuhn wrote:

Just implemented it for text edit (when using QgsFilterLineEdit or
QLineEdit). [1]

Please let me know if it works and if you are missing it in other places
as well.

Matthias

[1]
https://github.com/qgis/QGIS/commit/3f8a860503c78689c981234f874771f8b1277c97

On 24.09.2014 16:59, Matthias Kuhn wrote:

Hi Andreas,

I think we can. It should be quite easy. Let me give it a try.

Matthias

On 24.09.2014 16:51, Andreas Neumann wrote:

Hi,

I frequently have data with NULL values and still have problems with
QGIS correctly handling them.

While QGIS displays NULL values of text types correctly as NULL, NULL
values of numeric data types (e.g. smallint, double, numeric) just
display as an empty string. I would rather like to see NULL instead of
the empty string in the widget.

Can we do something about that so that NULL values are correctly
displayed as NULL also for numeric data types?

QGIS server even displays numeric values with NULL values as 0 instead
of NULL - which is wrong in my opinion. It is misleading as 0 and NULL
are not the same.

My data is in Postgis and I tested both with 2.4 and current master.

Thanks,
Andreas

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] NULL handling and numeric data types

2014-09-24 Thread Andreas Neumann
Thank you Matthias for the very quick fix.

This fix only changes the NULL value behavior of the widget - right?

This will probably have no effect on what QGIS server does with NULL
values, right?

Thanks a lot,
Andreas

Am 24.09.2014 15:13, schrieb Matthias Kuhn:
 Just implemented it for text edit (when using QgsFilterLineEdit or
 QLineEdit). [1]
 
 Please let me know if it works and if you are missing it in other places
 as well.
 
 Matthias
 
 [1]
 https://github.com/qgis/QGIS/commit/3f8a860503c78689c981234f874771f8b1277c97
 
 On 24.09.2014 16:59, Matthias Kuhn wrote:
 Hi Andreas,

 I think we can. It should be quite easy. Let me give it a try.

 Matthias

 On 24.09.2014 16:51, Andreas Neumann wrote:
 Hi,

 I frequently have data with NULL values and still have problems with
 QGIS correctly handling them.

 While QGIS displays NULL values of text types correctly as NULL, NULL
 values of numeric data types (e.g. smallint, double, numeric) just
 display as an empty string. I would rather like to see NULL instead of
 the empty string in the widget.

 Can we do something about that so that NULL values are correctly
 displayed as NULL also for numeric data types?

 QGIS server even displays numeric values with NULL values as 0 instead
 of NULL - which is wrong in my opinion. It is misleading as 0 and NULL
 are not the same.

 My data is in Postgis and I tested both with 2.4 and current master.

 Thanks,
 Andreas

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
 
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] NULL handling and numeric data types

2014-09-24 Thread Matthias Kuhn
Hi Andreas

On 24.09.2014 17:55, Andreas Neumann wrote:
 Thank you Matthias for the very quick fix.

 This fix only changes the NULL value behavior of the widget - right?

 This will probably have no effect on what QGIS server does with NULL
 values, right?

Correct, it's just representation on forms.


-- Matthias
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer