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()
|
||||
{
|
||||
const QModelIndexList indexes =
|
||||
m_fileSystemView->selectionModel()->selectedIndexes();
|
||||
if (indexes.empty())
|
||||
QModelIndex idx = m_model.mapToSource(m_fileSystemView->currentIndex());
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
|
||||
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
@@ -208,7 +207,6 @@ void SelectRemoteFileDialog::selectFile()
|
||||
m_localFile = localFile.fileName();
|
||||
}
|
||||
|
||||
QModelIndex idx = indexes.at(0);
|
||||
idx = idx.sibling(idx.row(), 1);
|
||||
m_remoteFile = m_fileSystemModel.data(idx, SftpFileSystemModel::PathRole).toString();
|
||||
m_sftpJobId = m_fileSystemModel.downloadFile(idx, m_localFile);
|
||||
|
||||
Reference in New Issue
Block a user