I'd like to disentangle things a bit, and there's quite a bit
non-window-ish stuff here.
Change-Id: Iad1e1d17ccd10b3ffff14251039ae2a5d6bfb675
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
There's nothing inherently tied to the main window here.
Change-Id: I48ae09777a4408fc4c955d23fdee3483d8a97dd0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This way when the user clicks on the slider with the mouse the slider
jumps under the mouse and not left and right according to the slider
page.
Change-Id: If36f9d8ea82f5b200e2322758f4fc25aef5e1a04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We only want to set the button "checked" if the Output panes are
visible.
Amends b72f9dc8ef
Change-Id: Ia6fd461338086e141dac09ebf47de09c0635b28b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Clean-up, simplification and modernization.
Also fix the bugs uncovered by this.
Change-Id: Ia3a77557f10faf9a901540a55fd6c07a2e986bf5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Do not show the buttons of output views with priority < 0 (instead of
only == -1). Reduce the number of buttons that are shown by default to
the essential ones.
Change-Id: I5b44f18537b3033ce9d616f044a8b54b76988783
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
It was using the displayName for the key in the settings (visibility and
shortcut), which is annoying when changing the language.
Change-Id: Iffa784347c59389599c90f468dcba15834599c39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Only restore a session or file from the command line (or the setting)
after initialization is completely done.
Kit restoration moved to delayedInitialize, and before that we cannot
sensibly open a session anyway.
Change-Id: I73b984a8744729ea63af16b1f0161b49a2cd5d55
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
... by moving restoreKits to the delayed initialize phase.
Change-Id: If72e41b64ee71f2917b3f7a317d9887afc6e29e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Including removing one use of QDir::toNativeSeparators()
Change-Id: I5c1fe7733942d6161bd9dda94195a44c0cfded72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Initialization of the MIME database takes time, and it is good to avoid
this during startup.
We nevertheless want to apply some modifications to the MIME database, so
we need to delay these modifications until first use. Allow registration
of additional initialization functions. Since the initialization
functions access the MIME database, which does locking for thread-
safety, we need to separate the initialization to outside these locking
functions.
Change-Id: I2b1706347768bcf081644e078ccfa45302d61641
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Add various trace points to the code, including the plugin
initialization methods (centrally in plugin manager), code that is
scheduled on the event loop with QTimer::singleShot or
QMetaObject::invokeMethod during initialization, and code that is
triggered from ICore::coreOpened
Can be turned on by configuring with `BUILD_LIBRARY_NANOTRACE=ON`
Run with `-trace <file>` to write trace file. If Nanotrace is not built,
the added code expands to nothing.
Changes in Nanotrace:
- turned generated data to microseconds instead of nanoseconds, because
that is what Chrome tracing expects
- fixed serialization of duration (needs to be an item of the event, not
in a "arg" subitem)
- fixed shutdown() to reset the initEvent
Change-Id: I994de82023b820d771e1be0a859ebd8da0b73d4d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Which would trigger reading the MIME database, which is not needed at
that point in time. We persist the map of MIME type to custom default
factories via the MIME type names anyway, so just stay with that.
Change-Id: I7570432573b16700e00811fe409d43a2db6c5347
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
It replaces the global menu bar on macOS (that is a QMenuBar(nullptr))
with a window specific menu bar, resulting in an empty menu bar for Qt
Creator.
Amends a6e779606d
Change-Id: Id6e2c0b9b2dfe4ade88af0f9a6d3b008fed790be
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This will only affect the platforms that do not have a native menu bar
e.g. Windows and Linux excepting Unity.
Fixes: QTCREATORBUG-29498
Change-Id: I17a654cfa50342f3e506bf0a2b14225c4d3a6bee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Each ActionContainer used to schedule an invokeMethod on the event loop
when it changes, which creates an unnecessary amount of individual
events, especially during startup.
Instead schedule that update through the ActionManager, which then can
schedule a single event that handles all updates up to that time.
Change-Id: Ia193606adc4cfda88df8e45f2027662ca16f2ad3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
When applicable, the flag makes a significant difference in
performacnce. However is easily forgotten in cases where it
is applicable, and cases where it is accidentally used are
easily spotted visually. So arguably, opt-out is a better
default than opt-in.
Change-Id: I88aeb05b42533ba4e23c39573a3ddd016343cd55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These trigger over 120k file exist check on my machine on startup,
just for a handful icons.
Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... when renaming.
For local renaming, we consider only function parameters.
Task-number: QTCREATORBUG-12051
Change-Id: I7948d69f11b97663c9bd747ae6241a82dd9bdd82
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.
Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Will ease transition to a key class that doen's have ::number()
Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Adapt the font of the search and replace input fields to the font of the
widget that is searched. This makes it use the text editor font when
searching in the text editor but keeps the "application font" when
searching in other widgets.
Change-Id: I8bd3b5dd3d14ab0e774f7272be236c35abd12de0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Symmetric to saveSettings() now, and allows for central Key conversions
later.
Change-Id: I3fbf81c51197c9882b1f64ef591398b83aa0d633
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
The "history of editors" is supposed to contain the order in which files/
documents were recently accessed. It is used for the "open documents
window" (the Ctrl+Tab popup). In contrast to the "navigation history" it
should contain each file/document only once.
Since 324de13b4e items for suspended
documents with the same file name were no longer removed. For suspended
documents it is necessary to check for the same file name.
This was so far not vital, but when we save the editor history in the
session, these do not have a document when restoring, which would lead
to an evergrowing editor history.
Amends 324de13b4e
Change-Id: Ia4b7848a1265024d0463afbf7c1cd69189c4be97
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Mainly to simplify the implementation and naming.
Kind of follow-up to 862c9694.
There is some consolidation needed as followup as well as some potential
renamings. I'd leave that for separate patches to keep this here
somewhat self-contained.
Change-Id: I152e138a1d5baadec3f7542fed0894b8d4ffc8a3
Reviewed-by: David Schulz <david.schulz@qt.io>
In case a document does not yet have a filename,
simply fall back to save as
Change-Id: I3cb30ab39e30ecba5c720d4b7d4c955f9dd4609f
Reviewed-by: David Schulz <david.schulz@qt.io>