[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 Nicolas Fella changed: What|Removed |Added Resolution|--- |FIXED Version Fixed In||Qt 6.7.2 Status|CONFIRMED |RESOLVED --- Comment #9 from Nicolas Fella --- This is fixed with https://codereview.qt-project.org/c/qt/qtbase/+/556573 -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 smow changed: What|Removed |Added CC||smowten...@protonmail.com -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 wolf.seif...@web.de changed: What|Removed |Added CC||wolf.seif...@web.de --- Comment #8 from wolf.seif...@web.de --- I totally agree: whether a kde dialog or a plain qt dialog is used should only change its look & feel, but not its behavior (especially if it is just a QFileDialog in code). I commented here https://bugs.kde.org/show_bug.cgi?id=483439#c14 and it was already mentioned here https://bugs.kde.org/show_bug.cgi?id=471941. But nothing happened. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 --- Comment #7 from Vladimir Golovnev --- I believe that the "platform theme" should be considered exactly as an extension of the Qt implementation. Therefore, it is completely unacceptable for it to make Qt's behavior so incorrect and unpredictable. The application should base its logic only on the Qt interface. And it is certainly not declared by its interface that the application can terminate when some dialog or system tray icon is closed. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 postix changed: What|Removed |Added CC||pos...@posteo.eu -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 --- Comment #6 from David Redondo --- But given that there was a Qt6 behavior change that causes problems I would be in favour of removing this. It's the apps job to not close and the correct thing is probably quitOnLastWindowClosed anyways. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 David Redondo changed: What|Removed |Added CC||k...@david-redondo.de --- Comment #5 from David Redondo --- // Ensure that closing the last KMainWindow doesn't exit the application // if a system tray icon is still present. QEventLoopLocker eventLoopLocker; One could argue it's not on the implementation to make sure apps dont quit when windows are closed. I couldn't find Qt documentation tthat QSystemTrayIcon would do that automatically either if that is required nor does KStatusNotifierItem. However changing that behavior seems like a behavior change as well... -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 Nate Graham changed: What|Removed |Added Severity|normal |crash -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 Anatoly changed: What|Removed |Added CC||liyiy26...@felibg.com --- Comment #4 from Anatoly --- This issue affects Telegram Desktop and qBittorrent: when disabling tray icon in settings app instantly closes. And when the icon is disabled its impossible to use file dialogs: app abruptly closes when selecting any file or closing file dialog. Below there is my MRE. Without setQuitOnLastWindowClosed(false) line all woks fine. But when you uncomment it and try to open file dialog (with disabled icon) app closes. But if you start with setQuitOnLastWindowClosed(false) and trayIcon->show() enabled the dialog works fine. main.cpp: ``` #include #include #include "Window.hpp" int main(int argc, char *argv[]) { const auto app = QApplication(argc, argv); /* QApplication::setQuitOnLastWindowClosed(false); */ Window window; window.show(); return app.exec(); } ``` Window.hpp: ``` #pragma once #include #include #include #include #include #include #include #include class Window : public QDialog { Q_OBJECT QCheckBox *showIconCheckBox; QSystemTrayIcon *trayIcon; QPushButton *button; public: Window() { showIconCheckBox = new QCheckBox("Show icon"); button = new QPushButton("Show dialog"); connect(button, ::clicked, this, [] { const auto fname = QFileDialog::getOpenFileName(); qInfo() << fname; }); const auto mainLayout = new QVBoxLayout; mainLayout->addWidget(showIconCheckBox); mainLayout->addWidget(button); setLayout(mainLayout); trayIcon = new QSystemTrayIcon(this); trayIcon->setIcon( QApplication::style()->standardIcon(QStyle::SP_TabCloseButton)); /* trayIcon->show(); */ showIconCheckBox->setChecked(trayIcon->isVisible()); connect(showIconCheckBox, ::toggled, trayIcon, ::setVisible); } }; ``` meson.build: ``` project( 'test-tray-icon', 'cpp', default_options: ['cpp_std=c++20']) qt6_mod = import('qt6') qt6_dep = dependency('qt6', modules: ['Core','Gui', 'Widgets']) processed = qt6_mod.preprocess( moc_headers : 'Window.hpp', ) executable('a', ['main.cpp', processed], dependencies: qt6_dep) ``` Alternative CMakeLists.txt: ``` cmake_minimum_required(VERSION 3.16) project(test-tray-icon LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_standard_project_setup() qt_add_executable(a main.cpp Window.hpp) target_link_libraries(a PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets) ``` -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 Nate Graham changed: What|Removed |Added CC||n...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 --- Comment #3 from Vladimir Golovnev --- I think I figured it out. Previously, `QCoreApplication::setQuitLockEnabled(false)` was implicitly set by `QGuiApplication::setQuitOnLastWindowClosed(false)`. I wonder if this was mentioned somewhere in the documentation? I didn't find it. Anyway, I don't think it's a good idea to use something like `QEventLoopLocker` at "platform theme" level. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 --- Comment #2 from Vladimir Golovnev --- >Because of a behavior change in Qt6 the application needs to set >QCoreApplication::setQuitLockEnabled(false) Could you please specify in more detail what exactly has been changed in Qt? Is QEventLoopLocker intended to quit the application if there are open windows? -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 Nicolas Fella changed: What|Removed |Added CC||nicolas.fe...@gmx.de --- Comment #1 from Nicolas Fella --- This has the same root cause as https://bugs.kde.org/show_bug.cgi?id=483757 The system tray implementation uses QEventLoopLocker internally, which triggers this behavior. Because of a behavior change in Qt6 the application needs to set QCoreApplication::setQuitLockEnabled(false) -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 484405] Application closes when deleting QSystemTrayIcon in Linux Plasma 6
https://bugs.kde.org/show_bug.cgi?id=484405 David Edmundson changed: What|Removed |Added CC||k...@davidedmundson.co.uk Ever confirmed|0 |1 Status|REPORTED|CONFIRMED Priority|NOR |VHI -- You are receiving this mail because: You are watching all bug changes.