From 9a5c1a32127489750574ac88bf43b8a6e493e3c5 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 16 Oct 2024 10:18:08 +0100 Subject: [PATCH] chore: Remove Wayland experimental pop --- src/lib/gui/core/WaylandWarnings.cpp | 9 ---- src/lib/gui/core/WaylandWarnings.h | 2 - src/lib/gui/messages.cpp | 11 ----- src/lib/gui/messages.h | 2 - .../gui/core/WaylandWarningsTests.cpp | 42 ------------------- 5 files changed, 66 deletions(-) diff --git a/src/lib/gui/core/WaylandWarnings.cpp b/src/lib/gui/core/WaylandWarnings.cpp index 9137d50ce..beea755b1 100644 --- a/src/lib/gui/core/WaylandWarnings.cpp +++ b/src/lib/gui/core/WaylandWarnings.cpp @@ -31,10 +31,6 @@ void WaylandWarnings::Deps::showWaylandLibraryError(QWidget *parent) { messages::showWaylandLibraryError(parent); } -void WaylandWarnings::Deps::showWaylandExperimental(QWidget *parent) { - messages::showWaylandExperimental(parent); -} - // // WaylandWarnings // @@ -55,11 +51,6 @@ void WaylandWarnings::showOnce( } return; } - - if (!m_warningShown) { - m_warningShown = true; - m_pDeps->showWaylandExperimental(parent); - } } } // namespace deskflow::gui::core diff --git a/src/lib/gui/core/WaylandWarnings.h b/src/lib/gui/core/WaylandWarnings.h index a33ca64b2..21e952427 100644 --- a/src/lib/gui/core/WaylandWarnings.h +++ b/src/lib/gui/core/WaylandWarnings.h @@ -29,7 +29,6 @@ class WaylandWarnings { public: struct Deps { virtual ~Deps() = default; - virtual void showWaylandExperimental(QWidget *parent); virtual void showWaylandLibraryError(QWidget *parent); }; @@ -44,7 +43,6 @@ public: private: bool m_errorShown{false}; - bool m_warningShown{false}; std::shared_ptr m_pDeps; }; diff --git a/src/lib/gui/messages.cpp b/src/lib/gui/messages.cpp index 4b0278b27..1620eb0ed 100644 --- a/src/lib/gui/messages.cpp +++ b/src/lib/gui/messages.cpp @@ -285,17 +285,6 @@ void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath) { .arg(nativePath)); } -void showWaylandExperimental(QWidget *parent) { - QMessageBox::information( - parent, "Wayland support (experimental)", - QString( - "

Heads up!

" - "

Wayland support is experimental and contains bugs.

" - R"(

Please report bugs to us if you find any.

)" - "

Happy testing!

") - .arg(kAppName, kUrlHelp, kColorSecondary)); -} - void showWaylandLibraryError(QWidget *parent) { QMessageBox::critical( parent, "Library problem", diff --git a/src/lib/gui/messages.h b/src/lib/gui/messages.h index ee42c9108..15cd0fd62 100644 --- a/src/lib/gui/messages.h +++ b/src/lib/gui/messages.h @@ -52,8 +52,6 @@ bool showClearSettings(QWidget *parent); void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath); -void showWaylandExperimental(QWidget *parent); - void showWaylandLibraryError(QWidget *parent); bool showUpdateCheckOption(QWidget *parent); diff --git a/src/test/unittests/gui/core/WaylandWarningsTests.cpp b/src/test/unittests/gui/core/WaylandWarningsTests.cpp index 4bf3c2821..73b427776 100644 --- a/src/test/unittests/gui/core/WaylandWarningsTests.cpp +++ b/src/test/unittests/gui/core/WaylandWarningsTests.cpp @@ -27,7 +27,6 @@ using namespace deskflow::gui::core; namespace { struct MockDeps : public WaylandWarnings::Deps { - MOCK_METHOD(void, showWaylandExperimental, (QWidget *), (override)); MOCK_METHOD(void, showWaylandLibraryError, (QWidget *), (override)); }; @@ -72,32 +71,6 @@ TEST(WaylandWarningsTests, showOnce_serverNoPortalIc_showLibraryError) { nullptr, CoreProcess::Mode::Server, hasEi, hasPortal, hasPortalIC); } -TEST(WaylandWarningTests, showOnce_clientNoPortalIc_showExperimental) { - const auto deps = std::make_shared(); - const bool hasEi = true; - const bool hasPortal = true; - const bool hasPortalIC = false; - WaylandWarnings waylandWarnings(deps); - - EXPECT_CALL(*deps, showWaylandExperimental(nullptr)).Times(1); - - waylandWarnings.showOnce( - nullptr, CoreProcess::Mode::Client, hasEi, hasPortal, hasPortalIC); -} - -TEST(WaylandWarningsTests, showOnce_serverHasPortalIc_showExperimentalOnly) { - const auto deps = std::make_shared(); - const bool hasEi = true; - const bool hasPortal = true; - const bool hasPortalIC = true; - WaylandWarnings waylandWarnings(deps); - - EXPECT_CALL(*deps, showWaylandExperimental(nullptr)).Times(1); - - waylandWarnings.showOnce( - nullptr, CoreProcess::Mode::Server, hasEi, hasPortal, hasPortalIC); -} - TEST(WaylandWarningsTests, showOnce_failureCalledTwice_messageOnlyShownOnce) { const auto deps = std::make_shared(); const bool hasEi = false; @@ -112,18 +85,3 @@ TEST(WaylandWarningsTests, showOnce_failureCalledTwice_messageOnlyShownOnce) { waylandWarnings.showOnce( nullptr, CoreProcess::Mode::Server, hasEi, hasPortal, hasPortalIC); } - -TEST(WaylandWarningsTests, showOnce_successCalledTwice_messageOnlyShownOnce) { - const auto deps = std::make_shared(); - const bool hasEi = true; - const bool hasPortal = true; - const bool hasPortalIC = true; - WaylandWarnings waylandWarnings(deps); - - EXPECT_CALL(*deps, showWaylandExperimental(nullptr)).Times(1); - - waylandWarnings.showOnce( - nullptr, CoreProcess::Mode::Server, hasEi, hasPortal, hasPortalIC); - waylandWarnings.showOnce( - nullptr, CoreProcess::Mode::Server, hasEi, hasPortal, hasPortalIC); -}