diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-06-07 17:11:34 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-06-07 17:11:34 +0200 |
commit | 45b4c8cb23aa0ca90980c09f183b4815109ff514 (patch) | |
tree | 6b5dced64ed28e2213c2cd2e9426ac5b1fdd7f62 | |
parent | 75c996e7430a2609a83539d1ef199bd52e722d04 (diff) | |
parent | 590d2e313c5a10dc9c7d61a654ada451e5df82aa (diff) | |
download | qtwayland-45b4c8cb23aa0ca90980c09f183b4815109ff514.tar.gz |
Merge 5.11 into 5.11.1
Change-Id: I3d3cc001320febd64529f0997b88efd69303fa30
-rw-r--r-- | dist/changes-5.9.5 | 33 | ||||
-rw-r--r-- | dist/changes-5.9.6 | 30 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 13 | ||||
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 11 |
4 files changed, 86 insertions, 1 deletions
diff --git a/dist/changes-5.9.5 b/dist/changes-5.9.5 new file mode 100644 index 00000000..403b1dca --- /dev/null +++ b/dist/changes-5.9.5 @@ -0,0 +1,33 @@ +Qt 5.9.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. Exception: +between Qt 5.8.0 and 5.9.0 the QWaylandQuickOutput class was changed +in a binary incompatible way. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt Wayland QPA Plugin 5.9.5 Changes * +**************************************************************************** + + - [QTBUG-66687] Fixed a crash that happened sometimes when a window was shown. + - [QTBUG-66867] Fixed a crash when a hidden window was destroyed (EGL). + +**************************************************************************** +* Qt Wayland Compositor API 5.9.5 Changes * +**************************************************************************** + + - Minor documentation improvements. diff --git a/dist/changes-5.9.6 b/dist/changes-5.9.6 new file mode 100644 index 00000000..0ce68e7e --- /dev/null +++ b/dist/changes-5.9.6 @@ -0,0 +1,30 @@ +Qt 5.9.6 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0 through 5.9.5. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.9.6 Changes * +**************************************************************************** + +QPA plugin +---------- + + - [QTBUG-63411] Fixed a crash when calling setVisible for EGL windows twice + within one slot. + - [QTBUG-67150] Fixed a crash when a popup was shown without any input + events happening first. diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index fdfd6668..5d658f67 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -287,7 +287,18 @@ void QWaylandWindow::setWindowTitle(const QString &title) { if (mShellSurface) { const QString separator = QString::fromUtf8(" \xe2\x80\x94 "); // unicode character U+2014, EM DASH - mShellSurface->setTitle(formatWindowTitle(title, separator)); + const QString formatted = formatWindowTitle(title, separator); + + const int libwaylandMaxBufferSize = 4096; + // Some parts of the buffer is used for metadata, so subtract 100 to be on the safe side + const int maxLength = libwaylandMaxBufferSize - 100; + + auto truncated = QStringRef(&formatted).left(maxLength); + if (truncated.length() < formatted.length()) { + qCWarning(lcQpaWayland) << "Window titles longer than" << maxLength << "characters are not supported." + << "Truncating window title (from" << formatted.length() << "chars)"; + } + mShellSurface->setTitle(truncated.toString()); } if (mWindowDecoration && window()->isVisible()) diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index a8e2d5e1..dcc0cb77 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -181,6 +181,7 @@ private slots: void hiddenTransientParent(); void hiddenPopupParent(); void glWindow(); + void longWindowTitle(); private: MockCompositor *compositor = nullptr; @@ -582,6 +583,16 @@ void tst_WaylandClient::glWindow() QTRY_VERIFY(!compositor->surface()); } +void tst_WaylandClient::longWindowTitle() +{ + // See QTBUG-68715 + QWindow window; + QString absurdlyLongTitle(10000, QLatin1Char('z')); + window.setTitle(absurdlyLongTitle); + window.show(); + QTRY_VERIFY(compositor->surface()); +} + int main(int argc, char **argv) { setenv("XDG_RUNTIME_DIR", ".", 1); |