From a402c7b80163bb633aa9b991e9eb545535860008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 7 Jan 2013 19:50:47 +0100 Subject: [PATCH] don't use input windows on Qt < 4.8.3 According to aacid, it's been broken in every Qt version before BUG: 312784 REVIEW: 108249 --- client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/client.cpp b/client.cpp index 43296b3a06..0e9c10d0ce 100644 --- a/client.cpp +++ b/client.cpp @@ -353,8 +353,22 @@ void Client::destroyClient() deleteClient(this, Allowed); } +// DnD handling for input shaping is broken in the clients for all Qt versions before 4.8.3 +// NOTICE do not query the Qt version macro, this is a runtime problem! +// TODO KDE5 remove this +static inline bool qtBefore483() +{ + QStringList l = QString(qVersion()).split("."); + // "4.x.y" + return l.at(1).toUInt() < 5 && l.at(1).toUInt() < 9 && l.at(2).toUInt() < 3; +} + void Client::updateInputWindow() { + static bool brokenQtInputHandling = qtBefore483(); + if (brokenQtInputHandling) + return; + QRegion region; if (!noBorder()) {