This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.
Found with regular expression: (?<!(Tr::)|([\w]))tr\(
Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
While project files should ideally list all their source files, this is in
practice not always the case. In particular, a lot of cmake projects do
not bother to list their headers. Therefore, we amend
SessionManager::projectForFile() such that it also considers unlisted
files in a project source directory (but not in a build directory, i.e.
projects with in-source builds are not considered).
A user-visible effect is that when renaming C/C++ symbols, occurrences in
unlisted headers are now pre-selected.
Change-Id: Id9f64f4836d2bb4dba80e111489f6c14ebb322ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.
Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Right now, upon start-up of Qt Creator, entries in the Sessions menu are
sorted in reverse order of the time the corresponding files were last
modified on disk, which often (but not always) corresponds to a "least
recently used" order. This order is unchanged during the lifetime of the
current instance of Qt Creator, and potentially changes again after the
next start.
As this can be confusing to users, we now ensure LRU sorting at all
times.
Task-number: QTCREATORBUG-28202
Change-Id: I758371ac1cb968dd3f2e4278fc5066d1e74397c6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
Mostly unused #include's, also sort them or reduce scope.
A few namespaces, ...
Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
When no document is loaded, don't prepend a windowTitleAddition to the
IDE window title.
Fixes: QTCREATORBUG-27328
Change-Id: I283debc2588c6552eaeb9ea23d7df0d07580f9af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
... into a single class.
This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.
Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Some duplications of a string may perhaps be fine, but eight occurrences
need a constant. Also, understanding code works better by using the code
model instead of full-text search.
Change-Id: I2944cf9216c825b930dedaae1085491fd10feba5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Complete with (hidden) UI. Doesn't do anything yet, because some
assumptions about projects need to be adapted on the LanguageClient side
first.
Task-number: QTCREATORBUG-26526
Change-Id: I34c92555e34c3d3ed98462261d47b35dfc015ce0
Reviewed-by: David Schulz <david.schulz@qt.io>
So it can be accessed from a wider range of places.
Change-Id: I282883addecf7bb070a65d9f4f7b8e6e2e4b5e47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Show the active project's root directory.
Fixes: QTCREATORBUG-26297
Change-Id: Id66131582484e6d8d58ee67226bc1123609e5a7c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
ProjectInfo, ProjectPart and ProjectUpdateInfo used to carry pointers
to Project and/or Toolchain, even though they were used in contexts
where these pointers were either unsafe to access or not guaranteed to
be valid anymore, which made their use difficult and error-prone.
We turn these classes into pure value types by copying in all relevant
information before the first async operation takes place.
Fixes: QTCREATORBUG-25678
Change-Id: I1914b0dbda6c7dfba6c95e5e92f2d69977755590
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
It's the same as FilePath::lastModified locally, and toFileInfo
doesn't work remotely. So it's overall at least not worse.
Change-Id: Ice8d80dcfd01dc38edc1dce2b53e1b5e6274380f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Switching targets starts up a lot of machinery that is undesired for a
project that's going away.
The same goes for switching build configurations on a target that is
being removed.
Fixes: QTCREATORBUG-25655
Change-Id: I0cb6e395cca8f89bfeb70fcdf571bbcb64f94247
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Saves some code on the user side.
Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.
Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
... involving projects that aren't currently in the session, for the
purpose of re-establishing the dependency when they get re-added.
In addition to the rather special use case described in the linked task,
this also prevents losing dependency information involving projects that
temporarily fail to load.
Fixes: QTCREATORBUG-22524
Change-Id: I2558736a634e91cccc3f071a3c522b33a88003c0
Reviewed-by: hjk <hjk@qt.io>
Opening Qt Creator, closing it again, and then opening Qt Creator with
"-lastsession" opened some session - the last session that was opened in
Qt Creator at some earlier time.
The intention of "-lastsession" was more to re-open Qt Creator in the
state it was last closed from, so in this case it makes more sense to
not open a session at all.
Change-Id: Ia33ac5b79d93c7c97865186c56db2ef0b33b9f7c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The "implicit" default session, that is. See the verbose comment inside
this patch for details.
Fixes: QTCREATORBUG-19388
Change-Id: I270ca25ce3d4c32db51c53de2af055bdfe8c54af
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... or Target.
This patch moves build system from conceptually "one per project"
to "one per target (i.e. per project-and-kit)" or "per
BuildConfigurations" for targets where the builds differ
significantly.
Building requires usually items from the kit (Qt version, compiler,
...) so a target-agnostic build is practically almost always wrong.
Moving the build system to the target also has the potential
to solve issues caused by switching targets while parsing, that
used Project::activeTarget() regularly, with potentially different
results before and after the switch.
This patch might create performance/size regressions when several
targets are set up per project as the build system implementation's
internal data are duplicated in this case.
The idea is to fix that by sharing per-project pieces again in
the project implementation once these problems occur.
Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It was not possible to return false from
ProjectExplorerPlugin::initialize() without triggering crashes.
Change-Id: I96b2f80c835e69769f64f9b9c61f473e9ff88623
Reviewed-by: hjk <hjk@qt.io>
... when switching to a project that is unconfigured.
Task-number: QTCREATORBUG-22682
Change-Id: I91c6f791677054d2f86a5a5d81003f38ecc812fb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Helps to adapt to potential upstream changes in Qt 6
Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Checking some basic invariants, plus a small stress test
Task-number: QTCREATORBUG-20975
Change-Id: I975d0b96ade8a81c1358387927e4fe5a98d25892
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the second call really serves a purpose, we will find out eventually
and can add it back in with a proper comment.
Change-Id: Id4db1e59d771578f0eceebb6829ecf12e7da4d49
Reviewed-by: hjk <hjk@qt.io>