macOS overhaul for QCachegrind
There are several changes
- Menu bar overhaul
- About (Qt)/Preferences/Quit are automatically rehomed to the Application menu.
- Because on macOS, the Settings menu would only have Sidebars as a result of the rehoming, both its options have been moved to View on all platforms. (This could be changed.)
- A close item has been added in the menu so that it appears on the menu/typical bindings for it work (^W), and Exit/Quit has been changed to close all windows instead.
- Menu icons are hidden on macOS since they look out of place.
- A window menu has been added to QCachegrind when running on macOS to fit with other macOS applications. It has a minimize and zoom (zoom is bound to maximize since that's the easy answer; these don't get used on other platforms since they aren't installed into the menus there) and a window list. (This could be useful to other platforms, and also could be ported back to KCachegrind too.)
- A macOS icon has been created.
- A plist and many of the details about the executable are tweaked for macOS to change the bundle name. This might be overreaching, so please let me know if it is.
- A proxy icon (for dragging the icon as if it were a Finder icon/path combobox) is used through setting the file path on the window, then we set our proper caption afterwards. This emulates other document-oriented applications, though the window icon should be set to the file icon instead to match Mac behaviours.
Things that could be done for macOS later:
- Edit menu (why doesn't Qt let us create a default here that's reasonable?)
- Keeping the application open when all windows are closed.
- QMainWindow has a definition for setting a unified look with the title and tool bars, but the documentation says you'll get painting errors with docked toolbars - boy, is it correct!
- Some assembly required for getting cgview/GraphViz into a bundle. (Copy the executables into
Contents/MacOS
?)
Let me know if some commits should be cherry picked out into a separate branch.