sql in qt doesn't work across threads in release mode, it will be a lesson to me: obey documentation