changed std::auto_ptr for QScopedPointer