From 066dd1cdc0660d2e47bbcbad3c119d7029e08ecc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 5 Aug 2021 08:38:45 +0200 Subject: [PATCH] QInputDeviceManager: ++explicit, ++out-of-line-dtors It's private API, but exported, so de-inline the dtor to pin the vtable in QtCore instead of potentially duplicating it in every plugin that uses the class. Change-Id: Ia948985bb94677c8453a8e7be27a14085303aaf5 Reviewed-by: Giuseppe D'Angelo --- src/gui/kernel/qinputdevicemanager.cpp | 2 ++ src/gui/kernel/qinputdevicemanager_p.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qinputdevicemanager.cpp b/src/gui/kernel/qinputdevicemanager.cpp index 11442407e1..254b130461 100644 --- a/src/gui/kernel/qinputdevicemanager.cpp +++ b/src/gui/kernel/qinputdevicemanager.cpp @@ -67,6 +67,8 @@ QInputDeviceManager::QInputDeviceManager(QObject *parent) qRegisterMetaType(); } +QInputDeviceManager::~QInputDeviceManager() = default; + int QInputDeviceManager::deviceCount(DeviceType type) const { Q_D(const QInputDeviceManager); diff --git a/src/gui/kernel/qinputdevicemanager_p.h b/src/gui/kernel/qinputdevicemanager_p.h index 1d20b102e3..03dbde2d54 100644 --- a/src/gui/kernel/qinputdevicemanager_p.h +++ b/src/gui/kernel/qinputdevicemanager_p.h @@ -74,7 +74,8 @@ public: NumDeviceTypes }; - QInputDeviceManager(QObject *parent = nullptr); + explicit QInputDeviceManager(QObject *parent = nullptr); + ~QInputDeviceManager() override; int deviceCount(DeviceType type) const;