Commit fb15ae2f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Attach to Core: Fix remote core file selection

Change-Id: I32268f3dc87649bc71eed566f1acfb1d9e80e86a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 67be4201
......@@ -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);
......
Markdown is supported
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