diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-13 13:44:44 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-17 13:03:56 -0800 |
commit | dc37ba7758a34fb9d5dd840d41902621030fec32 (patch) | |
tree | aa046e96fe4179a5f4f5c4506ecabe2d05323180 /desktop-widgets/btdeviceselectiondialog.h | |
parent | fa6eb6144bc756380c4148d05a67a99b0ac25ef3 (diff) | |
download | subsurface-dc37ba7758a34fb9d5dd840d41902621030fec32.tar.gz |
cleanup: remove QPointer instances
QPointer is a strange "smart" pointer class, which resets itself
when the pointed-to QObject is deleted. It does this by listening
to the corresponding signal and therefore is surprisingly heavy
for a plain pointer. A cynic would say that the existence of
QPointer is an expression of Qt's broken ownership model.
In any case, QPointer was only used at two places, were it was
100% useless: As a parameter to a function and as a locally scoped
pointer. It only makes sense if
a) there is a chance that the object disappears during the pointer's
lifetime and
b) it is actually checked for null before use
None of which was the case here. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.h')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.h b/desktop-widgets/btdeviceselectiondialog.h index ebdc53b7d..62cd0eb56 100644 --- a/desktop-widgets/btdeviceselectiondialog.h +++ b/desktop-widgets/btdeviceselectiondialog.h @@ -4,7 +4,6 @@ #include <QDialog> #include <QListWidgetItem> -#include <QPointer> #include <QtBluetooth/QBluetoothLocalDevice> #include <QtBluetooth/QBluetoothDeviceDiscoveryAgent> |