fix: improve service availability checks

This commit is contained in:
uncor3
2026-04-09 11:42:57 +03:00
parent 6934d48bb3
commit 8a90ad3b5f
4 changed files with 12 additions and 5 deletions
+3 -4
View File
@@ -156,14 +156,13 @@ AirPlayWidget::AirPlayWidget(QWidget *parent)
setMinimumSize(0, 0);
});
/* FIXME: this can be handled better, add linux support */
/* FIXME: this can be handled better, also check for linux */
#ifdef WIN32
bool bonjour = IsBonjourServiceInstalled();
bool bonjour = IsBonjourServiceInstalled() == SERVICE_AVAILABLE;
if (!bonjour) {
QMessageBox::warning(
this, "Bonjour Service Not Installed",
"Bonjour service is not installed on your system. Please install "
"it to enable AirPlay functionality.");
"Bonjour service is not available on your system.");
DiagnoseDialog *diagnoseDialog = new DiagnoseDialog();
diagnoseDialog->show();
+1
View File
@@ -22,6 +22,7 @@
#include "iDescriptor-ui.h"
#include "qprocessindicator.h"
#include "service.h"
#include <QCheckBox>
#include <QCloseEvent>
#include <QComboBox>
+7 -1
View File
@@ -130,8 +130,9 @@ void iFuseWidget::setupUI()
QString defaultMountPath = QDir(homeDir).absoluteFilePath(productType);
m_mountPathLabel->setText(defaultMountPath);
/* FIXME: this can be handled better, also check for linux */
#ifdef WIN32
if (!IsWinFspInstalled()) {
if (IsWinFspInstalled() != SERVICE_AVAILABLE) {
DiagnoseDialog *diagnoseDialog = new DiagnoseDialog(this);
diagnoseDialog->setAttribute(Qt::WA_DeleteOnClose);
diagnoseDialog->show();
@@ -150,6 +151,11 @@ void iFuseWidget::updateDeviceComboBox()
m_mountButton->setEnabled(true);
for (std::shared_ptr<iDescriptorDevice> device : devices) {
if (device->deviceInfo.isWireless) {
continue; // Skip wireless devices since ifuse only works with USB
}
QString displayText =
QString::fromStdString(device->deviceInfo.productType) + " / " +
device->udid;
+1
View File
@@ -23,6 +23,7 @@
#include "appcontext.h"
#include "iDescriptor-ui.h"
#include "iDescriptor.h"
#include "service.h"
#include <QCheckBox>
#include <QComboBox>
#include <QDesktopServices>