mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
remove ztoast temporarily
This commit is contained in:
+2
-2
@@ -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
|
||||
)
|
||||
|
||||
+29
-28
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user