IDevice: Make it possible to forward declare Ptr and ConstPtr

Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-04-12 21:01:45 +02:00
parent bfc0d5ec32
commit 7fadaff5d4
84 changed files with 223 additions and 112 deletions

View File

@@ -32,6 +32,8 @@
#include <utils/algorithm.h>
#include <QDebug>
using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;

View File

@@ -41,7 +41,7 @@ class BareMetalDeviceConfigurationWidget final
Q_OBJECT
public:
explicit BareMetalDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &deviceConfig);
explicit BareMetalDeviceConfigurationWidget(const ProjectExplorer::IDevicePtr &deviceConfig);
private:
void debugServerProviderChanged();

View File

@@ -25,7 +25,7 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <utils/wizard.h>
namespace BareMetal {
@@ -42,7 +42,7 @@ class BareMetalDeviceConfigurationWizard final : public Utils::Wizard
public:
explicit BareMetalDeviceConfigurationWizard(QWidget *parent = nullptr);
ProjectExplorer::IDevice::Ptr device() const;
ProjectExplorer::IDevicePtr device() const;
private:
BareMetalDeviceConfigurationWizardSetupPage *m_setupPage = nullptr;

View File

@@ -28,9 +28,10 @@
#include "qdbconstants.h"
#include "qdbrunconfiguration.h"
#include <ssh/sshremoteprocessrunner.h>
#include <projectexplorer/target.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
#include <ssh/sshremoteprocessrunner.h>
namespace Qdb {
namespace Internal {

View File

@@ -50,6 +50,7 @@
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/namedwidget.h>
#include <projectexplorer/project.h>

View File

@@ -26,6 +26,7 @@
#include "startremotedialog.h"
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitchooser.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runcontrol.h>

View File

@@ -66,6 +66,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/progressmanager/futureprogress.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>

View File

@@ -33,7 +33,7 @@
#include "threadshandler.h"
#include <coreplugin/icontext.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <projectexplorer/runcontrol.h>
#include <texteditor/textmark.h>
#include <utils/fileutils.h>
@@ -554,7 +554,7 @@ protected:
bool isNativeMixedActiveFrame() const;
void startDying() const;
ProjectExplorer::IDevice::ConstPtr device() const;
ProjectExplorer::IDeviceConstPtr device() const;
DebuggerEngine *companionEngine() const;
private:

View File

@@ -28,9 +28,10 @@
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
#include <projectexplorer/toolchain.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runcontrol.h>
#include <projectexplorer/toolchain.h>
#include <utils/environment.h>
#include <utils/fileutils.h>

View File

@@ -88,6 +88,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/project.h>

View File

@@ -42,6 +42,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/environmentaspect.h> // For the environment
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>

View File

@@ -76,7 +76,7 @@ public:
void setInferior(const ProjectExplorer::Runnable &runnable);
void setInferiorExecutable(const Utils::FilePath &executable);
void setInferiorEnvironment(const Utils::Environment &env); // Used by GammaRay plugin
void setInferiorDevice(ProjectExplorer::IDevice::ConstPtr device); // Used by cdbengine
void setInferiorDevice(ProjectExplorer::IDeviceConstPtr device); // Used by cdbengine
void setRunControlName(const QString &name);
void setStartMessage(const QString &msg);
void addQmlServerInferiorCommandLineArgumentIfNeeded();

View File

@@ -54,6 +54,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>

View File

@@ -29,9 +29,10 @@
#include "debuggerkitinformation.h"
#include "gdb/gdbengine.h"
#include <projectexplorer/devicesupport/devicefilesystemmodel.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/devicesupport/devicefilesystemmodel.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/runextensions.h>

View File

@@ -31,6 +31,7 @@
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h>

View File

@@ -25,7 +25,8 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <utils/filepath.h>
#include <QObject>
@@ -37,7 +38,7 @@ class KitDetector : public QObject
Q_OBJECT
public:
explicit KitDetector(const ProjectExplorer::IDevice::ConstPtr &device);
explicit KitDetector(const ProjectExplorer::IDeviceConstPtr &device);
~KitDetector() override;
void autoDetect(const QString &sharedId, const Utils::FilePaths &selectedPaths) const;

View File

@@ -32,7 +32,7 @@
#include <debugger/debuggerconstants.h>
#include <debugger/debuggerruncontrol.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <projectexplorer/runconfiguration.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
@@ -83,7 +83,7 @@ private:
IosToolHandler *m_toolHandler = nullptr;
QString m_bundleDir;
ProjectExplorer::IDevice::ConstPtr m_device;
ProjectExplorer::IDeviceConstPtr m_device;
IosDeviceType m_deviceType;
bool m_cppDebug = false;
QmlDebug::QmlDebugServicesPreset m_qmlDebugServices = QmlDebug::NoQmlDebugServices;

View File

@@ -29,6 +29,7 @@
#include <coreplugin/messagebox.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runcontrol.h>

View File

@@ -25,11 +25,13 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QDialog>
#include <QProcess>
namespace Utils { class QtcProcess; }
namespace PerfProfiler {
namespace Internal {
@@ -50,7 +52,7 @@ private:
void finish();
Ui::PerfTracePointDialog *m_ui;
ProjectExplorer::IDevice::ConstPtr m_device;
ProjectExplorer::IDeviceConstPtr m_device;
std::unique_ptr<Utils::QtcProcess> m_process;
void accept() final;

View File

@@ -63,6 +63,7 @@ add_qtc_plugin(ProjectExplorer
devicesupport/deviceusedportsgatherer.cpp devicesupport/deviceusedportsgatherer.h
devicesupport/idevice.cpp devicesupport/idevice.h
devicesupport/idevicefactory.cpp devicesupport/idevicefactory.h
devicesupport/idevicefwd.h
devicesupport/idevicewidget.h
devicesupport/localprocesslist.cpp devicesupport/localprocesslist.h
devicesupport/sshdeviceprocess.cpp devicesupport/sshdeviceprocess.h

View File

@@ -27,8 +27,6 @@
#include "projectexplorer_export.h"
#include "devicesupport/idevice.h"
#include <utils/outputformat.h>
#include <utils/processhandle.h>

View File

@@ -47,6 +47,7 @@
#include <coreplugin/progressmanager/futureprogress.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/algorithm.h>
#include <utils/outputformatter.h>
#include <utils/runextensions.h>

View File

@@ -25,6 +25,7 @@
#include "devicefilesystemmodel.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/futuresynchronizer.h>
#include <utils/qtcassert.h>
#include <utils/runextensions.h>

View File

@@ -25,10 +25,13 @@
#pragma once
#include "idevice.h"
#include "../projectexplorer_export.h"
#include "idevicefwd.h"
#include <QAbstractItemModel>
namespace Utils { class FilePath; }
namespace ProjectExplorer {
namespace Internal {
@@ -44,7 +47,7 @@ public:
explicit DeviceFileSystemModel(QObject *parent = nullptr);
~DeviceFileSystemModel();
void setDevice(const IDevice::ConstPtr &device);
void setDevice(const IDeviceConstPtr &device);
// Use this to get the full path of a file or directory.
static const int PathRole = Qt::UserRole;

View File

@@ -26,12 +26,14 @@
#pragma once
#include "../projectexplorer_export.h"
#include "idevice.h"
#include "idevicefwd.h"
#include <QAbstractListModel>
#include <memory>
namespace Utils { class Id; }
namespace ProjectExplorer {
namespace Internal { class DeviceManagerModelPrivate; }
class IDevice;
@@ -47,9 +49,9 @@ public:
void setFilter(const QList<Utils::Id> &filter);
void setTypeFilter(Utils::Id type);
IDevice::ConstPtr device(int pos) const;
IDeviceConstPtr device(int pos) const;
Utils::Id deviceId(int pos) const;
int indexOf(IDevice::ConstPtr dev) const;
int indexOf(IDeviceConstPtr dev) const;
int indexForId(Utils::Id id) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
@@ -62,7 +64,7 @@ private:
void handleDeviceListChanged();
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool matchesTypeFilter(const IDevice::ConstPtr &dev) const;
bool matchesTypeFilter(const IDeviceConstPtr &dev) const;
const std::unique_ptr<Internal::DeviceManagerModelPrivate> d;
};

View File

@@ -25,6 +25,7 @@
#include "deviceprocessesdialog.h"
#include "deviceprocesslist.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitchooser.h>
#include <projectexplorer/kitinformation.h>

View File

@@ -27,7 +27,7 @@
#include "../projectexplorer_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QDialog>
@@ -51,7 +51,7 @@ public:
void addAcceptButton(const QString &label);
void addCloseButton();
void setDevice(const IDevice::ConstPtr &device);
void setDevice(const IDeviceConstPtr &device);
void showAllDevices();
Utils::ProcessInfo currentProcess() const;
KitChooser *kitChooser() const;

View File

@@ -25,6 +25,7 @@
#include "deviceprocesslist.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/fileutils.h>
#include <utils/processinfo.h>
#include <utils/qtcassert.h>

View File

@@ -25,7 +25,8 @@
#pragma once
#include "idevice.h"
#include "../projectexplorer_export.h"
#include "idevicefwd.h"
#include <QAbstractItemModel>
#include <QList>
@@ -43,7 +44,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessList : public QObject
Q_OBJECT
public:
DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = nullptr);
DeviceProcessList(const IDeviceConstPtr &device, QObject *parent = nullptr);
~DeviceProcessList() override;
void update();
@@ -63,7 +64,7 @@ protected:
void reportProcessKilled();
void reportProcessListUpdated(const QList<Utils::ProcessInfo> &processes);
IDevice::ConstPtr device() const;
IDeviceConstPtr device() const;
private:
virtual void doUpdate() = 0;

View File

@@ -25,7 +25,7 @@
#pragma once
#include "idevice.h"
#include "idevicefwd.h"
#include <QList>
#include <QString>
@@ -38,7 +38,6 @@ class QPushButton;
QT_END_NAMESPACE
namespace ProjectExplorer {
class IDevice;
class DeviceManager;
class DeviceManagerModel;
class IDeviceWidget;
@@ -71,7 +70,7 @@ private:
void initGui();
void displayCurrent();
void setDeviceInfoWidgetsEnabled(bool enable);
IDevice::ConstPtr currentDevice() const;
IDeviceConstPtr currentDevice() const;
int currentIndex() const;
void clearDetails();
QString parseTestOutput();

View File

@@ -27,6 +27,7 @@
#include <ssh/sshconnection.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/port.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>

View File

@@ -25,7 +25,7 @@
#pragma once
#include "idevice.h"
#include "idevicefwd.h"
#include <projectexplorer/runcontrol.h>
@@ -46,7 +46,7 @@ public:
DeviceUsedPortsGatherer(QObject *parent = nullptr);
~DeviceUsedPortsGatherer() override;
void start(const IDevice::ConstPtr &device);
void start(const IDeviceConstPtr &device);
void stop();
Utils::Port getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
QList<Utils::Port> usedPorts() const;

View File

@@ -26,6 +26,7 @@
#pragma once
#include "../projectexplorer_export.h"
#include "idevicefwd.h"
#include <utils/id.h>
#include <utils/filepath.h>
@@ -123,8 +124,8 @@ class PROJECTEXPLORER_EXPORT IDevice : public QEnableSharedFromThis<IDevice>
{
friend class Internal::IDevicePrivate;
public:
using Ptr = QSharedPointer<IDevice>;
using ConstPtr = QSharedPointer<const IDevice>;
using Ptr = IDevicePtr;
using ConstPtr = IDeviceConstPtr;
template <class ...Args> using Continuation = std::function<void(Args...)>;
enum Origin { ManuallyAdded, AutoDetected };

View File

@@ -25,6 +25,7 @@
#include "idevicefactory.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/algorithm.h>
#include <utils/icon.h>
#include <utils/qtcassert.h>

View File

@@ -25,12 +25,15 @@
#pragma once
#include "idevice.h"
#include "idevicefwd.h"
#include <projectexplorer/projectexplorer_export.h>
#include <utils/id.h>
#include <QIcon>
#include <QVariantMap>
namespace Utils { class FilePath; }
namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT IDeviceFactory
@@ -43,8 +46,8 @@ public:
QString displayName() const { return m_displayName; }
QIcon icon() const { return m_icon; }
bool canCreate() const;
IDevice::Ptr construct() const;
IDevice::Ptr create() const;
IDevicePtr construct() const;
IDevicePtr create() const;
virtual bool canRestore(const QVariantMap &) const { return true; }
@@ -58,15 +61,15 @@ protected:
void setDisplayName(const QString &displayName);
void setIcon(const QIcon &icon);
void setCombinedIcon(const Utils::FilePath &small, const Utils::FilePath &large);
void setConstructionFunction(const std::function<IDevice::Ptr ()> &constructor);
void setCreator(const std::function<IDevice::Ptr()> &creator);
void setConstructionFunction(const std::function<IDevicePtr ()> &constructor);
void setCreator(const std::function<IDevicePtr()> &creator);
private:
std::function<IDevice::Ptr()> m_creator;
std::function<IDevicePtr()> m_creator;
const Utils::Id m_deviceType;
QString m_displayName;
QIcon m_icon;
std::function<IDevice::Ptr()> m_constructor;
std::function<IDevicePtr()> m_constructor;
};
} // namespace ProjectExplorer

View File

@@ -0,0 +1,42 @@
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <QtGlobal>
QT_BEGIN_NAMESPACE
template <class T>
class QSharedPointer;
QT_END_NAMESPACE
namespace ProjectExplorer {
class IDevice;
using IDevicePtr = QSharedPointer<IDevice>;
using IDeviceConstPtr = QSharedPointer<const IDevice>;
} // namespace ProjectExplorer

View File

@@ -25,7 +25,7 @@
#pragma once
#include "idevice.h"
#include "idevicefwd.h"
#include <projectexplorer/projectexplorer_export.h>
#include <QWidget>
@@ -40,14 +40,14 @@ public:
virtual void updateDeviceFromUi() = 0;
protected:
explicit IDeviceWidget(const IDevice::Ptr &device) :
explicit IDeviceWidget(const IDevicePtr &device) :
m_device(device)
{ }
IDevice::Ptr device() const { return m_device; }
IDevicePtr device() const { return m_device; }
private:
IDevice::Ptr m_device;
IDevicePtr m_device;
};
} // namespace ProjectExplorer

View File

@@ -25,6 +25,7 @@
#include "localprocesslist.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/processinfo.h>
#include <QTimer>

View File

@@ -35,7 +35,7 @@ class LocalProcessList : public DeviceProcessList
Q_OBJECT
public:
explicit LocalProcessList(const IDevice::ConstPtr &device, QObject *parent = nullptr);
explicit LocalProcessList(const IDeviceConstPtr &device, QObject *parent = nullptr);
private:
void doUpdate() override;

View File

@@ -27,6 +27,7 @@
#include "idevice.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <ssh/sshremoteprocessrunner.h>
#include <utils/fileutils.h>
#include <utils/processinfo.h>

View File

@@ -35,7 +35,7 @@ class PROJECTEXPLORER_EXPORT SshDeviceProcessList : public DeviceProcessList
{
Q_OBJECT
public:
explicit SshDeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = nullptr);
explicit SshDeviceProcessList(const IDeviceConstPtr &device, QObject *parent = nullptr);
~SshDeviceProcessList() override;
private:

View File

@@ -27,6 +27,7 @@
#include "abiwidget.h"
#include "clangparser.h"
#include "devicesupport/idevice.h"
#include "gccparser.h"
#include "linuxiccparser.h"
#include "projectmacro.h"

View File

@@ -26,7 +26,7 @@
#pragma once
#include "abi.h"
#include "devicesupport/idevice.h"
#include "devicesupport/idevicefwd.h"
#include "kitmanager.h"
#include "kit.h"
@@ -157,9 +157,9 @@ public:
void addToMacroExpander(ProjectExplorer::Kit *kit, Utils::MacroExpander *expander) const override;
static Utils::Id id();
static IDevice::ConstPtr device(const Kit *k);
static IDeviceConstPtr device(const Kit *k);
static Utils::Id deviceId(const Kit *k);
static void setDevice(Kit *k, IDevice::ConstPtr dev);
static void setDevice(Kit *k, IDeviceConstPtr dev);
static void setDeviceId(Kit *k, Utils::Id dataId);
private:
@@ -194,13 +194,13 @@ public:
void addToMacroExpander(ProjectExplorer::Kit *kit, Utils::MacroExpander *expander) const override;
static Utils::Id id();
static IDevice::ConstPtr device(const Kit *k);
static IDeviceConstPtr device(const Kit *k);
static Utils::Id deviceId(const Kit *k);
static void setDevice(Kit *k, IDevice::ConstPtr dev);
static void setDevice(Kit *k, IDeviceConstPtr dev);
static void setDeviceId(Kit *k, Utils::Id dataId);
private:
static IDevice::ConstPtr defaultDevice();
static IDeviceConstPtr defaultDevice();
void kitsWereLoaded();
void deviceUpdated(Utils::Id dataId);

View File

@@ -28,6 +28,7 @@
#include "kitinformation.h"
#include "target.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>

View File

@@ -221,6 +221,7 @@ Project {
"deviceusedportsgatherer.cpp", "deviceusedportsgatherer.h",
"idevice.cpp", "idevice.h",
"idevicefactory.cpp", "idevicefactory.h",
"idevicefwd.h",
"idevicewidget.h",
"localprocesslist.cpp", "localprocesslist.h",
"sshdeviceprocess.cpp", "sshdeviceprocess.h",

View File

@@ -40,6 +40,9 @@
#include "target.h"
#include "toolchain.h"
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/algorithm.h>
#include <utils/checkablemessagebox.h>
#include <utils/detailswidget.h>
@@ -49,9 +52,6 @@
#include <utils/utilsicons.h>
#include <utils/variablechooser.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <QDir>
#include <QFormLayout>
#include <QHash>

View File

@@ -26,7 +26,6 @@
#pragma once
#include "buildtargetinfo.h"
#include "devicesupport/idevice.h"
#include "projectconfiguration.h"
#include "projectexplorerconstants.h"
#include "task.h"

View File

@@ -26,6 +26,7 @@
#include "runcontrol.h"
#include "devicesupport/desktopdevice.h"
#include "devicesupport/idevice.h"
#include "abi.h"
#include "buildconfiguration.h"
#include "customparser.h"

View File

@@ -27,7 +27,7 @@
#include "applicationlauncher.h"
#include "buildconfiguration.h"
#include "devicesupport/idevice.h"
#include "devicesupport/idevicefwd.h"
#include "projectexplorerconstants.h"
#include "runconfiguration.h"
@@ -70,7 +70,7 @@ public:
Utils::CommandLine command;
Utils::FilePath workingDirectory;
Utils::Environment environment;
IDevice::ConstPtr device; // Override the kit's device. Keep unset by default.
IDeviceConstPtr device; // Override the kit's device. Keep unset by default.
QVariantHash extraData;
// FIXME: Not necessarily a display name
@@ -100,7 +100,7 @@ public:
// Part of read-only interface of RunControl for convenience.
void appendMessage(const QString &msg, Utils::OutputFormat format, bool appendNewLine = true);
IDevice::ConstPtr device() const;
IDeviceConstPtr device() const;
const Runnable &runnable() const;
// States
@@ -223,7 +223,7 @@ public:
Utils::ProcessHandle applicationProcessHandle() const;
void setApplicationProcessHandle(const Utils::ProcessHandle &handle);
IDevice::ConstPtr device() const;
IDeviceConstPtr device() const;
RunConfiguration *runConfiguration() const; // FIXME: Remove.
// FIXME: Try to cut down to amount of functions.
@@ -275,7 +275,7 @@ signals:
void applicationProcessHandleChanged(QPrivateSignal); // Use setApplicationProcessHandle
private:
void setDevice(const IDevice::ConstPtr &device);
void setDevice(const IDeviceConstPtr &device);
friend class RunWorker;
friend class Internal::RunWorkerPrivate;

View File

@@ -26,6 +26,7 @@
#include "toolchain.h"
#include "abi.h"
#include "devicesupport/idevice.h"
#include "headerpath.h"
#include "projectexplorerconstants.h"
#include "toolchainmanager.h"

View File

@@ -28,7 +28,7 @@
#include "projectexplorer_export.h"
#include "abi.h"
#include "devicesupport/idevice.h"
#include "devicesupport/idevicefwd.h"
#include "headerpath.h"
#include "projectmacro.h"
#include "task.h"
@@ -251,14 +251,14 @@ class PROJECTEXPLORER_EXPORT ToolchainDetector
{
public:
ToolchainDetector(const Toolchains &alreadyKnown,
const IDevice::ConstPtr &device,
const IDeviceConstPtr &device,
const Utils::FilePaths &searchPaths);
bool isBadToolchain(const Utils::FilePath &toolchain) const;
void addBadToolchain(const Utils::FilePath &toolchain) const;
const Toolchains alreadyKnown;
const IDevice::ConstPtr device;
const IDeviceConstPtr device;
const Utils::FilePaths searchPaths; // If empty use device path and/or magic.
};

View File

@@ -27,7 +27,6 @@
#include "projectexplorer_export.h"
#include "ioutputparser.h"
#include "devicesupport/idevice.h"
#include <QRegularExpression>
#include <QStringList>

View File

@@ -31,6 +31,7 @@
#include <coreplugin/messagemanager.h>
#include <baremetal/baremetalconstants.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/gcctoolchain.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>

View File

@@ -40,38 +40,41 @@
#include <app/app_version.h>
#include <debugger/debuggericons.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/analyzer/analyzermanager.h>
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
#include <utils/url.h>
#include <utils/utilsicons.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/session.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/taskhub.h>
#include <texteditor/texteditor.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/findplugin.h>
#include <coreplugin/icore.h>
#include <coreplugin/imode.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/helpmanager.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/imode.h>
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/debuggericons.h>
#include <debugger/debuggermainwindow.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/session.h>
#include <projectexplorer/taskhub.h>
#include <qtsupport/qtkitinformation.h>
#include <texteditor/texteditor.h>
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
#include <utils/url.h>
#include <utils/utilsicons.h>
#include <QApplication>
#include <QDockWidget>
#include <QElapsedTimer>

View File

@@ -42,6 +42,7 @@
#include <coreplugin/messagemanager.h>
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/target.h>

View File

@@ -34,6 +34,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>

View File

@@ -50,6 +50,7 @@
#include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <QDebug>
#include <QDir>
#include <QMessageBox>
#include <QFileInfo>

View File

@@ -30,6 +30,7 @@
#include "qnxqtversion.h"
#include <projectexplorer/deployablefile.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <qtsupport/qtversionmanager.h>
#include <remotelinux/genericdirectuploadservice.h>
#include <ssh/sshremoteprocessrunner.h>

View File

@@ -28,7 +28,7 @@
#include <QDialog>
#include <projectexplorer/deployablefile.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
namespace QSsh {
class SshRemoteProcessRunner;
@@ -57,7 +57,7 @@ public:
Uploading
};
explicit QnxDeployQtLibrariesDialog(const ProjectExplorer::IDevice::ConstPtr &device,
explicit QnxDeployQtLibrariesDialog(const ProjectExplorer::IDeviceConstPtr &device,
QWidget *parent = nullptr);
~QnxDeployQtLibrariesDialog() override;
@@ -90,7 +90,7 @@ private:
QSsh::SshRemoteProcessRunner *m_processRunner;
RemoteLinux::GenericDirectUploadService *m_uploadService;
ProjectExplorer::IDevice::ConstPtr m_device;
ProjectExplorer::IDeviceConstPtr m_device;
int m_progressCount;

View File

@@ -25,6 +25,7 @@
#include "qnxdeviceprocesslist.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/processinfo.h>

View File

@@ -25,7 +25,6 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/sshdeviceprocesslist.h>
namespace Qnx {
@@ -36,7 +35,7 @@ class QnxDeviceProcessList : public ProjectExplorer::SshDeviceProcessList
Q_OBJECT
public:
explicit QnxDeviceProcessList(
const ProjectExplorer::IDevice::ConstPtr &device, QObject *parent = nullptr);
const ProjectExplorer::IDeviceConstPtr &device, QObject *parent = nullptr);
private:
QString listProcessesCommandLine() const override;

View File

@@ -27,6 +27,7 @@
#include "deploymenttimeinfo.h"
#include <projectexplorer/deployablefile.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>

View File

@@ -27,7 +27,7 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QObject>
#include <QVariantMap>
@@ -69,7 +69,7 @@ public:
void setTarget(ProjectExplorer::Target *bc);
// Only use setDevice() as fallback if no target is available
void setDevice(const ProjectExplorer::IDevice::ConstPtr &device);
void setDevice(const ProjectExplorer::IDeviceConstPtr &device);
void start();
void stop();
@@ -89,7 +89,7 @@ signals:
protected:
const ProjectExplorer::Target *target() const;
const ProjectExplorer::Kit *profile() const;
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
ProjectExplorer::IDeviceConstPtr deviceConfiguration() const;
QSsh::SshConnection *connection() const;
void saveDeploymentTimeStamp(const ProjectExplorer::DeployableFile &deployableFile,

View File

@@ -28,6 +28,8 @@
#include "abstractremotelinuxdeployservice.h"
#include "remotelinux_export.h"
namespace Utils { class FilePath; }
namespace RemoteLinux {
class AbstractRemoteLinuxPackageInstaller;

View File

@@ -26,6 +26,7 @@
#include "deploymenttimeinfo.h"
#include <projectexplorer/deployablefile.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>

View File

@@ -26,7 +26,6 @@
#pragma once
#include <QVariantMap>
#include <projectexplorer/devicesupport/idevice.h>
namespace ProjectExplorer {
class DeployableFile;

View File

@@ -25,7 +25,6 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefactory.h>
#include <utils/fileutils.h>

View File

@@ -27,6 +27,7 @@
#include "ui_genericlinuxdeviceconfigurationwidget.h"
#include <coreplugin/coreconstants.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/portlist.h>
#include <utils/fancylineedit.h>
#include <utils/utilsicons.h>

View File

@@ -29,6 +29,8 @@
#include "remotelinux_export.h"
namespace Utils { class FilePath; }
namespace RemoteLinux {
namespace Ui { class GenericLinuxDeviceConfigurationWidget; }
@@ -40,7 +42,7 @@ class REMOTELINUX_EXPORT GenericLinuxDeviceConfigurationWidget
public:
explicit GenericLinuxDeviceConfigurationWidget(
const ProjectExplorer::IDevice::Ptr &deviceConfig);
const ProjectExplorer::IDevicePtr &deviceConfig);
~GenericLinuxDeviceConfigurationWidget() override;
private:

View File

@@ -29,6 +29,7 @@
#include "linuxdevice.h"
#include "remotelinux_constants.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/portlist.h>
#include <utils/fileutils.h>

View File

@@ -27,7 +27,7 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <utils/wizard.h>
namespace RemoteLinux {
@@ -41,7 +41,7 @@ public:
GenericLinuxDeviceConfigurationWizard(QWidget *parent = nullptr);
~GenericLinuxDeviceConfigurationWizard() override;
ProjectExplorer::IDevice::Ptr device();
ProjectExplorer::IDevicePtr device();
private:
Internal::GenericLinuxDeviceConfigurationWizardPrivate * const d;

View File

@@ -28,6 +28,7 @@
#include "sshkeydeployer.h"
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <ssh/sshconnection.h>
#include <utils/theme/theme.h>

View File

@@ -27,10 +27,12 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QProgressDialog>
namespace Utils { class FilePath; }
namespace RemoteLinux {
namespace Internal { class PublicKeyDeploymentDialogPrivate; }
@@ -39,10 +41,10 @@ class REMOTELINUX_EXPORT PublicKeyDeploymentDialog : public QProgressDialog
Q_OBJECT
public:
// Asks for public key and returns null if the file dialog is canceled.
static PublicKeyDeploymentDialog *createDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
static PublicKeyDeploymentDialog *createDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
QWidget *parent = nullptr);
PublicKeyDeploymentDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
PublicKeyDeploymentDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
const Utils::FilePath &publicKeyFileName, QWidget *parent = nullptr);
~PublicKeyDeploymentDialog() override;

View File

@@ -25,6 +25,7 @@
#include "remotelinuxcheckforfreediskspaceservice.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <ssh/sshremoteprocessrunner.h>
#include <utils/fileutils.h>

View File

@@ -25,9 +25,10 @@
#include "remotelinuxcustomcommanddeployservice.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <ssh/sshremoteprocessrunner.h>
#include <utils/qtcassert.h>
#include <utils/fileutils.h>
#include <ssh/sshremoteprocessrunner.h>
using namespace QSsh;

View File

@@ -33,6 +33,7 @@
#include "rsyncdeploystep.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>

View File

@@ -25,11 +25,13 @@
#pragma once
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <utils/environment.h>
#include <QObject>
namespace Utils { class QtcProcess; }
namespace RemoteLinux {
namespace Internal {
@@ -38,7 +40,7 @@ class RemoteLinuxEnvironmentReader : public QObject
Q_OBJECT
public:
RemoteLinuxEnvironmentReader(const ProjectExplorer::IDevice::ConstPtr &device,
RemoteLinuxEnvironmentReader(const ProjectExplorer::IDeviceConstPtr &device,
QObject *parent = nullptr);
void start();
void stop();
@@ -58,7 +60,7 @@ private:
bool m_stop = false;
Utils::Environment m_env;
ProjectExplorer::IDevice::ConstPtr m_device;
ProjectExplorer::IDeviceConstPtr m_device;
Utils::QtcProcess *m_deviceProcess = nullptr;
};

View File

@@ -25,6 +25,7 @@
#include "remotelinuxkillappservice.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/fileutils.h>
namespace RemoteLinux {

View File

@@ -25,9 +25,10 @@
#include "remotelinuxpackageinstaller.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <ssh/sshremoteprocessrunner.h>
#include <utils/qtcassert.h>
#include <utils/fileutils.h>
#include <ssh/sshremoteprocessrunner.h>
using namespace ProjectExplorer;
using namespace QSsh;

View File

@@ -27,7 +27,9 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/idevicefwd.h>
#include <QObject>
namespace RemoteLinux {
@@ -40,8 +42,8 @@ class REMOTELINUX_EXPORT AbstractRemoteLinuxPackageInstaller : public QObject
public:
~AbstractRemoteLinuxPackageInstaller() override;
void installPackage(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
const QString &packageFilePath, bool removePackageFile);
void installPackage(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
const QString &packageFilePath, bool removePackageFile);
void cancelInstallation();
signals:

View File

@@ -27,6 +27,8 @@
#include <utils/temporaryfile.h>
#include <QDebug>
#define CALLGRIND_CONTROL_DEBUG 0
using namespace ProjectExplorer;

View File

@@ -51,6 +51,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>

View File

@@ -28,6 +28,7 @@
#include "xmlprotocol/threadedparser.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>

View File

@@ -32,6 +32,10 @@
#include <QProcess>
QT_BEGIN_NAMESPACE
class QHostAddress;
QT_END_NAMESPACE
namespace Valgrind {
namespace XmlProtocol { class ThreadedParser; }
@@ -48,7 +52,7 @@ public:
void setDebuggee(const ProjectExplorer::Runnable &debuggee);
void setProcessChannelMode(QProcess::ProcessChannelMode mode);
void setLocalServerAddress(const QHostAddress &localServerAddress);
void setDevice(const ProjectExplorer::IDevice::ConstPtr &device);
void setDevice(const ProjectExplorer::IDeviceConstPtr &device);
void setUseTerminal(bool on);
void waitForFinished() const;