forked from qt-creator/qt-creator
Attach to Core: Fix remote core file selection
Change-Id: I32268f3dc87649bc71eed566f1acfb1d9e80e86a Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -191,9 +191,8 @@ void SelectRemoteFileDialog::handleRemoteError(const QString &errorMessage)
|
|||||||
|
|
||||||
void SelectRemoteFileDialog::selectFile()
|
void SelectRemoteFileDialog::selectFile()
|
||||||
{
|
{
|
||||||
const QModelIndexList indexes =
|
QModelIndex idx = m_model.mapToSource(m_fileSystemView->currentIndex());
|
||||||
m_fileSystemView->selectionModel()->selectedIndexes();
|
if (!idx.isValid())
|
||||||
if (indexes.empty())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||||
@@ -208,7 +207,6 @@ void SelectRemoteFileDialog::selectFile()
|
|||||||
m_localFile = localFile.fileName();
|
m_localFile = localFile.fileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex idx = indexes.at(0);
|
|
||||||
idx = idx.sibling(idx.row(), 1);
|
idx = idx.sibling(idx.row(), 1);
|
||||||
m_remoteFile = m_fileSystemModel.data(idx, SftpFileSystemModel::PathRole).toString();
|
m_remoteFile = m_fileSystemModel.data(idx, SftpFileSystemModel::PathRole).toString();
|
||||||
m_sftpJobId = m_fileSystemModel.downloadFile(idx, m_localFile);
|
m_sftpJobId = m_fileSystemModel.downloadFile(idx, m_localFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user