Commit fc17ac2f authored by ck's avatar ck
Browse files

Maemo: Make deployables widget read-only.

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

Reviewed-by: kh1
parent 7d2f56d3
...@@ -62,10 +62,8 @@ bool MaemoDeployableListModel::buildModel() ...@@ -62,10 +62,8 @@ bool MaemoDeployableListModel::buildModel()
: QLatin1String("/usr/local/bin"); : QLatin1String("/usr/local/bin");
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(), m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
remoteDir)); remoteDir));
if (!m_proFileWrapper->addInstallsTarget(remoteDir)) { if (!m_proFileWrapper->addInstallsTarget(remoteDir))
qWarning("Error updating .pro file."); qWarning("Error updating .pro file.");
return false;
}
} else { } else {
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(), m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
installs.targetPath)); installs.targetPath));
...@@ -150,8 +148,8 @@ QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) cons ...@@ -150,8 +148,8 @@ QVariant MaemoDeployableListModel::data(const QModelIndex &index, int role) cons
Qt::ItemFlags MaemoDeployableListModel::flags(const QModelIndex &index) const Qt::ItemFlags MaemoDeployableListModel::flags(const QModelIndex &index) const
{ {
Qt::ItemFlags parentFlags = QAbstractTableModel::flags(index); Qt::ItemFlags parentFlags = QAbstractTableModel::flags(index);
if (index.column() == 1) // if (index.column() == 1)
return parentFlags | Qt::ItemIsEditable; // return parentFlags | Qt::ItemIsEditable;
return parentFlags; return parentFlags;
} }
......
...@@ -60,6 +60,8 @@ MaemoDeployableListWidget::MaemoDeployableListWidget(QWidget *parent, ...@@ -60,6 +60,8 @@ MaemoDeployableListWidget::MaemoDeployableListWidget(QWidget *parent,
: QWidget(parent), m_ui(new Ui::MaemoDeployableListWidget), m_model(model) : QWidget(parent), m_ui(new Ui::MaemoDeployableListWidget), m_model(model)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->addFileButton->hide();
m_ui->removeFileButton->hide();
m_ui->deployablesView->setWordWrap(false); m_ui->deployablesView->setWordWrap(false);
m_ui->deployablesView->setModel(m_model); m_ui->deployablesView->setModel(m_model);
connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment