aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/shortcutmanager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add some additional shortcuts for actionsEike Ziller2020-03-171-6/+1
| | | | | | | | | | | | | | | | | Add Cmd+Shift+- for decreasing font size on macOS. Do not add Cmd+= for increasing size, because it conflicts with the existing shortcut for "Replace and Find Next". Sprinkle some Backspace shortcuts in addition to Delete for removing items. There are (laptop) keyboards that either do not have a designated Delete key (requiring Fn+Backspace) or where the Delete key is not conveniently located/sized, and there is no benefit in making the distinction in that case anyhow. Fixes: QTCREATORBUG-706 Fixes: QTCREATORBUG-13733 Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-161-2/+5
|\ | | | | | | | | | | | | Conflicts: src/plugins/baremetal/debugservers/uvsc/uvtargetdevicemodel.cpp Change-Id: I4a90920e52dbbe9eb46aef3437ee3c5a6e7b31c6
| * Enable Copy, Cut, and Paste in the Editor 3DMahmoud Badri2020-03-131-2/+5
| | | | | | | | | | | | | | Task-number: QDS-1563 Change-Id: I22c3017b8c158d8bc084f050baef89fa8fffd365 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Move some actions to a "View" menuEike Ziller2020-03-061-1/+1
|/ | | | | | | | | | A "View" menu seems to be what many users are looking for when they want to show or hide panes/views, so move corresponding actions there. Window management / split actions stay in the "Window" menu. Fixes: QTCREATORBUG-23610 Change-Id: Id683addc681de99abb35697a735fdbc9dc0d00cd Reviewed-by: hjk <hjk@qt.io>
* Integrate ADS in QtCreatorHenning Gruendl2020-02-201-45/+0
| | | | | | | | | | | | | | | - Integrate DockManager in DesignModeWidget (create factory default workspace, create menu items, add qds constants, remove unused shortcuts) - Remove unused functions and variables due to new docking system usage - Add DockWidget style sheet to resources - Fix scrollbar style by merging base and scrollbar style sheets - Fix update of StatesEditorWidget when switching tabs - Add missing unique ids in widget info - Set minimum size on ItemLibraryWidget Change-Id: I08be6d753233fc767037a33b41af335cec6d43b1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: Use backspace on macOSThomas Hartmann2019-07-031-1/+7
| | | | | | Change-Id: I8398d60b32e5bb65b47bf87b6309c805be4c48b5 Reviewed-by: Brook Cronin <brook.cronin@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Allow pinning files to ensure that they are always openMitch Curtis2019-04-031-1/+1
| | | | | | | | | | | | | | | | | | | This patch allows pinning files within a session. Pinning a file puts it at the top of the Open Documents list, and prevents Close All from closing it until it is unpinned. This is useful for files that should always be open for a given session. [ChangeLog] Files can now be pinned via the context menu. Pinning a file keeps it at the top of the Open Documents list, and prevents Close All and similar actions from closing it until it is unpinned. This provides a way to quickly close any open files without closing important ones. Change-Id: If47a599fb272db4c78a71eabe6fb29215a9a8a11 Fixes: QTCREATORBUG-21899 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QmlDesigner: remove not used includeTim Jenssen2019-01-211-1/+0
| | | | | Change-Id: I9a1ee2d902e672b4a066852b45d92e42ad385114 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix clazy warningThomas Hartmann2018-08-021-2/+2
| | | | | | | Do not call static member functions by instance. Change-Id: Iacc7abd7e93b4612fcaa5288cd428a569f64615c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: ModernizeAlessandro Portale2018-07-251-2/+2
| | | | | | | | | | | | modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: Ic42b5c59fed5a4a01853138542d8156471e86f58 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner/ShortcutManager: CleanupEike Ziller2018-04-161-21/+15
| | | | | | | | Remove some unneeded 0-parents, use nullptr, and do not use parameter actions when they are not needed. Change-Id: Ia556f83f7f1ce296fc08fa76cced7f41102d110f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Do not access clipboard if not requested to by userEike Ziller2018-04-161-11/+1
| | | | | | | | | | | | | | | | | | | QClipboard documentation states for X11: "Lastly, the X11 clipboard is event driven, i.e. the clipboard will not function properly if the event loop is not running. Similarly, it is recommended that the contents of the clipboard are stored or retrieved in direct response to user-input events, e.g. mouse button or key presses and releases. You should not store or retrieve the clipboard contents in response to timer or non-user-input events." So do not request the clipboard data when the QClipboard signals that the data has changed, because that locks up if the application providing the data is unresponsive. Task-number: QTCREATORBUG-20262 Change-Id: Ifd10150e1de62c8153ab2bb93a3e953a36fb243a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Fix that menus didn't show ampersands in files namesEike Ziller2018-03-261-2/+3
| | | | | | | | | | And instead interpreted the ampersand + following character as an accelerator key. Task-number: QTCREATORBUG-17817 Change-Id: I327239499ce56e75fd12f2df5be60d4b04913acd Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* QmlDesigner: remove "Editor" from "Status Editor"Tim Jenssen2017-11-091-1/+1
| | | | | | | | This saves some space in the tabs. Change-Id: I968378de7d7a6331a41c79944ce910e23e63f2fd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Fix navigator context menuThomas Hartmann2017-10-181-1/+4
| | | | | | | | | | | Depending on the context and focus we are disabling actions. But we did not enable actions when setting the focus/context back to e.g. the navigator. We "simulate" a selection change to set the proper state of the actions. Task-number: QTCREATORBUG-19110 Change-Id: Ie4eefb498956de22d33d72bd7189bacd3177912b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Drop unused variables and lambda capturesUlf Hermann2017-09-081-1/+1
| | | | | | | | | Also, add context to connect() expressions where we are or were capturing "this". Change-Id: I6e006ba6f83d532478018550d148ee93eca59605 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* QmlDesigner: Fix compileThomas Hartmann2017-05-221-2/+0
| | | | | Change-Id: Id37f517fb0584f8066cc0922ed1ca18901bfa7b2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlDesigner: Avoid conflicts in shortcutsThomas Hartmann2017-05-221-1/+1
| | | | | | | | | Some shortcuts for the toolbar were still conflicting with the text editor. Change-Id: I4cad3c9a1f4978ea75b74cc58b789c12fdde871c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QmlDesigner: Avoid conflict on F2Thomas Hartmann2017-05-221-6/+0
| | | | | | | | | | | | F2 is also used by the text editor. We avoid a conflict by defining F2 just in the form editor and navigator. To avoid conflict we remove the action from the shortcut manager, since we already have an action in the context menu. Change-Id: Ib4c30a271da8f106210f5a86cfe0088386b87403 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QmlDesigner: Use the same usage pattern for sidebars as edit modeThomas Hartmann2017-03-241-19/+2
| | | | | Change-Id: Ia1ec631b8b486e98e957b5dbcccbc7b91baecb0f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Use Qt5-style connectOrgad Shaneh2017-03-201-5/+5
| | | | | | | + De-slot where possible Change-Id: Ibd2edbef7b7712aba20593bd0417940e828e0c9c Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fixing delete actionThomas Hartmann2017-03-101-9/+12
| | | | | | | | | | | | The delete action should always be visible (not always enabled) in the toolbar. For this, we have to use the main Qml Designer context. We react to context changes manually to disable delete, cut, copy and paste. Those actions should only be available in the formeditor and navigator. Change-Id: Ibc3b718c14e787c8451a3e84b679eb37aac814b5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* TextEditor: add right sidebarSerhii Moroz2017-03-091-1/+1
| | | | | | | | Task-number: QTCREATORBUG-9436 Change-Id: Ic0406758a30d52c22c58433f5f35305b798cb462 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* QmlDesigner: Never use ALT+CRTL for shortcutsThomas Hartmann2017-02-081-2/+2
| | | | | | | | The users of certain keyboard layouts do not like it, if e.g. their shortcut for "}" is taken by a shortcut. Change-Id: I93db8627d23624ed3a87dd6a8bfafc037caee0a4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Crash fixThomas Hartmann2017-02-071-3/+3
| | | | | | | | Deleting or cutting the root node is not possible. Task-number: QTCREATORBUG-17646 Change-Id: I613179c291e744c2d2f6e44ce103bcbd2afaed28 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: refactor setup/integration codeTim Jenssen2017-01-271-0/+9
| | | | | | | | | | | | | - moved switchTextFormAction to shortcut manager - renamed createDesignModeWidget - remove unncessary DesignerSettingsKey::TEXTEDIT_IN_DESIGNMODE (supporting it in future would be too much effort) - using delayed registration inside QtCreator (which does not bring more speed, but more time for the codemodel in case of opening a qml.ui file directly) Change-Id: I1fd05f161e4bf4659c5a2fb09705b1f67d6f8e36 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Update connect syntaxThomas Hartmann2017-01-191-22/+21
| | | | | Change-Id: If19e7483f86e0a92dae2bf1d4eb92387235a1cae Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Do not move cursor when reformatingThomas Hartmann2017-01-191-13/+2
| | | | | | | | | | | When saving a .ui.qml file the complete file is reformated. Without this patch the cursor is moved to the bottom. The cursor is still moved, but they line is kept. Since we reformat the complete file this should be fine. Change-Id: Ia1ef003e2e6ca7497dcad7e0e8044ffb99c80ea3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Hook up states editor expanded state to commandThomas Hartmann2017-01-191-0/+10
| | | | | | | | | | The expanded/collpased state of the states editor is now hooked up to a Qt Creator command. This means there is a configurable shortcurt and an entry in the menu under Windows/Views. Change-Id: Ied993870fe605cfd6651b203986b009620c98f1b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Fix compileChristian Stenger2017-01-191-1/+1
| | | | | Change-Id: Iec5585376078e05b131fc942605fc642fcafe05e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Implementing exporting QML file as imageThomas Hartmann2017-01-191-0/+10
| | | | | | Task-number: QTCREATORBUG-11494 Change-Id: Ifcfef6f9434637c0be0a727d9f80dfed1ef1c11b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Some cleanupThomas Hartmann2017-01-061-1/+1
| | | | | Change-Id: If1369124ca694bd5313213625636cf39a14af247 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Adding a toolbarThomas Hartmann2017-01-051-3/+39
| | | | | | | | | | | | | | * Icons are not the final ones. * I fixed a couple of glitches and cleaned up the code. - Action for copy and paste/delete were not properly updated - Delete had no icon - Using std::function for action predicates and operations - The context menu has no icons. This way we avoid having to define 2 icons. Change-Id: Ic23cbc78ba299c19e07e8de775eb813aae55db9b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix compilation with Qt 5.6Orgad Shaneh2016-10-171-1/+2
| | | | | | | | Broke by 5da074f95a0a8fcc548a5b0bad4fe50a5fa11e5a. Change-Id: Icd0400e7b19a564ba2777e1cceadd4994eb867f8 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlDesigner: Fix ESC issuesThomas Hartmann2016-10-141-0/+5
| | | | | | | | | | We do not want to switch to the editor whenever pressing ESCAPE. Using shortcut override does not work for QQuickWidget. Therefore we register our own action and disable it. Change-Id: I399265a5254767d2825edf3fe823dd35177a6ce5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Reformat .ui.qml files when savingThomas Hartmann2016-10-101-2/+26
| | | | | | | | The feature can be turned off using a setting, if there are serious issues with the reformating. Change-Id: If90475af2db8aaade8bc52af0fb7cd14bfa1c121 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-10/+10
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Qt Quick Designer: License change to Qt Commercial + GPLv3Alessandro Portale2015-09-181-12/+7
| | | | | | | | Change-Id: I7f7aecd02892b6c616cd148fa5d845e7bc0d3b4f Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* Clean exported headers of the Core plugin.Friedemann Kleint2015-03-051-0/+2
| | | | | Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clean exported headers of the TextEditor plugin.Friedemann Kleint2015-02-261-0/+1
| | | | | Change-Id: I1e7dd34ba5a51fb0b34d137dc03add4457b32ed1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License update.Eike Ziller2014-10-151-7/+8
| | | | | Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Project Explorer: fix possible nullptr derefs and remove deadErik Verbruggen2014-09-111-1/+1
| | | | | | | | The dead store is not harmfull, but add noise when checking for dead stores that are due to logic errors. Change-Id: I18084c357696311b6556c7bc60832a72b3318e92 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Add copyright commentNikolai Kosjar2014-08-221-0/+29
| | | | | Change-Id: Ia16f38f4823a0d740391ef4450b858d10f3184e5 Reviewed-by: hjk <hjk121@nokiamail.com>
* Fix closing editor with ctrl+w or "x" or File > CloseEike Ziller2014-08-221-1/+1
| | | | | | | | | If there are other editors on the document visible in some split, it should not close the document, but only the editor. Task-number: QTCREATORBUG-9346 Change-Id: Idce1ae2f518d4c6e875d86f9831d41c46c06361c Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* EditorManager: closeOtherEditors --> closeOtherDocumentsEike Ziller2014-08-181-1/+1
| | | | | Change-Id: Id8b225ed7ba6ea88669db06943d862793aa2671d Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* QmlDesigner.ShortcutManager: Fix CLANG static analysis warningsThomas Hartmann2014-08-041-7/+7
| | | | | | Change-Id: I9600439e1236c52b347c667bac6b6d79e2335375 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Make document model API more consistent with entry vs documentEike Ziller2014-06-131-1/+1
| | | | | Change-Id: Iae2fe480d9fcb564d566f1dcca142c21c99c2d5b Reviewed-by: hjk <hjk121@nokiamail.com>
* QmlDesigner: Avoid repetitive callsOrgad Shaneh2014-05-221-6/+9
| | | | | Change-Id: Id33e46f925c94a970b001e7f34b7deb56224cc97 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
* DocumentModel: Make interface statichjk2014-05-131-1/+1
| | | | | | | Move item model implementation to private, adjust user code. Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13 Reviewed-by: Eike Ziller <eike.ziller@digia.com>