forked from qt-creator/qt-creator
Maemo: Adapt list of deployables for "aux" project.
This commit is contained in:
@@ -85,7 +85,7 @@ bool MaemoDeployableListModel::buildModel()
|
|||||||
const QStringList deployInfo = QStringList() << remoteDir
|
const QStringList deployInfo = QStringList() << remoteDir
|
||||||
<< QLatin1String("INSTALLS += target");
|
<< QLatin1String("INSTALLS += target");
|
||||||
return addLinesToProFile(deployInfo);
|
return addLinesToProFile(deployInfo);
|
||||||
} else {
|
} else if (m_projectType != AuxTemplate) {
|
||||||
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
|
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
|
||||||
m_installsList.targetPath));
|
m_installsList.targetPath));
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,8 @@ void MaemoDeployableListModel::setProFileUpdateSetting(ProFileUpdateSetting upda
|
|||||||
|
|
||||||
bool MaemoDeployableListModel::isEditable(const QModelIndex &index) const
|
bool MaemoDeployableListModel::isEditable(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
return index.row() == 0 && index.column() == 1
|
return m_projectType != AuxTemplate
|
||||||
|
&& index.row() == 0 && index.column() == 1
|
||||||
&& m_deployables.first().remoteDir.isEmpty();
|
&& m_deployables.first().remoteDir.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public:
|
|||||||
QString projectName() const { return m_projectName; }
|
QString projectName() const { return m_projectName; }
|
||||||
QString projectDir() const;
|
QString projectDir() const;
|
||||||
QString proFilePath() const { return m_proFilePath; }
|
QString proFilePath() const { return m_proFilePath; }
|
||||||
|
Qt4ProjectType projectType() const { return m_projectType; }
|
||||||
bool isApplicationProject() const { return m_projectType == ApplicationTemplate; }
|
bool isApplicationProject() const { return m_projectType == ApplicationTemplate; }
|
||||||
QString applicationName() const { return m_targetInfo.target; }
|
QString applicationName() const { return m_targetInfo.target; }
|
||||||
bool hasTargetPath() const { return m_hasTargetPath; }
|
bool hasTargetPath() const { return m_hasTargetPath; }
|
||||||
|
|||||||
@@ -118,12 +118,16 @@ void MaemoDeployables::createModels(const Qt4ProFileNode *proFileNode)
|
|||||||
switch (proFileNode->projectType()) {
|
switch (proFileNode->projectType()) {
|
||||||
case ApplicationTemplate:
|
case ApplicationTemplate:
|
||||||
case LibraryTemplate:
|
case LibraryTemplate:
|
||||||
case ScriptTemplate: {
|
case AuxTemplate: {
|
||||||
UpdateSettingsMap::ConstIterator it
|
MaemoDeployableListModel::ProFileUpdateSetting updateSetting;
|
||||||
= m_updateSettings.find(proFileNode->path());
|
if (proFileNode->projectType() == AuxTemplate) {
|
||||||
const MaemoDeployableListModel::ProFileUpdateSetting updateSetting
|
updateSetting = MaemoDeployableListModel::DontUpdateProFile;
|
||||||
= it != m_updateSettings.end()
|
} else {
|
||||||
? it.value() : MaemoDeployableListModel::AskToUpdateProFile;
|
UpdateSettingsMap::ConstIterator it
|
||||||
|
= m_updateSettings.find(proFileNode->path());
|
||||||
|
updateSetting = it != m_updateSettings.end()
|
||||||
|
? it.value() : MaemoDeployableListModel::AskToUpdateProFile;
|
||||||
|
}
|
||||||
MaemoDeployableListModel *const newModel
|
MaemoDeployableListModel *const newModel
|
||||||
= new MaemoDeployableListModel(proFileNode, updateSetting, this);
|
= new MaemoDeployableListModel(proFileNode, updateSetting, this);
|
||||||
m_listModels << newModel;
|
m_listModels << newModel;
|
||||||
@@ -201,7 +205,8 @@ QVariant MaemoDeployables::data(const QModelIndex &index, int role) const
|
|||||||
|| index.column() != 0)
|
|| index.column() != 0)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
const MaemoDeployableListModel *const model = m_listModels.at(index.row());
|
const MaemoDeployableListModel *const model = m_listModels.at(index.row());
|
||||||
if (role == Qt::ForegroundRole && !model->hasTargetPath()) {
|
if (role == Qt::ForegroundRole && model->projectType() != AuxTemplate
|
||||||
|
&& !model->hasTargetPath()) {
|
||||||
QBrush brush;
|
QBrush brush;
|
||||||
brush.setColor(Qt::red);
|
brush.setColor(Qt::red);
|
||||||
return brush;
|
return brush;
|
||||||
|
|||||||
Reference in New Issue
Block a user