Maemo: Make deployables widget read-only.

We don't have the API to sensibly support writing tot he project file.

Reviewed-by: kh1
This commit is contained in:
ck
2010-07-08 13:44:56 +02:00
parent 7d2f56d3df
commit fc17ac2f9e
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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)),