From d3e0ffef0ff4cfa2b6c977865a504e70e7de08ad Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Mon, 31 Oct 2011 16:23:35 +0000 Subject: [PATCH] Add embedded linux target ... and required factories. Change-Id: Id8a0e7a5a83d3c05e70d61d5023401be5e201c6c Reviewed-by: Daniel Teske <daniel.teske@nokia.com> --- .../qt-desktop/qt4desktoptargetfactory.h | 2 +- src/plugins/qtsupport/baseqtversion.cpp | 1 - .../remotelinux/embeddedlinuxtarget.cpp | 103 ++++++++++ src/plugins/remotelinux/embeddedlinuxtarget.h | 67 +++++++ .../embeddedlinuxtargetfactory.cpp | 178 ++++++++++++++++++ .../remotelinux/embeddedlinuxtargetfactory.h | 71 +++++++ .../remotelinux/images/embeddedtarget.png | Bin 0 -> 1050 bytes src/plugins/remotelinux/remotelinux.pro | 6 + src/plugins/remotelinux/remotelinux.qrc | 5 + .../remotelinuxdeployconfigurationfactory.h | 18 +- src/plugins/remotelinux/remotelinuxplugin.cpp | 2 + 11 files changed, 441 insertions(+), 12 deletions(-) create mode 100644 src/plugins/remotelinux/embeddedlinuxtarget.cpp create mode 100644 src/plugins/remotelinux/embeddedlinuxtarget.h create mode 100644 src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp create mode 100644 src/plugins/remotelinux/embeddedlinuxtargetfactory.h create mode 100644 src/plugins/remotelinux/images/embeddedtarget.png create mode 100644 src/plugins/remotelinux/remotelinux.qrc diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h index 42d5d88c95a..7eb4fb45217 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h @@ -60,9 +60,9 @@ public: bool importEnabled, QList<BuildConfigurationInfo> importInfos); QString buildNameForId(const QString &id) const; QSet<QString> targetFeatures(const QString &id) const; + ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id); ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos); - }; } } diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 9e1a1bb4cd2..8e33dbd564b 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1199,7 +1199,6 @@ QString BaseQtVersion::qtCorePath(const QHash<QString,QString> &versionInfo, con else if (file.endsWith(QLatin1String(".dll")) || file.endsWith(QString::fromLatin1(".so.") + versionString) || file.endsWith(QLatin1Char('.') + versionString + QLatin1String(".dylib"))) - return info.absoluteFilePath(); } } diff --git a/src/plugins/remotelinux/embeddedlinuxtarget.cpp b/src/plugins/remotelinux/embeddedlinuxtarget.cpp new file mode 100644 index 00000000000..22f3782a649 --- /dev/null +++ b/src/plugins/remotelinux/embeddedlinuxtarget.cpp @@ -0,0 +1,103 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "embeddedlinuxtarget.h" + +#include "remotelinux_constants.h" +#include "remotelinuxrunconfiguration.h" + +#include <projectexplorer/customexecutablerunconfiguration.h> +#include <qt4projectmanager/qt4buildconfiguration.h> +#include <qt4projectmanager/qt4nodes.h> +#include <qt4projectmanager/qt4project.h> + +#include <QtCore/QCoreApplication> + +namespace RemoteLinux { +namespace Internal { + +EmbeddedLinuxTarget::EmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id) : + Qt4ProjectManager::Qt4BaseTarget(parent, id), + m_buildConfigurationFactory(new Qt4ProjectManager::Qt4BuildConfigurationFactory) +{ + setDisplayName(tr("Embedded Linux")); +} + +EmbeddedLinuxTarget::~EmbeddedLinuxTarget() +{ + delete m_buildConfigurationFactory; +} + +ProjectExplorer::IBuildConfigurationFactory *EmbeddedLinuxTarget::buildConfigurationFactory() const +{ + return m_buildConfigurationFactory; +} + +QList<ProjectExplorer::RunConfiguration *> EmbeddedLinuxTarget::runConfigurationsForNode(ProjectExplorer::Node *n) +{ + QList<ProjectExplorer::RunConfiguration *> result; + foreach (ProjectExplorer::RunConfiguration *rc, runConfigurations()) + if (RemoteLinuxRunConfiguration *qt4c = qobject_cast<RemoteLinuxRunConfiguration *>(rc)) + if (qt4c->proFilePath() == n->path()) + result << rc; + return result; +} + +void EmbeddedLinuxTarget::createApplicationProFiles() +{ + removeUnconfiguredCustomExectutableRunConfigurations(); + + // We use the list twice + QList<Qt4ProjectManager::Qt4ProFileNode *> profiles = qt4Project()->applicationProFiles(); + QStringList pathes; + foreach (Qt4ProjectManager::Qt4ProFileNode *pro, profiles) + pathes.append(pro->path()); + + foreach (ProjectExplorer::RunConfiguration *rc, runConfigurations()) { + if (RemoteLinuxRunConfiguration *qt4rc = qobject_cast<RemoteLinuxRunConfiguration *>(rc)) + pathes.removeAll(qt4rc->proFilePath()); + } + + // Only add new runconfigurations if there are none. + foreach (const QString &path, pathes) { + RemoteLinuxRunConfiguration *qt4rc = + new RemoteLinuxRunConfiguration(this,RemoteLinuxRunConfiguration::Id, path); + addRunConfiguration(qt4rc); + } + + // Oh still none? Add a custom executable runconfiguration + if (runConfigurations().isEmpty()) + addRunConfiguration(new ProjectExplorer::CustomExecutableRunConfiguration(this)); +} + +} // namespace Internal +} // namespace RemoteLinux diff --git a/src/plugins/remotelinux/embeddedlinuxtarget.h b/src/plugins/remotelinux/embeddedlinuxtarget.h new file mode 100644 index 00000000000..181a9b5b07f --- /dev/null +++ b/src/plugins/remotelinux/embeddedlinuxtarget.h @@ -0,0 +1,67 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef EMBEDDEDLINUXTARGET_H +#define EMBEDDEDLINUXTARGET_H + +#include <qt4projectmanager/qt4target.h> +#include <qt4projectmanager/qt4buildconfiguration.h> + +namespace RemoteLinux { +namespace Internal { + +class EmbeddedLinuxTargetFactory; + +class EmbeddedLinuxTarget : public Qt4ProjectManager::Qt4BaseTarget +{ + Q_OBJECT + +public: + EmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id); + ~EmbeddedLinuxTarget(); + + ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const; + + void createApplicationProFiles(); + + QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Node *n); + +private: + Qt4ProjectManager::Qt4BuildConfigurationFactory *m_buildConfigurationFactory; + + friend class EmbeddedLinuxTargetFactory; +}; + +} // namespace Internal +} // namespace RemoteLinux + +#endif // EMBEDDEDLINUXTARGET_H diff --git a/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp b/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp new file mode 100644 index 00000000000..0304b4a3ad1 --- /dev/null +++ b/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp @@ -0,0 +1,178 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "embeddedlinuxtargetfactory.h" + +#include "remotelinuxdeployconfiguration.h" +#include "remotelinuxdeployconfigurationfactory.h" +#include "embeddedlinuxtarget.h" +#include "remotelinux_constants.h" + +#include <projectexplorer/customexecutablerunconfiguration.h> + +#include <qt4projectmanager/buildconfigurationinfo.h> +#include <qt4projectmanager/qt4project.h> +#include <qt4projectmanager/qt4projectmanagerconstants.h> + +#include <qtsupport/qtversionmanager.h> + +#include <QtGui/QIcon> + +namespace RemoteLinux { +namespace Internal { + +EmbeddedLinuxTargetFactory::EmbeddedLinuxTargetFactory(QObject *parent) : + Qt4ProjectManager::Qt4BaseTargetFactory(parent) +{ } + +EmbeddedLinuxTargetFactory::~EmbeddedLinuxTargetFactory() +{ } + +QIcon EmbeddedLinuxTargetFactory::iconForId(const QString &id) const +{ + if (id == QLatin1String(Constants::EMBEDDED_LINUX_TARGET_ID)) + return QIcon(":/remotelinux/images/embeddedtarget.png"); + return QIcon(); +} + +QString EmbeddedLinuxTargetFactory::buildNameForId(const QString &id) const +{ + if (supportsTargetId(id)) + return tr("embedded"); + return QString(); +} + +QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const QString & /*id*/) const +{ + QSet<QString> features; + features << Qt4ProjectManager::Constants::MOBILE_TARGETFEATURE_ID; + features << Qt4ProjectManager::Constants::SHADOWBUILD_TARGETFEATURE_ID; + + return features; +} + +QStringList EmbeddedLinuxTargetFactory::supportedTargetIds(ProjectExplorer::Project *project) const +{ + Q_UNUSED(project); + return QStringList() << RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID; +} + +bool EmbeddedLinuxTargetFactory::supportsTargetId(const QString &id) const +{ + return id == RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID; +} + +QString EmbeddedLinuxTargetFactory::displayNameForId(const QString &id) const +{ + if (id == RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID) + return tr("Embedded Linux"); + return QString(); +} + +bool EmbeddedLinuxTargetFactory::canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const +{ + return canCreate(parent, ProjectExplorer::idFromMap(map)); +} + +ProjectExplorer::Target *EmbeddedLinuxTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map) +{ + Q_ASSERT(canRestore(parent, map)); + + EmbeddedLinuxTarget *t = new EmbeddedLinuxTarget(static_cast<Qt4ProjectManager::Qt4Project *>(parent), + Constants::EMBEDDED_LINUX_TARGET_ID); + if (t->fromMap(map)) + return t; + + delete t; + return 0; +} + +bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const +{ + Qt4ProjectManager::Qt4Project *project = qobject_cast<Qt4ProjectManager::Qt4Project *>(parent); + if (!project) + return false; + + return supportsTargetId(id); +} + + +ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent, + const QString &id) +{ + if (!canCreate(parent, id)) + return 0; + + QList<QtSupport::BaseQtVersion *> knownVersions = + QtSupport::QtVersionManager::instance()->versionsForTargetId(id); + if (knownVersions.isEmpty()) + return 0; + + QtSupport::BaseQtVersion *qtVersion = knownVersions.first(); + QtSupport::BaseQtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig(); + + QList<Qt4ProjectManager::BuildConfigurationInfo> infos; + infos.append(Qt4ProjectManager::BuildConfigurationInfo(qtVersion, config, QString(), QString())); + infos.append(Qt4ProjectManager::BuildConfigurationInfo(qtVersion, + config ^ QtSupport::BaseQtVersion::DebugBuild, + QString(), QString())); + + return create(parent, id, infos); +} + +ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent, + const QString &id, + const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos) +{ + if (!canCreate(parent, id) || infos.isEmpty()) + return 0; + + EmbeddedLinuxTarget *t = new EmbeddedLinuxTarget(static_cast<Qt4ProjectManager::Qt4Project *>(parent), id); + + foreach (const Qt4ProjectManager::BuildConfigurationInfo &info, infos) + t->addQt4BuildConfiguration(msgBuildConfigurationName(info), QString(), + info.version, info.buildConfig, + info.additionalArguments, info.directory, info.importing); + + t->addDeployConfiguration( + t->createDeployConfiguration( + RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId())); + + t->createApplicationProFiles(); + + if (t->runConfigurations().isEmpty()) + t->addRunConfiguration(new ProjectExplorer::CustomExecutableRunConfiguration(t)); + return t; +} + +} // namespace Internal +} // namespace RemoteLinux diff --git a/src/plugins/remotelinux/embeddedlinuxtargetfactory.h b/src/plugins/remotelinux/embeddedlinuxtargetfactory.h new file mode 100644 index 00000000000..74a74ef7d5a --- /dev/null +++ b/src/plugins/remotelinux/embeddedlinuxtargetfactory.h @@ -0,0 +1,71 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef EMBEDDEDLINUXTARGETFACTORY_H +#define EMBEDDEDLINUXTARGETFACTORY_H + +#include <qt4projectmanager/qt4basetargetfactory.h> + +namespace RemoteLinux { +namespace Internal { + +class EmbeddedLinuxTargetFactory : public Qt4ProjectManager::Qt4BaseTargetFactory +{ + Q_OBJECT + +public: + explicit EmbeddedLinuxTargetFactory(QObject *parent = 0); + ~EmbeddedLinuxTargetFactory(); + + QIcon iconForId(const QString &id) const; + QString buildNameForId(const QString &id) const; + + QSet<QString> targetFeatures(const QString &id) const; + + QStringList supportedTargetIds(ProjectExplorer::Project *project) const; + bool supportsTargetId(const QString &id) const; + + QString displayNameForId(const QString &id) const; + + bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const; + ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map); + + bool canCreate(ProjectExplorer::Project *parent, const QString &id) const; + ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id); + ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, + const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos); +}; + +} // namespace Internal +} // namespace RemoteLinux + +#endif // EMBEDDEDLINUXTARGETFACTORY_H diff --git a/src/plugins/remotelinux/images/embeddedtarget.png b/src/plugins/remotelinux/images/embeddedtarget.png new file mode 100644 index 0000000000000000000000000000000000000000..93a092ab13dfecfe099db859a6f56bcbed44a92a GIT binary patch literal 1050 zcmV+#1m*jQP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F80000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU#yh%hsRCwCFS37GPK@gr@J?sR6EJz`n z5Db<{nOfN3I;9(v(p3V6K-%;P1iR2*&<{wJ+Th-#O&}&|1qL^65<PBbva>t8w|6={ zQdlR3)va_p-+bT9?4IiP`)>f?+*%9Pd)-@mS7+zFUa!?|x7X_Z?(VL2eSLk-09spH zTX1!C1vfW0FdmN|)N!-fg#G<}I66Aw+eZulh{!pgynGGyCr_cKH7IL@2!_oVFj)o} z+jI)kZ0bk0iHy^HF3Wh#{4<6}1Bk}?*-#mbzW;#3!$Sus0^rE?<2ERzoO5jr?QhEd zrqU1;-zBE1Bb_r1W2ys^azG;hM07VKU^sG~;nCfvD-eZ$dZTJbv_y*FGco|;5S7Qy zk@GzN(ajTs5kRTQ2hw};5NHuV@mXMiwGKb35ToP(8uaD>F)(stG%5iJBneYQ3m8ZN z@FE&@{zvkTT_U0fzzK!nyD)>403iV)j)`VPsRm%PmdGZb(g{@pz%h||Af^NYDawRM zGcr}_Pziv`jHBmDaM_;Z0Vd^`0}*Kij8EFY2$n#skOK@rY2^V(7LZWOPK*&2GUKfR zL}WystI~fi0Ip440RWMr_MQb3SwLfQSz?kVY~cS$U;)f$Adw+jA_b;NTFix|eIRAP z0SFzAq?#E3$-)K;k!K|kj)jm1D5bd!K&bx$fY{MOd7(&Q^0F*gE<wt`yes%D0B{n7 z3P@V7%Y)FOV=g2);heJs#cEj8kShW3F6ZJ;0L1nxGDHy48zLit{uQF10gxskM_-m8 z?*~DO#7yZvM!(us%7M&p$3+E7oh|8nvHJyPXl3Ws3~(b-em7T9!LYG}T)=$GPLeb1 zl&fAdRnTZOpfUObBh{>sK&pZAz7QPddaveuLmAMDW;@~b_BQl}za0w?dDUt)*x7j& z6P*Fv+xl;HyIt7Z+gr<tn4Qa!>@Nd&I~)!_+OfOl_kv&6J}7tk37O}uCd@QgGCoPm zcb=~e27{lARy{pEeZi`7PIF;dn<U0_CO>|X&w+{qtxkXhFg)smgM(#}H3UG&WE7`5 z36ctZ0Op^p%cd_cFTa%zzvUCSmU&(A{H&8X5;TPR%|wFw+1c4E`&QFm6u!-;&leXL z1Bp6NKNicxq6E6)C{GD(QNxpyljpWdKFu7<OV;Uh-X9+ycf{dD*2rW{EWb9?E8Zta zoX4)o3+(Rhe!0E9eY`?;Z(5eVN>ycvnPh!f1OQ9-wGyCJuaP`wlIUml=zjtX0Bx{~ U()J@iBme*a07*qoM6N<$f}&N?)c^nh literal 0 HcmV?d00001 diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro index 7614cfc6c72..b219077217e 100644 --- a/src/plugins/remotelinux/remotelinux.pro +++ b/src/plugins/remotelinux/remotelinux.pro @@ -5,6 +5,8 @@ include(../../qtcreatorplugin.pri) include(remotelinux_dependencies.pri) HEADERS += \ + embeddedlinuxtarget.h \ + embeddedlinuxtargetfactory.h \ embeddedlinuxqtversion.h \ embeddedlinuxqtversionfactory.h \ remotelinuxplugin.h \ @@ -62,6 +64,8 @@ HEADERS += \ remotelinuxcustomcommanddeploymentstep.h SOURCES += \ + embeddedlinuxtarget.cpp \ + embeddedlinuxtargetfactory.cpp \ embeddedlinuxqtversion.cpp \ embeddedlinuxqtversionfactory.cpp \ remotelinuxplugin.cpp \ @@ -126,5 +130,7 @@ FORMS += \ profilesupdatedialog.ui \ startgdbserverdialog.ui +RESOURCES += remotelinux.qrc + DEFINES += QT_NO_CAST_TO_ASCII DEFINES += REMOTELINUX_LIBRARY diff --git a/src/plugins/remotelinux/remotelinux.qrc b/src/plugins/remotelinux/remotelinux.qrc new file mode 100644 index 00000000000..e461e2e8e6c --- /dev/null +++ b/src/plugins/remotelinux/remotelinux.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/remotelinux"> + <file>images/embeddedtarget.png</file> + </qresource> +</RCC> diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h index c06f97148a9..115ba13c71a 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h +++ b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h @@ -44,16 +44,14 @@ class RemoteLinuxDeployConfigurationFactory : public ProjectExplorer::DeployConf public: explicit RemoteLinuxDeployConfigurationFactory(QObject *parent = 0); - virtual QStringList availableCreationIds(ProjectExplorer::Target *parent) const; - virtual QString displayNameForId(const QString &id) const; - virtual bool canCreate(ProjectExplorer::Target *parent, const QString &id) const; - virtual ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id); - virtual bool canRestore(ProjectExplorer::Target *parent, - const QVariantMap &map) const; - virtual ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, - const QVariantMap &map); - virtual ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent, - ProjectExplorer::DeployConfiguration *product); + QStringList availableCreationIds(ProjectExplorer::Target *parent) const; + QString displayNameForId(const QString &id) const; + bool canCreate(ProjectExplorer::Target *parent, const QString &id) const; + ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id); + bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const; + ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map); + ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent, + ProjectExplorer::DeployConfiguration *product); static QString genericDeployConfigurationId(); }; diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp index 1fe931afe3d..75d4762f602 100644 --- a/src/plugins/remotelinux/remotelinuxplugin.cpp +++ b/src/plugins/remotelinux/remotelinuxplugin.cpp @@ -33,6 +33,7 @@ #include "remotelinuxplugin.h" #include "embeddedlinuxqtversionfactory.h" +#include "embeddedlinuxtargetfactory.h" #include "deployablefile.h" #include "genericlinuxdeviceconfigurationfactory.h" #include "genericremotelinuxdeploystepfactory.h" @@ -78,6 +79,7 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments, addAutoReleasedObject(new RemoteLinuxDeployConfigurationFactory); addAutoReleasedObject(new GenericRemoteLinuxDeployStepFactory); + addAutoReleasedObject(new EmbeddedLinuxTargetFactory); addAutoReleasedObject(new EmbeddedLinuxQtVersionFactory); qRegisterMetaType<RemoteLinux::DeployableFile>("RemoteLinux::DeployableFile"); -- GitLab