2011-07-14 15:38:16 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2011-07-14 15:38:16 +02:00
|
|
|
**
|
2012-07-19 12:26:56 +02:00
|
|
|
** Contact: http://www.qt-project.org/
|
2011-07-14 15:38:16 +02:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
#include "remotelinuxdeployconfiguration.h"
|
|
|
|
|
|
|
|
|
|
#include "deploymentinfo.h"
|
2011-08-01 16:44:59 +02:00
|
|
|
#include "remotelinuxdeployconfigurationwidget.h"
|
2011-07-22 12:38:57 +02:00
|
|
|
#include "typespecificdeviceconfigurationlistmodel.h"
|
2011-07-14 15:38:16 +02:00
|
|
|
|
2012-03-06 12:31:42 +01:00
|
|
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
2012-07-25 17:41:01 +02:00
|
|
|
#include <projectexplorer/project.h>
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <projectexplorer/target.h>
|
|
|
|
|
#include <qt4projectmanager/qt4project.h>
|
2011-07-14 15:38:16 +02:00
|
|
|
|
|
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
using namespace Qt4ProjectManager;
|
|
|
|
|
|
|
|
|
|
namespace {
|
2012-04-24 15:49:09 +02:00
|
|
|
const char DEPLOYMENT_INFO_SETTING[] = "RemoteLinux.DeploymentInfo";
|
|
|
|
|
} // namespace
|
2011-08-01 16:44:59 +02:00
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
namespace RemoteLinux {
|
2011-07-14 15:38:16 +02:00
|
|
|
|
|
|
|
|
using namespace Internal;
|
|
|
|
|
|
|
|
|
|
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
|
2012-03-15 17:17:40 +01:00
|
|
|
const Core::Id id, const QString &defaultDisplayName)
|
2012-04-24 15:49:09 +02:00
|
|
|
: DeployConfiguration(target, id)
|
2011-07-14 15:38:16 +02:00
|
|
|
{
|
|
|
|
|
setDefaultDisplayName(defaultDisplayName);
|
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
// Make sure we have deploymentInfo, but create it only once:
|
|
|
|
|
DeploymentInfo *info
|
|
|
|
|
= qobject_cast<DeploymentInfo *>(target->project()->namedSettings(QLatin1String(DEPLOYMENT_INFO_SETTING)).value<QObject *>());
|
|
|
|
|
if (!info) {
|
|
|
|
|
info = new DeploymentInfo(static_cast<Qt4ProjectManager::Qt4Project *>(target->project()));
|
|
|
|
|
QVariant data = QVariant::fromValue(static_cast<QObject *>(info));
|
|
|
|
|
target->project()->setNamedSettings(QLatin1String(DEPLOYMENT_INFO_SETTING), data);
|
|
|
|
|
}
|
2011-07-14 15:38:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
|
2011-08-01 16:44:59 +02:00
|
|
|
RemoteLinuxDeployConfiguration *source)
|
2012-04-24 15:49:09 +02:00
|
|
|
: DeployConfiguration(target, source)
|
|
|
|
|
{ }
|
2011-07-14 15:38:16 +02:00
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
DeploymentInfo *RemoteLinuxDeployConfiguration::deploymentInfo() const
|
2011-07-14 15:38:16 +02:00
|
|
|
{
|
2012-04-24 15:49:09 +02:00
|
|
|
DeploymentInfo *info
|
|
|
|
|
= qobject_cast<DeploymentInfo *>(target()->project()->namedSettings(QLatin1String(DEPLOYMENT_INFO_SETTING)).value<QObject *>());
|
|
|
|
|
return info;
|
2011-07-14 15:38:16 +02:00
|
|
|
}
|
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
QString RemoteLinuxDeployConfiguration::qmakeScope() const
|
2011-07-14 15:38:16 +02:00
|
|
|
{
|
2012-04-24 15:49:09 +02:00
|
|
|
return QLatin1String("unix");
|
2011-07-14 15:38:16 +02:00
|
|
|
}
|
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
QString RemoteLinuxDeployConfiguration::installPrefix() const
|
2011-07-14 15:38:16 +02:00
|
|
|
{
|
2012-04-24 15:49:09 +02:00
|
|
|
return QString();
|
2011-07-14 15:38:16 +02:00
|
|
|
}
|
|
|
|
|
|
2012-02-07 14:13:56 +01:00
|
|
|
DeployConfigurationWidget *RemoteLinuxDeployConfiguration::configurationWidget() const
|
2011-07-14 15:38:16 +02:00
|
|
|
{
|
2012-02-07 14:13:56 +01:00
|
|
|
return new RemoteLinuxDeployConfigurationWidget;
|
2011-07-14 15:38:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace RemoteLinux
|