diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index c6740d2ace..6aed3e385e 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -556,9 +556,7 @@ void TestShellClient::testCaptionSimplified() shellSurface->setTitle(origTitle); auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(c); - QEXPECT_FAIL("", "BUG 323798", Continue); QVERIFY(c->caption() != origTitle); - QEXPECT_FAIL("", "BUG 323798", Continue); QCOMPARE(c->caption(), origTitle.simplified()); } diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index 0ca060ca7e..f391b80d15 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -111,9 +111,7 @@ void X11ClientTest::testCaptionSimplified() Client *client = windowCreatedSpy.first().first().value(); QVERIFY(client); QCOMPARE(client->window(), w); - QEXPECT_FAIL("", "BUG 323798", Continue); QVERIFY(client->caption() != QString::fromUtf8(origTitle)); - QEXPECT_FAIL("", "BUG 323798", Continue); QCOMPARE(client->caption(), QString::fromUtf8(origTitle).simplified()); // and destroy the window again diff --git a/client.cpp b/client.cpp index 8ae4d9e172..ef51aa2fa3 100644 --- a/client.cpp +++ b/client.cpp @@ -1417,9 +1417,9 @@ void Client::fetchName() QString Client::readName() const { if (info->name() && info->name()[0] != '\0') - return QString::fromUtf8(info->name()); + return QString::fromUtf8(info->name()).simplified(); else - return KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_NAME); + return KWindowSystem::readNameProperty(window(), XCB_ATOM_WM_NAME).simplified(); } // The list is taken from http://www.unicode.org/reports/tr9/ (#154840) diff --git a/shell_client.cpp b/shell_client.cpp index 8315725801..e41efb0a56 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -90,12 +90,12 @@ ShellClient::~ShellClient() = default; template void ShellClient::initSurface(T *shellSurface) { - m_caption = shellSurface->title(); + m_caption = shellSurface->title().simplified(); connect(shellSurface, &T::titleChanged, this, &ShellClient::captionChanged); connect(shellSurface, &T::destroyed, this, &ShellClient::destroyClient); connect(shellSurface, &T::titleChanged, this, [this] (const QString &s) { - m_caption = s; + m_caption = s.simplified(); emit captionChanged(); } );