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/ServerConnection.h
core/ServerMessage.cpp core/ServerMessage.cpp
core/ServerMessage.h core/ServerMessage.h
core/WaylandWarnings.cpp
core/WaylandWarnings.h
dialogs/AboutDialog.cpp dialogs/AboutDialog.cpp
dialogs/AboutDialog.h dialogs/AboutDialog.h
dialogs/AboutDialog.ui dialogs/AboutDialog.ui

View file

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

View file

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

View file

@ -8,7 +8,6 @@
#include "Logger.h" #include "Logger.h"
#include "common/Enums.h"
#include "common/Settings.h" #include "common/Settings.h"
#include "common/UrlConstants.h" #include "common/UrlConstants.h"
#include "common/VersionInfo.h" #include "common/VersionInfo.h"
@ -225,24 +224,6 @@ void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath)
QMessageBox::information(parent, title, message); 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) bool showUpdateCheckOption(QWidget *parent)
{ {
QMessageBox message(parent); QMessageBox message(parent);

View file

@ -31,8 +31,6 @@ bool showClearSettings(QWidget *parent);
void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath); void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath);
void showWaylandLibraryError(QWidget *parent);
bool showUpdateCheckOption(QWidget *parent); bool showUpdateCheckOption(QWidget *parent);
bool showDaemonOffline(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> <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> <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>
<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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation type="unfinished">No, gracias</translation> <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> <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> <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>
<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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation>No, grazie</translation> <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> <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> <translation>&lt;p&gt;以下のファイルへの書き込み権限がないため、設定は読み取り専用です:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message> </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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation>不要です</translation> <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> <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> <translation>&lt;p&gt;다음 파일에 대한 쓰기 권한이 없어 설정이 읽기 전용입니다:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message> </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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation>아니요</translation> <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> <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> <translation>&lt;p&gt;Настройки доступны только для чтения, так как у вас есть доступ только на чтение к файлу:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message> </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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation>Нет, спасибо</translation> <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> <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> <translation>&lt;p&gt;设置是只读的,因为您对该文件只有读取权限:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message> </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> <message>
<source>No thanks</source> <source>No thanks</source>
<translation>不,谢谢</translation> <translation>不,谢谢</translation>