diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-05-25 23:08:18 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-26 09:21:46 -0700 |
commit | d21d42b69117aae04b68ecc9cc2139e034bde146 (patch) | |
tree | 6bb81d66565de33cb2de09eebc8924e9caf62c68 /theme | |
parent | 0de862971e98a6db88562b1e3424ee9cd3024679 (diff) | |
download | subsurface-d21d42b69117aae04b68ecc9cc2139e034bde146.tar.gz |
Cleanup: remove three instances of deleteLater() in mainwindow.cpp
deleteLater() can be dangerous. Remove where not necessary.
Analysis:
1) `helpView` was a pointer which was initialized on demand. close() and
deleteLater() were called on closure of the main window. Firstly, there's
no point in calling deleteLater(), because no references to helpView
are used later on. Secondly, the deletion (and closing) can be done
automatically in the destructor, by passing `this` as parent object.
2) `survey`: pretty much the same situation. But here, `this` was already
passed as parent object.
3) `progressDialog` is a global (not thread safe!) pointer. The object
is deleted after use. There is no point in using deleteLater(), because
the callers are not active after hideProgressBar(), which is the
place were the deleteLater() call was found.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'theme')
0 files changed, 0 insertions, 0 deletions