powerprofileconfig: Use m_profileCombo as the watcher's parent
m_profileCombo
could be an invalid pointer, because when clicking an
item, QAbstractItemView::clicked
and QAbstractItemView::activated
in
systemsettings both will be emitted, and IconMode::changeModule
will be
called twice, and closeModules()
will free m_profileCombo
in the
second call, which will crash systemsettings.
To fix the crash, set the watcher's parent to m_profileCombo
, so when
m_profileCombo
is destroyed, the watcher is also destroyed and the
connection is disconnected to prevent modification to the old m_profileCombo
.
Edited by Fushan Wen