From fc17ac2f9e54df8800640ed0993740146bb28e5a Mon Sep 17 00:00:00 2001 From: ck <qt-info@nokia.com> Date: Thu, 8 Jul 2010 13:44:56 +0200 Subject: [PATCH] Maemo: Make deployables widget read-only. We don't have the API to sensibly support writing tot he project file. Reviewed-by: kh1 --- .../qt-maemo/maemodeployablelistmodel.cpp | 8 +++----- .../qt-maemo/maemodeployablelistwidget.cpp | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp index 920c61f075c..2d1be63adf4 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp @@ -62,10 +62,8 @@ bool MaemoDeployableListModel::buildModel() : QLatin1String("/usr/local/bin"); m_deployables.prepend(MaemoDeployable(localExecutableFilePath(), remoteDir)); - if (!m_proFileWrapper->addInstallsTarget(remoteDir)) { + if (!m_proFileWrapper->addInstallsTarget(remoteDir)) qWarning("Error updating .pro file."); - return false; - } } else { m_deployables.prepend(MaemoDeployable(localExecutableFilePath(), installs.targetPath)); @@ -150,8 +148,8 @@ QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) cons Qt::ItemFlags MaemoDeployableListModel::flags(const QModelIndex &index) const { Qt::ItemFlags parentFlags = QAbstractTableModel::flags(index); - if (index.column() == 1) - return parentFlags | Qt::ItemIsEditable; +// if (index.column() == 1) +// return parentFlags | Qt::ItemIsEditable; return parentFlags; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistwidget.cpp index 82fb469485a..df008ceebdb 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistwidget.cpp @@ -60,6 +60,8 @@ MaemoDeployableListWidget::MaemoDeployableListWidget(QWidget *parent, : QWidget(parent), m_ui(new Ui::MaemoDeployableListWidget), m_model(model) { m_ui->setupUi(this); + m_ui->addFileButton->hide(); + m_ui->removeFileButton->hide(); m_ui->deployablesView->setWordWrap(false); m_ui->deployablesView->setModel(m_model); connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), -- GitLab