RemoteLinux: Rename some classes and the associated files.

Also make them external.

Change-Id: I21a74c1f7124646b5507ffd2ee0e24c7c60eca97
Reviewed-on: http://codereview.qt.nokia.com/749
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Christian Kandeler
2011-06-27 10:11:17 +02:00
parent 90ee1cc1c9
commit 0119dade1a
29 changed files with 217 additions and 212 deletions

View File

@@ -32,6 +32,7 @@
#include "abstractmaemodeploystep.h" #include "abstractmaemodeploystep.h"
#include "deployablefile.h"
#include "maemoconstants.h" #include "maemoconstants.h"
#include "maemodeploystepwidget.h" #include "maemodeploystepwidget.h"
#include "maemoglobal.h" #include "maemoglobal.h"
@@ -48,6 +49,7 @@
#include <utils/ssh/sshconnectionmanager.h> #include <utils/ssh/sshconnectionmanager.h>
#include <QtCore/QDateTime>
#include <QtCore/QEventLoop> #include <QtCore/QEventLoop>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
#include <QtCore/QTimer> #include <QtCore/QTimer>
@@ -177,7 +179,7 @@ void AbstractMaemoDeployStep::getDeployTimesFromMap(const QVariantMap &map)
= qMin(qMin(hostList.size(), fileList.size()), = qMin(qMin(hostList.size(), fileList.size()),
qMin(remotePathList.size(), timeList.size())); qMin(remotePathList.size(), timeList.size()));
for (int i = 0; i < elemCount; ++i) { for (int i = 0; i < elemCount; ++i) {
const MaemoDeployable d(fileList.at(i).toString(), const DeployableFile d(fileList.at(i).toString(),
remotePathList.at(i).toString()); remotePathList.at(i).toString());
m_lastDeployed.insert(DeployablePerHost(d, hostList.at(i).toString()), m_lastDeployed.insert(DeployablePerHost(d, hostList.at(i).toString()),
timeList.at(i).toDateTime()); timeList.at(i).toDateTime());
@@ -220,7 +222,7 @@ void AbstractMaemoDeployStep::stop()
} }
bool AbstractMaemoDeployStep::currentlyNeedsDeployment(const QString &host, bool AbstractMaemoDeployStep::currentlyNeedsDeployment(const QString &host,
const MaemoDeployable &deployable) const const DeployableFile &deployable) const
{ {
const QDateTime &lastDeployed const QDateTime &lastDeployed
= m_lastDeployed.value(DeployablePerHost(deployable, host)); = m_lastDeployed.value(DeployablePerHost(deployable, host));
@@ -229,7 +231,7 @@ bool AbstractMaemoDeployStep::currentlyNeedsDeployment(const QString &host,
} }
void AbstractMaemoDeployStep::setDeployed(const QString &host, void AbstractMaemoDeployStep::setDeployed(const QString &host,
const MaemoDeployable &deployable) const DeployableFile &deployable)
{ {
m_lastDeployed.insert(DeployablePerHost(deployable, host), m_lastDeployed.insert(DeployablePerHost(deployable, host),
QDateTime::currentDateTime()); QDateTime::currentDateTime());

View File

@@ -34,8 +34,6 @@
#define ABSTRACTMAEMODEPLOYSTEP_H #define ABSTRACTMAEMODEPLOYSTEP_H
#include "abstractlinuxdevicedeploystep.h" #include "abstractlinuxdevicedeploystep.h"
#include "maemodeployable.h"
#include "maemodeployables.h"
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
@@ -52,6 +50,8 @@ namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace Utils { class SshConnection; } namespace Utils { class SshConnection; }
namespace RemoteLinux { namespace RemoteLinux {
class DeployableFile;
namespace Internal { namespace Internal {
class AbstractMaemoPackageCreationStep; class AbstractMaemoPackageCreationStep;
class Qt4MaemoDeployConfiguration; class Qt4MaemoDeployConfiguration;
@@ -79,8 +79,8 @@ protected:
BaseState baseState() const { return m_baseState; } BaseState baseState() const { return m_baseState; }
bool currentlyNeedsDeployment(const QString &host, bool currentlyNeedsDeployment(const QString &host,
const MaemoDeployable &deployable) const; const DeployableFile &deployable) const;
void setDeployed(const QString &host, const MaemoDeployable &deployable); void setDeployed(const QString &host, const DeployableFile &deployable);
void raiseError(const QString &error); void raiseError(const QString &error);
void writeOutput(const QString &text, OutputFormat format = MessageOutput, void writeOutput(const QString &text, OutputFormat format = MessageOutput,
OutputNewlineSetting newlineSetting = DoAppendNewline); OutputNewlineSetting newlineSetting = DoAppendNewline);
@@ -118,7 +118,7 @@ private:
void setBaseState(BaseState newState); void setBaseState(BaseState newState);
QSharedPointer<Utils::SshConnection> m_connection; QSharedPointer<Utils::SshConnection> m_connection;
typedef QPair<MaemoDeployable, QString> DeployablePerHost; typedef QPair<DeployableFile, QString> DeployablePerHost;
QHash<DeployablePerHost, QDateTime> m_lastDeployed; QHash<DeployablePerHost, QDateTime> m_lastDeployed;
BaseState m_baseState; BaseState m_baseState;
bool m_hasError; bool m_hasError;

View File

@@ -30,24 +30,25 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef MAEMODEPLOYABLE_H #ifndef DEPLOYABLEFILE_H
#define MAEMODEPLOYABLE_H #define DEPLOYABLEFILE_H
#include "remotelinux_export.h"
#include <QtCore/QHash> #include <QtCore/QHash>
#include <QtCore/QString> #include <QtCore/QString>
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal {
class MaemoDeployable class REMOTELINUX_EXPORT DeployableFile
{ {
public: public:
MaemoDeployable() {} DeployableFile() {}
MaemoDeployable(const QString &localFilePath, const QString &remoteDir) DeployableFile(const QString &localFilePath, const QString &remoteDir)
: localFilePath(localFilePath), remoteDir(remoteDir) {} : localFilePath(localFilePath), remoteDir(remoteDir) {}
bool operator==(const MaemoDeployable &other) const bool operator==(const DeployableFile &other) const
{ {
return localFilePath == other.localFilePath return localFilePath == other.localFilePath
&& remoteDir == other.remoteDir; && remoteDir == other.remoteDir;
@@ -57,12 +58,11 @@ public:
QString remoteDir; QString remoteDir;
}; };
inline uint qHash(const MaemoDeployable &d) inline uint qHash(const DeployableFile &d)
{ {
return qHash(qMakePair(d.localFilePath, d.remoteDir)); return qHash(qMakePair(d.localFilePath, d.remoteDir));
} }
} // namespace RemoteLinux } // namespace RemoteLinux
} // namespace Internal
#endif // MAEMODEPLOYABLE_H #endif // DEPLOYABLEFILE_H

View File

@@ -30,7 +30,7 @@
** **
**************************************************************************/ **************************************************************************/
#include "maemodeployablelistmodel.h" #include "deployablefilesperprofile.h"
#include "maemoglobal.h" #include "maemoglobal.h"
@@ -55,9 +55,9 @@
using namespace Qt4ProjectManager; using namespace Qt4ProjectManager;
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { using namespace Internal;
MaemoDeployableListModel::MaemoDeployableListModel(const Qt4BaseTarget *target, DeployableFilesPerProFile::DeployableFilesPerProFile(const Qt4BaseTarget *target,
const Qt4ProFileNode *proFileNode, ProFileUpdateSetting updateSetting, QObject *parent) const Qt4ProFileNode *proFileNode, ProFileUpdateSetting updateSetting, QObject *parent)
: QAbstractTableModel(parent), : QAbstractTableModel(parent),
m_target(target), m_target(target),
@@ -75,9 +75,9 @@ MaemoDeployableListModel::MaemoDeployableListModel(const Qt4BaseTarget *target,
buildModel(); buildModel();
} }
MaemoDeployableListModel::~MaemoDeployableListModel() {} DeployableFilesPerProFile::~DeployableFilesPerProFile() {}
bool MaemoDeployableListModel::buildModel() bool DeployableFilesPerProFile::buildModel()
{ {
m_deployables.clear(); m_deployables.clear();
@@ -92,40 +92,40 @@ bool MaemoDeployableListModel::buildModel()
<< QLatin1String("INSTALLS += target"); << QLatin1String("INSTALLS += target");
return addLinesToProFile(deployInfo); return addLinesToProFile(deployInfo);
} else if (m_projectType == ApplicationTemplate) { } else if (m_projectType == ApplicationTemplate) {
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(), m_deployables.prepend(DeployableFile(localExecutableFilePath(),
m_installsList.targetPath)); m_installsList.targetPath));
} else if (m_projectType == LibraryTemplate) { } else if (m_projectType == LibraryTemplate) {
foreach (const QString &filePath, localLibraryFilePaths()) { foreach (const QString &filePath, localLibraryFilePaths()) {
m_deployables.prepend(MaemoDeployable(filePath, m_deployables.prepend(DeployableFile(filePath,
m_installsList.targetPath)); m_installsList.targetPath));
} }
} }
foreach (const InstallsItem &elem, m_installsList.items) { foreach (const InstallsItem &elem, m_installsList.items) {
foreach (const QString &file, elem.files) foreach (const QString &file, elem.files)
m_deployables << MaemoDeployable(file, elem.path); m_deployables << DeployableFile(file, elem.path);
} }
m_modified = true; m_modified = true;
return true; return true;
} }
MaemoDeployable MaemoDeployableListModel::deployableAt(int row) const DeployableFile DeployableFilesPerProFile::deployableAt(int row) const
{ {
Q_ASSERT(row >= 0 && row < rowCount()); Q_ASSERT(row >= 0 && row < rowCount());
return m_deployables.at(row); return m_deployables.at(row);
} }
int MaemoDeployableListModel::rowCount(const QModelIndex &parent) const int DeployableFilesPerProFile::rowCount(const QModelIndex &parent) const
{ {
return parent.isValid() ? 0 : m_deployables.count(); return parent.isValid() ? 0 : m_deployables.count();
} }
int MaemoDeployableListModel::columnCount(const QModelIndex &parent) const int DeployableFilesPerProFile::columnCount(const QModelIndex &parent) const
{ {
return parent.isValid() ? 0 : 2; return parent.isValid() ? 0 : 2;
} }
QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) const QVariant DeployableFilesPerProFile::data(const QModelIndex &index, int role) const
{ {
if (!index.isValid() || index.row() >= rowCount()) if (!index.isValid() || index.row() >= rowCount())
return QVariant(); return QVariant();
@@ -140,7 +140,7 @@ QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) cons
} }
} }
const MaemoDeployable &d = deployableAt(index.row()); const DeployableFile &d = deployableAt(index.row());
if (index.column() == 0 && role == Qt::DisplayRole) if (index.column() == 0 && role == Qt::DisplayRole)
return QDir::toNativeSeparators(d.localFilePath); return QDir::toNativeSeparators(d.localFilePath);
if (role == Qt::DisplayRole || role == Qt::EditRole) if (role == Qt::DisplayRole || role == Qt::EditRole)
@@ -148,7 +148,7 @@ QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) cons
return QVariant(); return QVariant();
} }
Qt::ItemFlags MaemoDeployableListModel::flags(const QModelIndex &index) const Qt::ItemFlags DeployableFilesPerProFile::flags(const QModelIndex &index) const
{ {
Qt::ItemFlags parentFlags = QAbstractTableModel::flags(index); Qt::ItemFlags parentFlags = QAbstractTableModel::flags(index);
if (isEditable(index)) if (isEditable(index))
@@ -156,7 +156,7 @@ Qt::ItemFlags MaemoDeployableListModel::flags(const QModelIndex &index) const
return parentFlags; return parentFlags;
} }
bool MaemoDeployableListModel::setData(const QModelIndex &index, bool DeployableFilesPerProFile::setData(const QModelIndex &index,
const QVariant &value, int role) const QVariant &value, int role)
{ {
if (!isEditable(index) || role != Qt::EditRole) if (!isEditable(index) || role != Qt::EditRole)
@@ -171,7 +171,7 @@ bool MaemoDeployableListModel::setData(const QModelIndex &index,
return true; return true;
} }
QVariant MaemoDeployableListModel::headerData(int section, QVariant DeployableFilesPerProFile::headerData(int section,
Qt::Orientation orientation, int role) const Qt::Orientation orientation, int role) const
{ {
if (orientation == Qt::Vertical || role != Qt::DisplayRole) if (orientation == Qt::Vertical || role != Qt::DisplayRole)
@@ -179,14 +179,14 @@ QVariant MaemoDeployableListModel::headerData(int section,
return section == 0 ? tr("Local File Path") : tr("Remote Directory"); return section == 0 ? tr("Local File Path") : tr("Remote Directory");
} }
QString MaemoDeployableListModel::localExecutableFilePath() const QString DeployableFilesPerProFile::localExecutableFilePath() const
{ {
if (!m_targetInfo.valid || m_projectType != ApplicationTemplate) if (!m_targetInfo.valid || m_projectType != ApplicationTemplate)
return QString(); return QString();
return QDir::cleanPath(m_targetInfo.workingDir + '/' + m_targetInfo.target); return QDir::cleanPath(m_targetInfo.workingDir + '/' + m_targetInfo.target);
} }
QStringList MaemoDeployableListModel::localLibraryFilePaths() const QStringList DeployableFilesPerProFile::localLibraryFilePaths() const
{ {
if (!m_targetInfo.valid || m_projectType != LibraryTemplate) if (!m_targetInfo.valid || m_projectType != LibraryTemplate)
return QStringList(); return QStringList();
@@ -206,7 +206,7 @@ QStringList MaemoDeployableListModel::localLibraryFilePaths() const
<< basePath; << basePath;
} }
QString MaemoDeployableListModel::remoteExecutableFilePath() const QString DeployableFilesPerProFile::remoteExecutableFilePath() const
{ {
return m_hasTargetPath && m_projectType == ApplicationTemplate return m_hasTargetPath && m_projectType == ApplicationTemplate
? deployableAt(0).remoteDir + '/' ? deployableAt(0).remoteDir + '/'
@@ -214,37 +214,37 @@ QString MaemoDeployableListModel::remoteExecutableFilePath() const
: QString(); : QString();
} }
QString MaemoDeployableListModel::projectDir() const QString DeployableFilesPerProFile::projectDir() const
{ {
return QFileInfo(m_proFilePath).dir().path(); return QFileInfo(m_proFilePath).dir().path();
} }
void MaemoDeployableListModel::setProFileUpdateSetting(ProFileUpdateSetting updateSetting) void DeployableFilesPerProFile::setProFileUpdateSetting(ProFileUpdateSetting updateSetting)
{ {
m_proFileUpdateSetting = updateSetting; m_proFileUpdateSetting = updateSetting;
if (updateSetting == UpdateProFile) if (updateSetting == UpdateProFile)
buildModel(); buildModel();
} }
bool MaemoDeployableListModel::isEditable(const QModelIndex &index) const bool DeployableFilesPerProFile::isEditable(const QModelIndex &index) const
{ {
return m_projectType != AuxTemplate return m_projectType != AuxTemplate
&& index.row() == 0 && index.column() == 1 && index.row() == 0 && index.column() == 1
&& m_deployables.first().remoteDir.isEmpty(); && m_deployables.first().remoteDir.isEmpty();
} }
QString MaemoDeployableListModel::localDesktopFilePath() const QString DeployableFilesPerProFile::localDesktopFilePath() const
{ {
if (m_projectType == LibraryTemplate) if (m_projectType == LibraryTemplate)
return QString(); return QString();
foreach (const MaemoDeployable &d, m_deployables) { foreach (const DeployableFile &d, m_deployables) {
if (QFileInfo(d.localFilePath).fileName() == m_projectName + QLatin1String(".desktop")) if (QFileInfo(d.localFilePath).fileName() == m_projectName + QLatin1String(".desktop"))
return d.localFilePath; return d.localFilePath;
} }
return QString(); return QString();
} }
bool MaemoDeployableListModel::addDesktopFile() bool DeployableFilesPerProFile::addDesktopFile()
{ {
if (!canAddDesktopFile()) if (!canAddDesktopFile())
return true; return true;
@@ -275,12 +275,12 @@ bool MaemoDeployableListModel::addDesktopFile()
return false; return false;
beginInsertRows(QModelIndex(), rowCount(), rowCount()); beginInsertRows(QModelIndex(), rowCount(), rowCount());
m_deployables << MaemoDeployable(desktopFilePath, remoteDir); m_deployables << DeployableFile(desktopFilePath, remoteDir);
endInsertRows(); endInsertRows();
return true; return true;
} }
bool MaemoDeployableListModel::addIcon(const QString &fileName) bool DeployableFilesPerProFile::addIcon(const QString &fileName)
{ {
if (!canAddIcon()) if (!canAddIcon())
return true; return true;
@@ -295,17 +295,17 @@ bool MaemoDeployableListModel::addIcon(const QString &fileName)
beginInsertRows(QModelIndex(), rowCount(), rowCount()); beginInsertRows(QModelIndex(), rowCount(), rowCount());
const QString filePath = QFileInfo(m_proFilePath).path() const QString filePath = QFileInfo(m_proFilePath).path()
+ QLatin1Char('/') + fileName; + QLatin1Char('/') + fileName;
m_deployables << MaemoDeployable(filePath, remoteIconDir()); m_deployables << DeployableFile(filePath, remoteIconDir());
endInsertRows(); endInsertRows();
return true; return true;
} }
QString MaemoDeployableListModel::remoteIconFilePath() const QString DeployableFilesPerProFile::remoteIconFilePath() const
{ {
if (m_projectType == LibraryTemplate) if (m_projectType == LibraryTemplate)
return QString(); return QString();
const QList<QByteArray> &imageTypes = QImageReader::supportedImageFormats(); const QList<QByteArray> &imageTypes = QImageReader::supportedImageFormats();
foreach (const MaemoDeployable &d, m_deployables) { foreach (const DeployableFile &d, m_deployables) {
const QByteArray extension const QByteArray extension
= QFileInfo(d.localFilePath).suffix().toLocal8Bit(); = QFileInfo(d.localFilePath).suffix().toLocal8Bit();
if (d.remoteDir.startsWith(remoteIconDir()) if (d.remoteDir.startsWith(remoteIconDir())
@@ -316,7 +316,7 @@ QString MaemoDeployableListModel::remoteIconFilePath() const
return QString(); return QString();
} }
bool MaemoDeployableListModel::addLinesToProFile(const QStringList &lines) bool DeployableFilesPerProFile::addLinesToProFile(const QStringList &lines)
{ {
Core::FileChangeBlocker update(m_proFilePath); Core::FileChangeBlocker update(m_proFilePath);
@@ -329,14 +329,14 @@ bool MaemoDeployableListModel::addLinesToProFile(const QStringList &lines)
return saver.finalize(Core::ICore::instance()->mainWindow()); return saver.finalize(Core::ICore::instance()->mainWindow());
} }
const QtSupport::BaseQtVersion *MaemoDeployableListModel::qtVersion() const const QtSupport::BaseQtVersion *DeployableFilesPerProFile::qtVersion() const
{ {
const Qt4BuildConfiguration *const bc = m_target->activeBuildConfiguration(); const Qt4BuildConfiguration *const bc = m_target->activeBuildConfiguration();
QTC_ASSERT(bc, return 0); QTC_ASSERT(bc, return 0);
return bc->qtVersion(); return bc->qtVersion();
} }
QString MaemoDeployableListModel::proFileScope() const QString DeployableFilesPerProFile::proFileScope() const
{ {
const QtSupport::BaseQtVersion *const qv = qtVersion(); const QtSupport::BaseQtVersion *const qv = qtVersion();
QTC_ASSERT(qv, return QString()); QTC_ASSERT(qv, return QString());
@@ -344,12 +344,12 @@ QString MaemoDeployableListModel::proFileScope() const
? "maemo5" : "unix:!symbian:!maemo5"); ? "maemo5" : "unix:!symbian:!maemo5");
} }
QString MaemoDeployableListModel::installPrefix() const QString DeployableFilesPerProFile::installPrefix() const
{ {
return QLatin1String("/opt/") + m_projectName; return QLatin1String("/opt/") + m_projectName;
} }
QString MaemoDeployableListModel::remoteIconDir() const QString DeployableFilesPerProFile::remoteIconDir() const
{ {
const QtSupport::BaseQtVersion *const qv = qtVersion(); const QtSupport::BaseQtVersion *const qv = qtVersion();
QTC_ASSERT(qv, return QString()); QTC_ASSERT(qv, return QString());
@@ -358,4 +358,3 @@ QString MaemoDeployableListModel::remoteIconDir() const
} }
} // namespace RemoteLinux } // namespace RemoteLinux
} // namespace Internal

View File

@@ -30,10 +30,12 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef MAEMOPACKAGECONTENTS_H #ifndef DEPLOYABLEFILESPERPROFILE_H
#define MAEMOPACKAGECONTENTS_H #define DEPLOYABLEFILESPERPROFILE_H
#include "maemodeployable.h" #include "deployablefile.h"
#include "remotelinux_export.h"
#include <qt4projectmanager/qt4nodes.h> #include <qt4projectmanager/qt4nodes.h>
@@ -51,9 +53,8 @@ class Qt4BaseTarget;
} }
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal {
class MaemoDeployableListModel : public QAbstractTableModel class REMOTELINUX_EXPORT DeployableFilesPerProFile : public QAbstractTableModel
{ {
Q_OBJECT Q_OBJECT
public: public:
@@ -61,14 +62,14 @@ public:
UpdateProFile, DontUpdateProFile, AskToUpdateProFile UpdateProFile, DontUpdateProFile, AskToUpdateProFile
}; };
MaemoDeployableListModel(const Qt4ProjectManager::Qt4BaseTarget *target, DeployableFilesPerProFile(const Qt4ProjectManager::Qt4BaseTarget *target,
const Qt4ProjectManager::Qt4ProFileNode *proFileNode, ProFileUpdateSetting updateSetting, const Qt4ProjectManager::Qt4ProFileNode *proFileNode, ProFileUpdateSetting updateSetting,
QObject *parent); QObject *parent);
~MaemoDeployableListModel(); ~DeployableFilesPerProFile();
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
MaemoDeployable deployableAt(int row) const; DeployableFile deployableAt(int row) const;
bool isModified() const { return m_modified; } bool isModified() const { return m_modified; }
void setUnModified() { m_modified = false; } void setUnModified() { m_modified = false; }
const QtSupport::BaseQtVersion *qtVersion() const; const QtSupport::BaseQtVersion *qtVersion() const;
@@ -119,13 +120,12 @@ private:
const Qt4ProjectManager::InstallsList m_installsList; const Qt4ProjectManager::InstallsList m_installsList;
const Qt4ProjectManager::ProjectVersion m_projectVersion; const Qt4ProjectManager::ProjectVersion m_projectVersion;
const QStringList m_config; const QStringList m_config;
QList<MaemoDeployable> m_deployables; QList<DeployableFile> m_deployables;
mutable bool m_modified; mutable bool m_modified;
ProFileUpdateSetting m_proFileUpdateSetting; ProFileUpdateSetting m_proFileUpdateSetting;
bool m_hasTargetPath; bool m_hasTargetPath;
}; };
} // namespace RemoteLinux } // namespace RemoteLinux
} // namespace Internal
#endif // MAEMOPACKAGECONTENTS_H #endif // DEPLOYABLEFILESPERPROFILE_H

View File

@@ -29,8 +29,9 @@
** **
**************************************************************************/ **************************************************************************/
#include "maemodeployables.h" #include "deploymentinfo.h"
#include "deployablefile.h"
#include "maemoprofilesupdatedialog.h" #include "maemoprofilesupdatedialog.h"
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
@@ -43,9 +44,9 @@
using namespace Qt4ProjectManager; using namespace Qt4ProjectManager;
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { using namespace Internal;
MaemoDeployables::MaemoDeployables(const Qt4BaseTarget *target) DeploymentInfo::DeploymentInfo(const Qt4BaseTarget *target)
: m_target(target), m_updateTimer(new QTimer(this)) : m_target(target), m_updateTimer(new QTimer(this))
{ {
Qt4Project * const pro = m_target->qt4Project(); Qt4Project * const pro = m_target->qt4Project();
@@ -57,16 +58,16 @@ MaemoDeployables::MaemoDeployables(const Qt4BaseTarget *target)
createModels(); createModels();
} }
MaemoDeployables::~MaemoDeployables() {} DeploymentInfo::~DeploymentInfo() {}
void MaemoDeployables::startTimer(Qt4ProjectManager::Qt4ProFileNode*, bool success, bool parseInProgress) void DeploymentInfo::startTimer(Qt4ProjectManager::Qt4ProFileNode*, bool success, bool parseInProgress)
{ {
Q_UNUSED(success) Q_UNUSED(success)
if (!parseInProgress) if (!parseInProgress)
m_updateTimer->start(); m_updateTimer->start();
} }
void MaemoDeployables::createModels() void DeploymentInfo::createModels()
{ {
if (m_target->project()->activeTarget() != m_target) if (m_target->project()->activeTarget() != m_target)
return; return;
@@ -82,10 +83,10 @@ void MaemoDeployables::createModels()
qDeleteAll(m_listModels); qDeleteAll(m_listModels);
m_listModels.clear(); m_listModels.clear();
createModels(rootNode); createModels(rootNode);
QList<MaemoDeployableListModel *> modelsWithoutTargetPath; QList<DeployableFilesPerProFile *> modelsWithoutTargetPath;
foreach (MaemoDeployableListModel *const model, m_listModels) { foreach (DeployableFilesPerProFile *const model, m_listModels) {
if (!model->hasTargetPath()) { if (!model->hasTargetPath()) {
if (model->proFileUpdateSetting() == MaemoDeployableListModel::AskToUpdateProFile) if (model->proFileUpdateSetting() == DeployableFilesPerProFile::AskToUpdateProFile)
modelsWithoutTargetPath << model; modelsWithoutTargetPath << model;
} }
} }
@@ -96,10 +97,10 @@ void MaemoDeployables::createModels()
const QList<MaemoProFilesUpdateDialog::UpdateSetting> &settings const QList<MaemoProFilesUpdateDialog::UpdateSetting> &settings
= dialog.getUpdateSettings(); = dialog.getUpdateSettings();
foreach (const MaemoProFilesUpdateDialog::UpdateSetting &setting, settings) { foreach (const MaemoProFilesUpdateDialog::UpdateSetting &setting, settings) {
const MaemoDeployableListModel::ProFileUpdateSetting updateSetting const DeployableFilesPerProFile::ProFileUpdateSetting updateSetting
= setting.second = setting.second
? MaemoDeployableListModel::UpdateProFile ? DeployableFilesPerProFile::UpdateProFile
: MaemoDeployableListModel::DontUpdateProFile; : DeployableFilesPerProFile::DontUpdateProFile;
m_updateSettings.insert(setting.first->proFilePath(), m_updateSettings.insert(setting.first->proFilePath(),
updateSetting); updateSetting);
setting.first->setProFileUpdateSetting(updateSetting); setting.first->setProFileUpdateSetting(updateSetting);
@@ -112,23 +113,23 @@ void MaemoDeployables::createModels()
this, SLOT(startTimer(Qt4ProjectManager::Qt4ProFileNode*,bool,bool))); this, SLOT(startTimer(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
} }
void MaemoDeployables::createModels(const Qt4ProFileNode *proFileNode) void DeploymentInfo::createModels(const Qt4ProFileNode *proFileNode)
{ {
switch (proFileNode->projectType()) { switch (proFileNode->projectType()) {
case ApplicationTemplate: case ApplicationTemplate:
case LibraryTemplate: case LibraryTemplate:
case AuxTemplate: { case AuxTemplate: {
MaemoDeployableListModel::ProFileUpdateSetting updateSetting; DeployableFilesPerProFile::ProFileUpdateSetting updateSetting;
if (proFileNode->projectType() == AuxTemplate) { if (proFileNode->projectType() == AuxTemplate) {
updateSetting = MaemoDeployableListModel::DontUpdateProFile; updateSetting = DeployableFilesPerProFile::DontUpdateProFile;
} else { } else {
UpdateSettingsMap::ConstIterator it UpdateSettingsMap::ConstIterator it
= m_updateSettings.find(proFileNode->path()); = m_updateSettings.find(proFileNode->path());
updateSetting = it != m_updateSettings.end() updateSetting = it != m_updateSettings.end()
? it.value() : MaemoDeployableListModel::AskToUpdateProFile; ? it.value() : DeployableFilesPerProFile::AskToUpdateProFile;
} }
MaemoDeployableListModel *const newModel DeployableFilesPerProFile *const newModel
= new MaemoDeployableListModel(m_target, proFileNode, updateSetting, this); = new DeployableFilesPerProFile(m_target, proFileNode, updateSetting, this);
m_listModels << newModel; m_listModels << newModel;
break; break;
} }
@@ -148,32 +149,32 @@ void MaemoDeployables::createModels(const Qt4ProFileNode *proFileNode)
} }
} }
void MaemoDeployables::setUnmodified() void DeploymentInfo::setUnmodified()
{ {
foreach (MaemoDeployableListModel *model, m_listModels) foreach (DeployableFilesPerProFile *model, m_listModels)
model->setUnModified(); model->setUnModified();
} }
bool MaemoDeployables::isModified() const bool DeploymentInfo::isModified() const
{ {
foreach (const MaemoDeployableListModel *model, m_listModels) { foreach (const DeployableFilesPerProFile *model, m_listModels) {
if (model->isModified()) if (model->isModified())
return true; return true;
} }
return false; return false;
} }
int MaemoDeployables::deployableCount() const int DeploymentInfo::deployableCount() const
{ {
int count = 0; int count = 0;
foreach (const MaemoDeployableListModel *model, m_listModels) foreach (const DeployableFilesPerProFile *model, m_listModels)
count += model->rowCount(); count += model->rowCount();
return count; return count;
} }
MaemoDeployable MaemoDeployables::deployableAt(int i) const DeployableFile DeploymentInfo::deployableAt(int i) const
{ {
foreach (const MaemoDeployableListModel *model, m_listModels) { foreach (const DeployableFilesPerProFile *model, m_listModels) {
Q_ASSERT(i >= 0); Q_ASSERT(i >= 0);
if (i < model->rowCount()) if (i < model->rowCount())
return model->deployableAt(i); return model->deployableAt(i);
@@ -181,29 +182,29 @@ MaemoDeployable MaemoDeployables::deployableAt(int i) const
} }
Q_ASSERT(!"Invalid deployable number"); Q_ASSERT(!"Invalid deployable number");
return MaemoDeployable(QString(), QString()); return DeployableFile(QString(), QString());
} }
QString MaemoDeployables::remoteExecutableFilePath(const QString &localExecutableFilePath) const QString DeploymentInfo::remoteExecutableFilePath(const QString &localExecutableFilePath) const
{ {
foreach (const MaemoDeployableListModel *model, m_listModels) { foreach (const DeployableFilesPerProFile *model, m_listModels) {
if (model->localExecutableFilePath() == localExecutableFilePath) if (model->localExecutableFilePath() == localExecutableFilePath)
return model->remoteExecutableFilePath(); return model->remoteExecutableFilePath();
} }
return QString(); return QString();
} }
int MaemoDeployables::rowCount(const QModelIndex &parent) const int DeploymentInfo::rowCount(const QModelIndex &parent) const
{ {
return parent.isValid() ? 0 : modelCount(); return parent.isValid() ? 0 : modelCount();
} }
QVariant MaemoDeployables::data(const QModelIndex &index, int role) const QVariant DeploymentInfo::data(const QModelIndex &index, int role) const
{ {
if (!index.isValid() || index.row() < 0 || index.row() >= modelCount() if (!index.isValid() || index.row() < 0 || index.row() >= modelCount()
|| index.column() != 0) || index.column() != 0)
return QVariant(); return QVariant();
const MaemoDeployableListModel *const model = m_listModels.at(index.row()); const DeployableFilesPerProFile *const model = m_listModels.at(index.row());
if (role == Qt::ForegroundRole && model->projectType() != AuxTemplate if (role == Qt::ForegroundRole && model->projectType() != AuxTemplate
&& !model->hasTargetPath()) { && !model->hasTargetPath()) {
QBrush brush; QBrush brush;
@@ -216,4 +217,3 @@ QVariant MaemoDeployables::data(const QModelIndex &index, int role) const
} }
} // namespace RemoteLinux } // namespace RemoteLinux
} // namespace Internal

View File

@@ -29,11 +29,11 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef MAEMODEPLOYABLES_H #ifndef DEPLOYMENTINFO_H
#define MAEMODEPLOYABLES_H #define DEPLOYMENTINFO_H
#include "maemodeployable.h" #include "deployablefilesperprofile.h"
#include "maemodeployablelistmodel.h" #include "remotelinux_export.h"
#include <QtCore/QAbstractListModel> #include <QtCore/QAbstractListModel>
#include <QtCore/QHash> #include <QtCore/QHash>
@@ -48,27 +48,27 @@ class Qt4ProFileNode;
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { class DeployableFile;
class MaemoDeployables : public QAbstractListModel class REMOTELINUX_EXPORT DeploymentInfo : public QAbstractListModel
{ {
Q_OBJECT Q_OBJECT
public: public:
MaemoDeployables(const Qt4ProjectManager::Qt4BaseTarget *target); DeploymentInfo(const Qt4ProjectManager::Qt4BaseTarget *target);
~MaemoDeployables(); ~DeploymentInfo();
void setUnmodified(); void setUnmodified();
bool isModified() const; bool isModified() const;
int deployableCount() const; int deployableCount() const;
MaemoDeployable deployableAt(int i) const; DeployableFile deployableAt(int i) const;
QString remoteExecutableFilePath(const QString &localExecutableFilePath) const; QString remoteExecutableFilePath(const QString &localExecutableFilePath) const;
int modelCount() const { return m_listModels.count(); } int modelCount() const { return m_listModels.count(); }
MaemoDeployableListModel *modelAt(int i) const { return m_listModels.at(i); } DeployableFilesPerProFile *modelAt(int i) const { return m_listModels.at(i); }
private slots: private slots:
void startTimer(Qt4ProjectManager::Qt4ProFileNode *, bool success, bool parseInProgress); void startTimer(Qt4ProjectManager::Qt4ProFileNode *, bool success, bool parseInProgress);
private: private:
typedef QHash<QString, MaemoDeployableListModel::ProFileUpdateSetting> UpdateSettingsMap; typedef QHash<QString, DeployableFilesPerProFile::ProFileUpdateSetting> UpdateSettingsMap;
virtual int rowCount(const QModelIndex &parent) const; virtual int rowCount(const QModelIndex &parent) const;
virtual QVariant data(const QModelIndex &index, int role) const; virtual QVariant data(const QModelIndex &index, int role) const;
@@ -76,13 +76,12 @@ private:
Q_SLOT void createModels(); Q_SLOT void createModels();
void createModels(const Qt4ProjectManager::Qt4ProFileNode *proFileNode); void createModels(const Qt4ProjectManager::Qt4ProFileNode *proFileNode);
QList<MaemoDeployableListModel *> m_listModels; QList<DeployableFilesPerProFile *> m_listModels;
UpdateSettingsMap m_updateSettings; UpdateSettingsMap m_updateSettings;
const Qt4ProjectManager::Qt4BaseTarget * const m_target; const Qt4ProjectManager::Qt4BaseTarget * const m_target;
QTimer *const m_updateTimer; QTimer *const m_updateTimer;
}; };
} // namespace RemoteLinux } // namespace RemoteLinux
} // namespace Internal
#endif // MAEMODEPLOYABLES_H #endif // DEPLOYMENTINFO_H

View File

@@ -32,6 +32,7 @@
#include "maemodeploybymountstep.h" #include "maemodeploybymountstep.h"
#include "deploymentinfo.h"
#include "maemodeploymentmounter.h" #include "maemodeploymentmounter.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
@@ -40,6 +41,7 @@
#include "qt4maemodeployconfiguration.h" #include "qt4maemodeployconfiguration.h"
#include "qt4maemotarget.h" #include "qt4maemotarget.h"
#include <projectexplorer/project.h>
#include <utils/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
@@ -243,7 +245,7 @@ bool MaemoMountAndInstallDeployStep::isDeploymentNeeded(const QString &hostName)
{ {
const AbstractMaemoPackageCreationStep * const pStep = packagingStep(); const AbstractMaemoPackageCreationStep * const pStep = packagingStep();
Q_ASSERT(pStep); Q_ASSERT(pStep);
const MaemoDeployable d(pStep->packageFilePath(), QString()); const DeployableFile d(pStep->packageFilePath(), QString());
return currentlyNeedsDeployment(hostName, d); return currentlyNeedsDeployment(hostName, d);
} }
@@ -270,7 +272,7 @@ void MaemoMountAndInstallDeployStep::cancelInstallation()
void MaemoMountAndInstallDeployStep::handleInstallationSuccess() void MaemoMountAndInstallDeployStep::handleInstallationSuccess()
{ {
setDeployed(connection()->connectionParameters().host, setDeployed(connection()->connectionParameters().host,
MaemoDeployable(packagingStep()->packageFilePath(), QString())); DeployableFile(packagingStep()->packageFilePath(), QString()));
writeOutput(tr("Package installed.")); writeOutput(tr("Package installed."));
} }
@@ -305,8 +307,8 @@ void MaemoMountAndCopyDeployStep::ctor()
SLOT(handleRemoteStderr(QString))); SLOT(handleRemoteStderr(QString)));
connect(m_copyFacility, SIGNAL(progress(QString)), connect(m_copyFacility, SIGNAL(progress(QString)),
SLOT(handleProgressReport(QString))); SLOT(handleProgressReport(QString)));
connect(m_copyFacility, SIGNAL(fileCopied(MaemoDeployable)), connect(m_copyFacility, SIGNAL(fileCopied(DeployableFile)),
SLOT(handleFileCopied(MaemoDeployable))); SLOT(handleFileCopied(DeployableFile)));
connect(m_copyFacility, SIGNAL(finished(QString)), connect(m_copyFacility, SIGNAL(finished(QString)),
SLOT(handleInstallationFinished(QString))); SLOT(handleInstallationFinished(QString)));
} }
@@ -319,11 +321,11 @@ bool MaemoMountAndCopyDeployStep::isDeploymentPossibleInternal(QString &) const
bool MaemoMountAndCopyDeployStep::isDeploymentNeeded(const QString &hostName) const bool MaemoMountAndCopyDeployStep::isDeploymentNeeded(const QString &hostName) const
{ {
m_filesToCopy.clear(); m_filesToCopy.clear();
const QSharedPointer<MaemoDeployables> deployables const QSharedPointer<DeploymentInfo> deploymentInfo
= maemoDeployConfig()->deployables(); = maemoDeployConfig()->deploymentInfo();
const int deployableCount = deployables->deployableCount(); const int deployableCount = deploymentInfo->deployableCount();
for (int i = 0; i < deployableCount; ++i) { for (int i = 0; i < deployableCount; ++i) {
const MaemoDeployable &d = deployables->deployableAt(i); const DeployableFile &d = deploymentInfo->deployableAt(i);
if (currentlyNeedsDeployment(hostName, d) if (currentlyNeedsDeployment(hostName, d)
|| QFileInfo(d.localFilePath).isDir()) { || QFileInfo(d.localFilePath).isDir()) {
m_filesToCopy << d; m_filesToCopy << d;
@@ -370,7 +372,7 @@ void MaemoMountAndCopyDeployStep::deploy()
m_filesToCopy, deployMountPoint()); m_filesToCopy, deployMountPoint());
} }
void MaemoMountAndCopyDeployStep::handleFileCopied(const MaemoDeployable &deployable) void MaemoMountAndCopyDeployStep::handleFileCopied(const DeployableFile &deployable)
{ {
setDeployed(connection()->connectionParameters().host, deployable); setDeployed(connection()->connectionParameters().host, deployable);
} }

View File

@@ -35,7 +35,7 @@
#include "abstractmaemodeploystep.h" #include "abstractmaemodeploystep.h"
#include "maemodeployable.h" #include "deployablefile.h"
#include "maemomountspecification.h" #include "maemomountspecification.h"
namespace RemoteLinux { namespace RemoteLinux {
@@ -132,10 +132,10 @@ private:
virtual void handleInstallationSuccess(); virtual void handleInstallationSuccess();
void ctor(); void ctor();
Q_SLOT void handleFileCopied(const MaemoDeployable &deployable); Q_SLOT void handleFileCopied(const DeployableFile &deployable);
MaemoRemoteCopyFacility *m_copyFacility; MaemoRemoteCopyFacility *m_copyFacility;
mutable QList<MaemoDeployable> m_filesToCopy; mutable QList<DeployableFile> m_filesToCopy;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -33,9 +33,9 @@
#include "maemodeployconfigurationwidget.h" #include "maemodeployconfigurationwidget.h"
#include "ui_maemodeployconfigurationwidget.h" #include "ui_maemodeployconfigurationwidget.h"
#include "deployablefilesperprofile.h"
#include "deploymentinfo.h"
#include "linuxdeviceconfigurations.h" #include "linuxdeviceconfigurations.h"
#include "maemodeployablelistmodel.h"
#include "maemodeployables.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopertargetdeviceconfigurationlistmodel.h" #include "maemopertargetdeviceconfigurationlistmodel.h"
#include "maemosettingspages.h" #include "maemosettingspages.h"
@@ -79,13 +79,13 @@ void MaemoDeployConfigurationWidget::init(DeployConfiguration *dc)
connect(m_deployConfig, SIGNAL(deviceConfigurationListChanged()), connect(m_deployConfig, SIGNAL(deviceConfigurationListChanged()),
SLOT(handleDeviceConfigurationListChanged())); SLOT(handleDeviceConfigurationListChanged()));
ui->projectsComboBox->setModel(m_deployConfig->deployables().data()); ui->projectsComboBox->setModel(m_deployConfig->deploymentInfo().data());
connect(m_deployConfig->deployables().data(), SIGNAL(modelAboutToBeReset()), connect(m_deployConfig->deploymentInfo().data(), SIGNAL(modelAboutToBeReset()),
SLOT(handleModelListToBeReset())); SLOT(handleModelListToBeReset()));
// Queued connection because of race condition with combo box's reaction // Queued connection because of race condition with combo box's reaction
// to modelReset(). // to modelReset().
connect(m_deployConfig->deployables().data(), SIGNAL(modelReset()), connect(m_deployConfig->deploymentInfo().data(), SIGNAL(modelReset()),
SLOT(handleModelListReset()), Qt::QueuedConnection); SLOT(handleModelListReset()), Qt::QueuedConnection);
connect(ui->projectsComboBox, SIGNAL(currentIndexChanged(int)), connect(ui->projectsComboBox, SIGNAL(currentIndexChanged(int)),
@@ -106,8 +106,8 @@ void MaemoDeployConfigurationWidget::handleModelListToBeReset()
void MaemoDeployConfigurationWidget::handleModelListReset() void MaemoDeployConfigurationWidget::handleModelListReset()
{ {
QTC_ASSERT(m_deployConfig->deployables()->modelCount() == ui->projectsComboBox->count(), return); QTC_ASSERT(m_deployConfig->deploymentInfo()->modelCount() == ui->projectsComboBox->count(), return);
if (m_deployConfig->deployables()->modelCount() > 0) { if (m_deployConfig->deploymentInfo()->modelCount() > 0) {
if (ui->projectsComboBox->currentIndex() == -1) if (ui->projectsComboBox->currentIndex() == -1)
ui->projectsComboBox->setCurrentIndex(0); ui->projectsComboBox->setCurrentIndex(0);
else else
@@ -120,8 +120,8 @@ void MaemoDeployConfigurationWidget::setModel(int row)
bool canAddDesktopFile = false; bool canAddDesktopFile = false;
bool canAddIconFile = false; bool canAddIconFile = false;
if (row != -1) { if (row != -1) {
MaemoDeployableListModel * const model DeployableFilesPerProFile * const model
= m_deployConfig->deployables()->modelAt(row); = m_deployConfig->deploymentInfo()->modelAt(row);
ui->tableView->setModel(model); ui->tableView->setModel(model);
ui->tableView->resizeRowsToContents(); ui->tableView->resizeRowsToContents();
canAddDesktopFile = model->canAddDesktopFile(); canAddDesktopFile = model->canAddDesktopFile();
@@ -154,8 +154,8 @@ void MaemoDeployConfigurationWidget::addDesktopFile()
const int modelRow = ui->projectsComboBox->currentIndex(); const int modelRow = ui->projectsComboBox->currentIndex();
if (modelRow == -1) if (modelRow == -1)
return; return;
MaemoDeployableListModel *const model DeployableFilesPerProFile *const model
= m_deployConfig->deployables()->modelAt(modelRow); = m_deployConfig->deploymentInfo()->modelAt(modelRow);
model->addDesktopFile(); model->addDesktopFile();
ui->addDesktopFileButton->setEnabled(model->canAddDesktopFile()); ui->addDesktopFileButton->setEnabled(model->canAddDesktopFile());
ui->tableView->resizeRowsToContents(); ui->tableView->resizeRowsToContents();
@@ -167,8 +167,8 @@ void MaemoDeployConfigurationWidget::addIcon()
if (modelRow == -1) if (modelRow == -1)
return; return;
MaemoDeployableListModel *const model DeployableFilesPerProFile *const model
= m_deployConfig->deployables()->modelAt(modelRow); = m_deployConfig->deploymentInfo()->modelAt(modelRow);
const int iconDim = MaemoGlobal::applicationIconSize(MaemoGlobal::osType(model->qtVersion()->qmakeCommand())); const int iconDim = MaemoGlobal::applicationIconSize(MaemoGlobal::osType(model->qtVersion()->qmakeCommand()));
const QString origFilePath = QFileDialog::getOpenFileName(this, const QString origFilePath = QFileDialog::getOpenFileName(this,
tr("Choose Icon (will be scaled to %1x%1 pixels, if necessary)").arg(iconDim), tr("Choose Icon (will be scaled to %1x%1 pixels, if necessary)").arg(iconDim),

View File

@@ -32,7 +32,8 @@
#include "maemodirectdeviceuploadstep.h" #include "maemodirectdeviceuploadstep.h"
#include "maemodeployable.h" #include "deployablefile.h"
#include "deploymentinfo.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "qt4maemodeployconfiguration.h" #include "qt4maemodeployconfiguration.h"
@@ -82,16 +83,16 @@ bool MaemoDirectDeviceUploadStep::isDeploymentPossibleInternal(QString &whyNot)
bool MaemoDirectDeviceUploadStep::isDeploymentNeeded(const QString &hostName) const bool MaemoDirectDeviceUploadStep::isDeploymentNeeded(const QString &hostName) const
{ {
m_filesToUpload.clear(); m_filesToUpload.clear();
const QSharedPointer<MaemoDeployables> deployables const QSharedPointer<DeploymentInfo> deploymentInfo
= maemoDeployConfig()->deployables(); = maemoDeployConfig()->deploymentInfo();
const int deployableCount = deployables->deployableCount(); const int deployableCount = deploymentInfo->deployableCount();
for (int i = 0; i < deployableCount; ++i) for (int i = 0; i < deployableCount; ++i)
checkDeploymentNeeded(hostName, deployables->deployableAt(i)); checkDeploymentNeeded(hostName, deploymentInfo->deployableAt(i));
return !m_filesToUpload.isEmpty(); return !m_filesToUpload.isEmpty();
} }
void MaemoDirectDeviceUploadStep::checkDeploymentNeeded(const QString &hostName, void MaemoDirectDeviceUploadStep::checkDeploymentNeeded(const QString &hostName,
const MaemoDeployable &deployable) const const DeployableFile &deployable) const
{ {
QFileInfo fileInfo(deployable.localFilePath); QFileInfo fileInfo(deployable.localFilePath);
if (fileInfo.isDir()) { if (fileInfo.isDir()) {
@@ -105,7 +106,7 @@ void MaemoDirectDeviceUploadStep::checkDeploymentNeeded(const QString &hostName,
const QString remoteDir = deployable.remoteDir + QLatin1Char('/') const QString remoteDir = deployable.remoteDir + QLatin1Char('/')
+ fileInfo.fileName(); + fileInfo.fileName();
checkDeploymentNeeded(hostName, checkDeploymentNeeded(hostName,
MaemoDeployable(localFilePath, remoteDir)); DeployableFile(localFilePath, remoteDir));
} }
} else if (currentlyNeedsDeployment(hostName, deployable)) { } else if (currentlyNeedsDeployment(hostName, deployable)) {
m_filesToUpload << deployable; m_filesToUpload << deployable;
@@ -155,7 +156,7 @@ void MaemoDirectDeviceUploadStep::uploadNextFile()
return; return;
} }
const MaemoDeployable &d = m_filesToUpload.first(); const DeployableFile &d = m_filesToUpload.first();
QString dirToCreate = d.remoteDir; QString dirToCreate = d.remoteDir;
QFileInfo fi(d.localFilePath); QFileInfo fi(d.localFilePath);
if (fi.isDir()) if (fi.isDir())
@@ -177,7 +178,7 @@ void MaemoDirectDeviceUploadStep::handleMkdirFinished(int exitStatus)
if (m_extendedState == Inactive) if (m_extendedState == Inactive)
return; return;
const MaemoDeployable &d = m_filesToUpload.first(); const DeployableFile &d = m_filesToUpload.first();
QFileInfo fi(d.localFilePath); QFileInfo fi(d.localFilePath);
const QString nativePath = QDir::toNativeSeparators(d.localFilePath); const QString nativePath = QDir::toNativeSeparators(d.localFilePath);
if (exitStatus != SshRemoteProcess::ExitedNormally if (exitStatus != SshRemoteProcess::ExitedNormally
@@ -209,7 +210,7 @@ void MaemoDirectDeviceUploadStep::handleUploadFinished(Utils::SftpJobId jobId,
if (m_extendedState == Inactive) if (m_extendedState == Inactive)
return; return;
const MaemoDeployable d = m_filesToUpload.takeFirst(); const DeployableFile d = m_filesToUpload.takeFirst();
if (!errorMsg.isEmpty()) { if (!errorMsg.isEmpty()) {
raiseError(tr("Upload of file '%1' failed: %2") raiseError(tr("Upload of file '%1' failed: %2")
.arg(QDir::toNativeSeparators(d.localFilePath), errorMsg)); .arg(QDir::toNativeSeparators(d.localFilePath), errorMsg));

View File

@@ -46,8 +46,9 @@ class SftpChannel;
} }
namespace RemoteLinux { namespace RemoteLinux {
class DeployableFile;
namespace Internal { namespace Internal {
class MaemoDeployable;
class MaemoDirectDeviceUploadStep : public AbstractMaemoDeployStep class MaemoDirectDeviceUploadStep : public AbstractMaemoDeployStep
{ {
@@ -79,12 +80,12 @@ private:
void ctor(); void ctor();
void setFinished(); void setFinished();
void checkDeploymentNeeded(const QString &hostName, void checkDeploymentNeeded(const QString &hostName,
const MaemoDeployable &deployable) const; const DeployableFile &deployable) const;
void uploadNextFile(); void uploadNextFile();
QSharedPointer<Utils::SftpChannel> m_uploader; QSharedPointer<Utils::SftpChannel> m_uploader;
QSharedPointer<Utils::SshRemoteProcess> m_mkdirProc; QSharedPointer<Utils::SshRemoteProcess> m_mkdirProc;
mutable QList<MaemoDeployable> m_filesToUpload; mutable QList<DeployableFile> m_filesToUpload;
ExtendedState m_extendedState; ExtendedState m_extendedState;
}; };

View File

@@ -32,7 +32,7 @@
#include "maemoinstalltosysrootstep.h" #include "maemoinstalltosysrootstep.h"
#include "maemodeployables.h" #include "deploymentinfo.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
#include "maemoqtversion.h" #include "maemoqtversion.h"
@@ -313,11 +313,11 @@ void MaemoCopyToSysrootStep::run(QFutureInterface<bool> &fi)
emit addOutput(tr("Copying files to sysroot ..."), MessageOutput); emit addOutput(tr("Copying files to sysroot ..."), MessageOutput);
QDir sysrootDir(qtVersion->systemRoot()); QDir sysrootDir(qtVersion->systemRoot());
const QSharedPointer<MaemoDeployables> deployables const QSharedPointer<DeploymentInfo> deploymentInfo
= qobject_cast<Qt4MaemoDeployConfiguration *>(deployConfiguration())->deployables(); = qobject_cast<Qt4MaemoDeployConfiguration *>(deployConfiguration())->deploymentInfo();
const QChar sep = QLatin1Char('/'); const QChar sep = QLatin1Char('/');
for (int i = 0; i < deployables->deployableCount(); ++i) { for (int i = 0; i < deploymentInfo->deployableCount(); ++i) {
const MaemoDeployable &deployable = deployables->deployableAt(i); const DeployableFile &deployable = deploymentInfo->deployableAt(i);
const QFileInfo localFileInfo(deployable.localFilePath); const QFileInfo localFileInfo(deployable.localFilePath);
const QString targetFilePath = qtVersion->systemRoot() + sep const QString targetFilePath = qtVersion->systemRoot() + sep
+ deployable.remoteDir + sep + localFileInfo.fileName(); + deployable.remoteDir + sep + localFileInfo.fileName();

View File

@@ -31,8 +31,8 @@
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
#include "deploymentinfo.h"
#include "maemoconstants.h" #include "maemoconstants.h"
#include "maemodeployables.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopackagecreationwidget.h" #include "maemopackagecreationwidget.h"
#include "qt4maemodeployconfiguration.h" #include "qt4maemodeployconfiguration.h"
@@ -118,7 +118,7 @@ void AbstractMaemoPackageCreationStep::run(QFutureInterface<bool> &fi)
buildProc->deleteLater(); buildProc->deleteLater();
if (success) { if (success) {
emit addOutput(tr("Package created."), BuildStep::MessageOutput); emit addOutput(tr("Package created."), BuildStep::MessageOutput);
deployConfig()->deployables()->setUnmodified(); deployConfig()->deploymentInfo()->setUnmodified();
} }
fi.reportResult(success); fi.reportResult(success);
} }
@@ -197,15 +197,15 @@ QString AbstractMaemoPackageCreationStep::projectName() const
bool AbstractMaemoPackageCreationStep::packagingNeeded() const bool AbstractMaemoPackageCreationStep::packagingNeeded() const
{ {
const QSharedPointer<MaemoDeployables> &deployables const QSharedPointer<DeploymentInfo> &deploymentInfo
= deployConfig()->deployables(); = deployConfig()->deploymentInfo();
QFileInfo packageInfo(packageFilePath()); QFileInfo packageInfo(packageFilePath());
if (!packageInfo.exists() || deployables->isModified()) if (!packageInfo.exists() || deploymentInfo->isModified())
return true; return true;
const int deployableCount = deployables->deployableCount(); const int deployableCount = deploymentInfo->deployableCount();
for (int i = 0; i < deployableCount; ++i) { for (int i = 0; i < deployableCount; ++i) {
if (MaemoGlobal::isFileNewerThan(deployables->deployableAt(i).localFilePath, if (MaemoGlobal::isFileNewerThan(deploymentInfo->deployableAt(i).localFilePath,
packageInfo.lastModified())) packageInfo.lastModified()))
return true; return true;
} }
@@ -656,9 +656,9 @@ bool MaemoTarPackageCreationStep::createPackage(QProcess *buildProc,
tarFile.errorString())); tarFile.errorString()));
return false; return false;
} }
const QSharedPointer<MaemoDeployables> deployables = deployConfig()->deployables(); const QSharedPointer<DeploymentInfo> deploymentInfo = deployConfig()->deploymentInfo();
for (int i = 0; i < deployables->deployableCount(); ++i) { for (int i = 0; i < deploymentInfo->deployableCount(); ++i) {
const MaemoDeployable &d = deployables->deployableAt(i); const DeployableFile &d = deploymentInfo->deployableAt(i);
QFileInfo fileInfo(d.localFilePath); QFileInfo fileInfo(d.localFilePath);
if (!appendFile(tarFile, fileInfo, d.remoteDir + QLatin1Char('/') if (!appendFile(tarFile, fileInfo, d.remoteDir + QLatin1Char('/')
+ fileInfo.fileName(), fi)) { + fileInfo.fileName(), fi)) {

View File

@@ -45,7 +45,6 @@ namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { namespace Internal {
class MaemoDeployableListModel;
class AbstractQt4MaemoTarget; class AbstractQt4MaemoTarget;
class AbstractDebBasedQt4MaemoTarget; class AbstractDebBasedQt4MaemoTarget;
class AbstractRpmBasedQt4MaemoTarget; class AbstractRpmBasedQt4MaemoTarget;

View File

@@ -32,7 +32,7 @@
#include "maemoprofilesupdatedialog.h" #include "maemoprofilesupdatedialog.h"
#include "ui_maemoprofilesupdatedialog.h" #include "ui_maemoprofilesupdatedialog.h"
#include "maemodeployablelistmodel.h" #include "deployablefilesperprofile.h"
#include <qt4projectmanager/qt4nodes.h> #include <qt4projectmanager/qt4nodes.h>
@@ -42,7 +42,7 @@
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { namespace Internal {
MaemoProFilesUpdateDialog::MaemoProFilesUpdateDialog(const QList<MaemoDeployableListModel *> &models, MaemoProFilesUpdateDialog::MaemoProFilesUpdateDialog(const QList<DeployableFilesPerProFile *> &models,
QWidget *parent) QWidget *parent)
: QDialog(parent), : QDialog(parent),
m_models(models), m_models(models),

View File

@@ -44,17 +44,18 @@ namespace Ui {
QT_END_NAMESPACE QT_END_NAMESPACE
namespace RemoteLinux { namespace RemoteLinux {
class DeployableFilesPerProFile;
namespace Internal { namespace Internal {
class MaemoDeployableListModel;
class MaemoProFilesUpdateDialog : public QDialog class MaemoProFilesUpdateDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
typedef QPair<MaemoDeployableListModel *, bool> UpdateSetting; typedef QPair<DeployableFilesPerProFile *, bool> UpdateSetting;
explicit MaemoProFilesUpdateDialog(const QList<MaemoDeployableListModel *> &models, explicit MaemoProFilesUpdateDialog(const QList<DeployableFilesPerProFile *> &models,
QWidget *parent = 0); QWidget *parent = 0);
~MaemoProFilesUpdateDialog(); ~MaemoProFilesUpdateDialog();
QList<UpdateSetting> getUpdateSettings() const; QList<UpdateSetting> getUpdateSettings() const;
@@ -64,7 +65,7 @@ private:
Q_SLOT void uncheckAll(); Q_SLOT void uncheckAll();
void setCheckStateForAll(Qt::CheckState checkState); void setCheckStateForAll(Qt::CheckState checkState);
const QList<MaemoDeployableListModel *> m_models; const QList<DeployableFilesPerProFile *> m_models;
Ui::MaemoProFilesUpdateDialog *ui; Ui::MaemoProFilesUpdateDialog *ui;
}; };

View File

@@ -31,8 +31,8 @@
**************************************************************************/ **************************************************************************/
#include "maemopublisherfremantlefree.h" #include "maemopublisherfremantlefree.h"
#include "maemodeployablelistmodel.h" #include "deployablefilesperprofile.h"
#include "maemodeployables.h" #include "deploymentinfo.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
#include "maemopublishingfileselectiondialog.h" #include "maemopublishingfileselectiondialog.h"
@@ -536,10 +536,10 @@ bool MaemoPublisherFremantleFree::updateDesktopFiles(QString *error) const
bool success = true; bool success = true;
const Qt4MaemoDeployConfiguration * const deployConfig const Qt4MaemoDeployConfiguration * const deployConfig
= qobject_cast<Qt4MaemoDeployConfiguration *>(m_buildConfig->target()->activeDeployConfiguration()); = qobject_cast<Qt4MaemoDeployConfiguration *>(m_buildConfig->target()->activeDeployConfiguration());
const QSharedPointer<MaemoDeployables> deployables const QSharedPointer<DeploymentInfo> deploymentInfo
= deployConfig->deployables(); = deployConfig->deploymentInfo();
for (int i = 0; i < deployables->modelCount(); ++i) { for (int i = 0; i < deploymentInfo->modelCount(); ++i) {
const MaemoDeployableListModel * const model = deployables->modelAt(i); const DeployableFilesPerProFile * const model = deploymentInfo->modelAt(i);
QString desktopFilePath = model->localDesktopFilePath(); QString desktopFilePath = model->localDesktopFilePath();
if (desktopFilePath.isEmpty()) if (desktopFilePath.isEmpty())
continue; continue;

View File

@@ -52,7 +52,7 @@ MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
void MaemoRemoteCopyFacility::copyFiles(const SshConnection::Ptr &connection, void MaemoRemoteCopyFacility::copyFiles(const SshConnection::Ptr &connection,
const LinuxDeviceConfiguration::ConstPtr &devConf, const LinuxDeviceConfiguration::ConstPtr &devConf,
const QList<MaemoDeployable> &deployables, const QString &mountPoint) const QList<DeployableFile> &deployables, const QString &mountPoint)
{ {
Q_ASSERT(connection->state() == SshConnection::Connected); Q_ASSERT(connection->state() == SshConnection::Connected);
Q_ASSERT(!m_isCopying); Q_ASSERT(!m_isCopying);
@@ -128,7 +128,7 @@ void MaemoRemoteCopyFacility::copyNextFile()
return; return;
} }
const MaemoDeployable &d = m_deployables.first(); const DeployableFile &d = m_deployables.first();
QString sourceFilePath = m_mountPoint; QString sourceFilePath = m_mountPoint;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
const QString localFilePath = QDir::fromNativeSeparators(d.localFilePath); const QString localFilePath = QDir::fromNativeSeparators(d.localFilePath);

View File

@@ -33,7 +33,7 @@
#ifndef MAEMOREMOTECOPYFACILITY_H #ifndef MAEMOREMOTECOPYFACILITY_H
#define MAEMOREMOTECOPYFACILITY_H #define MAEMOREMOTECOPYFACILITY_H
#include "maemodeployable.h" #include "deployablefile.h"
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QObject> #include <QtCore/QObject>
@@ -59,14 +59,14 @@ public:
void copyFiles(const QSharedPointer<Utils::SshConnection> &connection, void copyFiles(const QSharedPointer<Utils::SshConnection> &connection,
const QSharedPointer<const LinuxDeviceConfiguration> &devConf, const QSharedPointer<const LinuxDeviceConfiguration> &devConf,
const QList<MaemoDeployable> &deployables, const QString &mountPoint); const QList<DeployableFile> &deployables, const QString &mountPoint);
void cancel(); void cancel();
signals: signals:
void stdoutData(const QString &output); void stdoutData(const QString &output);
void stderrData(const QString &output); void stderrData(const QString &output);
void progress(const QString &message); void progress(const QString &message);
void fileCopied(const MaemoDeployable &deployable); void fileCopied(const DeployableFile &deployable);
void finished(const QString &errorMsg = QString()); void finished(const QString &errorMsg = QString());
private slots: private slots:
@@ -81,7 +81,7 @@ private:
QSharedPointer<Utils::SshRemoteProcessRunner> m_copyRunner; QSharedPointer<Utils::SshRemoteProcessRunner> m_copyRunner;
QSharedPointer<const LinuxDeviceConfiguration> m_devConf; QSharedPointer<const LinuxDeviceConfiguration> m_devConf;
QList<MaemoDeployable> m_deployables; QList<DeployableFile> m_deployables;
QString m_mountPoint; QString m_mountPoint;
bool m_isCopying; bool m_isCopying;
}; };

View File

@@ -32,6 +32,7 @@
#include "maemouploadandinstalldeploystep.h" #include "maemouploadandinstalldeploystep.h"
#include "deployablefile.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
#include "maemopackageinstaller.h" #include "maemopackageinstaller.h"
@@ -96,7 +97,7 @@ bool AbstractMaemoUploadAndInstallStep::isDeploymentNeeded(const QString &hostNa
{ {
const AbstractMaemoPackageCreationStep * const pStep = packagingStep(); const AbstractMaemoPackageCreationStep * const pStep = packagingStep();
Q_ASSERT(pStep); Q_ASSERT(pStep);
const MaemoDeployable d(pStep->packageFilePath(), QString()); const DeployableFile d(pStep->packageFilePath(), QString());
return currentlyNeedsDeployment(hostName, d); return currentlyNeedsDeployment(hostName, d);
} }
@@ -168,7 +169,7 @@ void AbstractMaemoUploadAndInstallStep::handleInstallationFinished(const QString
if (errorMsg.isEmpty()) { if (errorMsg.isEmpty()) {
setDeployed(connection()->connectionParameters().host, setDeployed(connection()->connectionParameters().host,
MaemoDeployable(packagingStep()->packageFilePath(), QString())); DeployableFile(packagingStep()->packageFilePath(), QString()));
writeOutput(tr("Package installed.")); writeOutput(tr("Package installed."));
} else { } else {
raiseError(errorMsg); raiseError(errorMsg);

View File

@@ -32,11 +32,11 @@
#include "qt4maemodeployconfiguration.h" #include "qt4maemodeployconfiguration.h"
#include "deploymentinfo.h"
#include "linuxdeviceconfigurations.h" #include "linuxdeviceconfigurations.h"
#include "maemoconstants.h" #include "maemoconstants.h"
#include "maemodeploybymountstep.h" #include "maemodeploybymountstep.h"
#include "maemodeployconfigurationwidget.h" #include "maemodeployconfigurationwidget.h"
#include "maemodeployables.h"
#include "maemoinstalltosysrootstep.h" #include "maemoinstalltosysrootstep.h"
#include "maemopackagecreationstep.h" #include "maemopackagecreationstep.h"
#include "maemopertargetdeviceconfigurationlistmodel.h" #include "maemopertargetdeviceconfigurationlistmodel.h"
@@ -60,7 +60,7 @@ const QString OldDeployConfigId = QLatin1String("2.2MaemoDeployConfig");
Qt4MaemoDeployConfiguration::Qt4MaemoDeployConfiguration(Target *target, Qt4MaemoDeployConfiguration::Qt4MaemoDeployConfiguration(Target *target,
const QString &id) : DeployConfiguration(target, id) const QString &id) : DeployConfiguration(target, id)
{ {
// A MaemoDeployables object is only dependent on the active build // A DeploymentInfo object is only dependent on the active build
// configuration and therefore can (and should) be shared among all // configuration and therefore can (and should) be shared among all
// deploy steps. The per-target device configurations model is // deploy steps. The per-target device configurations model is
// similarly only dependent on the target. // similarly only dependent on the target.
@@ -70,13 +70,13 @@ Qt4MaemoDeployConfiguration::Qt4MaemoDeployConfiguration(Target *target,
const Qt4MaemoDeployConfiguration * const mdc const Qt4MaemoDeployConfiguration * const mdc
= qobject_cast<const Qt4MaemoDeployConfiguration *>(dc); = qobject_cast<const Qt4MaemoDeployConfiguration *>(dc);
if (mdc) { if (mdc) {
m_deployables = mdc->deployables(); m_deploymentInfo = mdc->deploymentInfo();
m_devConfModel = mdc->m_devConfModel; m_devConfModel = mdc->m_devConfModel;
break; break;
} }
} }
if (!m_deployables) { if (!m_deploymentInfo) {
m_deployables = QSharedPointer<MaemoDeployables>(new MaemoDeployables(qobject_cast<Qt4BaseTarget *>(target))); m_deploymentInfo = QSharedPointer<DeploymentInfo>(new DeploymentInfo(qobject_cast<Qt4BaseTarget *>(target)));
m_devConfModel = QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> m_devConfModel = QSharedPointer<MaemoPerTargetDeviceConfigurationListModel>
(new MaemoPerTargetDeviceConfigurationListModel(0, target)); (new MaemoPerTargetDeviceConfigurationListModel(0, target));
} }
@@ -89,7 +89,7 @@ Qt4MaemoDeployConfiguration::Qt4MaemoDeployConfiguration(ProjectExplorer::Target
{ {
const Qt4MaemoDeployConfiguration * const mdc const Qt4MaemoDeployConfiguration * const mdc
= qobject_cast<Qt4MaemoDeployConfiguration *>(source); = qobject_cast<Qt4MaemoDeployConfiguration *>(source);
m_deployables = mdc->deployables(); m_deploymentInfo = mdc->deploymentInfo();
m_devConfModel = mdc->deviceConfigModel(); m_devConfModel = mdc->deviceConfigModel();
initialize(); initialize();
} }
@@ -145,9 +145,9 @@ DeployConfigurationWidget *Qt4MaemoDeployConfiguration::configurationWidget() co
return new MaemoDeployConfigurationWidget; return new MaemoDeployConfigurationWidget;
} }
QSharedPointer<MaemoDeployables> Qt4MaemoDeployConfiguration::deployables() const QSharedPointer<DeploymentInfo> Qt4MaemoDeployConfiguration::deploymentInfo() const
{ {
return m_deployables; return m_deploymentInfo;
} }
QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> Qt4MaemoDeployConfiguration::deviceConfigModel() const QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> Qt4MaemoDeployConfiguration::deviceConfigModel() const

View File

@@ -40,8 +40,9 @@
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
namespace RemoteLinux { namespace RemoteLinux {
class DeploymentInfo;
namespace Internal { namespace Internal {
class MaemoDeployables;
class MaemoPerTargetDeviceConfigurationListModel; class MaemoPerTargetDeviceConfigurationListModel;
class Qt4MaemoDeployConfiguration : public ProjectExplorer::DeployConfiguration class Qt4MaemoDeployConfiguration : public ProjectExplorer::DeployConfiguration
@@ -54,7 +55,7 @@ public:
virtual ProjectExplorer::DeployConfigurationWidget *configurationWidget() const; virtual ProjectExplorer::DeployConfigurationWidget *configurationWidget() const;
void setDeviceConfiguration(int index); void setDeviceConfiguration(int index);
QSharedPointer<MaemoDeployables> deployables() const; QSharedPointer<DeploymentInfo> deploymentInfo() const;
QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> deviceConfigModel() const; QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> deviceConfigModel() const;
QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const; QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const;
@@ -83,7 +84,7 @@ private:
void setDeviceConfig(LinuxDeviceConfiguration::Id internalId); void setDeviceConfig(LinuxDeviceConfiguration::Id internalId);
Q_SLOT void handleDeviceConfigurationListUpdated(); Q_SLOT void handleDeviceConfigurationListUpdated();
QSharedPointer<MaemoDeployables> m_deployables; QSharedPointer<DeploymentInfo> m_deploymentInfo;
QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> m_devConfModel; QSharedPointer<MaemoPerTargetDeviceConfigurationListModel> m_devConfModel;
QSharedPointer<const LinuxDeviceConfiguration> m_deviceConfiguration; QSharedPointer<const LinuxDeviceConfiguration> m_deviceConfiguration;
}; };

View File

@@ -21,10 +21,7 @@ HEADERS += \
maemopackagecreationstep.h \ maemopackagecreationstep.h \
maemopackagecreationfactory.h \ maemopackagecreationfactory.h \
maemopackagecreationwidget.h \ maemopackagecreationwidget.h \
maemodeployablelistmodel.h \
maemoqemumanager.h \ maemoqemumanager.h \
maemodeployables.h \
maemodeployable.h \
maemodeploystepwidget.h \ maemodeploystepwidget.h \
maemodeploystepfactory.h \ maemodeploystepfactory.h \
maemoglobal.h \ maemoglobal.h \
@@ -85,7 +82,10 @@ HEADERS += \
remotelinuxruncontrolfactory.h \ remotelinuxruncontrolfactory.h \
remotelinuxdebugsupport.h \ remotelinuxdebugsupport.h \
genericlinuxdeviceconfigurationwizardpages.h \ genericlinuxdeviceconfigurationwizardpages.h \
portlist.h portlist.h \
deployablefile.h \
deployablefilesperprofile.h \
deploymentinfo.h
SOURCES += \ SOURCES += \
remotelinuxplugin.cpp \ remotelinuxplugin.cpp \
@@ -100,9 +100,7 @@ SOURCES += \
maemopackagecreationstep.cpp \ maemopackagecreationstep.cpp \
maemopackagecreationfactory.cpp \ maemopackagecreationfactory.cpp \
maemopackagecreationwidget.cpp \ maemopackagecreationwidget.cpp \
maemodeployablelistmodel.cpp \
maemoqemumanager.cpp \ maemoqemumanager.cpp \
maemodeployables.cpp \
maemodeploystepwidget.cpp \ maemodeploystepwidget.cpp \
maemodeploystepfactory.cpp \ maemodeploystepfactory.cpp \
maemoglobal.cpp \ maemoglobal.cpp \
@@ -162,7 +160,9 @@ SOURCES += \
remotelinuxruncontrolfactory.cpp \ remotelinuxruncontrolfactory.cpp \
remotelinuxdebugsupport.cpp \ remotelinuxdebugsupport.cpp \
genericlinuxdeviceconfigurationwizardpages.cpp \ genericlinuxdeviceconfigurationwizardpages.cpp \
portlist.cpp portlist.cpp \
deployablefilesperprofile.cpp \
deploymentinfo.cpp
FORMS += \ FORMS += \
maemoconfigtestdialog.ui \ maemoconfigtestdialog.ui \

View File

@@ -31,7 +31,6 @@
#include "remotelinuxdebugsupport.h" #include "remotelinuxdebugsupport.h"
#include "maemodeployables.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include "qt4maemotarget.h" #include "qt4maemotarget.h"
@@ -39,6 +38,7 @@
#include <debugger/debuggerengine.h> #include <debugger/debuggerengine.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/project.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)

View File

@@ -32,10 +32,10 @@
#include "remotelinuxplugin.h" #include "remotelinuxplugin.h"
#include "deployablefile.h"
#include "genericlinuxdeviceconfigurationfactory.h" #include "genericlinuxdeviceconfigurationfactory.h"
#include "maddedeviceconfigurationfactory.h" #include "maddedeviceconfigurationfactory.h"
#include "maemoconstants.h" #include "maemoconstants.h"
#include "maemodeployable.h"
#include "maemodeploystepfactory.h" #include "maemodeploystepfactory.h"
#include "linuxdeviceconfigurations.h" #include "linuxdeviceconfigurations.h"
#include "maemoglobal.h" #include "maemoglobal.h"
@@ -90,7 +90,7 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory); addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory);
addAutoReleasedObject(new RemoteLinuxRunControlFactory); addAutoReleasedObject(new RemoteLinuxRunControlFactory);
qRegisterMetaType<MaemoDeployable>("MaemoDeployable"); qRegisterMetaType<DeployableFile>("DeployableFile");
return true; return true;
} }

View File

@@ -33,7 +33,7 @@
#include "remotelinuxrunconfiguration.h" #include "remotelinuxrunconfiguration.h"
#include "abstractlinuxdevicedeploystep.h" #include "abstractlinuxdevicedeploystep.h"
#include "maemodeployables.h" #include "deploymentinfo.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemoqtversion.h" #include "maemoqtversion.h"
#include "maemotoolchain.h" #include "maemotoolchain.h"
@@ -280,7 +280,7 @@ QString RemoteLinuxRunConfiguration::localExecutableFilePath() const
QString RemoteLinuxRunConfiguration::remoteExecutableFilePath() const QString RemoteLinuxRunConfiguration::remoteExecutableFilePath() const
{ {
return deployConfig() return deployConfig()
? deployConfig()->deployables()->remoteExecutableFilePath(localExecutableFilePath()) ? deployConfig()->deploymentInfo()->remoteExecutableFilePath(localExecutableFilePath())
: QString(); : QString();
} }
@@ -329,7 +329,7 @@ void RemoteLinuxRunConfiguration::handleDeployConfigChanged()
{ {
Qt4MaemoDeployConfiguration * const activeDeployConf = deployConfig(); Qt4MaemoDeployConfiguration * const activeDeployConf = deployConfig();
if (activeDeployConf) { if (activeDeployConf) {
connect(activeDeployConf->deployables().data(), SIGNAL(modelReset()), connect(activeDeployConf->deploymentInfo().data(), SIGNAL(modelReset()),
SLOT(handleDeployablesUpdated()), Qt::UniqueConnection); SLOT(handleDeployablesUpdated()), Qt::UniqueConnection);
connect(activeDeployConf, SIGNAL(currentDeviceConfigurationChanged()), connect(activeDeployConf, SIGNAL(currentDeviceConfigurationChanged()),
SLOT(updateDeviceConfigurations()), Qt::UniqueConnection); SLOT(updateDeviceConfigurations()), Qt::UniqueConnection);

View File

@@ -34,7 +34,6 @@
#define REMOTELINUXRUNCONFIGURATION_H #define REMOTELINUXRUNCONFIGURATION_H
#include "maemoconstants.h" #include "maemoconstants.h"
#include "maemodeployable.h"
#include "portlist.h" #include "portlist.h"
#include "remotelinux_export.h" #include "remotelinux_export.h"

View File

@@ -31,7 +31,6 @@
**************************************************************************/ **************************************************************************/
#include "remotelinuxrunconfigurationwidget.h" #include "remotelinuxrunconfigurationwidget.h"
#include "maemodeployables.h"
#include "maemodeviceenvreader.h" #include "maemodeviceenvreader.h"
#include "maemoglobal.h" #include "maemoglobal.h"
#include "remotelinuxrunconfiguration.h" #include "remotelinuxrunconfiguration.h"
@@ -47,6 +46,7 @@
#include <QtGui/QButtonGroup> #include <QtGui/QButtonGroup>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtGui/QComboBox> #include <QtGui/QComboBox>
#include <QtGui/QFormLayout> #include <QtGui/QFormLayout>
#include <QtGui/QGroupBox> #include <QtGui/QGroupBox>