2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2019-07-12 13:40:00 +02:00
|
|
|
|
|
|
|
|
#include "webassemblyconstants.h"
|
|
|
|
|
#include "webassemblydevice.h"
|
2022-09-30 20:34:56 +02:00
|
|
|
#include "webassemblytr.h"
|
2019-07-12 13:40:00 +02:00
|
|
|
|
2019-08-01 17:57:52 +02:00
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
using namespace Utils;
|
|
|
|
|
|
2019-07-12 13:40:00 +02:00
|
|
|
namespace WebAssembly {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
WebAssemblyDevice::WebAssemblyDevice()
|
|
|
|
|
{
|
|
|
|
|
setupId(IDevice::AutoDetected, Constants::WEBASSEMBLY_DEVICE_DEVICE_ID);
|
|
|
|
|
setType(Constants::WEBASSEMBLY_DEVICE_TYPE);
|
2022-09-30 20:34:56 +02:00
|
|
|
const QString displayNameAndType = Tr::tr("Web Browser");
|
2019-08-01 14:30:10 +02:00
|
|
|
setDefaultDisplayName(displayNameAndType);
|
2019-07-12 13:40:00 +02:00
|
|
|
setDisplayType(displayNameAndType);
|
|
|
|
|
setDeviceState(IDevice::DeviceStateUnknown);
|
|
|
|
|
setMachineType(IDevice::Hardware);
|
2019-08-16 10:17:45 +02:00
|
|
|
setOsType(OsTypeOther);
|
2022-12-01 10:25:00 +01:00
|
|
|
setFileAccess(nullptr);
|
2019-07-12 13:40:00 +02:00
|
|
|
}
|
|
|
|
|
|
2022-01-26 09:05:35 +01:00
|
|
|
IDevice::Ptr WebAssemblyDevice::create()
|
2019-07-12 13:40:00 +02:00
|
|
|
{
|
2022-09-30 20:34:56 +02:00
|
|
|
return IDevicePtr(new WebAssemblyDevice);
|
2019-07-12 13:40:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WebAssemblyDeviceFactory::WebAssemblyDeviceFactory()
|
|
|
|
|
: ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE)
|
|
|
|
|
{
|
2022-09-30 20:34:56 +02:00
|
|
|
setDisplayName(Tr::tr("WebAssembly Runtime"));
|
2019-07-12 13:40:00 +02:00
|
|
|
setCombinedIcon(":/webassembly/images/webassemblydevicesmall.png",
|
|
|
|
|
":/webassembly/images/webassemblydevice.png");
|
|
|
|
|
setConstructionFunction(&WebAssemblyDevice::create);
|
2022-01-26 09:05:35 +01:00
|
|
|
setCreator(&WebAssemblyDevice::create);
|
2019-07-12 13:40:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace WebAssembly
|