diff options
author | hjk <hjk@qt.io> | 2020-01-21 16:17:59 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-01-23 13:32:12 +0000 |
commit | d08c0f31c449dab03b480ce07fe741620f3dcf57 (patch) | |
tree | 5fed285af9823c27be151bcdf44bce97f184bea8 /src | |
parent | 8265d1d710b6b8676e4ee4fdf4a47269898596ca (diff) |
De-Q_OBJECT-ify most DeviceFactories
WinRt is the odd one out.
Some were using setObjectName, but only used for debug reasons,
not really needed.
Change-Id: I4a370e4694443bc1c455fda4337ef3acfb9259b8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
27 files changed, 53 insertions, 80 deletions
diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp index 3ab22251c4e..16ff6828242 100644 --- a/src/plugins/android/androiddevice.cpp +++ b/src/plugins/android/androiddevice.cpp @@ -33,7 +33,6 @@ #include <utils/url.h> -#include <QCoreApplication> #include <QLoggingCategory> using namespace ProjectExplorer; @@ -45,9 +44,8 @@ AndroidDevice::AndroidDevice() { setupId(IDevice::AutoDetected, Constants::ANDROID_DEVICE_ID); setType(Constants::ANDROID_DEVICE_TYPE); - setDefaultDisplayName(QCoreApplication::translate("Android::Internal::AndroidDevice", - "Run on Android")); - setDisplayType(QCoreApplication::translate("Android::Internal::AndroidDevice", "Android")); + setDefaultDisplayName(tr("Run on Android")); + setDisplayType(tr("Android")); setMachineType(IDevice::Hardware); setOsType(Utils::OsTypeOtherUnix); @@ -88,8 +86,7 @@ QUrl AndroidDevice::toolControlChannel(const ControlChannelHint &) const AndroidDeviceFactory::AndroidDeviceFactory() : ProjectExplorer::IDeviceFactory(Constants::ANDROID_DEVICE_TYPE) { - setObjectName(QLatin1String("AndroidDeviceFactory")); - setDisplayName(tr("Android Device")); + setDisplayName(AndroidDevice::tr("Android Device")); setCombinedIcon(":/android/images/androiddevicesmall.png", ":/android/images/androiddevice.png"); setConstructionFunction(&AndroidDevice::create); diff --git a/src/plugins/android/androiddevice.h b/src/plugins/android/androiddevice.h index 33ea84cf50c..4fea1956c38 100644 --- a/src/plugins/android/androiddevice.h +++ b/src/plugins/android/androiddevice.h @@ -31,8 +31,10 @@ namespace Android { namespace Internal { -class AndroidDevice : public ProjectExplorer::IDevice +class AndroidDevice final : public ProjectExplorer::IDevice { + Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidDevice) + public: static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); } @@ -48,9 +50,8 @@ private: QUrl toolControlChannel(const ControlChannelHint &) const override; }; -class AndroidDeviceFactory : public ProjectExplorer::IDeviceFactory +class AndroidDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT public: AndroidDeviceFactory(); }; diff --git a/src/plugins/baremetal/baremetaldevice.cpp b/src/plugins/baremetal/baremetaldevice.cpp index b27c66455ab..cf06c500ab0 100644 --- a/src/plugins/baremetal/baremetaldevice.cpp +++ b/src/plugins/baremetal/baremetaldevice.cpp @@ -31,12 +31,8 @@ #include "debugserverprovidermanager.h" #include "idebugserverprovider.h" -#include <coreplugin/id.h> - #include <utils/qtcassert.h> -#include <QCoreApplication> - using namespace ProjectExplorer; namespace BareMetal { @@ -48,8 +44,7 @@ const char debugServerProviderIdKeyC[] = "IDebugServerProviderId"; BareMetalDevice::BareMetalDevice() { - setDisplayType(QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", - "Bare Metal")); + setDisplayType(tr("Bare Metal")); setDefaultDisplayName(defaultDisplayName()); setOsType(Utils::OsTypeOther); } @@ -63,8 +58,7 @@ BareMetalDevice::~BareMetalDevice() QString BareMetalDevice::defaultDisplayName() { - return QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", - "Bare Metal Device"); + return tr("Bare Metal Device"); } QString BareMetalDevice::debugServerProviderId() const @@ -128,7 +122,7 @@ IDeviceWidget *BareMetalDevice::createWidget() BareMetalDeviceFactory::BareMetalDeviceFactory() : IDeviceFactory(Constants::BareMetalOsType) { - setDisplayName(tr("Bare Metal Device")); + setDisplayName(BareMetalDevice::tr("Bare Metal Device")); setCombinedIcon(":/baremetal/images/baremetaldevicesmall.png", ":/baremetal/images/baremetaldevice.png"); setCanCreate(true); diff --git a/src/plugins/baremetal/baremetaldevice.h b/src/plugins/baremetal/baremetaldevice.h index 28299e8d315..88c42d75f24 100644 --- a/src/plugins/baremetal/baremetaldevice.h +++ b/src/plugins/baremetal/baremetaldevice.h @@ -38,6 +38,8 @@ class IDebugServerProvider; class BareMetalDevice final : public ProjectExplorer::IDevice { + Q_DECLARE_TR_FUNCTIONS(BareMetal::Internal::BareMetalDevice) + public: using Ptr = QSharedPointer<BareMetalDevice>; using ConstPtr = QSharedPointer<const BareMetalDevice>; @@ -67,8 +69,6 @@ private: class BareMetalDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT - public: explicit BareMetalDeviceFactory(); diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp index 2f1ae79b00e..9a52ca1f0e8 100644 --- a/src/plugins/boot2qt/qdbdevice.cpp +++ b/src/plugins/boot2qt/qdbdevice.cpp @@ -283,7 +283,7 @@ private: QdbLinuxDeviceFactory::QdbLinuxDeviceFactory() : IDeviceFactory(Constants::QdbLinuxOsType) { - setDisplayName(tr("Boot2Qt Device")); + setDisplayName(QdbDevice::tr("Boot2Qt Device")); setCombinedIcon(":/qdb/images/qdbdevicesmall.png", ":/qdb/images/qdbdevice.png"); setCanCreate(true); setConstructionFunction(&QdbDevice::create); diff --git a/src/plugins/boot2qt/qdbdevice.h b/src/plugins/boot2qt/qdbdevice.h index 214db74a524..5cf64c52551 100644 --- a/src/plugins/boot2qt/qdbdevice.h +++ b/src/plugins/boot2qt/qdbdevice.h @@ -32,7 +32,7 @@ namespace Qdb { namespace Internal { -class QdbDevice : public RemoteLinux::LinuxDevice +class QdbDevice final : public RemoteLinux::LinuxDevice { Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice) @@ -60,9 +60,8 @@ private: QString m_serialNumber; }; -class QdbLinuxDeviceFactory : public ProjectExplorer::IDeviceFactory +class QdbLinuxDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT public: QdbLinuxDeviceFactory(); diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index a9c9e321620..9a9e79d7e70 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -33,7 +33,6 @@ #include <coreplugin/helpmanager.h> #include <utils/portlist.h> -#include <QCoreApplication> #include <QVariant> #include <QVariantMap> #include <QMessageBox> @@ -93,7 +92,7 @@ IosDevice::IosDevice(CtorHelper) { setType(Constants::IOS_DEVICE_TYPE); setDefaultDisplayName(IosDevice::name()); - setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS")); + setDisplayType(tr("iOS")); setMachineType(IDevice::Hardware); setOsType(Utils::OsTypeMac); setDeviceState(DeviceDisconnected); @@ -538,7 +537,6 @@ void IosDeviceManager::updateAvailableDevices(const QStringList &devices) IosDeviceFactory::IosDeviceFactory() : IDeviceFactory(Constants::IOS_DEVICE_TYPE) { - setObjectName(QLatin1String("IosDeviceFactory")); setDisplayName(IosDevice::name()); setCombinedIcon(":/ios/images/iosdevicesmall.png", ":/ios/images/iosdevice.png"); diff --git a/src/plugins/ios/iosdevice.h b/src/plugins/ios/iosdevice.h index 3370deb6207..533a319f32b 100644 --- a/src/plugins/ios/iosdevice.h +++ b/src/plugins/ios/iosdevice.h @@ -42,8 +42,10 @@ class IosConfigurations; namespace Internal { class IosDeviceManager; -class IosDevice : public ProjectExplorer::IDevice +class IosDevice final : public ProjectExplorer::IDevice { + Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosDevice) + public: using Dict = QMap<QString, QString>; using ConstPtr = QSharedPointer<const IosDevice>; @@ -76,9 +78,8 @@ protected: mutable quint16 m_lastPort; }; -class IosDeviceFactory : public ProjectExplorer::IDeviceFactory +class IosDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT public: IosDeviceFactory(); diff --git a/src/plugins/ios/iossimulator.cpp b/src/plugins/ios/iossimulator.cpp index 84eebaae0f7..2b671fffe64 100644 --- a/src/plugins/ios/iossimulator.cpp +++ b/src/plugins/ios/iossimulator.cpp @@ -51,9 +51,8 @@ IosSimulator::IosSimulator(Core::Id id) setType(Constants::IOS_SIMULATOR_TYPE); setMachineType(IDevice::Emulator); setOsType(Utils::OsTypeMac); - setDefaultDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", - "iOS Simulator")); - setDisplayType(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator")); + setDefaultDisplayName(tr("iOS Simulator")); + setDisplayType(tr("iOS Simulator")); setDeviceState(DeviceReadyToUse); } @@ -242,8 +241,7 @@ QDebug operator <<(QDebug debug, const IosDeviceType &deviceType) IosSimulatorFactory::IosSimulatorFactory() : ProjectExplorer::IDeviceFactory(Constants::IOS_SIMULATOR_TYPE) { - setObjectName(QLatin1String("IosSimulatorFactory")); - setDisplayName(tr("iOS Simulator")); + setDisplayName(IosSimulator::tr("iOS Simulator")); setCombinedIcon(":/ios/images/iosdevicesmall.png", ":/ios/images/iosdevice.png"); setConstructionFunction([] { return ProjectExplorer::IDevice::Ptr(new IosSimulator()); }); diff --git a/src/plugins/ios/iossimulator.h b/src/plugins/ios/iossimulator.h index 6d21acc4e68..d6fca46a475 100644 --- a/src/plugins/ios/iossimulator.h +++ b/src/plugins/ios/iossimulator.h @@ -62,8 +62,10 @@ public: QDebug operator <<(QDebug debug, const IosDeviceType &deviceType); -class IosSimulator : public ProjectExplorer::IDevice +class IosSimulator final : public ProjectExplorer::IDevice { + Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosSimulator) + public: using ConstPtr = QSharedPointer<const IosSimulator>; using Ptr = QSharedPointer<IosSimulator>; @@ -84,9 +86,8 @@ private: mutable quint16 m_lastPort; }; -class IosSimulatorFactory : public ProjectExplorer::IDeviceFactory +class IosSimulatorFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT public: IosSimulatorFactory(); }; diff --git a/src/plugins/mcusupport/mcusupportdevice.cpp b/src/plugins/mcusupport/mcusupportdevice.cpp index 17fb3d2471c..fff6c307490 100644 --- a/src/plugins/mcusupport/mcusupportdevice.cpp +++ b/src/plugins/mcusupport/mcusupportdevice.cpp @@ -56,7 +56,7 @@ ProjectExplorer::IDevice::Ptr McuSupportDevice::create() McuSupportDeviceFactory::McuSupportDeviceFactory() : ProjectExplorer::IDeviceFactory(Constants::DEVICE_TYPE) { - setDisplayName(tr("MCU Device")); + setDisplayName(McuSupportDevice::tr("MCU Device")); setCombinedIcon(":/mcusupport/images/mcusupportdevicesmall.png", ":/mcusupport/images/mcusupportdevice.png"); setCanCreate(true); diff --git a/src/plugins/mcusupport/mcusupportdevice.h b/src/plugins/mcusupport/mcusupportdevice.h index 50c505eb489..6bbd764914f 100644 --- a/src/plugins/mcusupport/mcusupportdevice.h +++ b/src/plugins/mcusupport/mcusupportdevice.h @@ -27,12 +27,10 @@ #include <projectexplorer/devicesupport/desktopdevice.h> -#include <QCoreApplication> - namespace McuSupport { namespace Internal { -class McuSupportDevice : public ProjectExplorer::DesktopDevice +class McuSupportDevice final : public ProjectExplorer::DesktopDevice { Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportDevice) @@ -43,10 +41,8 @@ private: McuSupportDevice(); }; -class McuSupportDeviceFactory : public ProjectExplorer::IDeviceFactory +class McuSupportDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT - public: McuSupportDeviceFactory(); diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index 1128e35a3be..455783855bf 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -53,8 +53,7 @@ DesktopDevice::DesktopDevice() { setupId(IDevice::AutoDetected, DESKTOP_DEVICE_ID); setType(DESKTOP_DEVICE_TYPE); - setDefaultDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", - "Local PC")); + setDefaultDisplayName(tr("Local PC")); setDisplayType(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop")); setDeviceState(IDevice::DeviceStateUnknown); diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.h b/src/plugins/projectexplorer/devicesupport/desktopdevice.h index 2610cc9b128..aacea5f9c7f 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.h @@ -30,6 +30,8 @@ #include "idevice.h" #include "idevicefactory.h" +#include <QApplication> + namespace ProjectExplorer { class ProjectExplorerPlugin; @@ -37,6 +39,8 @@ namespace Internal { class DesktopDeviceFactory; } class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice { + Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::DesktopDevice) + public: IDevice::DeviceInfo deviceInformation() const override; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp index 0c4e488c714..90f7bd92cb1 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp @@ -31,7 +31,6 @@ #include <utils/icon.h> #include <utils/qtcassert.h> -#include <QApplication> #include <QStyle> namespace ProjectExplorer { @@ -41,7 +40,7 @@ DesktopDeviceFactory::DesktopDeviceFactory() : IDeviceFactory(Constants::DESKTOP_DEVICE_TYPE) { setConstructionFunction([] { return IDevice::Ptr(new DesktopDevice); }); - setDisplayName(tr("Desktop")); + setDisplayName(DesktopDevice::tr("Desktop")); setIcon(Utils::creatorTheme()->flag(Utils::Theme::FlatSideBarIcons) ? Utils::Icon::combinedIcon({Icons::DESKTOP_DEVICE.icon(), Icons::DESKTOP_DEVICE_SMALL.icon()}) diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.h b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.h index e69e2842509..7a02deb52e5 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.h @@ -30,10 +30,8 @@ namespace ProjectExplorer { namespace Internal { -class DesktopDeviceFactory : public IDeviceFactory +class DesktopDeviceFactory final : public IDeviceFactory { - Q_OBJECT - public: DesktopDeviceFactory(); }; diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp index ecd0aca473d..4ed4a337b4e 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp @@ -425,7 +425,7 @@ private: } }; -class TestDeviceFactory : public IDeviceFactory +class TestDeviceFactory final : public IDeviceFactory { public: TestDeviceFactory() : IDeviceFactory(TestDevice::testTypeId()) diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 65e739950f6..37403e8b82f 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -31,6 +31,7 @@ #include <utils/hostosinfo.h> #include <QAbstractSocket> +#include <QCoreApplication> #include <QList> #include <QObject> #include <QSharedPointer> diff --git a/src/plugins/projectexplorer/devicesupport/idevicefactory.h b/src/plugins/projectexplorer/devicesupport/idevicefactory.h index 419e76d2dad..1cf49385baa 100644 --- a/src/plugins/projectexplorer/devicesupport/idevicefactory.h +++ b/src/plugins/projectexplorer/devicesupport/idevicefactory.h @@ -33,12 +33,10 @@ namespace ProjectExplorer { -class PROJECTEXPLORER_EXPORT IDeviceFactory : public QObject +class PROJECTEXPLORER_EXPORT IDeviceFactory { - Q_OBJECT - public: - ~IDeviceFactory() override; + virtual ~IDeviceFactory(); static const QList<IDeviceFactory *> allDeviceFactories(); Core::Id deviceType() const { return m_deviceType; } @@ -55,6 +53,8 @@ public: protected: explicit IDeviceFactory(Core::Id deviceType); + IDeviceFactory(const IDeviceFactory &) = delete; + IDeviceFactory &operator=(const IDeviceFactory &) = delete; void setDisplayName(const QString &displayName); void setIcon(const QIcon &icon); diff --git a/src/plugins/qnx/qnxdevice.cpp b/src/plugins/qnx/qnxdevice.cpp index da5e5ca11e6..99a94c7f755 100644 --- a/src/plugins/qnx/qnxdevice.cpp +++ b/src/plugins/qnx/qnxdevice.cpp @@ -176,7 +176,7 @@ DeviceProcessSignalOperation::Ptr QnxDevice::signalOperation() const QnxDeviceFactory::QnxDeviceFactory() : ProjectExplorer::IDeviceFactory(Constants::QNX_QNX_OS_TYPE) { - setDisplayName(tr("QNX Device")); + setDisplayName(QnxDevice::tr("QNX Device")); setCombinedIcon(":/qnx/images/qnxdevicesmall.png", ":/qnx/images/qnxdevice.png"); setCanCreate(true); diff --git a/src/plugins/qnx/qnxdevice.h b/src/plugins/qnx/qnxdevice.h index 3cd7a069f9a..75666868db0 100644 --- a/src/plugins/qnx/qnxdevice.h +++ b/src/plugins/qnx/qnxdevice.h @@ -32,7 +32,7 @@ namespace Qnx { namespace Internal { -class QnxDevice : public RemoteLinux::LinuxDevice +class QnxDevice final : public RemoteLinux::LinuxDevice { Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDevice) @@ -66,10 +66,8 @@ private: mutable int m_versionNumber = 0; }; -class QnxDeviceFactory : public ProjectExplorer::IDeviceFactory +class QnxDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT - public: QnxDeviceFactory(); diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 4bec21d896b..96d74870b62 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -49,8 +49,6 @@ #include <utils/port.h> #include <utils/qtcassert.h> -#include <QTimer> - using namespace ProjectExplorer; using namespace Utils; @@ -299,7 +297,7 @@ namespace Internal { LinuxDeviceFactory::LinuxDeviceFactory() : IDeviceFactory(Constants::GenericLinuxOsType) { - setDisplayName(tr("Generic Linux Device")); + setDisplayName(LinuxDevice::tr("Generic Linux Device")); setIcon(QIcon()); setCanCreate(true); setConstructionFunction(&LinuxDevice::create); diff --git a/src/plugins/remotelinux/linuxdevice.h b/src/plugins/remotelinux/linuxdevice.h index f9a84eedb64..8cf11c75248 100644 --- a/src/plugins/remotelinux/linuxdevice.h +++ b/src/plugins/remotelinux/linuxdevice.h @@ -30,8 +30,6 @@ #include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevicefactory.h> -#include <QCoreApplication> - namespace RemoteLinux { class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice @@ -66,10 +64,8 @@ protected: namespace Internal { -class LinuxDeviceFactory : public ProjectExplorer::IDeviceFactory +class LinuxDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT - public: LinuxDeviceFactory(); diff --git a/src/plugins/webassembly/webassemblydevice.cpp b/src/plugins/webassembly/webassemblydevice.cpp index d49ebc1c37e..753bd57f041 100644 --- a/src/plugins/webassembly/webassemblydevice.cpp +++ b/src/plugins/webassembly/webassemblydevice.cpp @@ -56,7 +56,7 @@ ProjectExplorer::IDevice::Ptr WebAssemblyDevice::create() WebAssemblyDeviceFactory::WebAssemblyDeviceFactory() : ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE) { - setDisplayName(tr("WebAssembly Runtime")); + setDisplayName(WebAssemblyDevice::tr("WebAssembly Runtime")); setCombinedIcon(":/webassembly/images/webassemblydevicesmall.png", ":/webassembly/images/webassemblydevice.png"); setCanCreate(true); diff --git a/src/plugins/webassembly/webassemblydevice.h b/src/plugins/webassembly/webassemblydevice.h index 12759b22f59..137a33aaef6 100644 --- a/src/plugins/webassembly/webassemblydevice.h +++ b/src/plugins/webassembly/webassemblydevice.h @@ -27,12 +27,10 @@ #include <projectexplorer/devicesupport/desktopdevice.h> -#include <QCoreApplication> - namespace WebAssembly { namespace Internal { -class WebAssemblyDevice : public ProjectExplorer::DesktopDevice +class WebAssemblyDevice final : public ProjectExplorer::DesktopDevice { Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::WebAssemblyDevice) @@ -43,10 +41,8 @@ private: WebAssemblyDevice(); }; -class WebAssemblyDeviceFactory : public ProjectExplorer::IDeviceFactory +class WebAssemblyDeviceFactory final : public ProjectExplorer::IDeviceFactory { - Q_OBJECT - public: WebAssemblyDeviceFactory(); diff --git a/src/plugins/winrt/winrtdevice.cpp b/src/plugins/winrt/winrtdevice.cpp index a1ccf7a08fe..ed338684919 100644 --- a/src/plugins/winrt/winrtdevice.cpp +++ b/src/plugins/winrt/winrtdevice.cpp @@ -40,7 +40,6 @@ #include <utils/portlist.h> #include <QFileInfo> -#include <QCoreApplication> #include <QIcon> #include <QLoggingCategory> #include <QWizard> diff --git a/src/plugins/winrt/winrtdevice.h b/src/plugins/winrt/winrtdevice.h index 6b077d47477..d6eeb4cba92 100644 --- a/src/plugins/winrt/winrtdevice.h +++ b/src/plugins/winrt/winrtdevice.h @@ -33,7 +33,7 @@ namespace WinRt { namespace Internal { -class WinRtDevice : public ProjectExplorer::IDevice +class WinRtDevice final : public ProjectExplorer::IDevice { public: typedef QSharedPointer<WinRtDevice> Ptr; @@ -56,7 +56,7 @@ private: int m_deviceId = -1; }; -class WinRtDeviceFactory : public ProjectExplorer::IDeviceFactory +class WinRtDeviceFactory final : public QObject, public ProjectExplorer::IDeviceFactory { Q_OBJECT public: |