Commit Graph

15 Commits

Author SHA1 Message Date
Zheng, Lei
7458912b33 Gui: fix shortcut context handling in ShortcutManager
Related #6097

Qt ignores shortcut of actions in invisible toolbar, but not for actions
in a hidden menu action of menu bar, which is likely a Qt bug. The
desired behavior should be that of toolbar actions, so that actions
belong to different workbenches can have the same shortcut without
conflict.

This commit works around this inconsistency by ensuring only the active
actions are added in menu bar. In addition, all active actions will be
added to a zero sized child widget of the main window, which ensures the
shortcuts of these actions being active regardless whether the action is
in toolbar or menu bar, visible or not.
2022-11-10 23:20:18 +01:00
Paddle
8d346f1bf5 Gui: Add setting enabling workbench selector to be on the menubar. Restart required. 2022-11-07 11:57:53 -05:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
wmayer
d5921e08ec fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
f60d67a121 [Gui] MDIView: remove unused includes 2022-03-05 02:10:24 +01:00
wmayer
07200f9260 Gui: extend Workbench class to allow to define permanent menu items 2022-02-14 16:47:32 +01:00
triplus
b0d83f3c5e Optional ClearMenuBar parameter
Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=34&t=34366

P.S. Note that some mixed line endings were detected in this file and were normalized automatically.
2019-02-28 03:15:13 +01:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Peter Lama
c3423ad8d8 Fix duplicate about entries in mac app menu
Clearing the menu bar does not remove the actions from the app menu,
but setting the action role allows Qt to take care of duplicates.
2018-03-30 10:47:19 -07:00
Peter Lama
129e2f7a1b Workaround Qt 5 macOS menu bug
With Qt => 5.9, it would randomly crash when opening a menu after changing workbenches.
Evidently it is a Qt macOS bug related to removing actions from menus.
Recreating the menus everytime avoids the issue.
2018-03-22 09:47:54 -07:00
wmayer
d2cb4e4af9 Qt4/Qt5 neutral changes:
+ remove QCoreApplication::UnicodeUTF8/QApplication::UnicodeUTF8
+ remove QCoreApplication::CodecForTr/QApplication::CodecForTr
2016-12-12 14:52:09 +01:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
wmayer
3cc9818713 0000903: V0.13 - Change Individual face color on solid is missing (finish this in 0.14) 2012-12-07 12:13:36 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00