IMO, the problem isn't in Q_OBJECT (as long as AutochargeData does not use "Qt extras" - it is not an UI object, it declares no properties, slots or signals, etc.) The setOrderID() method is innocent. IMO, the problem is somewhere in the database. For starters, I recommend splitting the setOrderID() statement and seeing whether you pass and what values will the debugger show. Therefore:
QVariant val
= query.
value("increment_id");
// does it pass? QString str
= val.
toString();
// does it pass? What is in str?
setOrderID(str); // does it pass? What happens?
QVariant val = query.value("increment_id"); // does it pass?
QString str = val.toString(); // does it pass? What is in str?
setOrderID(str); // does it pass? What happens?
To copy to clipboard, switch view to plain text mode
Pleas, post your findings.
Bookmarks