Using QSettings:setPath() several times in Qt3Support mode causes segmentation fault. It's caused because in QSettings:setPath_helper() is created new QSettingsPrivate and old is deleted by QScopedPointer::reset(). Reset Cleanup decreases reference counter. But setting new private instance doesn't increase it. Reference counting is out of sync and cause crash when application is closing.
Valgrind summary of attached example:
==5106== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 0 from 0)