forked from qt-creator/qt-creator
ProjectExplorer: Modernize
modernize-* Change-Id: I01b9b3d73a2dc2a5c858cf316a1fbff7a4113600 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
859dce092b
commit
667ad61710
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
AbstractProcessStep(BuildStepList *bsl, Core::Id id);
|
AbstractProcessStep(BuildStepList *bsl, Core::Id id);
|
||||||
~AbstractProcessStep();
|
~AbstractProcessStep() override;
|
||||||
|
|
||||||
virtual void processStarted();
|
virtual void processStarted();
|
||||||
virtual void processFinished(int exitCode, QProcess::ExitStatus status);
|
virtual void processFinished(int exitCode, QProcess::ExitStatus status);
|
||||||
|
@@ -132,6 +132,8 @@ class PROJECTEXPLORER_EXPORT BuildStepFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BuildStepFactory();
|
BuildStepFactory();
|
||||||
|
BuildStepFactory(const BuildStepFactory &) = delete;
|
||||||
|
BuildStepFactory &operator=(const BuildStepFactory &) = delete;
|
||||||
virtual ~BuildStepFactory();
|
virtual ~BuildStepFactory();
|
||||||
|
|
||||||
static const QList<BuildStepFactory *> allBuildStepFactories();
|
static const QList<BuildStepFactory *> allBuildStepFactories();
|
||||||
@@ -144,9 +146,6 @@ public:
|
|||||||
bool canHandle(BuildStepList *bsl) const;
|
bool canHandle(BuildStepList *bsl) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BuildStepFactory(const BuildStepFactory &) = delete;
|
|
||||||
BuildStepFactory &operator=(const BuildStepFactory &) = delete;
|
|
||||||
|
|
||||||
using BuildStepCreator = std::function<BuildStep *(BuildStepList *)>;
|
using BuildStepCreator = std::function<BuildStep *(BuildStepList *)>;
|
||||||
|
|
||||||
template <class BuildStepType>
|
template <class BuildStepType>
|
||||||
|
@@ -82,7 +82,7 @@ class PROJECTEXPLORER_EXPORT CustomWizard : public Core::BaseFileWizardFactory
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QMap<QString, QString> FieldReplacementMap;
|
using FieldReplacementMap = QMap<QString, QString>;
|
||||||
|
|
||||||
CustomWizard();
|
CustomWizard();
|
||||||
~CustomWizard() override;
|
~CustomWizard() override;
|
||||||
@@ -101,8 +101,8 @@ public:
|
|||||||
static int verbose();
|
static int verbose();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef QSharedPointer<Internal::CustomWizardParameters> CustomWizardParametersPtr;
|
using CustomWizardParametersPtr = QSharedPointer<Internal::CustomWizardParameters>;
|
||||||
typedef QSharedPointer<Internal::CustomWizardContext> CustomWizardContextPtr;
|
using CustomWizardContextPtr = QSharedPointer<Internal::CustomWizardContext>;
|
||||||
|
|
||||||
// generate files in path
|
// generate files in path
|
||||||
Core::GeneratedFiles generateWizardFiles(QString *errorMessage) const;
|
Core::GeneratedFiles generateWizardFiles(QString *errorMessage) const;
|
||||||
|
@@ -50,7 +50,7 @@ class CustomWizardContext;
|
|||||||
class CustomWizardFieldPage : public QWizardPage {
|
class CustomWizardFieldPage : public QWizardPage {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
typedef QList<CustomWizardField> FieldList;
|
using FieldList = QList<CustomWizardField>;
|
||||||
|
|
||||||
explicit CustomWizardFieldPage(const QSharedPointer<CustomWizardContext> &ctx,
|
explicit CustomWizardFieldPage(const QSharedPointer<CustomWizardContext> &ctx,
|
||||||
const QSharedPointer<CustomWizardParameters> ¶meters,
|
const QSharedPointer<CustomWizardParameters> ¶meters,
|
||||||
@@ -92,9 +92,9 @@ private:
|
|||||||
QString userChange;
|
QString userChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QList<LineEditData> LineEditDataList;
|
using LineEditDataList = QList<LineEditData>;
|
||||||
typedef QList<TextEditData> TextEditDataList;
|
using TextEditDataList = QList<TextEditData>;
|
||||||
typedef QList<PathChooserData> PathChooserDataList;
|
using PathChooserDataList = QList<PathChooserData>;
|
||||||
|
|
||||||
QWidget *registerLineEdit(const QString &fieldName, const CustomWizardField &field);
|
QWidget *registerLineEdit(const QString &fieldName, const CustomWizardField &field);
|
||||||
QWidget *registerComboBox(const QString &fieldName, const CustomWizardField &field);
|
QWidget *registerComboBox(const QString &fieldName, const CustomWizardField &field);
|
||||||
|
@@ -45,7 +45,7 @@ namespace Internal {
|
|||||||
class CustomWizardField {
|
class CustomWizardField {
|
||||||
public:
|
public:
|
||||||
// Parameters of the widget control are stored as map
|
// Parameters of the widget control are stored as map
|
||||||
typedef QMap<QString, QString> ControlAttributeMap;
|
using ControlAttributeMap = QMap<QString, QString>;
|
||||||
CustomWizardField();
|
CustomWizardField();
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ public:
|
|||||||
// Documentation inside.
|
// Documentation inside.
|
||||||
class CustomWizardContext {
|
class CustomWizardContext {
|
||||||
public:
|
public:
|
||||||
typedef QMap<QString, QString> FieldReplacementMap;
|
using FieldReplacementMap = QMap<QString, QString>;
|
||||||
typedef QSharedPointer<Utils::TemporaryFile> TemporaryFilePtr;
|
using TemporaryFilePtr = QSharedPointer<Utils::TemporaryFile>;
|
||||||
typedef QList<TemporaryFilePtr> TemporaryFilePtrList;
|
using TemporaryFilePtrList = QList<TemporaryFilePtr>;
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ class DependenciesWidget : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DependenciesWidget(Project *project, QWidget *parent = 0);
|
explicit DependenciesWidget(Project *project, QWidget *parent = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Project *m_project;
|
Project *m_project;
|
||||||
|
@@ -76,6 +76,8 @@ class PROJECTEXPLORER_EXPORT DeployConfigurationFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeployConfigurationFactory();
|
DeployConfigurationFactory();
|
||||||
|
DeployConfigurationFactory(const DeployConfigurationFactory &) = delete;
|
||||||
|
DeployConfigurationFactory operator=(const DeployConfigurationFactory &) = delete;
|
||||||
virtual ~DeployConfigurationFactory();
|
virtual ~DeployConfigurationFactory();
|
||||||
|
|
||||||
// used to show the list of possible additons to a target, returns a list of types
|
// used to show the list of possible additons to a target, returns a list of types
|
||||||
@@ -113,9 +115,6 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeployConfigurationFactory(const DeployConfigurationFactory &) = delete;
|
|
||||||
DeployConfigurationFactory operator=(const DeployConfigurationFactory &) = delete;
|
|
||||||
|
|
||||||
DeployConfigurationCreator m_creator;
|
DeployConfigurationCreator m_creator;
|
||||||
Core::Id m_deployConfigBaseId;
|
Core::Id m_deployConfigBaseId;
|
||||||
Core::Id m_supportedProjectType;
|
Core::Id m_supportedProjectType;
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
IDeviceWidget *createWidget() override;
|
IDeviceWidget *createWidget() override;
|
||||||
QList<Core::Id> actionIds() const override;
|
QList<Core::Id> actionIds() const override;
|
||||||
QString displayNameForActionId(Core::Id actionId) 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;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
bool canCreateProcessModel() const override;
|
bool canCreateProcessModel() const override;
|
||||||
DeviceProcessList *createProcessListModel(QObject *parent) const override;
|
DeviceProcessList *createProcessListModel(QObject *parent) const override;
|
||||||
|
@@ -34,7 +34,7 @@ class DesktopDeviceConfigurationWidget : public IDeviceWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DesktopDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent = 0);
|
explicit DesktopDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent = nullptr);
|
||||||
~DesktopDeviceConfigurationWidget() override;
|
~DesktopDeviceConfigurationWidget() override;
|
||||||
|
|
||||||
void updateDeviceFromUi() override;
|
void updateDeviceFromUi() override;
|
||||||
|
@@ -35,7 +35,7 @@ class DesktopDeviceProcess : public DeviceProcess
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DesktopDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = 0);
|
DesktopDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = nullptr);
|
||||||
|
|
||||||
void start(const Runnable &runnable) override;
|
void start(const Runnable &runnable) override;
|
||||||
void interrupt() override;
|
void interrupt() override;
|
||||||
|
@@ -40,7 +40,7 @@ class DeviceFactorySelectionDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DeviceFactorySelectionDialog(QWidget *parent = 0);
|
explicit DeviceFactorySelectionDialog(QWidget *parent = nullptr);
|
||||||
~DeviceFactorySelectionDialog() override;
|
~DeviceFactorySelectionDialog() override;
|
||||||
Core::Id selectedId() const;
|
Core::Id selectedId() const;
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ class PROJECTEXPLORER_EXPORT DeviceManagerModel : public QAbstractListModel
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DeviceManagerModel(const DeviceManager *deviceManager, QObject *parent = 0);
|
explicit DeviceManagerModel(const DeviceManager *deviceManager, QObject *parent = nullptr);
|
||||||
~DeviceManagerModel() override;
|
~DeviceManagerModel() override;
|
||||||
|
|
||||||
void setFilter(const QList<Core::Id> &filter);
|
void setFilter(const QList<Core::Id> &filter);
|
||||||
|
@@ -39,10 +39,9 @@ namespace Internal { class DeviceProcessListPrivate; }
|
|||||||
class PROJECTEXPLORER_EXPORT DeviceProcessItem
|
class PROJECTEXPLORER_EXPORT DeviceProcessItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeviceProcessItem() : pid(0) {}
|
|
||||||
bool operator<(const DeviceProcessItem &other) const;
|
bool operator<(const DeviceProcessItem &other) const;
|
||||||
|
|
||||||
int pid;
|
int pid = 0;
|
||||||
QString cmdLine;
|
QString cmdLine;
|
||||||
QString exe;
|
QString exe;
|
||||||
};
|
};
|
||||||
|
@@ -39,7 +39,7 @@ class DeviceSettingsPage : public Core::IOptionsPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceSettingsPage(QObject *parent = 0);
|
DeviceSettingsPage(QObject *parent = nullptr);
|
||||||
|
|
||||||
QWidget *widget() override;
|
QWidget *widget() override;
|
||||||
void apply() override;
|
void apply() override;
|
||||||
|
@@ -49,7 +49,7 @@ class DeviceSettingsWidget : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DeviceSettingsWidget(QWidget *parent = 0);
|
DeviceSettingsWidget(QWidget *parent = nullptr);
|
||||||
~DeviceSettingsWidget() override;
|
~DeviceSettingsWidget() override;
|
||||||
|
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
@@ -72,7 +72,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessSignalOperation : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<DeviceProcessSignalOperation> Ptr;
|
using Ptr = QSharedPointer<DeviceProcessSignalOperation>;
|
||||||
|
|
||||||
virtual void killProcess(qint64 pid) = 0;
|
virtual void killProcess(qint64 pid) = 0;
|
||||||
virtual void killProcess(const QString &filePath) = 0;
|
virtual void killProcess(const QString &filePath) = 0;
|
||||||
@@ -96,7 +96,7 @@ class PROJECTEXPLORER_EXPORT DeviceEnvironmentFetcher : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<DeviceEnvironmentFetcher> Ptr;
|
using Ptr = QSharedPointer<DeviceEnvironmentFetcher>;
|
||||||
|
|
||||||
virtual void start() = 0;
|
virtual void start() = 0;
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ protected:
|
|||||||
class PROJECTEXPLORER_EXPORT PortsGatheringMethod
|
class PROJECTEXPLORER_EXPORT PortsGatheringMethod
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<const PortsGatheringMethod> Ptr;
|
using Ptr = QSharedPointer<const PortsGatheringMethod>;
|
||||||
|
|
||||||
virtual ~PortsGatheringMethod() = default;
|
virtual ~PortsGatheringMethod() = default;
|
||||||
virtual Runnable runnable(QAbstractSocket::NetworkLayerProtocol protocol) const = 0;
|
virtual Runnable runnable(QAbstractSocket::NetworkLayerProtocol protocol) const = 0;
|
||||||
@@ -121,12 +121,13 @@ public:
|
|||||||
class PROJECTEXPLORER_EXPORT IDevice : public QEnableSharedFromThis<IDevice>
|
class PROJECTEXPLORER_EXPORT IDevice : public QEnableSharedFromThis<IDevice>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<IDevice> Ptr;
|
using Ptr = QSharedPointer<IDevice>;
|
||||||
typedef QSharedPointer<const IDevice> ConstPtr;
|
using ConstPtr = QSharedPointer<const IDevice>;
|
||||||
|
|
||||||
enum Origin { ManuallyAdded, AutoDetected };
|
enum Origin { ManuallyAdded, AutoDetected };
|
||||||
enum MachineType { Hardware, Emulator };
|
enum MachineType { Hardware, Emulator };
|
||||||
|
|
||||||
|
IDevice &operator=(const IDevice &) = delete;
|
||||||
virtual ~IDevice();
|
virtual ~IDevice();
|
||||||
|
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
@@ -141,7 +142,7 @@ public:
|
|||||||
QString key;
|
QString key;
|
||||||
QString value;
|
QString value;
|
||||||
};
|
};
|
||||||
typedef QList<DeviceInfoItem> DeviceInfo;
|
using DeviceInfo = QList<DeviceInfoItem>;
|
||||||
virtual DeviceInfo deviceInformation() const;
|
virtual DeviceInfo deviceInformation() const;
|
||||||
|
|
||||||
Core::Id type() const;
|
Core::Id type() const;
|
||||||
@@ -211,8 +212,6 @@ protected:
|
|||||||
IDevice(const IDevice &other);
|
IDevice(const IDevice &other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDevice &operator=(const IDevice &) = delete;
|
|
||||||
|
|
||||||
int version() const;
|
int version() const;
|
||||||
|
|
||||||
const std::unique_ptr<Internal::IDevicePrivate> d;
|
const std::unique_ptr<Internal::IDevicePrivate> d;
|
||||||
|
@@ -35,7 +35,7 @@ class LocalProcessList : public DeviceProcessList
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LocalProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
explicit LocalProcessList(const IDevice::ConstPtr &device, QObject *parent = nullptr);
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
|
|
||||||
static QList<DeviceProcessItem> getLocalProcesses();
|
static QList<DeviceProcessItem> getLocalProcesses();
|
||||||
|
@@ -94,7 +94,7 @@ class FolderNavigationWidget : public QWidget
|
|||||||
Q_PROPERTY(bool autoSynchronization READ autoSynchronization WRITE setAutoSynchronization)
|
Q_PROPERTY(bool autoSynchronization READ autoSynchronization WRITE setAutoSynchronization)
|
||||||
public:
|
public:
|
||||||
explicit FolderNavigationWidget(QWidget *parent = nullptr);
|
explicit FolderNavigationWidget(QWidget *parent = nullptr);
|
||||||
~FolderNavigationWidget();
|
~FolderNavigationWidget() override;
|
||||||
|
|
||||||
static QStringList projectFilesInDirectory(const QString &path);
|
static QStringList projectFilesInDirectory(const QString &path);
|
||||||
|
|
||||||
|
@@ -40,8 +40,8 @@ class JournaldWatcher : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QMap<QByteArray, QByteArray> LogEntry;
|
using LogEntry = QMap<QByteArray, QByteArray>;
|
||||||
typedef std::function<void(const LogEntry&)> Subscription;
|
using Subscription = std::function<void(const LogEntry&)>;
|
||||||
|
|
||||||
~JournaldWatcher() override;
|
~JournaldWatcher() override;
|
||||||
|
|
||||||
|
@@ -110,10 +110,10 @@ public:
|
|||||||
const std::unique_ptr<FieldPrivate> d;
|
const std::unique_ptr<FieldPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
JsonFieldPage(Utils::MacroExpander *expander, QWidget *parent = 0);
|
JsonFieldPage(Utils::MacroExpander *expander, QWidget *parent = nullptr);
|
||||||
~JsonFieldPage() override;
|
~JsonFieldPage() override;
|
||||||
|
|
||||||
typedef std::function<Field *()> FieldFactory;
|
using FieldFactory = std::function<Field *()>;
|
||||||
static void registerFieldFactory(const QString &id, const FieldFactory &ff);
|
static void registerFieldFactory(const QString &id, const FieldFactory &ff);
|
||||||
|
|
||||||
bool setup(const QVariant &data);
|
bool setup(const QVariant &data);
|
||||||
|
@@ -189,7 +189,7 @@ public:
|
|||||||
IconStringRole = Qt::UserRole + 2
|
IconStringRole = Qt::UserRole + 2
|
||||||
};
|
};
|
||||||
ListField();
|
ListField();
|
||||||
virtual ~ListField() override;
|
~ListField() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool parseData(const QVariant &data, QString *errorMessage) override;
|
bool parseData(const QVariant &data, QString *errorMessage) override;
|
||||||
|
@@ -59,7 +59,7 @@ public:
|
|||||||
QVariant condition;
|
QVariant condition;
|
||||||
};
|
};
|
||||||
static QVector<ConditionalFeature> parseFeatures(const QVariant &data,
|
static QVector<ConditionalFeature> parseFeatures(const QVariant &data,
|
||||||
QString *errorMessage = 0);
|
QString *errorMessage = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupProjectFiles(const JsonWizard::GeneratorFiles &files);
|
void setupProjectFiles(const JsonWizard::GeneratorFiles &files);
|
||||||
|
@@ -47,7 +47,7 @@ class PROJECTEXPLORER_EXPORT JsonWizard : public Utils::Wizard
|
|||||||
public:
|
public:
|
||||||
class GeneratorFile {
|
class GeneratorFile {
|
||||||
public:
|
public:
|
||||||
GeneratorFile() : generator(nullptr) { }
|
GeneratorFile() = default;
|
||||||
GeneratorFile(const Core::GeneratedFile &f, JsonWizardGenerator *g) :
|
GeneratorFile(const Core::GeneratedFile &f, JsonWizardGenerator *g) :
|
||||||
file(f), generator(g)
|
file(f), generator(g)
|
||||||
{ }
|
{ }
|
||||||
@@ -55,9 +55,9 @@ public:
|
|||||||
bool isValid() const { return generator; }
|
bool isValid() const { return generator; }
|
||||||
|
|
||||||
Core::GeneratedFile file;
|
Core::GeneratedFile file;
|
||||||
JsonWizardGenerator *generator;
|
JsonWizardGenerator *generator = nullptr;
|
||||||
};
|
};
|
||||||
typedef QList<GeneratorFile> GeneratorFiles;
|
using GeneratorFiles = QList<GeneratorFile>;
|
||||||
Q_PROPERTY(GeneratorFiles generateFileList READ generateFileList)
|
Q_PROPERTY(GeneratorFiles generateFileList READ generateFileList)
|
||||||
|
|
||||||
explicit JsonWizard(QWidget *parent = nullptr);
|
explicit JsonWizard(QWidget *parent = nullptr);
|
||||||
|
@@ -41,7 +41,7 @@ namespace ProjectExplorer {
|
|||||||
class JsonWizardGenerator
|
class JsonWizardGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~JsonWizardGenerator() { }
|
virtual ~JsonWizardGenerator() = default;
|
||||||
|
|
||||||
virtual Core::GeneratedFiles fileList(Utils::MacroExpander *expander,
|
virtual Core::GeneratedFiles fileList(Utils::MacroExpander *expander,
|
||||||
const QString &baseDir, const QString &projectDir,
|
const QString &baseDir, const QString &projectDir,
|
||||||
|
@@ -270,7 +270,7 @@ QSet<Id> KitManager::availableFeatures(Core::Id platformId)
|
|||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Kit *> KitManager::sortKits(const QList<Kit *> kits)
|
QList<Kit *> KitManager::sortKits(const QList<Kit *> &kits)
|
||||||
{
|
{
|
||||||
// This method was added to delay the sorting of kits as long as possible.
|
// This method was added to delay the sorting of kits as long as possible.
|
||||||
// Since the displayName can contain variables it can be costly (e.g. involve
|
// Since the displayName can contain variables it can be costly (e.g. involve
|
||||||
|
@@ -66,8 +66,8 @@ class PROJECTEXPLORER_EXPORT KitInformation : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QPair<QString, QString> Item;
|
using Item = QPair<QString, QString>;
|
||||||
typedef QList<Item> ItemList;
|
using ItemList = QList<Item>;
|
||||||
|
|
||||||
Core::Id id() const { return m_id; }
|
Core::Id id() const { return m_id; }
|
||||||
int priority() const { return m_priority; }
|
int priority() const { return m_priority; }
|
||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
static QSet<Core::Id> supportedPlatforms();
|
static QSet<Core::Id> supportedPlatforms();
|
||||||
static QSet<Core::Id> availableFeatures(Core::Id platformId);
|
static QSet<Core::Id> availableFeatures(Core::Id platformId);
|
||||||
|
|
||||||
static QList<Kit *> sortKits(const QList<Kit *> kits); // Avoid sorting whenever possible!
|
static QList<Kit *> sortKits(const QList<Kit *> &kits); // Avoid sorting whenever possible!
|
||||||
|
|
||||||
static void saveKits();
|
static void saveKits();
|
||||||
|
|
||||||
@@ -167,7 +167,6 @@ private:
|
|||||||
class KitList
|
class KitList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KitList() {}
|
|
||||||
Core::Id defaultKit;
|
Core::Id defaultKit;
|
||||||
std::vector<std::unique_ptr<Kit>> kits;
|
std::vector<std::unique_ptr<Kit>> kits;
|
||||||
};
|
};
|
||||||
|
@@ -34,7 +34,7 @@ class PROJECTEXPLORER_EXPORT LocalEnvironmentAspect : public EnvironmentAspect
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::function<void(Utils::Environment &)> BaseEnvironmentModifier;
|
using BaseEnvironmentModifier = std::function<void(Utils::Environment &)>;
|
||||||
LocalEnvironmentAspect(Target *parent, const BaseEnvironmentModifier &modifier);
|
LocalEnvironmentAspect(Target *parent, const BaseEnvironmentModifier &modifier);
|
||||||
|
|
||||||
Utils::Environment baseEnvironment() const override;
|
Utils::Environment baseEnvironment() const override;
|
||||||
|
@@ -461,7 +461,7 @@ static QByteArray msvcCompilationFile()
|
|||||||
//
|
//
|
||||||
// [1] https://msdn.microsoft.com/en-us/library/b0084kay.aspx
|
// [1] https://msdn.microsoft.com/en-us/library/b0084kay.aspx
|
||||||
// [2] http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros
|
// [2] http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros
|
||||||
Macros MsvcToolChain::msvcPredefinedMacros(const QStringList cxxflags,
|
Macros MsvcToolChain::msvcPredefinedMacros(const QStringList &cxxflags,
|
||||||
const Utils::Environment &env) const
|
const Utils::Environment &env) const
|
||||||
{
|
{
|
||||||
Macros predefinedMacros;
|
Macros predefinedMacros;
|
||||||
@@ -1384,7 +1384,7 @@ bool ClangClToolChain::operator ==(const ToolChain &other) const
|
|||||||
return m_clangPath == clangClTc->m_clangPath;
|
return m_clangPath == clangClTc->m_clangPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
Macros ClangClToolChain::msvcPredefinedMacros(const QStringList cxxflags,
|
Macros ClangClToolChain::msvcPredefinedMacros(const QStringList &cxxflags,
|
||||||
const Utils::Environment &env) const
|
const Utils::Environment &env) const
|
||||||
{
|
{
|
||||||
if (!cxxflags.contains("--driver-mode=g++"))
|
if (!cxxflags.contains("--driver-mode=g++"))
|
||||||
@@ -1497,9 +1497,7 @@ static void detectCppBuildTools2015(QList<ToolChain *> *list)
|
|||||||
+ QLatin1Char('/') + name + QStringLiteral("/vcbuildtools.bat");
|
+ QLatin1Char('/') + name + QStringLiteral("/vcbuildtools.bat");
|
||||||
if (!QFileInfo(vcVarsBat).isFile())
|
if (!QFileInfo(vcVarsBat).isFile())
|
||||||
return;
|
return;
|
||||||
const size_t count = sizeof(entries) / sizeof(entries[0]);
|
for (const Entry &e : entries) {
|
||||||
for (size_t i = 0; i < count; ++i) {
|
|
||||||
const Entry &e = entries[i];
|
|
||||||
const Abi abi(e.architecture, Abi::WindowsOS, Abi::WindowsMsvc2015Flavor,
|
const Abi abi(e.architecture, Abi::WindowsOS, Abi::WindowsMsvc2015Flavor,
|
||||||
e.format, e.wordSize);
|
e.format, e.wordSize);
|
||||||
for (auto language: {Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID}) {
|
for (auto language: {Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID}) {
|
||||||
|
@@ -67,7 +67,7 @@ public:
|
|||||||
Core::Id l, Detection d = ManualDetection);
|
Core::Id l, Detection d = ManualDetection);
|
||||||
MsvcToolChain(const MsvcToolChain &other);
|
MsvcToolChain(const MsvcToolChain &other);
|
||||||
MsvcToolChain();
|
MsvcToolChain();
|
||||||
~MsvcToolChain();
|
~MsvcToolChain() override;
|
||||||
|
|
||||||
Abi targetAbi() const override;
|
Abi targetAbi() const override;
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ protected:
|
|||||||
|
|
||||||
Utils::Environment readEnvironmentSetting(const Utils::Environment& env) const;
|
Utils::Environment readEnvironmentSetting(const Utils::Environment& env) const;
|
||||||
// Function must be thread-safe!
|
// Function must be thread-safe!
|
||||||
virtual Macros msvcPredefinedMacros(const QStringList cxxflags,
|
virtual Macros msvcPredefinedMacros(const QStringList &cxxflags,
|
||||||
const Utils::Environment &env) const;
|
const Utils::Environment &env) const;
|
||||||
virtual LanguageVersion msvcLanguageVersion(const QStringList &cxxflags,
|
virtual LanguageVersion msvcLanguageVersion(const QStringList &cxxflags,
|
||||||
const Core::Id &language,
|
const Core::Id &language,
|
||||||
@@ -198,7 +198,7 @@ public:
|
|||||||
void setClangPath(const QString &path) { m_clangPath = path; }
|
void setClangPath(const QString &path) { m_clangPath = path; }
|
||||||
|
|
||||||
void resetMsvcToolChain(const MsvcToolChain *base = nullptr);
|
void resetMsvcToolChain(const MsvcToolChain *base = nullptr);
|
||||||
Macros msvcPredefinedMacros(const QStringList cxxflags,
|
Macros msvcPredefinedMacros(const QStringList &cxxflags,
|
||||||
const Utils::Environment &env) const override;
|
const Utils::Environment &env) const override;
|
||||||
LanguageVersion msvcLanguageVersion(const QStringList &cxxflags,
|
LanguageVersion msvcLanguageVersion(const QStringList &cxxflags,
|
||||||
const Core::Id &language,
|
const Core::Id &language,
|
||||||
|
@@ -87,6 +87,8 @@ class PROJECTEXPLORER_EXPORT ProjectConfigurationAspects
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ProjectConfigurationAspects();
|
ProjectConfigurationAspects();
|
||||||
|
ProjectConfigurationAspects(const ProjectConfigurationAspects &) = delete;
|
||||||
|
ProjectConfigurationAspects &operator=(const ProjectConfigurationAspects &) = delete;
|
||||||
~ProjectConfigurationAspects();
|
~ProjectConfigurationAspects();
|
||||||
|
|
||||||
template <class Aspect, typename ...Args>
|
template <class Aspect, typename ...Args>
|
||||||
@@ -117,9 +119,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
Base &base() { return *this; }
|
Base &base() { return *this; }
|
||||||
const Base &base() const { return *this; }
|
const Base &base() const { return *this; }
|
||||||
|
|
||||||
ProjectConfigurationAspects(const ProjectConfigurationAspects &) = delete;
|
|
||||||
ProjectConfigurationAspects &operator=(const ProjectConfigurationAspects &) = delete;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ProjectConfiguration : public QObject
|
class PROJECTEXPLORER_EXPORT ProjectConfiguration : public QObject
|
||||||
|
@@ -104,9 +104,9 @@ class ProjectTreeWidgetFactory : public Core::INavigationWidgetFactory
|
|||||||
public:
|
public:
|
||||||
ProjectTreeWidgetFactory();
|
ProjectTreeWidgetFactory();
|
||||||
|
|
||||||
Core::NavigationView createWidget();
|
Core::NavigationView createWidget() override;
|
||||||
void restoreSettings(QSettings *settings, int position, QWidget *widget);
|
void restoreSettings(QSettings *settings, int position, QWidget *widget) override;
|
||||||
void saveSettings(QSettings *settings, int position, QWidget *widget);
|
void saveSettings(QSettings *settings, int position, QWidget *widget) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -429,7 +429,7 @@ RunConfigurationFactory::~RunConfigurationFactory()
|
|||||||
m_ownedRunWorkerFactories.clear();
|
m_ownedRunWorkerFactories.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RunConfigurationFactory::decoratedTargetName(const QString targetName, Target *target)
|
QString RunConfigurationFactory::decoratedTargetName(const QString &targetName, Target *target)
|
||||||
{
|
{
|
||||||
QString displayName;
|
QString displayName;
|
||||||
if (!targetName.isEmpty())
|
if (!targetName.isEmpty())
|
||||||
|
@@ -242,6 +242,8 @@ class PROJECTEXPLORER_EXPORT RunConfigurationFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RunConfigurationFactory();
|
RunConfigurationFactory();
|
||||||
|
RunConfigurationFactory(const RunConfigurationFactory &) = delete;
|
||||||
|
RunConfigurationFactory operator=(const RunConfigurationFactory &) = delete;
|
||||||
virtual ~RunConfigurationFactory();
|
virtual ~RunConfigurationFactory();
|
||||||
|
|
||||||
static RunConfiguration *restore(Target *parent, const QVariantMap &map);
|
static RunConfiguration *restore(Target *parent, const QVariantMap &map);
|
||||||
@@ -250,7 +252,7 @@ public:
|
|||||||
|
|
||||||
Core::Id runConfigurationBaseId() const { return m_runConfigBaseId; }
|
Core::Id runConfigurationBaseId() const { return m_runConfigBaseId; }
|
||||||
|
|
||||||
static QString decoratedTargetName(const QString targetName, Target *kit);
|
static QString decoratedTargetName(const QString &targetName, Target *kit);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QList<RunConfigurationCreationInfo> availableCreators(Target *parent) const;
|
virtual QList<RunConfigurationCreationInfo> availableCreators(Target *parent) const;
|
||||||
@@ -283,9 +285,6 @@ private:
|
|||||||
RunWorkerFactory *addRunWorkerFactoryHelper
|
RunWorkerFactory *addRunWorkerFactoryHelper
|
||||||
(Core::Id runMode, const std::function<RunWorker *(RunControl *)> &creator);
|
(Core::Id runMode, const std::function<RunWorker *(RunControl *)> &creator);
|
||||||
|
|
||||||
RunConfigurationFactory(const RunConfigurationFactory &) = delete;
|
|
||||||
RunConfigurationFactory operator=(const RunConfigurationFactory &) = delete;
|
|
||||||
|
|
||||||
bool canHandle(Target *target) const;
|
bool canHandle(Target *target) const;
|
||||||
|
|
||||||
friend class RunConfigurationCreationInfo;
|
friend class RunConfigurationCreationInfo;
|
||||||
|
@@ -94,7 +94,7 @@ private:
|
|||||||
QMenu *m_addRunMenu;
|
QMenu *m_addRunMenu;
|
||||||
QMenu *m_addDeployMenu;
|
QMenu *m_addDeployMenu;
|
||||||
bool m_ignoreChange = false;
|
bool m_ignoreChange = false;
|
||||||
typedef QPair<QWidget *, QLabel *> RunConfigItem;
|
using RunConfigItem = QPair<QWidget *, QLabel *>;
|
||||||
QList<RunConfigItem> m_subWidgets;
|
QList<RunConfigItem> m_subWidgets;
|
||||||
|
|
||||||
QGridLayout *m_gridLayout;
|
QGridLayout *m_gridLayout;
|
||||||
|
Reference in New Issue
Block a user