Skip to content
Commit bca001b1 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Apply patch #95860 to store empty icon (image 0) as a NULL value with SQlite and Mysql Databases

digiKam treats image zero as a "not set" icon value. This
breaks referential integrity in the database because image
zero does not exist. Explicitly convert a value of zero
into NULL when stored in the database.

Ideally digiKam should use an explicit null (in QVariant?)
placeholder for the no-icon case but currently no database
stores an image zero by default so the existing practice
works.

Note that when reading from the database the toLongLong
method of QVariant returns a zero when called against a
null value so this means that no changes are required
when reading null values in from the database.

CCBUGS: 355831
parent 10ef991c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment