From 99ff48ce4aa62fc6deaa3522cfeec7f0b2eda0bd Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 30 Oct 2024 11:41:21 +0100 Subject: [PATCH] CMake: fix crash after changing the cmake build directory The changes to the build directory line edit are applied automatically on focus out events. If the new directory does not exist a message box pops up asking the user whether to start a new configuration in the new path, this message box spawns a new eventloop. If the focus out event is triggered by opening a menu from the menubar a QAlphaWidget for the menu fade in animation is used. This gets deleted in the messag box event loop, but still gets used after the message box finishes. Workaround this by disabling menu fading effects on Windows. Fixes: QTCREATORBUG-31890 Task-number: QTBUG-130696 Change-Id: I98742136f3aa9fe5c42923478d9229a90c3eef05 Reviewed-by: Eike Ziller Reviewed-by: Christian Stenger --- src/app/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 8bfb8bb6093..c3531afd5a8 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -933,5 +933,8 @@ int main(int argc, char **argv) // shutdown plugin manager on the exit QObject::connect(&app, &QCoreApplication::aboutToQuit, &pluginManager, &PluginManager::shutdown); + if (Utils::HostOsInfo::isWindowsHost()) // Workaround for QTBUG-130696 and QTCREATORBUG-31890 + QApplication::setEffectEnabled(Qt::UI_FadeMenu, false); + return restarter.restartOrExit(app.exec()); }