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 <utils/algorithm.h>
#include <QDebug>
using namespace Core; using namespace Core;
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -76,7 +76,7 @@ public:
void setInferior(const ProjectExplorer::Runnable &runnable); void setInferior(const ProjectExplorer::Runnable &runnable);
void setInferiorExecutable(const Utils::FilePath &executable); void setInferiorExecutable(const Utils::FilePath &executable);
void setInferiorEnvironment(const Utils::Environment &env); // Used by GammaRay plugin 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 setRunControlName(const QString &name);
void setStartMessage(const QString &msg); void setStartMessage(const QString &msg);
void addQmlServerInferiorCommandLineArgumentIfNeeded(); void addQmlServerInferiorCommandLineArgumentIfNeeded();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -40,38 +40,41 @@
#include <app/app_version.h> #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/command.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/findplugin.h> #include <coreplugin/find/findplugin.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/imode.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <coreplugin/helpmanager.h> #include <coreplugin/helpmanager.h>
#include <coreplugin/modemanager.h> #include <coreplugin/modemanager.h>
#include <coreplugin/progressmanager/progressmanager.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 <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 <QApplication>
#include <QDockWidget> #include <QDockWidget>
#include <QElapsedTimer> #include <QElapsedTimer>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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