REMOVE old QT<= 5.14 code

Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
This commit is contained in:
Andrea
2025-03-01 09:17:30 +01:00
parent e8fe364090
commit 2d4ab5af20
47 changed files with 22 additions and 467 deletions

View File

@@ -205,45 +205,7 @@ void MenuManager::setup(MenuItem* menuItems) const
QMenuBar* menuBar = getMainWindow()->menuBar();
#if 0
#if defined(FC_OS_MACOSX) && QT_VERSION >= 0x050900
// Unknown Qt macOS bug observed with Qt >= 5.9.4 causes random crashes when viewing reused top level menus.
menuBar->clear();
#endif
// On Kubuntu 18.10 global menu has issues with FreeCAD 0.18 menu bar.
// Optional parameter, clearing the menu bar, can be set as a workaround.
// Clearing the menu bar can cause issues, when trying to access menu bar through Python.
// https://forum.freecad.org/viewtopic.php?f=10&t=30340&start=440#p289330
if (App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/MainWindow")->GetBool("ClearMenuBar",false)) {
menuBar->clear();
}
#else
// In addition to the reason described in the above comments, there is
// another more subtle one that's making clearing menu bar a necessity for
// all platforms.
//
// By right, it should be fine for more than one command action having the
// same shortcut but in different workbench. It should not require manual
// conflict resolving in this case, as the action in an inactive workbench
// is expected to be inactive as well, or else user may experience
// seemingly random shortcut miss firing based on the order he/she
// switches workbenches. In fact, this may be considered as an otherwise
// difficult to implement feature of context aware shortcut, where a
// specific shortcut can activate different actions under different
// workbenches.
//
// This works as expected for action adding to a toolbar. As Qt will ignore
// actions inside an invisible toolbar. However, Qt refuse to do the same
// for actions in a hidden menu action of a menu bar. This is very likely a
// Qt bug, as the behavior does not seem to conform to Qt's documentation
// of Qt::ShortcutContext.
//
// Clearing the menu bar, and recreate it every time when switching
// workbench with only the active actions can solve this problem.
menuBar->clear();
#endif
QList<QAction*> actions = menuBar->actions();
for (auto& item : menuItems->getItems())