forked from qt-creator/qt-creator
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:
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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()); });
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user