Changeset View
Changeset View
Standalone View
Standalone View
debug_console.cpp
Show First 20 Lines • Show All 530 Lines • ▼ Show 20 Line(s) | 529 | } else { | |||
---|---|---|---|---|---|
531 | m_ui->glxExtensionsBox->setVisible(true); | 531 | m_ui->glxExtensionsBox->setVisible(true); | ||
532 | 532 | | |||
533 | m_ui->glxExtensionsLabel->setText(extensionsString(glxExtensions())); | 533 | m_ui->glxExtensionsLabel->setText(extensionsString(glxExtensions())); | ||
534 | } | 534 | } | ||
535 | 535 | | |||
536 | m_ui->openGLExtensionsLabel->setText(extensionsString(openGLExtensions())); | 536 | m_ui->openGLExtensionsLabel->setText(extensionsString(openGLExtensions())); | ||
537 | } | 537 | } | ||
538 | 538 | | |||
539 | void DebugConsole::showEvent(QShowEvent *event) | ||||
540 | { | ||||
541 | QWidget::showEvent(event); | ||||
542 | | ||||
543 | // delay the connection to the show event as in ctor the windowHandle returns null | ||||
544 | connect(windowHandle(), &QWindow::visibleChanged, this, | ||||
545 | [this] (bool visible) { | ||||
546 | if (visible) { | ||||
luebking: if (!visible) deleteLater(); ... ;-P | |||||
547 | // ignore | ||||
sebas: return? | |||||
luebking: Why not reimplment the hideEvent? | |||||
I tried implementing the hideEvent, but for whatever reason it didn't get triggered. graesslin: I tried implementing the hideEvent, but for whatever reason it didn't get triggered. | |||||
luebking: What about closeEvent? | |||||
graesslin: closeEvent is also not invoked. | |||||
luebking: iow QWidget is bitrot. Maybe better use QML ... :-( | |||||
It might be a bug in KWin's QPA, so I wouldn't blame Qt here (yet). graesslin: It might be a bug in KWin's QPA, so I wouldn't blame Qt here (yet). | |||||
luebking: Wouldn't that prevent the QWindow signal just as well? | |||||
Maybe, maybe not. That's the point I haven't investigated it and it might be that an additional call is required for QWidget to be supported. graesslin: Maybe, maybe not. That's the point I haven't investigated it and it might be that an additional… | |||||
548 | return; | ||||
549 | } | ||||
550 | deleteLater(); | ||||
551 | } | ||||
552 | ); | ||||
553 | } | ||||
554 | | ||||
539 | DebugConsoleDelegate::DebugConsoleDelegate(QObject *parent) | 555 | DebugConsoleDelegate::DebugConsoleDelegate(QObject *parent) | ||
540 | : QStyledItemDelegate(parent) | 556 | : QStyledItemDelegate(parent) | ||
541 | { | 557 | { | ||
542 | } | 558 | } | ||
543 | 559 | | |||
544 | DebugConsoleDelegate::~DebugConsoleDelegate() = default; | 560 | DebugConsoleDelegate::~DebugConsoleDelegate() = default; | ||
545 | 561 | | |||
546 | QString DebugConsoleDelegate::displayText(const QVariant &value, const QLocale &locale) const | 562 | QString DebugConsoleDelegate::displayText(const QVariant &value, const QLocale &locale) const | ||
▲ Show 20 Lines • Show All 901 Lines • Show Last 20 Lines |
if (!visible) deleteLater(); ... ;-P