From b805603c58e64d63c4374ffb698aa513d73aa086 Mon Sep 17 00:00:00 2001 From: David Hurka Date: Sat, 19 Jun 2021 13:25:19 +0200 Subject: [PATCH] CursorWrapHelper: Do not crash on Wayland. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to https://bugs.kde.org/show_bug.cgi?id=437334 the cursor position is not necessarily known on Wayland. That would trigger the Q_ASSERT_X, so this patch removes it. This does not solve the problem that we can not wrap the cursor, but it prevents crashing Okular if using the debug build on Wayland. You’re reading rectangular text. BUG: 437334 CCBUG: 439471 --- part/cursorwraphelper.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/part/cursorwraphelper.cpp b/part/cursorwraphelper.cpp index 8bf8166cb..546f4a489 100644 --- a/part/cursorwraphelper.cpp +++ b/part/cursorwraphelper.cpp @@ -95,7 +95,6 @@ QScreen *CursorWrapHelper::getScreen() return screen; } } - Q_ASSERT_X(false, "CursorWrapHelper::getScreen()", "Found no screen containing QCursor::pos()"); return nullptr; }