Lets us remove a few explicit CppModelManager::instance() call
in user code later.
Change-Id: Id8d846d06a0715b3d609cc5d52cc031e1d025fb1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Introduce and make use of Utils::insert() for QSet with a return value
that indicates whether insertion actually happened.
Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Sessions are independent from projects, and this allows for removal of
e.g. the dependency from Bookmarks to ProjectExplorer.
Includes moving the command line arguments (-lastsession, <session>) to
Core plugin.
Change-Id: I6c578fd15c4990902e7196501de20f39376e90e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move the implementation of CppCurrentDocumentFilter into
cpplocatorfilter.h/cpp.
Rename CppLocatorFilter into CppAllSymbolsFilter to
conform to the other names.
Remove some unneeded intermediate classes now.
Change-Id: Ia911dc826b83ba11894757fc353ff72211910ff7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Rename some filter classes to conform to the names for cpp filters.
Remove some unneeded intermediate classes now.
Change-Id: Ib4fa295fa60da61c42c792556751d954ddb936e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With this patch, when both cpp and lsp function filters
are available, they now run in parallel. The execution time
for getting the filter results (~110 K hits) for the
Creator codebase went goes from ~1100 ms into ~650 ms.
This patch also solves the potential issue with interference
between parallel runs of functions filter in locator and
in find unused functions.
Change-Id: I8f7f0b85d325848c04760ab76a7b9f02bcb5991e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Register cpp and lsp matchers for all symbols,
classes and functions.
Change-Id: Id85c8164077ec395dac7e6ff45acc89db9e6ae08
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It's always the same instance of:
CppEditor::CppModelManager::instance()->locatorData().
Change-Id: I7d8aa2da6f0055d91b519efb6ebdf2177794e0b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... out of SessionManager.
The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.
Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.
Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
- doesn't make sense to translate "%1"
- showPreprocessedFile: "reason" contains full stop, put at the end
- add missing closing >
- remove whitespace at the end of translated string
- added missing quotes and full stops
- Remove some control text from tr
Change-Id: I5537c3d12d038e25e2209af1198129fbf959b43c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
We try to locate the old symbol name in the generated ui header and
rename the symbol in the background.
Task-number: QTCREATORBUG-1179
Change-Id: Iaf68e3922cd728cbc87d0dc97125e34b8bdaa6be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.
For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.
Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@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>
Note that especially in C++, there can be a lot of false positives,
especially in template-heavy code bases. We filter out the most notorious
offenders, namely:
- templates themselves
- constructors and destructors
- *begin() and *end()
- qHash()
- main()
Since the code model does not know about symbol visibility, the
functionality is quite useless for libraries, unless you want to check
your test coverage.
The procedure is rather slow, but that shouldn't matter so much, as it's
something you'll only run "once in a while".
Fixes: QTCREATORBUG-6772
Change-Id: If00a537b760a9b0babdda6c848133715c3240155
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The starts with CppDocument::filePath(), plus a bit of the fallout
This is one patch of potentially many. It is hard to draw the
line where to stop this kind of chunk, this here converts a few
additional functions for which including it in the patch looked
like less churn than without.
Converting is mostly fromString/toString, with a few exceptions
for "already seem" like caches, that use cheaper "path()" to
avoid likely performance regressions (on Windows FilePath
comparison is currently case-insenstive, and more expensive).
There should be no difference for local operation with this patch.
Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Allows the user to ignore certain patterns so that these files wont
be indexed
Fixes: QTCREATORBUG-28313
Change-Id: I2a860a473ca1a267e9fab31436fc98b8f4004484
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
And fix the capitalization of some message box titles.
Task-number: QTCREATORBUG-28334
Change-Id: I858eefd5a12494723c40e0253a3708fa77284d1b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>