mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
Refactor network device management and SSH terminal integration
- Removed the old NetworkDeviceManager class and replaced it with a new NetworkDeviceProvider class to streamline network device handling. - Updated various widgets (NetworkDevicesToConnectWidget, NetworkDevicesWidget, SSHTerminalTool) to utilize the new NetworkDeviceProvider for device management. - Introduced a new SSHTerminalTool class to manage SSH connections, replacing the OpenSSHTerminalWidget. - Enhanced device selection UI to support both wired and wireless devices, including manual IP connection options. - Improved signal-slot connections for device addition and removal events. - Cleaned up unnecessary includes and code related to the old SSH terminal widget. - Added checks for device jailbreak status during SSH connection attempts.
This commit is contained in:
+9
-3
@@ -37,7 +37,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "appcontext.h"
|
||||
#include "networkdevicemanager.h"
|
||||
#include "networkdeviceswidget.h"
|
||||
#include "settingsmanager.h"
|
||||
#include "statusballoon.h"
|
||||
@@ -418,8 +417,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Add a wireless device
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
connect(NetworkDeviceManager::sharedInstance(),
|
||||
&NetworkDeviceManager::deviceAdded, this,
|
||||
connect(NetworkDeviceProvider::sharedInstance(),
|
||||
&NetworkDeviceProvider::deviceAdded, this,
|
||||
[this](const NetworkDevice &device) {
|
||||
if (auto existingDevice =
|
||||
AppContext::sharedInstance()->getDeviceByMacAddress(
|
||||
@@ -517,6 +516,13 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
void MainWindow::raiseDeviceTab()
|
||||
{
|
||||
m_ZTabWidget->setCurrentIndex(0);
|
||||
raise();
|
||||
activateWindow();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
#ifdef ENABLE_RECOVERY_DEVICE_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user