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

View File

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

View File

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

View File

@@ -30,10 +30,12 @@
**
**************************************************************************/
#ifndef MAEMOPACKAGECONTENTS_H
#define MAEMOPACKAGECONTENTS_H
#ifndef DEPLOYABLEFILESPERPROFILE_H
#define DEPLOYABLEFILESPERPROFILE_H
#include "maemodeployable.h"
#include "deployablefile.h"
#include "remotelinux_export.h"
#include <qt4projectmanager/qt4nodes.h>
@@ -51,9 +53,8 @@ class Qt4BaseTarget;
}
namespace RemoteLinux {
namespace Internal {
class MaemoDeployableListModel : public QAbstractTableModel
class REMOTELINUX_EXPORT DeployableFilesPerProFile : public QAbstractTableModel
{
Q_OBJECT
public:
@@ -61,14 +62,14 @@ public:
UpdateProFile, DontUpdateProFile, AskToUpdateProFile
};
MaemoDeployableListModel(const Qt4ProjectManager::Qt4BaseTarget *target,
DeployableFilesPerProFile(const Qt4ProjectManager::Qt4BaseTarget *target,
const Qt4ProjectManager::Qt4ProFileNode *proFileNode, ProFileUpdateSetting updateSetting,
QObject *parent);
~MaemoDeployableListModel();
~DeployableFilesPerProFile();
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
MaemoDeployable deployableAt(int row) const;
DeployableFile deployableAt(int row) const;
bool isModified() const { return m_modified; }
void setUnModified() { m_modified = false; }
const QtSupport::BaseQtVersion *qtVersion() const;
@@ -119,13 +120,12 @@ private:
const Qt4ProjectManager::InstallsList m_installsList;
const Qt4ProjectManager::ProjectVersion m_projectVersion;
const QStringList m_config;
QList<MaemoDeployable> m_deployables;
QList<DeployableFile> m_deployables;
mutable bool m_modified;
ProFileUpdateSetting m_proFileUpdateSetting;
bool m_hasTargetPath;
};
} // 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 <projectexplorer/buildstep.h>
@@ -43,9 +44,9 @@
using namespace Qt4ProjectManager;
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))
{
Qt4Project * const pro = m_target->qt4Project();
@@ -57,16 +58,16 @@ MaemoDeployables::MaemoDeployables(const Qt4BaseTarget *target)
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)
if (!parseInProgress)
m_updateTimer->start();
}
void MaemoDeployables::createModels()
void DeploymentInfo::createModels()
{
if (m_target->project()->activeTarget() != m_target)
return;
@@ -82,10 +83,10 @@ void MaemoDeployables::createModels()
qDeleteAll(m_listModels);
m_listModels.clear();
createModels(rootNode);
QList<MaemoDeployableListModel *> modelsWithoutTargetPath;
foreach (MaemoDeployableListModel *const model, m_listModels) {
QList<DeployableFilesPerProFile *> modelsWithoutTargetPath;
foreach (DeployableFilesPerProFile *const model, m_listModels) {
if (!model->hasTargetPath()) {
if (model->proFileUpdateSetting() == MaemoDeployableListModel::AskToUpdateProFile)
if (model->proFileUpdateSetting() == DeployableFilesPerProFile::AskToUpdateProFile)
modelsWithoutTargetPath << model;
}
}
@@ -96,10 +97,10 @@ void MaemoDeployables::createModels()
const QList<MaemoProFilesUpdateDialog::UpdateSetting> &settings
= dialog.getUpdateSettings();
foreach (const MaemoProFilesUpdateDialog::UpdateSetting &setting, settings) {
const MaemoDeployableListModel::ProFileUpdateSetting updateSetting
const DeployableFilesPerProFile::ProFileUpdateSetting updateSetting
= setting.second
? MaemoDeployableListModel::UpdateProFile
: MaemoDeployableListModel::DontUpdateProFile;
? DeployableFilesPerProFile::UpdateProFile
: DeployableFilesPerProFile::DontUpdateProFile;
m_updateSettings.insert(setting.first->proFilePath(),
updateSetting);
setting.first->setProFileUpdateSetting(updateSetting);
@@ -112,23 +113,23 @@ void MaemoDeployables::createModels()
this, SLOT(startTimer(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
}
void MaemoDeployables::createModels(const Qt4ProFileNode *proFileNode)
void DeploymentInfo::createModels(const Qt4ProFileNode *proFileNode)
{
switch (proFileNode->projectType()) {
case ApplicationTemplate:
case LibraryTemplate:
case AuxTemplate: {
MaemoDeployableListModel::ProFileUpdateSetting updateSetting;
DeployableFilesPerProFile::ProFileUpdateSetting updateSetting;
if (proFileNode->projectType() == AuxTemplate) {
updateSetting = MaemoDeployableListModel::DontUpdateProFile;
updateSetting = DeployableFilesPerProFile::DontUpdateProFile;
} else {
UpdateSettingsMap::ConstIterator it
= m_updateSettings.find(proFileNode->path());
updateSetting = it != m_updateSettings.end()
? it.value() : MaemoDeployableListModel::AskToUpdateProFile;
? it.value() : DeployableFilesPerProFile::AskToUpdateProFile;
}
MaemoDeployableListModel *const newModel
= new MaemoDeployableListModel(m_target, proFileNode, updateSetting, this);
DeployableFilesPerProFile *const newModel
= new DeployableFilesPerProFile(m_target, proFileNode, updateSetting, this);
m_listModels << newModel;
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();
}
bool MaemoDeployables::isModified() const
bool DeploymentInfo::isModified() const
{
foreach (const MaemoDeployableListModel *model, m_listModels) {
foreach (const DeployableFilesPerProFile *model, m_listModels) {
if (model->isModified())
return true;
}
return false;
}
int MaemoDeployables::deployableCount() const
int DeploymentInfo::deployableCount() const
{
int count = 0;
foreach (const MaemoDeployableListModel *model, m_listModels)
foreach (const DeployableFilesPerProFile *model, m_listModels)
count += model->rowCount();
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);
if (i < model->rowCount())
return model->deployableAt(i);
@@ -181,29 +182,29 @@ MaemoDeployable MaemoDeployables::deployableAt(int i) const
}
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)
return model->remoteExecutableFilePath();
}
return QString();
}
int MaemoDeployables::rowCount(const QModelIndex &parent) const
int DeploymentInfo::rowCount(const QModelIndex &parent) const
{
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()
|| index.column() != 0)
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
&& !model->hasTargetPath()) {
QBrush brush;
@@ -216,4 +217,3 @@ QVariant MaemoDeployables::data(const QModelIndex &index, int role) const
}
} // namespace RemoteLinux
} // namespace Internal

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -44,17 +44,18 @@ namespace Ui {
QT_END_NAMESPACE
namespace RemoteLinux {
class DeployableFilesPerProFile;
namespace Internal {
class MaemoDeployableListModel;
class MaemoProFilesUpdateDialog : public QDialog
{
Q_OBJECT
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);
~MaemoProFilesUpdateDialog();
QList<UpdateSetting> getUpdateSettings() const;
@@ -64,7 +65,7 @@ private:
Q_SLOT void uncheckAll();
void setCheckStateForAll(Qt::CheckState checkState);
const QList<MaemoDeployableListModel *> m_models;
const QList<DeployableFilesPerProFile *> m_models;
Ui::MaemoProFilesUpdateDialog *ui;
};

View File

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

View File

@@ -52,7 +52,7 @@ MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
void MaemoRemoteCopyFacility::copyFiles(const SshConnection::Ptr &connection,
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(!m_isCopying);
@@ -128,7 +128,7 @@ void MaemoRemoteCopyFacility::copyNextFile()
return;
}
const MaemoDeployable &d = m_deployables.first();
const DeployableFile &d = m_deployables.first();
QString sourceFilePath = m_mountPoint;
#ifdef Q_OS_WIN
const QString localFilePath = QDir::fromNativeSeparators(d.localFilePath);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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