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>
This commit is contained in:
hjk
2020-01-21 16:17:59 +01:00
parent 8265d1d710
commit d08c0f31c4
27 changed files with 53 additions and 80 deletions

View File

@@ -33,7 +33,6 @@
#include <utils/url.h> #include <utils/url.h>
#include <QCoreApplication>
#include <QLoggingCategory> #include <QLoggingCategory>
using namespace ProjectExplorer; using namespace ProjectExplorer;
@@ -45,9 +44,8 @@ AndroidDevice::AndroidDevice()
{ {
setupId(IDevice::AutoDetected, Constants::ANDROID_DEVICE_ID); setupId(IDevice::AutoDetected, Constants::ANDROID_DEVICE_ID);
setType(Constants::ANDROID_DEVICE_TYPE); setType(Constants::ANDROID_DEVICE_TYPE);
setDefaultDisplayName(QCoreApplication::translate("Android::Internal::AndroidDevice", setDefaultDisplayName(tr("Run on Android"));
"Run on Android")); setDisplayType(tr("Android"));
setDisplayType(QCoreApplication::translate("Android::Internal::AndroidDevice", "Android"));
setMachineType(IDevice::Hardware); setMachineType(IDevice::Hardware);
setOsType(Utils::OsTypeOtherUnix); setOsType(Utils::OsTypeOtherUnix);
@@ -88,8 +86,7 @@ QUrl AndroidDevice::toolControlChannel(const ControlChannelHint &) const
AndroidDeviceFactory::AndroidDeviceFactory() AndroidDeviceFactory::AndroidDeviceFactory()
: ProjectExplorer::IDeviceFactory(Constants::ANDROID_DEVICE_TYPE) : ProjectExplorer::IDeviceFactory(Constants::ANDROID_DEVICE_TYPE)
{ {
setObjectName(QLatin1String("AndroidDeviceFactory")); setDisplayName(AndroidDevice::tr("Android Device"));
setDisplayName(tr("Android Device"));
setCombinedIcon(":/android/images/androiddevicesmall.png", setCombinedIcon(":/android/images/androiddevicesmall.png",
":/android/images/androiddevice.png"); ":/android/images/androiddevice.png");
setConstructionFunction(&AndroidDevice::create); setConstructionFunction(&AndroidDevice::create);

View File

@@ -31,8 +31,10 @@
namespace Android { namespace Android {
namespace Internal { namespace Internal {
class AndroidDevice : public ProjectExplorer::IDevice class AndroidDevice final : public ProjectExplorer::IDevice
{ {
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidDevice)
public: public:
static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); } static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); }
@@ -48,9 +50,8 @@ private:
QUrl toolControlChannel(const ControlChannelHint &) const override; QUrl toolControlChannel(const ControlChannelHint &) const override;
}; };
class AndroidDeviceFactory : public ProjectExplorer::IDeviceFactory class AndroidDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
AndroidDeviceFactory(); AndroidDeviceFactory();
}; };

View File

@@ -31,12 +31,8 @@
#include "debugserverprovidermanager.h" #include "debugserverprovidermanager.h"
#include "idebugserverprovider.h" #include "idebugserverprovider.h"
#include <coreplugin/id.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QCoreApplication>
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace BareMetal { namespace BareMetal {
@@ -48,8 +44,7 @@ const char debugServerProviderIdKeyC[] = "IDebugServerProviderId";
BareMetalDevice::BareMetalDevice() BareMetalDevice::BareMetalDevice()
{ {
setDisplayType(QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", setDisplayType(tr("Bare Metal"));
"Bare Metal"));
setDefaultDisplayName(defaultDisplayName()); setDefaultDisplayName(defaultDisplayName());
setOsType(Utils::OsTypeOther); setOsType(Utils::OsTypeOther);
} }
@@ -63,8 +58,7 @@ BareMetalDevice::~BareMetalDevice()
QString BareMetalDevice::defaultDisplayName() QString BareMetalDevice::defaultDisplayName()
{ {
return QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", return tr("Bare Metal Device");
"Bare Metal Device");
} }
QString BareMetalDevice::debugServerProviderId() const QString BareMetalDevice::debugServerProviderId() const
@@ -128,7 +122,7 @@ IDeviceWidget *BareMetalDevice::createWidget()
BareMetalDeviceFactory::BareMetalDeviceFactory() BareMetalDeviceFactory::BareMetalDeviceFactory()
: IDeviceFactory(Constants::BareMetalOsType) : IDeviceFactory(Constants::BareMetalOsType)
{ {
setDisplayName(tr("Bare Metal Device")); setDisplayName(BareMetalDevice::tr("Bare Metal Device"));
setCombinedIcon(":/baremetal/images/baremetaldevicesmall.png", setCombinedIcon(":/baremetal/images/baremetaldevicesmall.png",
":/baremetal/images/baremetaldevice.png"); ":/baremetal/images/baremetaldevice.png");
setCanCreate(true); setCanCreate(true);

View File

@@ -38,6 +38,8 @@ class IDebugServerProvider;
class BareMetalDevice final : public ProjectExplorer::IDevice class BareMetalDevice final : public ProjectExplorer::IDevice
{ {
Q_DECLARE_TR_FUNCTIONS(BareMetal::Internal::BareMetalDevice)
public: public:
using Ptr = QSharedPointer<BareMetalDevice>; using Ptr = QSharedPointer<BareMetalDevice>;
using ConstPtr = QSharedPointer<const BareMetalDevice>; using ConstPtr = QSharedPointer<const BareMetalDevice>;
@@ -67,8 +69,6 @@ private:
class BareMetalDeviceFactory final : public ProjectExplorer::IDeviceFactory class BareMetalDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
explicit BareMetalDeviceFactory(); explicit BareMetalDeviceFactory();

View File

@@ -283,7 +283,7 @@ private:
QdbLinuxDeviceFactory::QdbLinuxDeviceFactory() QdbLinuxDeviceFactory::QdbLinuxDeviceFactory()
: IDeviceFactory(Constants::QdbLinuxOsType) : IDeviceFactory(Constants::QdbLinuxOsType)
{ {
setDisplayName(tr("Boot2Qt Device")); setDisplayName(QdbDevice::tr("Boot2Qt Device"));
setCombinedIcon(":/qdb/images/qdbdevicesmall.png", ":/qdb/images/qdbdevice.png"); setCombinedIcon(":/qdb/images/qdbdevicesmall.png", ":/qdb/images/qdbdevice.png");
setCanCreate(true); setCanCreate(true);
setConstructionFunction(&QdbDevice::create); setConstructionFunction(&QdbDevice::create);

View File

@@ -32,7 +32,7 @@
namespace Qdb { namespace Qdb {
namespace Internal { namespace Internal {
class QdbDevice : public RemoteLinux::LinuxDevice class QdbDevice final : public RemoteLinux::LinuxDevice
{ {
Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice) Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice)
@@ -60,9 +60,8 @@ private:
QString m_serialNumber; QString m_serialNumber;
}; };
class QdbLinuxDeviceFactory : public ProjectExplorer::IDeviceFactory class QdbLinuxDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
QdbLinuxDeviceFactory(); QdbLinuxDeviceFactory();

View File

@@ -33,7 +33,6 @@
#include <coreplugin/helpmanager.h> #include <coreplugin/helpmanager.h>
#include <utils/portlist.h> #include <utils/portlist.h>
#include <QCoreApplication>
#include <QVariant> #include <QVariant>
#include <QVariantMap> #include <QVariantMap>
#include <QMessageBox> #include <QMessageBox>
@@ -93,7 +92,7 @@ IosDevice::IosDevice(CtorHelper)
{ {
setType(Constants::IOS_DEVICE_TYPE); setType(Constants::IOS_DEVICE_TYPE);
setDefaultDisplayName(IosDevice::name()); setDefaultDisplayName(IosDevice::name());
setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS")); setDisplayType(tr("iOS"));
setMachineType(IDevice::Hardware); setMachineType(IDevice::Hardware);
setOsType(Utils::OsTypeMac); setOsType(Utils::OsTypeMac);
setDeviceState(DeviceDisconnected); setDeviceState(DeviceDisconnected);
@@ -538,7 +537,6 @@ void IosDeviceManager::updateAvailableDevices(const QStringList &devices)
IosDeviceFactory::IosDeviceFactory() IosDeviceFactory::IosDeviceFactory()
: IDeviceFactory(Constants::IOS_DEVICE_TYPE) : IDeviceFactory(Constants::IOS_DEVICE_TYPE)
{ {
setObjectName(QLatin1String("IosDeviceFactory"));
setDisplayName(IosDevice::name()); setDisplayName(IosDevice::name());
setCombinedIcon(":/ios/images/iosdevicesmall.png", setCombinedIcon(":/ios/images/iosdevicesmall.png",
":/ios/images/iosdevice.png"); ":/ios/images/iosdevice.png");

View File

@@ -42,8 +42,10 @@ class IosConfigurations;
namespace Internal { namespace Internal {
class IosDeviceManager; class IosDeviceManager;
class IosDevice : public ProjectExplorer::IDevice class IosDevice final : public ProjectExplorer::IDevice
{ {
Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosDevice)
public: public:
using Dict = QMap<QString, QString>; using Dict = QMap<QString, QString>;
using ConstPtr = QSharedPointer<const IosDevice>; using ConstPtr = QSharedPointer<const IosDevice>;
@@ -76,9 +78,8 @@ protected:
mutable quint16 m_lastPort; mutable quint16 m_lastPort;
}; };
class IosDeviceFactory : public ProjectExplorer::IDeviceFactory class IosDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
IosDeviceFactory(); IosDeviceFactory();

View File

@@ -51,9 +51,8 @@ IosSimulator::IosSimulator(Core::Id id)
setType(Constants::IOS_SIMULATOR_TYPE); setType(Constants::IOS_SIMULATOR_TYPE);
setMachineType(IDevice::Emulator); setMachineType(IDevice::Emulator);
setOsType(Utils::OsTypeMac); setOsType(Utils::OsTypeMac);
setDefaultDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", setDefaultDisplayName(tr("iOS Simulator"));
"iOS Simulator")); setDisplayType(tr("iOS Simulator"));
setDisplayType(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
setDeviceState(DeviceReadyToUse); setDeviceState(DeviceReadyToUse);
} }
@@ -242,8 +241,7 @@ QDebug operator <<(QDebug debug, const IosDeviceType &deviceType)
IosSimulatorFactory::IosSimulatorFactory() IosSimulatorFactory::IosSimulatorFactory()
: ProjectExplorer::IDeviceFactory(Constants::IOS_SIMULATOR_TYPE) : ProjectExplorer::IDeviceFactory(Constants::IOS_SIMULATOR_TYPE)
{ {
setObjectName(QLatin1String("IosSimulatorFactory")); setDisplayName(IosSimulator::tr("iOS Simulator"));
setDisplayName(tr("iOS Simulator"));
setCombinedIcon(":/ios/images/iosdevicesmall.png", setCombinedIcon(":/ios/images/iosdevicesmall.png",
":/ios/images/iosdevice.png"); ":/ios/images/iosdevice.png");
setConstructionFunction([] { return ProjectExplorer::IDevice::Ptr(new IosSimulator()); }); setConstructionFunction([] { return ProjectExplorer::IDevice::Ptr(new IosSimulator()); });

View File

@@ -62,8 +62,10 @@ public:
QDebug operator <<(QDebug debug, const IosDeviceType &deviceType); 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: public:
using ConstPtr = QSharedPointer<const IosSimulator>; using ConstPtr = QSharedPointer<const IosSimulator>;
using Ptr = QSharedPointer<IosSimulator>; using Ptr = QSharedPointer<IosSimulator>;
@@ -84,9 +86,8 @@ private:
mutable quint16 m_lastPort; mutable quint16 m_lastPort;
}; };
class IosSimulatorFactory : public ProjectExplorer::IDeviceFactory class IosSimulatorFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
IosSimulatorFactory(); IosSimulatorFactory();
}; };

View File

@@ -56,7 +56,7 @@ ProjectExplorer::IDevice::Ptr McuSupportDevice::create()
McuSupportDeviceFactory::McuSupportDeviceFactory() McuSupportDeviceFactory::McuSupportDeviceFactory()
: ProjectExplorer::IDeviceFactory(Constants::DEVICE_TYPE) : ProjectExplorer::IDeviceFactory(Constants::DEVICE_TYPE)
{ {
setDisplayName(tr("MCU Device")); setDisplayName(McuSupportDevice::tr("MCU Device"));
setCombinedIcon(":/mcusupport/images/mcusupportdevicesmall.png", setCombinedIcon(":/mcusupport/images/mcusupportdevicesmall.png",
":/mcusupport/images/mcusupportdevice.png"); ":/mcusupport/images/mcusupportdevice.png");
setCanCreate(true); setCanCreate(true);

View File

@@ -27,12 +27,10 @@
#include <projectexplorer/devicesupport/desktopdevice.h> #include <projectexplorer/devicesupport/desktopdevice.h>
#include <QCoreApplication>
namespace McuSupport { namespace McuSupport {
namespace Internal { namespace Internal {
class McuSupportDevice : public ProjectExplorer::DesktopDevice class McuSupportDevice final : public ProjectExplorer::DesktopDevice
{ {
Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportDevice) Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportDevice)
@@ -43,10 +41,8 @@ private:
McuSupportDevice(); McuSupportDevice();
}; };
class McuSupportDeviceFactory : public ProjectExplorer::IDeviceFactory class McuSupportDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
McuSupportDeviceFactory(); McuSupportDeviceFactory();

View File

@@ -53,8 +53,7 @@ DesktopDevice::DesktopDevice()
{ {
setupId(IDevice::AutoDetected, DESKTOP_DEVICE_ID); setupId(IDevice::AutoDetected, DESKTOP_DEVICE_ID);
setType(DESKTOP_DEVICE_TYPE); setType(DESKTOP_DEVICE_TYPE);
setDefaultDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", setDefaultDisplayName(tr("Local PC"));
"Local PC"));
setDisplayType(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop")); setDisplayType(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop"));
setDeviceState(IDevice::DeviceStateUnknown); setDeviceState(IDevice::DeviceStateUnknown);

View File

@@ -30,6 +30,8 @@
#include "idevice.h" #include "idevice.h"
#include "idevicefactory.h" #include "idevicefactory.h"
#include <QApplication>
namespace ProjectExplorer { namespace ProjectExplorer {
class ProjectExplorerPlugin; class ProjectExplorerPlugin;
@@ -37,6 +39,8 @@ namespace Internal { class DesktopDeviceFactory; }
class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice
{ {
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::DesktopDevice)
public: public:
IDevice::DeviceInfo deviceInformation() const override; IDevice::DeviceInfo deviceInformation() const override;

View File

@@ -31,7 +31,6 @@
#include <utils/icon.h> #include <utils/icon.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QApplication>
#include <QStyle> #include <QStyle>
namespace ProjectExplorer { namespace ProjectExplorer {
@@ -41,7 +40,7 @@ DesktopDeviceFactory::DesktopDeviceFactory()
: IDeviceFactory(Constants::DESKTOP_DEVICE_TYPE) : IDeviceFactory(Constants::DESKTOP_DEVICE_TYPE)
{ {
setConstructionFunction([] { return IDevice::Ptr(new DesktopDevice); }); setConstructionFunction([] { return IDevice::Ptr(new DesktopDevice); });
setDisplayName(tr("Desktop")); setDisplayName(DesktopDevice::tr("Desktop"));
setIcon(Utils::creatorTheme()->flag(Utils::Theme::FlatSideBarIcons) setIcon(Utils::creatorTheme()->flag(Utils::Theme::FlatSideBarIcons)
? Utils::Icon::combinedIcon({Icons::DESKTOP_DEVICE.icon(), ? Utils::Icon::combinedIcon({Icons::DESKTOP_DEVICE.icon(),
Icons::DESKTOP_DEVICE_SMALL.icon()}) Icons::DESKTOP_DEVICE_SMALL.icon()})

View File

@@ -30,10 +30,8 @@
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Internal { namespace Internal {
class DesktopDeviceFactory : public IDeviceFactory class DesktopDeviceFactory final : public IDeviceFactory
{ {
Q_OBJECT
public: public:
DesktopDeviceFactory(); DesktopDeviceFactory();
}; };

View File

@@ -425,7 +425,7 @@ private:
} }
}; };
class TestDeviceFactory : public IDeviceFactory class TestDeviceFactory final : public IDeviceFactory
{ {
public: public:
TestDeviceFactory() : IDeviceFactory(TestDevice::testTypeId()) TestDeviceFactory() : IDeviceFactory(TestDevice::testTypeId())

View File

@@ -31,6 +31,7 @@
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <QAbstractSocket> #include <QAbstractSocket>
#include <QCoreApplication>
#include <QList> #include <QList>
#include <QObject> #include <QObject>
#include <QSharedPointer> #include <QSharedPointer>

View File

@@ -33,12 +33,10 @@
namespace ProjectExplorer { namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT IDeviceFactory : public QObject class PROJECTEXPLORER_EXPORT IDeviceFactory
{ {
Q_OBJECT
public: public:
~IDeviceFactory() override; virtual ~IDeviceFactory();
static const QList<IDeviceFactory *> allDeviceFactories(); static const QList<IDeviceFactory *> allDeviceFactories();
Core::Id deviceType() const { return m_deviceType; } Core::Id deviceType() const { return m_deviceType; }
@@ -55,6 +53,8 @@ public:
protected: protected:
explicit IDeviceFactory(Core::Id deviceType); explicit IDeviceFactory(Core::Id deviceType);
IDeviceFactory(const IDeviceFactory &) = delete;
IDeviceFactory &operator=(const IDeviceFactory &) = delete;
void setDisplayName(const QString &displayName); void setDisplayName(const QString &displayName);
void setIcon(const QIcon &icon); void setIcon(const QIcon &icon);

View File

@@ -176,7 +176,7 @@ DeviceProcessSignalOperation::Ptr QnxDevice::signalOperation() const
QnxDeviceFactory::QnxDeviceFactory() QnxDeviceFactory::QnxDeviceFactory()
: ProjectExplorer::IDeviceFactory(Constants::QNX_QNX_OS_TYPE) : ProjectExplorer::IDeviceFactory(Constants::QNX_QNX_OS_TYPE)
{ {
setDisplayName(tr("QNX Device")); setDisplayName(QnxDevice::tr("QNX Device"));
setCombinedIcon(":/qnx/images/qnxdevicesmall.png", setCombinedIcon(":/qnx/images/qnxdevicesmall.png",
":/qnx/images/qnxdevice.png"); ":/qnx/images/qnxdevice.png");
setCanCreate(true); setCanCreate(true);

View File

@@ -32,7 +32,7 @@
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
class QnxDevice : public RemoteLinux::LinuxDevice class QnxDevice final : public RemoteLinux::LinuxDevice
{ {
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDevice) Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDevice)
@@ -66,10 +66,8 @@ private:
mutable int m_versionNumber = 0; mutable int m_versionNumber = 0;
}; };
class QnxDeviceFactory : public ProjectExplorer::IDeviceFactory class QnxDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
QnxDeviceFactory(); QnxDeviceFactory();

View File

@@ -49,8 +49,6 @@
#include <utils/port.h> #include <utils/port.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QTimer>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
@@ -299,7 +297,7 @@ namespace Internal {
LinuxDeviceFactory::LinuxDeviceFactory() LinuxDeviceFactory::LinuxDeviceFactory()
: IDeviceFactory(Constants::GenericLinuxOsType) : IDeviceFactory(Constants::GenericLinuxOsType)
{ {
setDisplayName(tr("Generic Linux Device")); setDisplayName(LinuxDevice::tr("Generic Linux Device"));
setIcon(QIcon()); setIcon(QIcon());
setCanCreate(true); setCanCreate(true);
setConstructionFunction(&LinuxDevice::create); setConstructionFunction(&LinuxDevice::create);

View File

@@ -30,8 +30,6 @@
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefactory.h> #include <projectexplorer/devicesupport/idevicefactory.h>
#include <QCoreApplication>
namespace RemoteLinux { namespace RemoteLinux {
class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice
@@ -66,10 +64,8 @@ protected:
namespace Internal { namespace Internal {
class LinuxDeviceFactory : public ProjectExplorer::IDeviceFactory class LinuxDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
LinuxDeviceFactory(); LinuxDeviceFactory();

View File

@@ -56,7 +56,7 @@ ProjectExplorer::IDevice::Ptr WebAssemblyDevice::create()
WebAssemblyDeviceFactory::WebAssemblyDeviceFactory() WebAssemblyDeviceFactory::WebAssemblyDeviceFactory()
: ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE) : ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE)
{ {
setDisplayName(tr("WebAssembly Runtime")); setDisplayName(WebAssemblyDevice::tr("WebAssembly Runtime"));
setCombinedIcon(":/webassembly/images/webassemblydevicesmall.png", setCombinedIcon(":/webassembly/images/webassemblydevicesmall.png",
":/webassembly/images/webassemblydevice.png"); ":/webassembly/images/webassemblydevice.png");
setCanCreate(true); setCanCreate(true);

View File

@@ -27,12 +27,10 @@
#include <projectexplorer/devicesupport/desktopdevice.h> #include <projectexplorer/devicesupport/desktopdevice.h>
#include <QCoreApplication>
namespace WebAssembly { namespace WebAssembly {
namespace Internal { namespace Internal {
class WebAssemblyDevice : public ProjectExplorer::DesktopDevice class WebAssemblyDevice final : public ProjectExplorer::DesktopDevice
{ {
Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::WebAssemblyDevice) Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::WebAssemblyDevice)
@@ -43,10 +41,8 @@ private:
WebAssemblyDevice(); WebAssemblyDevice();
}; };
class WebAssemblyDeviceFactory : public ProjectExplorer::IDeviceFactory class WebAssemblyDeviceFactory final : public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT
public: public:
WebAssemblyDeviceFactory(); WebAssemblyDeviceFactory();

View File

@@ -40,7 +40,6 @@
#include <utils/portlist.h> #include <utils/portlist.h>
#include <QFileInfo> #include <QFileInfo>
#include <QCoreApplication>
#include <QIcon> #include <QIcon>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QWizard> #include <QWizard>

View File

@@ -33,7 +33,7 @@
namespace WinRt { namespace WinRt {
namespace Internal { namespace Internal {
class WinRtDevice : public ProjectExplorer::IDevice class WinRtDevice final : public ProjectExplorer::IDevice
{ {
public: public:
typedef QSharedPointer<WinRtDevice> Ptr; typedef QSharedPointer<WinRtDevice> Ptr;
@@ -56,7 +56,7 @@ private:
int m_deviceId = -1; int m_deviceId = -1;
}; };
class WinRtDeviceFactory : public ProjectExplorer::IDeviceFactory class WinRtDeviceFactory final : public QObject, public ProjectExplorer::IDeviceFactory
{ {
Q_OBJECT Q_OBJECT
public: public: