chore: remove untriggerable wayland warnings

This commit is contained in:
sithlord48
2026-02-25 18:47:14 -05:00
committed by Nick Bolton
parent 9188d4b1c1
commit a0a28e7a94
13 changed files with 0 additions and 119 deletions

View File

@ -58,8 +58,6 @@ add_library(${target} STATIC
core/ServerConnection.h
core/ServerMessage.cpp
core/ServerMessage.h
core/WaylandWarnings.cpp
core/WaylandWarnings.h
dialogs/AboutDialog.cpp
dialogs/AboutDialog.h
dialogs/AboutDialog.ui

View File

@ -892,9 +892,6 @@ void MainWindow::coreProcessStateChanged(ProcessState state)
m_actionStopCore->setEnabled(true);
if (state == Starting) {
if (deskflow::platform::isWayland()) {
m_waylandWarnings.showOnce(this);
}
saveSettings();
}

View File

@ -24,7 +24,6 @@
#include "gui/core/CoreProcess.h"
#include "gui/core/NetworkMonitor.h"
#include "gui/core/ServerConnection.h"
#include "gui/core/WaylandWarnings.h"
#include "net/Fingerprint.h"
#ifdef Q_OS_MACOS
@ -193,7 +192,6 @@ private:
bool m_secureSocket = false;
bool m_saveOnExit = true;
bool m_clientErrorVisible = false;
deskflow::gui::core::WaylandWarnings m_waylandWarnings;
ServerConfig m_serverConfig;
deskflow::gui::CoreProcess m_coreProcess;
deskflow::gui::ServerConnection m_serverConnection;

View File

@ -8,7 +8,6 @@
#include "Logger.h"
#include "common/Enums.h"
#include "common/Settings.h"
#include "common/UrlConstants.h"
#include "common/VersionInfo.h"
@ -225,24 +224,6 @@ void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath)
QMessageBox::information(parent, title, message);
}
void showWaylandLibraryError(QWidget *parent)
{
QMessageBox::critical(
parent, kAppName,
QObject::tr(
"<p>Sorry, while this version of %1 does support Wayland, "
"this build was not linked with one or more of the required "
"libraries.</p>"
"<p>Please either switch to X from your login screen or use a build "
"that uses the correct libraries.</p>"
"<p>If you think this is incorrect, please "
R"(<a href="%2">report a bug</a>.</p>)"
"<p>Please check the logs for more information.</p>"
)
.arg(kAppName, kUrlHelp)
);
}
bool showUpdateCheckOption(QWidget *parent)
{
QMessageBox message(parent);

View File

@ -31,8 +31,6 @@ bool showClearSettings(QWidget *parent);
void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath);
void showWaylandLibraryError(QWidget *parent);
bool showUpdateCheckOption(QWidget *parent);
bool showDaemonOffline(QWidget *parent);

View File

@ -1,30 +0,0 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
* SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#include "WaylandWarnings.h"
#include "Messages.h"
#include "common/Settings.h"
namespace deskflow::gui::core {
void WaylandWarnings::showOnce(QWidget *parent)
{
const auto mode = Settings::value(Settings::Core::CoreMode).value<Settings::CoreMode>();
if (!m_hasEi || !m_hasPortal || mode == Settings::CoreMode::Server) {
if (!m_errorShown) {
m_errorShown = true;
messages::showWaylandLibraryError(parent);
} else {
qWarning("missing required wayland lib(s) or feature");
}
return;
}
}
} // namespace deskflow::gui::core

View File

@ -1,37 +0,0 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
* SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#pragma once
#include <QWidget>
namespace deskflow::gui::core {
class WaylandWarnings
{
public:
explicit WaylandWarnings() = default;
void showOnce(QWidget *parent);
private:
bool m_errorShown{false};
#if WINAPI_LIBEI
const bool m_hasEi = true;
#else
const bool m_hasEi = false;
#endif
#if WINAPI_LIBPORTAL
const bool m_hasPortal = true;
#else
const bool m_hasPortal = false;
#endif
};
} // namespace deskflow::gui::core

View File

@ -654,10 +654,6 @@ Nombres válidos:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation type="unfinished">&lt;p&gt;Las configuraciones son de solo lectura porque solo tiene acceso de lectura al archivo:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt;Lo sentimos, aunque esta versión de %1 es compatible con Wayland, esta compilación no se vinculó con una o más de las bibliotecas requeridas.&lt;/p&gt;&lt;p&gt;Cambie a X desde su pantalla de inicio de sesión o use una compilación que use las bibliotecas correctas.&lt;/p&gt;&lt;p&gt;Si cree que esto es incorrecto, &lt;a href=&quot;%2&quot;&gt;informe un error&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Consulte los registros para obtener más información.&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation type="unfinished">No, gracias</translation>

View File

@ -654,10 +654,6 @@ Nomi validi:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;Le impostazioni sono di sola lettura perché hai solo accesso in lettura al file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt;Siamo spiacenti, sebbene questa versione di %1 supporti Wayland, questa build non è stata collegata a una o più librerie richieste.&lt;/p&gt;&lt;p&gt;Passa a X dalla schermata di accesso o usa una build che utilizzi le librerie corrette.&lt;/p&gt;&lt;p&gt;Se ritieni che ciò sia errato, &lt;a href=&quot;%2&quot;&gt;segnala un bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Controlla i log per maggiori informazioni.&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation>No, grazie</translation>

View File

@ -656,10 +656,6 @@ Valid names:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt; %1 Wayland &lt;/p&gt;&lt;p&gt; X 使&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;%2&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation></translation>

View File

@ -654,10 +654,6 @@ Valid names:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt; :&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt; %1() Wayland를 , .&lt;/p&gt;&lt;p&gt; X .&lt;/p&gt;&lt;p&gt; &lt;a href=&quot;%2&quot;&gt; &lt;/a&gt; .&lt;/p&gt;&lt;p&gt; .&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation></translation>

View File

@ -654,10 +654,6 @@ Valid names:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;Настройки доступны только для чтения, так как у вас есть доступ только на чтение к файлу:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt;Хотя эта версия %1 поддерживает Wayland, данная сборка не была слинкована с необходимыми библиотеками.&lt;/p&gt;&lt;p&gt;Пожалуйста, переключитесь на сессию X11 или используйте сборку с поддержкой нужных библиотек.&lt;/p&gt;&lt;p&gt;Если вы считаете это ошибкой, пожалуйста, &lt;a href=&quot;%2&quot;&gt;сообщите о ней&lt;/a&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation>Нет, спасибо</translation>

View File

@ -656,10 +656,6 @@ Valid names:
<source>&lt;p&gt;Settings are read-only because you only have read access to the file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.&lt;/p&gt;&lt;p&gt;Please either switch to X from your login screen or use a build that uses the correct libraries.&lt;/p&gt;&lt;p&gt;If you think this is incorrect, please &lt;a href=&quot;%2&quot;&gt;report a bug&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please check the logs for more information.&lt;/p&gt;</source>
<translation>&lt;p&gt; %1 Wayland&lt;/p&gt;&lt;p&gt; X使&lt;/p&gt;&lt;p&gt; &lt;a href=&quot;%2&quot;&gt; Bug&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</translation>
</message>
<message>
<source>No thanks</source>
<translation></translation>