This may help with tracking the freezes in main thread.
By default, when QTC_FREEZE_DETECTOR is set, it detects
freezes above the 100 ms and prints the receiver object
and event type that triggered the freeze.
Change the default 100 ms threshold by setting the
QTC_FREEZE_DETECTOR to some different numeric value.
Change-Id: Ifb68c7648c09a5329f1f2aa39cd7e29e69a76052
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This is necessary to not pollute the signed and notarized .app
bundle.
Task-number: QDS-9113
Change-Id: I74e0bced5679faac94b27d2a31ea10a7949fb21f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is important on macOS, where we cannot install optional plugins
into the app bundle, because that would break code signing.
Instead the install settings in the signed bundle sets a custom plugin
path outside the bundle, and the installer puts optional plugins there.
Task-number: QTCREATORBUG-26705
Change-Id: I8b36752471d16dfc5828e87e20254f39ab985ca2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
I run Qt Creator in german, but for responding to questions and
generally looking things up I regularly want to run it temporarily in
english. A command line option makes that easier than having to start Qt
Creator, navigate to the settings, and restarting it, and doing the same
again to revert back to german.
Change-Id: I7c0d84375ffc97e5c7607307fd3f785f2c315c3d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
When linking we should now consider the new sdktool location within the
Qt installation first. The new location of QtCreator.ini will be <Qt>/
Tools/sdktool/QtProject/QtCreator.ini on macOS, and <Qt>/Tools/sdktool/
share/qtcreator/QtProject/QtCreator.ini on Windows/Linux.
When resolving an existing install settings path to the old location
within the Qt Creator installation (Qt Creator.app/Contents/Resources or
Tools/QtCreator/share/qtcreator), the QtCreator.ini at that location
will itself redirect to the new sdktool location. So, try to follow that
as well, to keep existing setups working.
Task-number: QTBUG-28101
Change-Id: Idbb09ad6961f6fd4a4112830959a615d8186a132
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.
Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The global event filter function is executed often, for events
originating deep in the widget hierarchy even multiple times.
Triggering the timer only by mouse and key presses on the main
application and on texteditor is less intrusive and still happens
often enough (TM).
Change-Id: I848d55a347bd62d12e8523965d1750c59da33116
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Higher resolution also means more data to be cached. The default 10MB
cache limit don't cut it in HighDpi, especially in cache-intensive parts
like the welcome screen.
Change-Id: I653a939c3a37f80647d73e8de8df616d5386e39c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Currently, the none arm handler binary is hanging and
needs further investigation.
Maybe a complete universal build will fix this, and
we can enable it again.
Change-Id: I60b5623d8dda500a3be3efd095f91a9609600324
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Especially on older distributions, Qt/Wayland works worse than Qt/
XCB(XWayland). On Ubuntu 20.04, starting Qt Creator with Wayland can
even crash the Wayland session
(https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1958684/).
We still want to ship the plugins, and allow forcing the usage of
Wayland, since on the other hand Wayland works better in HiDPI
environments for newer distributions.
Behavior is enabled when configuring with -DQTC_FORCE_XCB=ON
Task-number: QTCREATORBUG-26867
Change-Id: I623f001412f809381208b6cb3ec5b3fcfdb86011
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Since it's not possible to use directly ICore::settings()
inside Utils lib, make setSettings() a static member.
This simplifies the API of other static methods.
Set the settings just once now, inside main().
Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Looks like the regular expression jitting is not reentrant when running
under Rosetta for some reason. It was crashing when loading bigger
subdir .pro files which regular expressions in it, like qtcreator.pro.
Disable JIT if we run under Rosetta.
Task-number: QTBUG-97085
Change-Id: Icbab1ca8f62afa9cc86045983e84087a7694b5ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Introduce Utils::Singleton class and
Utils::SingletonWithOptionalDependencies class template
that helps implementing singletons that depend on other
singletons. It's guaranteed that whenever singleton B depends
on singleton A, than A is always created before B is being
created, and that the order of destruction is always
opposite to the order of creation.
Dependencies of singleton are listed as template arguments
for SingletonWithOptionalDependencies class template.
The first argument of SingletonWithOptionalDependencies
class template is always a singleton class itself.
Prepare a common interface for all singleton subclasses:
SingletonSubClass *SingletonWithOptionalDependencies::instance();
Make instantiating singletons and its dependencies thread-safe.
Create singletons on demand (only if some code needs them).
It's not needed anymore to explicitly instantiate
all required singletons in tests.
Make it possible (and thread-safe) to instantiate ProcessReaper
and LauncherInterface singletons in non-main threads.
Make the following dependencies between existing singletons:
SshConnectionManager depends on:
-> LauncherInterface depends on:
-> ProcessReaper
Change-Id: Iefaacab561c2b3dcf07e7fafbb87339ea6a15278
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make it possible to control when the SshProcessManager is
being constructed / destructed. Expose public constructor.
Since different singletons depend on each other, we need
to control the order of creation and destruction of them.
The order of creation is like that:
1. QCoreApplication
2. ProcessReaper
3. ProcessLauncher
4. SshConnectionManager
The order of destruction must be opposite to the above.
Change-Id: Ice07eb751cd61c03cb461816fa1b74ab040a53de
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reuse ProcessReaper inside process launcher.
Automatically reap all internal QProcesses of QtcProcess
(either direct child of QtcProcess in QProcessImpl
or indirectly inside process launcher).
Make ProcessReaper work again on QProcess instead of on
QtcProcess, so it may still be reused for non-QtcProcesses.
Change-Id: I950cac5cec28f17ae97fe474d6a4e48c01d6aaa2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
* Add information about -tcs alias of -temporarycleansettings command
to the help message
Task-number: QTCREATORBUG-26132
Change-Id: Ie79e33cf2358ad2f7253656017c9e8b433b7f635
Reviewed-by: David Schulz <david.schulz@qt.io>
AA_DisableHighDpiScaling is deprecated and ignored in Qt 6.
The next best option is to use Qt::HighDpiScaleFactorRoundingPolicy::Floor
instead.
Change-Id: Ic279ac34f744dec2558624799809007bbb638431
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
After brief usage of a Qt 6 build of Qt Creator under non-rounded
scaling factors such as 150% or 175%, all kinds of rendering artifacts
are noticeable.
Proper support of these scaling factors requires fixes in several
places. This change is the quickest alternative fix/workaround: restore
the behavior of Qt 5.
Fixes: QDS-4739
Fixes: QTCREATORBUG-25862
Change-Id: Ia8bfda088ee20ebbe08cb4f79325d5a51ef7124b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Not only was "copyRecursively" copy/pasted, it is also unreferenced (by
others than itself).
Change-Id: I500fa42d31f5dbf97b2cb7ba5c144249c157ce57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The initial implementation is a copy of QbsProcess
with some small adaptations. Start a LauncherProcess
in Creator's main function, just after the creation of
the application object.
Change-Id: I016df3ed664d7914c73f4a35742d5a63d5faaca0
Reviewed-by: hjk <hjk@qt.io>
It is not used, and not supported in the other build systems.
Change-Id: I38049e145595490058e255b94cdb8dd13c3f6fb2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This helps to lower impedance in the using code.
Even though TemporaryDirectory will very likely always stay on the local
host, this is one of the entry points into path related string
manipulation
that we want to base on FilePath nowadays.
Change-Id: I302016b8d65e54df94296659a54a93935d9e4627
Reviewed-by: David Schulz <david.schulz@qt.io>
There are different ways of having a settingspath for QC. If the
settingspath is not provided for starting QC we may use the global
settings or a temporarily created settings folder.
To correctly run the test scenario from inside a plugin unit test
we need to have the same environment and settings.
Change-Id: I5dcc61e162258a0af8d3c8df2e63255d0e35f464
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
The TestStringTable tests the fix provided for a crash in StringTable
on shutdown.
Amends: f4ab1279fd
Task-number: QTCREATORBUG-25417
Change-Id: I5a4a7e4a20e1b9611682a976d38dee17d4603c5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
in order to prevent a crash ancompanying the console output:
QQuickWidget is only supported on OpenGL.
Use QQuickWindow::setGraphicsApi() to override the default
Change-Id: Iab7c0cc486b150723000cc11ba4c6d9cd4be8b03
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Qt 6 would emit:
"Qt::AA_UseOpenGLES is no longer supported in Qt 6"
Let's set the backend to OpenGL it via environment variable.
Setting it via QQuickWindow::setSceneGraphBackend would add a
dependency on "quick".
Fixes: QTCREATORBUG-25637
Change-Id: Ice53be9440c586008dea9ab3731050a63073bab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
On Windows you get one locale for unicode applications, and one
for old non-unicode applications.
Qt Creator uses QTextCodec::codecForLocale(), which would result
in the "System" codec, which is mapped for the default language
in the system.
Task-number: QTCREATORBUG-24776
Change-Id: I64496cc440931d3bf6f09314bdfc7c29e01b9f4f
Reviewed-by: David Schulz <david.schulz@qt.io>