... and let the fallout trickle down a bit.
Change-Id: I1a2f79e281725c4a121cc2fbbc0377e881616ce5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In preparation of just supporting Utils::FilePath to open editors.
Opening editors at specific locations is still supported via
openEditorAt with Utils::Link, but the caller has first to parse the
file name via Utils::Link::fromString.
Change-Id: I17e5a28aeb50779cef9948fe72e37122d1020c50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Part of the overall FilePath migration. Keep the original version for
a while to allow using code to catch up.
Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Like we suppress context updates during shutdown also disconnect from
the context object's destroyed signal. At that point we don't care
anymore.
This also avoids issues if the context object lives as the child of a
widget in the MainWindow geometry. These widgets (and respectively their
children) are destroyed only in the QObject destructor, i.e. after the
MainWindow itself already destroyed all its members, including the
m_contextWidgets map.
Amends 6d97c1fcb1
Fixes: QTCREATORBUG-25310
Change-Id: I75db6f8783b5f62aa9805b69d4d2bba07b906a5b
Reviewed-by: David Schulz <david.schulz@qt.io>
Only open one visible editor and add all other dropped files as
suspended documents to the document model.
Change-Id: Iade95b3891fb90c06cc8852859346bbfe10bc292
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Try to not save settings that weren't changed from their default, and
make it possible for defaults to change in the future.
Task-number: QTCREATORBUG-24762
Change-Id: If469b72573791bc92ed535edf00271ef09b55386
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When working with multiple windows, pressing the close button multiple
times can close Qt Creator too.
This patch adds a system option, asking for a confirmation before
closing the IDE. By default it's not enabled.
Fixes: QTCREATORBUG-7637
Change-Id: Ifc5e8c97511f9227ce0634c8a7064d95775c76c2
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
Since the code "belonging" to the widget was split across two
classes, but isn't now, a bit of moving was necessary.
Use the opportunity to remove now-unneeded undirections to the
model and ui members.
Change-Id: I25bb96de05c67d9116f28ae342d4aebd3c4419e6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
setting the main window as the parent of a widget makes it open above
the Edit View 3D. Also other dialogs (open file dialog, options dialog,
etc) open above the 3D View now.
Task-number: QDS-1446
Change-Id: I6f6325d7b81eccb5aec3c07dfadc021a17dfd26b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The application details (name, organization, etc) were only set during
Core plugin startup, but that is too late for e.g. the plugin manager.
Change-Id: Id47d79e38dec9e586ab7b91a3080101e5fecb20d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
And use it for the plugin dialog and when changing the UI language.
Change-Id: Ic767837d2526409f7ec46d7e4612a1499f19459e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
- Proxy dialog removed
- When the QDS window is minimized/maximized, the edit view 3D follows.
The opposite is not true (edit view 3D can be minimized separately).
- Edit view 3D is always on top of QDS window. Only exception is when
a popup is shown (so that the user can handle the popup).
- External apps go normally on top of the edit view 3D.
Known (non critical) issues:
- Activating the edit view 3D doesn't raise() the QDS window, so if an
external app is on top of the edit view 3D then the view is clicked,
the external app will be in between the view and the QDS window.
- Closing the edit view 3D from the x button doesnt work (causes a
restart). This is not in the scope of this commit.
Task-number: QDS-1179
Change-Id: I1dd72590037be295b94735de96772307ba14c59c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is used in user-visible strings e.g. in the analytics plugin.
Change-Id: I5942e915bccba01eb2c3d7049e2b789fff9e890a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Adds a global info bar display above the main window's status bar that
can be accessed via ICore::infoBar().
Replace the blocking "Take UI Tour" dialog by a notification there.
Fixes: QTCREATORBUG-22819
Change-Id: I733f1bfd2d1db0295754ed2e28bb202f927d0edb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Not all requests are the same, handling code might want to act
differently on different request reasons.
Main driver here is the handling of the debugger/analyzer main window
state savings which depends on actual visibility of certain windows.
Change-Id: I87b2a9149e3d09d27bc14b44aace9f2e0686db04
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.
The patch also makes it actually possible to assign JSON lists and
dictionaries to values.
This removes some hacks involving creating complex JavaScript objects
through string substitution.
Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Introduce a generic Utils::TouchBar that implements a touch bar for
macOS based on QAction. Touch bars can be nested, and one is set to be
the application's top level touch bar.
Also add an ActionContainer for the touch bar. That allows us to manage
the layout of the touch bar the same way we do with menus.
Since the touch bar is an input device with very limited space, a
command in the touch bar needs to be specifically styled for the touch
bar by setting either touchBarText or touchBarIcon (or both).
Touch bars can be nested by nesting the ActionContainers. A nested touch
bar ActionContainer needs to specify an icon and/or text to show in the
touch bar button that opens that sub-bar.
Commands are only shown in the touch bar if they are valid within the
current context.
Implementation-wise we cannot use the standard NSPopoverTouchBarItem for
nesting touch bar levels. We cannot hide items in the touch bar, because
hidden items still take up space in the touch bar. So we need to rebuild
the touch bar regularly. Since the items we show are very dynamic, every
time the items in the toplevel bar change because of a context change,
any opened sub-level touch bar closes. That is why we maintain a stack of
touch bar levels ourselves, replacing the main touch bar with the current
level, and managing opening and closing the levels manually.
This patch adds buttons for Help, Bookmarks, Header/Source, Follow
(Symbol), Decl/Def, and a sub-bar for the debugger actions.
Fixes: QTCREATORBUG-21263
Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Replace 2 loops with range loops, and use nullptr.
Change-Id: I9f8920bb978ed218c5ec9ca01105652ebb51d842
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We don't want various plugins to depend on the Help plugin,
but we also do not want Core to depend on QtHelp.
For example when turning the Help plugin off, documentation should
actually no longer be registered through QtHelp. So we need
parts of the interface in Core, which must then be delegated
to the actual implementation in Help.
As positive side-effects the interface in Core will be slimmer,
and the code in the Help plugin can later be simplified, too,
because then we don't have the "Core" and the "Gui" help engines
separated in different plugins anymore, which should remove the
need for some setup indirections.
Task-number: QTCREATORBUG-20381
Change-Id: I634c5811c45d6a3dfd6ddc682cae270e38384cbf
Reviewed-by: hjk <hjk@qt.io>
mimeTypeForFile(...) is documented to never return an invalid mime type
(it will fall back to binary if everything else fails), so remove
unneeded checks.
This also removes fallback code that used text/plain in case of invalid
mime type, which is probably a relict from the old mime implementation.
Change-Id: I88ed41fa3b81704f110f9f481b0f01424a487cbb
Reviewed-by: David Schulz <david.schulz@qt.io>
It seems more natural that remote commands
don't change current editor of active view if file
is already opened in another view.
Change-Id: Ie27de0d159cae6e63fa1d477fab59887a0e6d198
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.
Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>