mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
implement ServiceManager to handle services safely & cleanup UI
- Added `install_ipa.cpp` to handle IPA installation on iOS devices using the installation proxy. - Introduced `ServiceManager` class to centralize and thread-safely manage device service operations, including AFC file operations. - Updated `DeviceInfoWidget` layout for improved UI responsiveness. - Refactored `GalleryWidget`, `MediaStreamer`, `PhotoExportManager`, and `PhotoModel` to utilize `ServiceManager` for safer AFC operations. - Enhanced error handling and logging across various components. - Adjusted `ToolboxWidget` to streamline device change handling and UI updates.
This commit is contained in:
+4
-13
@@ -72,11 +72,8 @@ ToolboxWidget::ToolboxWidget(QWidget *parent) : QWidget{parent}
|
||||
updateDeviceList();
|
||||
updateToolboxStates();
|
||||
|
||||
// Connect to AppContext signals
|
||||
connect(AppContext::sharedInstance(), &AppContext::deviceAdded, this,
|
||||
&ToolboxWidget::onDeviceAdded);
|
||||
connect(AppContext::sharedInstance(), &AppContext::deviceRemoved, this,
|
||||
&ToolboxWidget::onDeviceRemoved);
|
||||
connect(AppContext::sharedInstance(), &AppContext::deviceChange, this,
|
||||
&ToolboxWidget::updateUI);
|
||||
}
|
||||
|
||||
void ToolboxWidget::setupUI()
|
||||
@@ -304,13 +301,7 @@ void ToolboxWidget::updateToolboxStates()
|
||||
}
|
||||
}
|
||||
|
||||
void ToolboxWidget::onDeviceAdded()
|
||||
{
|
||||
updateDeviceList();
|
||||
updateToolboxStates();
|
||||
}
|
||||
|
||||
void ToolboxWidget::onDeviceRemoved()
|
||||
void ToolboxWidget::updateUI()
|
||||
{
|
||||
updateDeviceList();
|
||||
updateToolboxStates();
|
||||
@@ -331,7 +322,7 @@ void ToolboxWidget::onDeviceSelectionChanged()
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_uuid.clear(); // No valid device selected
|
||||
m_uuid.clear();
|
||||
}
|
||||
|
||||
void ToolboxWidget::onToolboxClicked(iDescriptorTool tool)
|
||||
|
||||
Reference in New Issue
Block a user