Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0
-
None
-
Mac
Description
I have an enum and am using Q_ENUM. I store this in a database. I bind a prepared statement wit the enum field, and it stores correctly. When I read the value back in from a select statement, it is reading the correct value, but value<T> always returns the first value of the enum, not the correct one.
For me, I am reading in QVariant(qlonglong, 2), and canConvert<T> is returning true, but, value<T>() is always returning the enum with value 0.
Attachments
Issue Links
- relates to
-
QTBUG-45438 QVariant::convert() to convert a double number to a registered enum type fails
- Closed
For Gerrit Dashboard: QTBUG-53384 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
159277,3 | Fix QVariant conversion to an enum type. | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
181827,4 | Fix QVariant conversion to an enum type | tqtc/vxworks-5.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |