Replace obsolete auto_ptr by QScopedPointer