forked from qt-creator/qt-creator
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:
@@ -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
|
|||||||
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,
|
|||||||
: 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)),
|
||||||
|
|||||||
Reference in New Issue
Block a user