forked from qt-creator/qt-creator
iOS: Modernize
modernize-* Change-Id: I64d2bb4320c9b444bc13e90099600628eac1f5a6 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ class CreateSimulatorDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit CreateSimulatorDialog(QWidget *parent = nullptr);
|
||||
~CreateSimulatorDialog();
|
||||
~CreateSimulatorDialog() override;
|
||||
|
||||
QString name() const;
|
||||
RuntimeInfo runtime() const;
|
||||
|
||||
@@ -46,8 +46,8 @@ class IosBuildSettingsWidget : public ProjectExplorer::NamedWidget
|
||||
|
||||
public:
|
||||
explicit IosBuildSettingsWidget(const Core::Id &deviceType, const QString &signingIdentifier,
|
||||
bool isSigningAutoManaged, QWidget *parent = 0);
|
||||
~IosBuildSettingsWidget();
|
||||
bool isSigningAutoManaged, QWidget *parent = nullptr);
|
||||
~IosBuildSettingsWidget() override;
|
||||
|
||||
bool isSigningAutomaticallyManaged() const;
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ QStringList IosBuildStep::defaultArguments() const
|
||||
}
|
||||
if (tc->typeId() == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID
|
||||
|| tc->typeId() == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) {
|
||||
GccToolChain *gtc = static_cast<GccToolChain *>(tc);
|
||||
auto gtc = static_cast<GccToolChain *>(tc);
|
||||
res << gtc->platformCodeGenFlags();
|
||||
}
|
||||
if (!SysRootKitInformation::sysRoot(kit).isEmpty())
|
||||
|
||||
@@ -75,7 +75,7 @@ class IosBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
|
||||
public:
|
||||
IosBuildStepConfigWidget(IosBuildStep *buildStep);
|
||||
~IosBuildStepConfigWidget();
|
||||
~IosBuildStepConfigWidget() override;
|
||||
|
||||
private:
|
||||
void buildArgumentsChanged();
|
||||
|
||||
@@ -104,7 +104,7 @@ static Core::Id deviceId(const QString &sdkName)
|
||||
return Constants::IOS_DEVICE_TYPE;
|
||||
else if (sdkName.startsWith("iphonesimulator", Qt::CaseInsensitive))
|
||||
return Constants::IOS_SIMULATOR_TYPE;
|
||||
return Core::Id();
|
||||
return {};
|
||||
}
|
||||
|
||||
static bool isSimulatorDeviceId(const Core::Id &id)
|
||||
@@ -576,7 +576,7 @@ static ClangToolChain *createToolChain(const XcodePlatform &platform,
|
||||
&& l != Core::Id(ProjectExplorer::Constants::CXX_LANGUAGE_ID))
|
||||
return nullptr;
|
||||
|
||||
ClangToolChain *toolChain = new ClangToolChain(ToolChain::AutoDetection);
|
||||
auto toolChain = new ClangToolChain(ToolChain::AutoDetection);
|
||||
toolChain->setLanguage(l);
|
||||
toolChain->setDisplayName(target.name);
|
||||
toolChain->setPlatformCodeGenFlags(target.backendFlags);
|
||||
|
||||
@@ -51,7 +51,6 @@ class ProvisioningProfile
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(ProvisioningProfile)
|
||||
public:
|
||||
ProvisioningProfile() {}
|
||||
std::shared_ptr<DevelopmentTeam> developmentTeam() { return m_team; }
|
||||
QString identifier() const;
|
||||
QString displayName() const;
|
||||
@@ -75,7 +74,6 @@ class DevelopmentTeam
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(DevelopmentTeam)
|
||||
public:
|
||||
DevelopmentTeam() {}
|
||||
QString identifier() const;
|
||||
QString displayName() const;
|
||||
QString details() const;
|
||||
|
||||
@@ -82,8 +82,8 @@ bool IosDeployStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
Q_UNUSED(earlierSteps);
|
||||
QTC_ASSERT(m_transferStatus == NoTransfer, return false);
|
||||
m_device = DeviceKitInformation::device(target()->kit());
|
||||
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
|
||||
this->target()->activeRunConfiguration());
|
||||
auto runConfig = qobject_cast<const IosRunConfiguration *>(
|
||||
this->target()->activeRunConfiguration());
|
||||
QTC_ASSERT(runConfig, return false);
|
||||
m_bundlePath = runConfig->bundleDirectory().toString();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class IosDeployStepWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
|
||||
public:
|
||||
IosDeployStepWidget(IosDeployStep *step);
|
||||
~IosDeployStepWidget();
|
||||
~IosDeployStepWidget() override;
|
||||
|
||||
private:
|
||||
Ui::IosDeployStepWidget *ui;
|
||||
|
||||
@@ -93,10 +93,7 @@ IosDevice::IosDevice()
|
||||
setFreePorts(ports);
|
||||
}
|
||||
|
||||
IosDevice::IosDevice(const IosDevice &other)
|
||||
: IDevice(other), m_extraInfo(other.m_extraInfo), m_ignoreDevice(other.m_ignoreDevice),
|
||||
m_lastPort(other.m_lastPort)
|
||||
{ }
|
||||
IosDevice::IosDevice(const IosDevice &other) = default;
|
||||
|
||||
IosDevice::IosDevice(const QString &uid)
|
||||
: IDevice(Core::Id(Constants::IOS_DEVICE_TYPE),
|
||||
@@ -130,7 +127,7 @@ QString IosDevice::displayType() const
|
||||
|
||||
IDeviceWidget *IosDevice::createWidget()
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QList<Core::Id> IosDevice::actionIds() const
|
||||
@@ -223,7 +220,7 @@ Utils::OsType IosDevice::osType() const
|
||||
|
||||
IosDeviceManager::TranslationMap IosDeviceManager::translationMap()
|
||||
{
|
||||
static TranslationMap *translationMap = 0;
|
||||
static TranslationMap *translationMap = nullptr;
|
||||
if (translationMap)
|
||||
return *translationMap;
|
||||
TranslationMap &tMap = *new TranslationMap;
|
||||
@@ -248,7 +245,7 @@ void IosDeviceManager::deviceConnected(const QString &uid, const QString &name)
|
||||
Core::Id devId = baseDevId.withSuffix(uid);
|
||||
IDevice::ConstPtr dev = devManager->find(devId);
|
||||
if (dev.isNull()) {
|
||||
IosDevice *newDev = new IosDevice(uid);
|
||||
auto newDev = new IosDevice(uid);
|
||||
if (!name.isNull())
|
||||
newDev->setDisplayName(name);
|
||||
qCDebug(detectLog) << "adding ios device " << uid;
|
||||
@@ -256,9 +253,9 @@ void IosDeviceManager::deviceConnected(const QString &uid, const QString &name)
|
||||
} else if (dev->deviceState() != IDevice::DeviceConnected &&
|
||||
dev->deviceState() != IDevice::DeviceReadyToUse) {
|
||||
qCDebug(detectLog) << "updating ios device " << uid;
|
||||
IosDevice *newDev = 0;
|
||||
IosDevice *newDev = nullptr;
|
||||
if (dev->type() == devType) {
|
||||
const IosDevice *iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
auto iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
newDev = new IosDevice(*iosDev);
|
||||
} else {
|
||||
newDev = new IosDevice(uid);
|
||||
@@ -279,7 +276,7 @@ void IosDeviceManager::deviceDisconnected(const QString &uid)
|
||||
if (dev.isNull() || dev->type() != devType) {
|
||||
qCWarning(detectLog) << "ignoring disconnection of ios device " << uid; // should neve happen
|
||||
} else {
|
||||
const IosDevice *iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
auto iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
if (iosDev->m_extraInfo.isEmpty()
|
||||
|| iosDev->m_extraInfo.value(QLatin1String("deviceName")) == QLatin1String("*unknown*")) {
|
||||
devManager->removeDevice(iosDev->id());
|
||||
@@ -309,9 +306,9 @@ void IosDeviceManager::deviceInfo(IosToolHandler *, const QString &uid,
|
||||
Core::Id devId = baseDevId.withSuffix(uid);
|
||||
IDevice::ConstPtr dev = devManager->find(devId);
|
||||
bool skipUpdate = false;
|
||||
IosDevice *newDev = 0;
|
||||
IosDevice *newDev = nullptr;
|
||||
if (!dev.isNull() && dev->type() == devType) {
|
||||
const IosDevice *iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
auto iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
if (iosDev->m_extraInfo == info) {
|
||||
skipUpdate = true;
|
||||
newDev = const_cast<IosDevice *>(iosDev);
|
||||
@@ -550,7 +547,7 @@ void IosDeviceManager::updateAvailableDevices(const QStringList &devices)
|
||||
Core::Id devType(Constants::IOS_DEVICE_TYPE);
|
||||
if (dev.isNull() || dev->type() != devType)
|
||||
continue;
|
||||
const IosDevice *iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
auto iosDev = static_cast<const IosDevice *>(dev.data());
|
||||
if (devices.contains(iosDev->uniqueDeviceID()))
|
||||
continue;
|
||||
if (iosDev->deviceState() != IDevice::DeviceDisconnected) {
|
||||
|
||||
@@ -48,15 +48,15 @@ class IosDeviceManager;
|
||||
class IosDevice : public ProjectExplorer::IDevice
|
||||
{
|
||||
public:
|
||||
typedef QMap<QString, QString> Dict;
|
||||
typedef QSharedPointer<const IosDevice> ConstPtr;
|
||||
typedef QSharedPointer<IosDevice> Ptr;
|
||||
using Dict = QMap<QString, QString>;
|
||||
using ConstPtr = QSharedPointer<const IosDevice>;
|
||||
using Ptr = QSharedPointer<IosDevice>;
|
||||
|
||||
ProjectExplorer::IDevice::DeviceInfo deviceInformation() const override;
|
||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||
QList<Core::Id> actionIds() const override;
|
||||
QString displayNameForActionId(Core::Id actionId) const override;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = 0) override;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = nullptr) override;
|
||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||
QString displayType() const override;
|
||||
|
||||
@@ -85,7 +85,7 @@ protected:
|
||||
class IosDeviceManager : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef QHash<QString, QString> TranslationMap;
|
||||
using TranslationMap = QHash<QString, QString>;
|
||||
|
||||
static TranslationMap translationMap();
|
||||
static IosDeviceManager *instance();
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
void monitorAvailableDevices();
|
||||
private:
|
||||
void updateUserModeDevices();
|
||||
IosDeviceManager(QObject *parent = 0);
|
||||
IosDeviceManager(QObject *parent = nullptr);
|
||||
QTimer m_userModeDevicesTimer;
|
||||
QStringList m_userModeDeviceIds;
|
||||
};
|
||||
|
||||
@@ -149,8 +149,7 @@ QStringList IosDsymBuildStep::defaultCmdList() const
|
||||
.appendPath("Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil");
|
||||
if (dsymUtilPath.exists())
|
||||
dsymutilCmd = dsymUtilPath.toUserOutput();
|
||||
IosRunConfiguration *runConf =
|
||||
qobject_cast<IosRunConfiguration *>(target()->activeRunConfiguration());
|
||||
auto runConf = qobject_cast<const IosRunConfiguration *>(target()->activeRunConfiguration());
|
||||
QTC_ASSERT(runConf, return QStringList("echo"));
|
||||
QString dsymPath = runConf->bundleDirectory().toUserOutput();
|
||||
dsymPath.chop(4);
|
||||
|
||||
@@ -72,7 +72,7 @@ class IosDsymBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidg
|
||||
|
||||
public:
|
||||
IosDsymBuildStepConfigWidget(IosDsymBuildStep *buildStep);
|
||||
~IosDsymBuildStepConfigWidget();
|
||||
~IosDsymBuildStepConfigWidget() override;
|
||||
|
||||
private:
|
||||
void commandChanged();
|
||||
|
||||
@@ -69,8 +69,6 @@ class XcodeProbe
|
||||
public:
|
||||
static Utils::FileName sdkPath(const QString &devPath, const QString &platformName);
|
||||
static QMap<QString, XcodePlatform> detectPlatforms(const QString &devPath = QString());
|
||||
XcodeProbe()
|
||||
{ }
|
||||
|
||||
private:
|
||||
void addDeveloperPath(const QString &path);
|
||||
|
||||
@@ -40,10 +40,7 @@
|
||||
using namespace Ios::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
IosQtVersion::IosQtVersion()
|
||||
: QtSupport::BaseQtVersion()
|
||||
{
|
||||
}
|
||||
IosQtVersion::IosQtVersion() = default;
|
||||
|
||||
IosQtVersion::IosQtVersion(const Utils::FileName &path, bool isAutodetected,
|
||||
const QString &autodetectionSource)
|
||||
|
||||
@@ -48,8 +48,8 @@ bool IosQtVersionFactory::canRestore(const QString &type)
|
||||
QtSupport::BaseQtVersion *IosQtVersionFactory::restore(const QString &type,
|
||||
const QVariantMap &data)
|
||||
{
|
||||
QTC_ASSERT(canRestore(type), return 0);
|
||||
IosQtVersion *v = new IosQtVersion;
|
||||
QTC_ASSERT(canRestore(type), return nullptr);
|
||||
auto v = new IosQtVersion;
|
||||
v->fromMap(data);
|
||||
return v;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ QtSupport::BaseQtVersion *IosQtVersionFactory::create(const Utils::FileName &qma
|
||||
const QString &autoDetectionSource)
|
||||
{
|
||||
if (!(evaluator->values(QLatin1String("QMAKE_PLATFORM")).contains(QLatin1String("ios"))))
|
||||
return 0;
|
||||
return nullptr;
|
||||
return new IosQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Internal {
|
||||
class IosQtVersionFactory : public QtSupport::QtVersionFactory
|
||||
{
|
||||
public:
|
||||
explicit IosQtVersionFactory(QObject *parent = 0);
|
||||
explicit IosQtVersionFactory(QObject *parent = nullptr);
|
||||
|
||||
bool canRestore(const QString &type) override;
|
||||
QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data) override;
|
||||
|
||||
@@ -169,7 +169,7 @@ FileName IosRunConfiguration::profilePath() const
|
||||
|
||||
static QmakeProFile *proFile(const IosRunConfiguration *rc)
|
||||
{
|
||||
QmakeProject *pro = qobject_cast<QmakeProject *>(rc->target()->project());
|
||||
auto pro = qobject_cast<const QmakeProject *>(rc->target()->project());
|
||||
QmakeProFile *proFile = pro ? pro->rootProFile() : nullptr;
|
||||
if (proFile)
|
||||
proFile = proFile->findProFile(rc->profilePath());
|
||||
|
||||
@@ -47,7 +47,7 @@ class IosRunner : public ProjectExplorer::RunWorker
|
||||
|
||||
public:
|
||||
IosRunner(ProjectExplorer::RunControl *runControl);
|
||||
~IosRunner();
|
||||
~IosRunner() override;
|
||||
|
||||
void setCppDebugging(bool cppDebug);
|
||||
void setQmlDebugging(QmlDebug::QmlDebugServicesPreset qmlDebugServices);
|
||||
|
||||
@@ -39,7 +39,7 @@ class IosSettingsPage : public Core::IOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IosSettingsPage(QObject *parent = 0);
|
||||
explicit IosSettingsPage(QObject *parent = nullptr);
|
||||
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
|
||||
@@ -41,8 +41,8 @@ class IosSettingsWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IosSettingsWidget(QWidget *parent = 0);
|
||||
~IosSettingsWidget();
|
||||
IosSettingsWidget(QWidget *parent = nullptr);
|
||||
~IosSettingsWidget() override;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ QString IosSimulator::displayType() const
|
||||
|
||||
IDeviceWidget *IosSimulator::createWidget()
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QList<Core::Id> IosSimulator::actionIds() const
|
||||
|
||||
@@ -63,15 +63,15 @@ QDebug operator <<(QDebug debug, const IosDeviceType &deviceType);
|
||||
class IosSimulator : public ProjectExplorer::IDevice
|
||||
{
|
||||
public:
|
||||
typedef QSharedPointer<const IosSimulator> ConstPtr;
|
||||
typedef QSharedPointer<IosSimulator> Ptr;
|
||||
using ConstPtr = QSharedPointer<const IosSimulator>;
|
||||
using Ptr = QSharedPointer<IosSimulator>;
|
||||
ProjectExplorer::IDevice::DeviceInfo deviceInformation() const override;
|
||||
|
||||
QString displayType() const override;
|
||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||
QList<Core::Id> actionIds() const override;
|
||||
QString displayNameForActionId(Core::Id actionId) const override;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = 0) override;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = nullptr) override;
|
||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
|
||||
@@ -235,7 +235,7 @@ class IosDeviceToolHandlerPrivate : public IosToolHandlerPrivate
|
||||
};
|
||||
public:
|
||||
explicit IosDeviceToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q);
|
||||
~IosDeviceToolHandlerPrivate();
|
||||
~IosDeviceToolHandlerPrivate() override;
|
||||
|
||||
// IosToolHandlerPrivate overrides
|
||||
public:
|
||||
@@ -304,7 +304,7 @@ class IosSimulatorToolHandlerPrivate : public IosToolHandlerPrivate
|
||||
{
|
||||
public:
|
||||
explicit IosSimulatorToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q);
|
||||
~IosSimulatorToolHandlerPrivate();
|
||||
~IosSimulatorToolHandlerPrivate() override;
|
||||
|
||||
// IosToolHandlerPrivate overrides
|
||||
public:
|
||||
@@ -336,9 +336,7 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(const IosDeviceType &devType,
|
||||
{
|
||||
}
|
||||
|
||||
IosToolHandlerPrivate::~IosToolHandlerPrivate()
|
||||
{
|
||||
}
|
||||
IosToolHandlerPrivate::~IosToolHandlerPrivate() = default;
|
||||
|
||||
// signals
|
||||
void IosToolHandlerPrivate::isTransferringApp(const QString &bundlePath, const QString &deviceId,
|
||||
|
||||
@@ -43,7 +43,7 @@ class IosToolHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef QMap<QString,QString> Dict;
|
||||
using Dict = QMap<QString,QString>;
|
||||
enum RunKind {
|
||||
NormalRun,
|
||||
DebugRun
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
|
||||
static QString iosDeviceToolPath();
|
||||
|
||||
explicit IosToolHandler(const Internal::IosDeviceType &type, QObject *parent = 0);
|
||||
~IosToolHandler();
|
||||
explicit IosToolHandler(const Internal::IosDeviceType &type, QObject *parent = nullptr);
|
||||
~IosToolHandler() override;
|
||||
void requestTransferApp(const QString &bundlePath, const QString &deviceId, int timeout = 1000);
|
||||
void requestRunApp(const QString &bundlePath, const QStringList &extraArgs, RunKind runType,
|
||||
const QString &deviceId, int timeout = 1000);
|
||||
|
||||
@@ -356,14 +356,9 @@ QList<SimulatorInfo> SimulatorControlPrivate::availableDevices;
|
||||
QList<DeviceTypeInfo> SimulatorControlPrivate::availableDeviceTypes;
|
||||
QList<RuntimeInfo> SimulatorControlPrivate::availableRuntimes;
|
||||
|
||||
SimulatorControlPrivate::SimulatorControlPrivate()
|
||||
{
|
||||
}
|
||||
SimulatorControlPrivate::SimulatorControlPrivate() = default;
|
||||
|
||||
SimulatorControlPrivate::~SimulatorControlPrivate()
|
||||
{
|
||||
|
||||
}
|
||||
SimulatorControlPrivate::~SimulatorControlPrivate() = default;
|
||||
|
||||
SimulatorInfo SimulatorControlPrivate::deviceInfo(const QString &simUdid)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
|
||||
public:
|
||||
explicit SimulatorControl(QObject* parent = nullptr);
|
||||
~SimulatorControl();
|
||||
~SimulatorControl() override;
|
||||
|
||||
public:
|
||||
static QList<DeviceTypeInfo> availableDeviceTypes();
|
||||
|
||||
@@ -57,7 +57,7 @@ SimulatorInfoModel::SimulatorInfoModel(QObject *parent) :
|
||||
QVariant SimulatorInfoModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
return {};
|
||||
|
||||
const SimulatorInfo &simInfo = m_simList[index.row()];
|
||||
if (role == Qt::EditRole || role == Qt::DisplayRole) {
|
||||
@@ -77,7 +77,7 @@ QVariant SimulatorInfoModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant::fromValue<SimulatorInfo>(simInfo);
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
int SimulatorInfoModel::rowCount(const QModelIndex &parent) const
|
||||
@@ -96,7 +96,7 @@ int SimulatorInfoModel::columnCount(const QModelIndex &parent) const
|
||||
QVariant SimulatorInfoModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (orientation == Qt::Vertical || section > colCount)
|
||||
return QVariant();
|
||||
return {};
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
switch (section) {
|
||||
@@ -111,7 +111,7 @@ QVariant SimulatorInfoModel::headerData(int section, Qt::Orientation orientation
|
||||
}
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
QModelIndex SimulatorInfoModel::index(int row, int column, const QModelIndex &parent) const
|
||||
@@ -121,7 +121,7 @@ QModelIndex SimulatorInfoModel::index(int row, int column, const QModelIndex &pa
|
||||
|
||||
QModelIndex SimulatorInfoModel::parent(const QModelIndex &) const
|
||||
{
|
||||
return QModelIndex();
|
||||
return {};
|
||||
}
|
||||
|
||||
void SimulatorInfoModel::requestSimulatorInfo()
|
||||
@@ -149,7 +149,7 @@ void SimulatorInfoModel::populateSimulators(const SimulatorInfoList &simulatorLi
|
||||
for (auto itr = m_simList.cbegin(); itr < m_simList.cend(); ++itr, ++newItr) {
|
||||
if (*itr == *newItr) {
|
||||
if (end != -1)
|
||||
updatedIndexes.push_back(std::make_pair(start, end - 1));
|
||||
updatedIndexes.emplace_back(start, end - 1);
|
||||
start = std::distance(m_simList.cbegin(), itr);
|
||||
end = -1;
|
||||
} else {
|
||||
|
||||
@@ -45,7 +45,7 @@ class SimulatorOperationDialog : public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SimulatorOperationDialog(QWidget *parent = nullptr);
|
||||
~SimulatorOperationDialog();
|
||||
~SimulatorOperationDialog() override;
|
||||
|
||||
public:
|
||||
void addFutures(const QList<QFuture<void> > &futureList);
|
||||
|
||||
Reference in New Issue
Block a user