feat: Add import functionality to ExportManager and related components

- Introduced ImportJob and ImportItem structures to handle import tasks.
- Enhanced ExportManagerThread to support import operations, including job queuing and progress tracking.
- Updated ServiceManager to facilitate file imports with optional AFC client handling.
- Modified ImageLoader and ImageTask to accommodate alternative AFC client for image loading.
- Implemented UI updates in StatusBalloon to reflect import process status alongside export.
- Refactored existing code to improve readability and maintainability, including the removal of unused variables and comments.
- Added a new loading icon label for better user feedback during import operations.
- Updated gallery widget to streamline export item creation by removing unnecessary index tracking.
- Enhanced error handling and logging for file operations during import and export processes.
This commit is contained in:
uncor3
2026-03-20 03:05:57 +00:00
parent ddcaab6f4d
commit b989978668
26 changed files with 1054 additions and 479 deletions
+1 -3
View File
@@ -115,7 +115,6 @@ void ExportAlbum::getTotalPhotoCount(const QStringList &paths)
errorOccurred = true;
idevice_error_free(err);
} else {
int index = 0;
for (size_t i = 0; i < innerCount; ++i) {
const char *item = items[i];
if (!item) {
@@ -130,8 +129,7 @@ void ExportAlbum::getTotalPhotoCount(const QStringList &paths)
QString filePath = path + "/" + QString::fromUtf8(item);
m_exportItems.append(
ExportItem(filePath, fileName, m_device->udid, index));
++index;
ExportItem(filePath, fileName, m_device->udid));
}
free_directory_listing(items, innerCount);
count += innerCount;