summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppsnapshotupdater.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CppTools: Rename SnapshotUpdater to BuiltinEditorDocumentParserNikolai Kosjar2014-08-201-232/+0
| | | | | Change-Id: I554b5e9e3f1ef7c167fa45b5cd0c230fdf63073b Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Extract BaseEditorDocumentParser out of SnapshotUpdaterNikolai Kosjar2014-08-201-86/+25
| | | | | Change-Id: If89e81eec6d600d3d39cc09203cf434d0768c1b4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}Nikolai Kosjar2014-08-201-1/+1
| | | | | Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Tests: Add "Find Errors Indexing" modeNikolai Kosjar2014-08-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding QTC_FIND_ERRORS_INDEXING=1 to the run environment will Creator force to do some "extended indexing" in order to find bugs: 1) The project files are parsed as if they would be opened in an editor. That is, parsing happens as precisely as possible, based on the ProjectPart information. 2) Symbols are looked up by invoking CheckSymbols, the backend of the semantic highlighter. 3) A "Task List File" (*.tasks) will be written with all diagnostic messages. This special indexing mode is meant for testing purposes. E.g. it can be run nightly on some bigger projects to find regressions. Note that Qt Creator will quit exactly after the first time some source files are indexed. E.g. that will happen if you open a file manually or if you open a new unconfigured project. Therefore it's required to configure projects as needed before invoking in this indexing mode. Change-Id: If25b83e67d24df9e28e107cb062f21cbf3b4c643 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Auto-include pre-compiled headersNikolai Kosjar2014-07-241-1/+2
| | | | | | | | | | | | So far the pre-compiled headers were processed (thus defines from those headers were visible), but the actual includes for the documents were not added, which is necessary for lookup/completion. Note that this will be only done if pre-compiled headers are not ignored (Options > C++ > Code Model > [] Ignore pre-compiled headers). Change-Id: I54a8e6b00597af164d958e3e9f2a1075ea187788 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix include/framework path handling.Erik Verbruggen2014-07-041-21/+7
| | | | | | | | | | Instead of having two lists of paths, now only one list is used where both include paths and framework paths can be mixed. This reflects the way the compiler is invoked, and retains the (correct) search order. Task-number: QTCREATORBUG-11599 Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: move post-sourceprocessing action into callback.Erik Verbruggen2014-06-181-15/+11
| | | | | Change-Id: Iac6c9fe1ada27ac0d96417e490cc5723e6969541 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Rename CppPreprocessor to CppSourceProcessorNikolai Kosjar2014-06-041-12/+12
| | | | | | | | | | ...since it does quite a bit more than only preprocessing, as the name suggests. We use that class to process source files in general. The output is not a preprocessed source, but a set of CPlusPlus::Documents with symbols. Change-Id: I787d0f22f9f042ddf0c99e8c2f0bdb9aa7001735 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: introduce a project config file field in the projectPart.Erik Verbruggen2014-02-271-0/+9
| | | | | | | | | | | This field is used by the generic project manager which passes the ".config" file in it. The advantage is that both the SnapshotUpdater and the clang code model do not need to do anything smart, but can pass it directly to the preprocessor. Task-number: QTCREATORBUG-11390 Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | C++: split defines into project-defined and toolchain-defined.Erik Verbruggen2013-12-101-1/+2
|/ | | | | | | | So we can ignore possibly problematic toolchain-defines, while can still unconditionally apply project-defines. Change-Id: I7cb96f35a963d080011fe888ef71bfc098dd33ef Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Release more documents.Erik Verbruggen2013-11-121-0/+14
| | | | | | | | | | | | | | | | | | | | - fix memory leak in find-usages - do not retain snapshot in search history - when an editor is invisible for more than 2 minutes, release the backing snapshot Retaining snapshots will retain their documents, and if done for too long, the memory consumption might grow. This is especially the case when switching to a different kit (Qt version): in that case, the new versions of headers will be indexed, while the old ones stay around. Task-number: QTCREATORBUG-5583 Task-number: QTCREATORBUG-7645 Task-number: QTCREATORBUG-9842 Change-Id: I045eda1565e0a3fa702baeffaab9c12662f90289 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: fix inclusion of "injected" defines.Erik Verbruggen2013-10-231-2/+8
| | | | | | | Task-number: QTCREATORBUG-10280 Change-Id: Ibc6ffeedb97a31a35a2d1f00625506f844692e16 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: Follow Symbol Under Cursor opens the preprocessor dialogNikolai Kosjar2013-10-221-1/+2
| | | | | | | ... when invoked on a macro that is defined inside that dialog. Change-Id: I419c6675d70cfb8dd174f6a33f502b4c584baa3a Reviewed-by: David Schulz <david.schulz@digia.com>
* CppTools: Protect SnapshotUpdater getters by mutexNikolai Kosjar2013-10-091-4/+18
| | | | | | | Task-number: QTCREATORBUG-10282 Change-Id: Ia58359f774c72260956caecd5f63d44b612d1451 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: add method to manually set the project part.Erik Verbruggen2013-10-011-0/+19
| | | | | Change-Id: Ic3578bd98c2f1aefcaef61f5b993dc9a67ca5a77 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: add code-model support for defines-per-editor.Erik Verbruggen2013-10-011-1/+26
| | | | | | | The UI side will come in another commit. Change-Id: I1038a438587fe4cef70408f7f627d08837fc192d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: honor pre-compiled headers in the code-model.Erik Verbruggen2013-10-011-0/+19
| | | | | | | Task-number: QTCREATORBUG-476 Change-Id: I82ed92acdcda551d2c6a9ca221832ac20117a08f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Only parse with appropriate defines for open editors.Erik Verbruggen2013-10-011-0/+194
If two files from different (sub-)projects include the same header file, and the defined macros differ for both files, the header file will be parsed with only the appropriate macros for the including file. Task-number: QTCREATORBUG-9802 Task-number: QTCREATORBUG-1249 Change-Id: I560490afa287b3bb1e863bce1bb4f57af36ad56e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>