forked from qt-creator/qt-creator
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 <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -933,5 +933,8 @@ int main(int argc, char **argv)
|
|||||||
// shutdown plugin manager on the exit
|
// shutdown plugin manager on the exit
|
||||||
QObject::connect(&app, &QCoreApplication::aboutToQuit, &pluginManager, &PluginManager::shutdown);
|
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());
|
return restarter.restartOrExit(app.exec());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user