Fix ItemWeb compilation on Qt 4.7
Fix socket code and tests