Details
-
Type:
Task
-
Status: Reported
-
Priority:
Not Evaluated
-
Resolution: Unresolved
-
Affects Version/s: 5.15, 6.0.0
-
Fix Version/s: None
-
Component/s: SQL Support
-
Labels:
Description
QSqlError is a value type with broken move semantics. A value that's been moved-from via assignment operator will be valid (it will have the d-pointer of the assignee), while a value that's been moved from via move-construction will be invalid (d-pointer will be nullptr).
Getters don't check the d-pointer for being a valid pointer. That is is ok as per QUIP-19.
The class should generally use implicit sharing to avoid these inconsistencies.