Commit 64fb6409 authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Tomaz Canabrava
Browse files

Fix demo_konsolepart crash

Apply the same fix at a6b2bd53 to demo_konsolepart:

    Basically to use QWidget::windowHandle() to get a QWindow*, we need
    to first set the Qt::WA_NativeWindow attribute on the QWidget. See:
    https://phabricator.kde.org/D23108
parent 1d6da99c
Pipeline #188472 passed with stage
in 2 minutes and 23 seconds
......@@ -34,6 +34,11 @@ demo_konsolepart::demo_konsolepart()
{
const bool useTranslucency = KWindowSystem::compositingActive();
// Set the WA_NativeWindow attribute to force the creation of the QWindow.
// Without this QWidget::windowHandle() returns 0.
// See https://phabricator.kde.org/D23108
setAttribute(Qt::WA_NativeWindow);
setAttribute(Qt::WA_TranslucentBackground, useTranslucency);
setAttribute(Qt::WA_NoSystemBackground, false);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment