summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qt-maemo
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-05-05 17:43:52 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-05-05 17:44:27 +0200
commit6b5ce26bf68662b7fbf27cc90a1427e33c4e31ca (patch)
treeaea97b67d6fdb46ee4143b36c525addfb330f3c5 /src/plugins/qt4projectmanager/qt-maemo
parente751a135db5e86cf1fd1e7dd90bd7104d0423fdb (diff)
downloadqt-creator-6b5ce26bf68662b7fbf27cc90a1427e33c4e31ca.tar.gz
Maemo: Adapt list of deployables for "aux" project.
Diffstat (limited to 'src/plugins/qt4projectmanager/qt-maemo')
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp5
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h1
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp19
3 files changed, 16 insertions, 9 deletions
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
index f3d6b3a4a4..40e6725c4b 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
@@ -85,7 +85,7 @@ bool MaemoDeployableListModel::buildModel()
const QStringList deployInfo = QStringList() << remoteDir
<< QLatin1String("INSTALLS += target");
return addLinesToProFile(deployInfo);
- } else {
+ } else if (m_projectType != AuxTemplate) {
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
m_installsList.targetPath));
}
@@ -209,7 +209,8 @@ void MaemoDeployableListModel::setProFileUpdateSetting(ProFileUpdateSetting upda
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();
}
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h
index 88b4ee2dbc..07b2b4427b 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h
@@ -70,6 +70,7 @@ public:
QString projectName() const { return m_projectName; }
QString projectDir() const;
QString proFilePath() const { return m_proFilePath; }
+ Qt4ProjectType projectType() const { return m_projectType; }
bool isApplicationProject() const { return m_projectType == ApplicationTemplate; }
QString applicationName() const { return m_targetInfo.target; }
bool hasTargetPath() const { return m_hasTargetPath; }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp
index fa25b83ba6..121b5aaf28 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp
@@ -118,12 +118,16 @@ void MaemoDeployables::createModels(const Qt4ProFileNode *proFileNode)
switch (proFileNode->projectType()) {
case ApplicationTemplate:
case LibraryTemplate:
- case ScriptTemplate: {
- UpdateSettingsMap::ConstIterator it
- = m_updateSettings.find(proFileNode->path());
- const MaemoDeployableListModel::ProFileUpdateSetting updateSetting
- = it != m_updateSettings.end()
- ? it.value() : MaemoDeployableListModel::AskToUpdateProFile;
+ case AuxTemplate: {
+ MaemoDeployableListModel::ProFileUpdateSetting updateSetting;
+ if (proFileNode->projectType() == AuxTemplate) {
+ updateSetting = MaemoDeployableListModel::DontUpdateProFile;
+ } else {
+ UpdateSettingsMap::ConstIterator it
+ = m_updateSettings.find(proFileNode->path());
+ updateSetting = it != m_updateSettings.end()
+ ? it.value() : MaemoDeployableListModel::AskToUpdateProFile;
+ }
MaemoDeployableListModel *const newModel
= new MaemoDeployableListModel(proFileNode, updateSetting, this);
m_listModels << newModel;
@@ -201,7 +205,8 @@ QVariant MaemoDeployables::data(const QModelIndex &index, int role) const
|| index.column() != 0)
return QVariant();
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;
brush.setColor(Qt::red);
return brush;