From b22990c4cdcaa2b5d4c6a8983b7a06dd0c4ad1a4 Mon Sep 17 00:00:00 2001 From: uncor3 Date: Sun, 8 Feb 2026 00:52:47 +0000 Subject: [PATCH] remove ztoast temporarily --- CMakeLists.txt | 4 +-- src/devicemenuwidget.cpp | 57 ++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30504b4..7376ec0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,7 +349,7 @@ endif() add_subdirectory(lib/uxplay) add_subdirectory(lib/ipatool-go) add_subdirectory(lib/zupdater) -add_subdirectory(lib/ztoast) +# add_subdirectory(lib/ztoast) if (WIN32) set(NO_DEPLOY_WIN_IFUSE ON) @@ -419,7 +419,7 @@ target_link_libraries(iDescriptor PRIVATE uxplay ipatool-go ZUpdater - ZToast + # ZToast ${IDEVICE_IMPLEMENTATION_LIBS} SQLite::SQLite3 ) diff --git a/src/devicemenuwidget.cpp b/src/devicemenuwidget.cpp index 444b303..1d4f1d6 100644 --- a/src/devicemenuwidget.cpp +++ b/src/devicemenuwidget.cpp @@ -18,7 +18,7 @@ */ #include "devicemenuwidget.h" -#include "Toast.h" +// #include "Toast.h" #include "cableinfowidget.h" #include "devdiskimageswidget.h" #include "iDescriptor.h" @@ -91,33 +91,34 @@ void DeviceMenuWidget::init() stackedWidget->removeWidget(loadingWidget); loadingWidget->deleteLater(); - if (m_device->deviceInfo.parsedDeviceVersion.major < 13) { - Toast *toast = new Toast(this); - toast->setAttribute(Qt::WA_DeleteOnClose); - toast->setDuration(8000); // Hide after 8 seconds - toast->setTitle("Not wireless compatible"); - toast->setText("This device is not wireless compatible."); - toast->setPosition(ToastPosition::BOTTOM_MIDDLE); - toast->show(); - } else { - if (m_device->deviceInfo.isWireless) - return; - bool enabled = ServiceManager::enableWirelessConnections(m_device); - Toast *toast = new Toast(this); - toast->setAttribute(Qt::WA_DeleteOnClose); - toast->setDuration(8000); // Hide after 8 seconds - toast->setPosition(ToastPosition::BOTTOM_MIDDLE); - if (enabled) { - toast->setTitle("Wireless connections enabled"); - toast->setText( - "You can now use wireless connections with this device."); - } else { - toast->setTitle("Failed to enable wireless connections"); - toast->setText( - "Could not enable wireless connections for this device."); - } - toast->show(); - } + // FIXME: toast really necessary here? + // if (m_device->deviceInfo.parsedDeviceVersion.major < 13) { + // Toast *toast = new Toast(this); + // toast->setAttribute(Qt::WA_DeleteOnClose); + // toast->setDuration(8000); // Hide after 8 seconds + // toast->setTitle("Not wireless compatible"); + // toast->setText("This device is not wireless compatible."); + // toast->setPosition(ToastPosition::BOTTOM_MIDDLE); + // toast->show(); + // } else { + // if (m_device->deviceInfo.isWireless) + // return; + // bool enabled = ServiceManager::enableWirelessConnections(m_device); + // Toast *toast = new Toast(this); + // toast->setAttribute(Qt::WA_DeleteOnClose); + // toast->setDuration(8000); // Hide after 8 seconds + // toast->setPosition(ToastPosition::BOTTOM_MIDDLE); + // if (enabled) { + // toast->setTitle("Wireless connections enabled"); + // toast->setText( + // "You can now use wireless connections with this device."); + // } else { + // toast->setTitle("Failed to enable wireless connections"); + // toast->setText( + // "Could not enable wireless connections for this device."); + // } + // toast->show(); + // } } void DeviceMenuWidget::switchToTab(const QString &tabName)