| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
... between CppTools::ProjectPart and ProjectExplorer::ToolChain.
Change-Id: I8b448747e454adbed77547460383b8515462cc81
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the new experimental plugin based on LibFormat.
It replaces the default indenter for CppEditorDocument
and applies clang-format after the CR or the set of 'electric'
characters.
Uses the global .clang-format kept in QtC settings or
the one for current project. Both can be configured.
For indentation some style modifications and code manipulations
are done to prevent line shrinking when it's not expected.
Manual indentation uses unmodified style from .clang-format file.
Change-Id: I6279b805e418e1804b553efa615f5c843f395a58
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.
ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.
Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
qbs/modules/qtc/qtc.qbs
qtcreator.pri
Change-Id: I29916313f12e25f3942ac926f8e4d4490074978e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They are no longer inside the global object pool.
Get them from CppModelManager instead.
Task-number: QTCREATORBUG-20678
Change-Id: Ifb3221a812295e1dcfe8b59ea693a4b350cbcc2e
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|/
|
|
|
| |
Change-Id: Ia9cd428e3bed193167903b6ffa080e4886193789
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We do not ship clang-cl anymore which makes it impossible
to run clang with MSVC options.
Secondly we used to we tweak compiler options quite a bit so
why not to switch to CompilerOptionsBuilder totally?
Change-Id: Id323cb554587afaea7d9aa530e947a45a03922d1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
processEvents is a bad way of dealing with asynchronous
requests. Use QFutureWatcher for that purpose.
Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
| |
Without object pool resetting filters does nothing
and therefore is not needed anymore.
Change-Id: Id5439d11b0ee2564d7573b95c0c922d7fd7da59e
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
Not needed anymore, they are more directly accessible nowadays.
Change-Id: Ibe16ab1281a16b05e02fb20c0722d87196d99365
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
| |
Move ownership and add the placeholder for future clang based
OverviewModel.
Change-Id: Ia44d2c1d0db59b40239d1f7934bf37a02e4b14e6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.
Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
| |
Move locator and find filters ownership and initialization
to ModelManager. Initialize builtin filters by default and
provide methods to set them from plugins.
Change-Id: I4cc82ecff3415329a5f97b1be9dcc45e6103bf5a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
This is in preparation for clang code model to provide its own hover
handler.
Change-Id: Ifbdd96f427989bd5d1fbc4badb9c38108485c2f2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
| |
Change-Id: I30f9048aff18440d8cc6a6247f5fd5bcdba5058d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
| |
Allows to follow outside of current TU.
Change-Id: Ieea2fd72bfdf6d60a988b40efcf2f41c5a71d045
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| | |
Change-Id: I32715e2fdbb14e4fccc4c58d3fd6052d7c1127f3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The extra macros in the config files are being read in
CppModelManager::internalDefinedMacros(), but they also affect the language
features in ProjectPart::updateLanguageFeatures().
Task-number: QTCREATORBUG-1478
Change-Id: Ic197b0b7d4cc6e6a74637da0c710b0630daae25c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Provide refactoring engine for ClangCodeModel and
implement missing methods.
Change-Id: If5c913e0c5a7941cd2ced54d0fcfa4d625eadc93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Has the same limitations as findUsages.
Change-Id: I8de4df2ecbfd8a4f3073666994398dc43af0d73c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Functionality is limited to the abilities of
current index which is not updated and is
generated only at project open.
Search box temporarily doesn't allow to "Search again".
Change-Id: Id1047f27ad0aafc901f06aa51ad38ceab95eaebb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|/
|
|
|
|
|
|
| |
Make model manager able to select the most functional
refactoring engine from the available ones.
Change-Id: I74031c910706fd694a0a7def022531501f1ea005
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
Move CppRefactoringEngine to CppTools and builtin member
ownership to model manager.
Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
Move FollowSymbolUnderCursor to CppTools and
builtin member ownership to internal model manager.
Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
Create an interface to get the ability to use
another FollowSymbol implementation
Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.
Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...so that only the built-in code model parser sees them, but not the
clang code model, which has problems with them. The specific case here
is due to definition of __int32:
winnt.h:3077:1: error: functions that differ only in their return type
cannot be overloaded
intrin.h:357:31: note: previous declaration is here
While moving, drop __MSVCRT__, which seems to be a predefined macro of
ancient MSVC versions, see
https://sourceforge.net/p/mpg123/mailman/mpg123-devel/?viewmonth=201010&viewday=24
Change-Id: I4b8c49ed4bdc942a2190dbae3c260f3a1a8078a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
working copy"
This reverts commit 05942b63f8bad6d6787fea10c31f10458cdccd06 because it
breaks refactoring, e.g. Q_PROPERTY generators.
Change-Id: I9a14b912ba72663f08ea99e7e066d824b18da4b0
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
${AnyProject}::updateCppCodeModel() did two potentially not that cheap
operations in the ui thread:
(1) Querying the MimeDatabase for the mime type for the source files of
the project. In 99.9% of the cases no files need to be read for
this as the file extension will resolve the type. The expensiveness
comes from the sheer number of files that can occur.
(2) Calling compilers with the "(sub)project's compiler command line"
to determine the macros. While the caches avoid redundant calls,
the number of the unique compiler calls makes this still a
ui-freezing experience.
These two operations are moved into a worker thread. For this, the
expensive compiler calls are encapsulated in thread safe lambdas
("runners") in order to keep the "mutexed" data minimal. The original
API calls of the toolchains are implemented in terms of the runners.
While adapting the project managers, remove also the calls to
setProjectLanguage(). These are redundant because all of the project
managers already set a proper value in the constructor. Also, currently
there is no need (client) to report back detection of C sources in
project parts. This also keeps CppProjectUpdater simple.
There is still room for improvement:
* Run the compiler calls in parallel instead of sequence.
* Ensure that the mime type for a file is determined exactly once.
Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
| |
We don't need two IDs for C++ and the QmlJS ID should look the same as
as the others.
Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
| |
As long as there are project parts for a source file, always determine
the best project part, instead of trying to stick to the previous one.
This ensures the best project part at all times and simplifies the code.
Change-Id: I25ea3eb43a5a3e6d93688d4b8965f596dc9ae22b
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: I010709c866291bf59c27f4a05765e1ab0efd28af
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: I5d0db45d9fdb624bb6cc55d7f04061d553f13bce
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
...instead, use the latest we support.
Change-Id: I7e7768bc4bc31de1fe0f441c03f3ab5d677d76e8
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
copy
These are remnants of the time when we had only one snapshot.
Change-Id: I6ff4db645d1065a0ef195834890e0774e2e2c60e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
| |
No need to require the project managers to do this. Also, it is easy to
forget.
Change-Id: I96f7a5e5547418678af9653e5753c372f0880e5a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-16712
Change-Id: I92db8cbcac9669cbd5e4ee5f7ef6f613797c753a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: I71d67f1273bad025b8dff45b3903b458f5cda2a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I2e3f36f810276da3f8dc7dcc587b06f8edb586d3
GPush-Base: d02f51b48fc752fddcdef6dcb32b3f7f6c0195a3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...and not all projects parts of a project if it is closed.
Re-produce with:
open a project A with subdirs (e.g. qtcreator.pro)
open a subdir project from project A (e.g. cppeditor.pro)
close project A
--> The project part representing the subdir is announced as removed
although it is still open.
The clang code model was the only affected user - affected translation
units were not parsed/updated anymore
("ERROR: ProjectPartDoesNotExistMessage").
Change-Id: Ia79341ce201e3b4aefff9f597920dbc6f7d67634
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
|
|
|
|
|
|
|
| |
Mostly done by clazy.
Change-Id: I0fbbbe1a2d28b79bcb83093d608bca6e2f927ebb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...in file qbsproject.cpp, line 940.
The assert can be triggered with e.g.:
1. Load a bigger qbs project, e.g. qtcreator.qbs.
2. Trigger project build as soon as possible.
3. Cancel the "Parsing C/C++" operation.
4. Wait until the build finished and the assert occurs.
This happens because CppModelManager::updateProjectInfo() since
commit 536ccc8a8742b38e75547d98ce457b0b90af3ee7
CppTools: Fix incompletely indexed project
will check whether the previous indexer run was canceled or not. If it
was canceled, it will trigger a full-reindexing of the project.
Updating the compiler call data is a special case and it should never
trigger an indexing operation, so introduce a dedicated update function
for this case.
Change-Id: I456945ccf2bf697aaeada572ed87f3acb21a5eaf
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use case to reproduce:
1. Open some bigger project, e.g. qtcreator.pro
2. As soon as "Parsing C/C++ files" is reported, add a character to
qmake's additional arguments in project mode (indexing should not be
finished at this point).
3. The indexing gets canceled.
==> ...but reindexing is not triggered.
Fix by checking whether the future was canceled.
Task-number: QTCREATORBUG-16134
Change-Id: I520c6a64a6adc1cb04cafb5e0aa56c8bf41d7b14
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
| |
in places where we do not need it
Change-Id: Ibf35f8144da859fffa3e0a7b6bb262284ec2292a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/shared/qbs
tests/manual/proparser/main.cpp
Change-Id: I13654bf10c14eb6b1d6805fe86b67ac73b2e4d75
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Affected functionality was, among others:
* Getting the correct project part when opening a file
* Fallback project part (merged defines/includes) not up to date
* Fallback for "Switch Header/Source" not up to date
In the early days sessions switching was probably implemented by "close
all projects of session X, open all projects of session Y". That's not
the case anymore today.
Change-Id: I4c6a80e2eb219615d3ea6fcf07be7c05072c8832
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Without this, too many threads are spawned, and loading a project takes
forever.
Change-Id: I3c22557ddd7bfb0c70f7b089c276432e3b003097
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
* Update files in src/plugins
Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also extracting inline HeaderPath class and change projects list in vector
because the size is larger than a pointer.
Change-Id: I885fdff3fe9bccc877634d1615249755f5b674fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
This removes also the need to close editor documents.
Change-Id: I96c68105bceb37841053f3dbd8a264e059a02cb8
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
|