mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
feat(export): update export logic
This commit is contained in:
@@ -297,7 +297,8 @@ void AfcExplorerWidget::onFileListContextMenu(const QPoint &pos)
|
|||||||
QString fileName = selItem->text();
|
QString fileName = selItem->text();
|
||||||
QString devicePath =
|
QString devicePath =
|
||||||
currPath == "/" ? "/" + fileName : currPath + fileName;
|
currPath == "/" ? "/" + fileName : currPath + fileName;
|
||||||
exportItems.append(ExportItem(devicePath, fileName, index));
|
exportItems.append(
|
||||||
|
ExportItem(devicePath, fileName, m_device->udid, index));
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,7 +355,8 @@ void AfcExplorerWidget::onExportClicked()
|
|||||||
QString fileName = item->text();
|
QString fileName = item->text();
|
||||||
QString devicePath =
|
QString devicePath =
|
||||||
currPath == "/" ? "/" + fileName : currPath + fileName;
|
currPath == "/" ? "/" + fileName : currPath + fileName;
|
||||||
exportItems.append(ExportItem(devicePath, fileName, index));
|
exportItems.append(
|
||||||
|
ExportItem(devicePath, fileName, m_device->udid, index));
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -232,12 +232,6 @@ void GalleryWidget::onExportSelected()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExportManager::sharedInstance()->isExporting()) {
|
|
||||||
QMessageBox::information(this, "Export in Progress",
|
|
||||||
"An export is already in progress.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndexList selectedIndexes =
|
QModelIndexList selectedIndexes =
|
||||||
m_listView->selectionModel()->selectedIndexes();
|
m_listView->selectionModel()->selectedIndexes();
|
||||||
QStringList filePaths = m_model->getSelectedFilePaths(selectedIndexes);
|
QStringList filePaths = m_model->getSelectedFilePaths(selectedIndexes);
|
||||||
@@ -259,7 +253,8 @@ void GalleryWidget::onExportSelected()
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
for (const QString &filePath : filePaths) {
|
for (const QString &filePath : filePaths) {
|
||||||
QString fileName = filePath.split('/').last();
|
QString fileName = filePath.split('/').last();
|
||||||
exportItems.append(ExportItem(filePath, fileName, index));
|
exportItems.append(
|
||||||
|
ExportItem(filePath, fileName, m_device->udid, index));
|
||||||
++index;
|
++index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user