summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-77/+0
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Use test objects to group related test functionsChristian Kandeler2021-08-261-219/+5
| | | | | Change-Id: I9ed2ad222579f49c20c75a53c862bb7251cff28d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move SendDocumentTracker tests into pluginChristian Kandeler2021-07-221-0/+19
| | | | | | Change-Id: I1d0532b5d0e155f6d53c683d01c4a92e4bae3ce9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppTools: Move ProjectFileCategorizer tests to pluginChristian Kandeler2021-07-221-0/+7
| | | | | Change-Id: I51d66d9ff9a14e2dd04cf25448ccc8c85bcbce97 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move HeaderPathsFilter tests to pluginChristian Kandeler2021-07-201-0/+13
| | | | | Change-Id: Iecbb0942bed51002e85b96f6cc2ab034622cd07f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move ProjectInfoGenerator tests into the pluginChristian Kandeler2021-07-161-0/+9
| | | | | Change-Id: I40d4b0b9751e77a5bb605349c86b37ad3935ca59 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move ProjectPartChooser tests into the pluginChristian Kandeler2021-07-051-0/+22
| | | | | Change-Id: Ic2ef95d4d6a5bd65cbc611b66a0b297c7468bbcb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move CompilerOptionsBuilder tests to pluginChristian Kandeler2021-07-021-0/+42
| | | | | | | ... where they belong. Change-Id: Ifc6aebc218f9f85ffeb6a4b7121f97379b53b69d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Move CppFilesSettingsPage closer to new setuphjk2020-02-051-12/+2
| | | | | | | Including some drive-by cosmetics. Change-Id: Id9cdba68545907b099a70944c83fe17ad3c0b2a0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add final specifies to classesIgor Sidorov2020-02-051-1/+1
| | | | | | | Warning -Wfinal-dtor-non-final-class in clang trunk Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: Use unshared object for CppCodeModelSettingshjk2020-02-041-1/+1
| | | | | | | | | There's nothing shared here, only ever one copy. Ideally, this should be const outside CppToolsPlugin, but some settings are modified directly. Change-Id: I775b9151a244b3cc44d28bc992a041c42d234a18 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppLocatorFilter: Add highlighting auto-testsAndre Hartmann2019-09-101-0/+2
| | | | | Change-Id: Ibd5b8318040876b46bfb14561c69019abd8dd8b7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-2/+2
| | | | | | | | 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>
* Wizards: Support using #pragma once instead of include guardsFilip Bucek2019-01-231-0/+1
| | | | | | | | | | | Allow users to choose #pragma once instead of #ifndef include guards in generated header files. Fixes: QTCREATORBUG-12166 Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Filip Bucek <fbucek@atlas.cz>
* CppTools: Apply 'static' pattern to StringTablehjk2018-02-071-6/+3
| | | | | | | | This also fixes a crash on loading (some?) projects introduced in 577bf7c08a. Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppToolsPlugin: Partially pimpl and remove use of global object poolhjk2018-02-071-7/+7
| | | | | Change-Id: Iee09bf2fc7c945b8dcf950edfe94889d35c63735 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Initialize settings pointerTobias Hunger2016-11-291-1/+1
| | | | | Change-Id: Ib12d4c67fc69a0e41f863f5679013edfd09008ae Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.0'Oswald Buddenhagen2016-04-011-0/+3
|\ | | | | | | | | | | | | | | | | Conflicts: qtcreator.pri qtcreator.qbs src/plugins/debugger/debuggerruncontrol.cpp Change-Id: I81b43480a1369e3d7be60ae26e812dda6b962b0b
| * C++: Fix completion for doxygen tags INikolai Kosjar2016-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three cases that must be handled: 1. Completion in C++ style comment 2. Completion in first line of a C style comment 3. Completion in non-first line of a C style comment This change fixes case 1 + 2. Case 3 will be addressed in a follow-up change, same goes for the duplication. Task-number: QTCREATORBUG-15143 Change-Id: I449711f965ddcbbe6158870a8a5ae33218e0d238 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* | Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
|/ | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Fix changing "#include" lines after file renamingDaniel Teske2015-10-061-1/+1
| | | | | | | | Didn't work if there was any folded text before the #include. Change-Id: I8f16205f06bfaa8b8541401a9ebd5995c15b2227 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* CppTools: Export CppCodeModelSettingsNikolai Kosjar2015-06-031-1/+1
| | | | | | | | Needed for the ClangCodeModel tests, where we need to activate the clang code model. Change-Id: I368b840875ca2a46da4535338bf55967cbcdf5ea Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* CppTools: Remove separate indexing revisionNikolai Kosjar2015-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | For indexing we used a custom revision that was updated on each modelManager BuiltinIndexingSupport::refreshSourceFiles() call. This could lead to rejection of updated documents triggered by refactoring actions, like for the following case: 1. Open a project containing a.h and a.cpp 2. Open a.cpp, insert some new lines, save and close the document 3. Open a.h and rename a function that is defined in a.cpp --> The refactoring action modifies a.h and a.cpp, so re-indexing of those is triggered. Since a.cpp has already a higher revision (step 2) than the updated document, the updated document is discarded. As a consequence find usages and follow symbol fails for the renamed function. Now the document call back provided to CppSourceProcessor is responsible for updating the document revision based on the latest revision in the global snapshot. Change-Id: I4dfa0a4d34991655acfa749109f00c47b0fbfdbe Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* CppTools: Fix global completion after '&'Nikolai Kosjar2015-04-131-0/+3
| | | | | | | | | | | Regression introduced by commit 9fb5b0be15a1d877132942ca5da1829510f23361 CppTools: Add basic completion support for qt5 style signals/slots Change-Id: I0a8e5ef31c1394512a51a26ed08b0f445add5acd Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | C++: Finish gcc's include_next supportNikolai Kosjar2014-12-151-0/+1
|/ | | | | | | | | | | | | | | | | This implements the actual include_next logic and thus completes commit b934cc1 C++: pass #include_next down to CppPreprocessor::tryIncludeFile commmit 140b502 C++: Highlight argument to gcc's #include_next extension Based on https://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html Task-number: QTCREATORBUG-10225 Change-Id: I7eef7f5ea64a114f6d092304d32b72c55c2ce134 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* CppTools: Update document on activationNikolai Kosjar2014-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | ...if the project was updated in the meanwhile. If a project is updated mark invisible editor documents dirty and update them if they get focus. This also fixes document highlighting when restoring a session for documents that the user "switched away" before the project info is pushed to CppModelManager. This completes CppTools: Update visible documents on project update commit c2eb91e053332d010adc8b9e7918d9de28ef4c90 which only takes care of visible documents. Task-number: QTCREATORBUG-13270 Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/ipaddresslineedit.cpp src/libs/utils/logging.h src/plugins/analyzerbase/AnalyzerBase.pluginspec.in src/plugins/android/Android.pluginspec.in src/plugins/android/androiddeploystep.cpp src/plugins/android/androiddeploystep.h src/plugins/android/androiddeploystepfactory.cpp src/plugins/android/androiddeploystepwidget.cpp src/plugins/android/androidpackagecreationfactory.cpp src/plugins/android/androidpackagecreationstep.cpp src/plugins/android/androidpackagecreationstep.h src/plugins/android/androidpackagecreationwidget.cpp src/plugins/android/androidpackagecreationwidget.h src/plugins/android/javafilewizard.cpp src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/baremetal/BareMetal.pluginspec.in src/plugins/bazaar/Bazaar.pluginspec.in src/plugins/beautifier/Beautifier.pluginspec.in src/plugins/bineditor/BinEditor.pluginspec.in src/plugins/bookmarks/Bookmarks.pluginspec.in src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in src/plugins/clangcodemodel/clanghighlightingsupport.cpp src/plugins/clangcodemodel/clangsymbolsearcher.cpp src/plugins/classview/ClassView.pluginspec.in src/plugins/clearcase/ClearCase.pluginspec.in src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp src/plugins/cmakeprojectmanager/cmakehighlighter.cpp src/plugins/coreplugin/Core.pluginspec.in src/plugins/cpaster/CodePaster.pluginspec.in src/plugins/cppeditor/CppEditor.pluginspec.in src/plugins/cppeditor/cppfilewizard.cpp src/plugins/cpptools/CppTools.pluginspec.in src/plugins/cpptools/cpphighlightingsupportinternal.cpp src/plugins/cpptools/cppmodelmanagerinterface.cpp src/plugins/cpptools/cppmodelmanagerinterface.h src/plugins/cvs/CVS.pluginspec.in src/plugins/debugger/Debugger.pluginspec.in src/plugins/designer/Designer.pluginspec.in src/plugins/diffeditor/DiffEditor.pluginspec.in src/plugins/emacskeys/EmacsKeys.pluginspec.in src/plugins/fakevim/FakeVim.pluginspec.in src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in src/plugins/git/Git.pluginspec.in src/plugins/git/gitorious/gitorious.cpp src/plugins/git/gitorious/gitorious.h src/plugins/git/gitorious/gitoriousclonewizard.cpp src/plugins/git/gitorious/gitorioushostwidget.cpp src/plugins/git/gitorious/gitorioushostwidget.h src/plugins/git/gitorious/gitorioushostwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwidget.cpp src/plugins/git/gitorious/gitoriousprojectwidget.h src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwizardpage.h src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp src/plugins/git/gitorious/gitoriousrepositorywizardpage.h src/plugins/glsleditor/GLSLEditor.pluginspec.in src/plugins/glsleditor/glsleditorfactory.cpp src/plugins/glsleditor/glslfilewizard.cpp src/plugins/helloworld/HelloWorld.pluginspec.in src/plugins/help/Help.pluginspec.in src/plugins/imageviewer/ImageViewer.pluginspec.in src/plugins/ios/Ios.pluginspec.in src/plugins/macros/Macros.pluginspec.in src/plugins/mercurial/Mercurial.pluginspec.in src/plugins/perforce/Perforce.pluginspec.in src/plugins/projectexplorer/ProjectExplorer.pluginspec.in src/plugins/pythoneditor/PythonEditor.pluginspec.in src/plugins/pythoneditor/pythoneditorwidget.cpp src/plugins/pythoneditor/wizard/pythonfilewizard.cpp src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in src/plugins/qmakeprojectmanager/profileeditorfactory.cpp src/plugins/qmldesigner/QmlDesigner.pluginspec.in src/plugins/qmljseditor/QmlJSEditor.pluginspec.in src/plugins/qmljseditor/qmljseditorfactory.cpp src/plugins/qmljstools/QmlJSTools.pluginspec.in src/plugins/qmlprofiler/QmlProfiler.pluginspec.in src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in src/plugins/qnx/Qnx.pluginspec.in src/plugins/qtsupport/QtSupport.pluginspec.in src/plugins/remotelinux/RemoteLinux.pluginspec.in src/plugins/resourceeditor/ResourceEditor.pluginspec.in src/plugins/resourceeditor/resourcewizard.h src/plugins/subversion/Subversion.pluginspec.in src/plugins/tasklist/TaskList.pluginspec.in src/plugins/texteditor/TextEditor.pluginspec.in src/plugins/texteditor/basetexteditor_p.h src/plugins/texteditor/basetextmark.cpp src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h src/plugins/texteditor/codeassist/defaultassistinterface.h src/plugins/texteditor/codeassist/iassistproposalitem.cpp src/plugins/texteditor/itexteditor.cpp src/plugins/texteditor/itexteditor.h src/plugins/texteditor/itextmark.cpp src/plugins/texteditor/plaintexteditor.cpp src/plugins/texteditor/plaintexteditor.h src/plugins/texteditor/texteditoractionhandler.cpp src/plugins/todo/Todo.pluginspec.in src/plugins/updateinfo/UpdateInfo.pluginspec.in src/plugins/valgrind/Valgrind.pluginspec.in src/plugins/vcsbase/VcsBase.pluginspec.in src/plugins/welcome/Welcome.pluginspec.in src/plugins/winrt/WinRt.pluginspec.in tests/auto/debugger/temporarydir.h Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
| * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Cpp: Adjust includes when files are renamed.David Schulz2014-10-021-0/+1
| | | | | | | | | | Change-Id: Ie6aaaa5d99ba3823d9d42331f45b2dcab397e1cd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | CppTools: Change CppModelManager implementation patternhjk2014-09-191-1/+0
| | | | | | | | | | | | | | | | | | Replace the CppModelManagerInterface/derived CppModelManager combo by a more common CppModelManager/CppModelManagerPrivate pimpl pattern. Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Merge remote-tracking branch 'origin/3.2'Oswald Buddenhagen2014-08-051-1/+1
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: qtcreator.pri qtcreator.qbs src/plugins/android/androidglobal.h Change-Id: I3367bf2ea47c088989175dddeed2210294346f4c
| * CppTools: Auto-include pre-compiled headersNikolai Kosjar2014-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | CppTools: Export licensetemplate and licensetemplatepath as variablesTobias Hunger2014-07-151-0/+4
|/ | | | | Change-Id: Id86b72b275d3381a32003c0439ff2d6b3b6ab505 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Add basic LocalSymbols testNikolai Kosjar2014-07-041-0/+3
| | | | | Change-Id: I199e912203f329ec9b8bed2eb105e4a56f729e7d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Unexport some internal classes.Nikolai Kosjar2014-06-101-2/+2
| | | | | | | | | | | | | | | | Unexports CppModelManager, CppSourceProcessor and CppToolsPlugin. Now only some constructor signatures mention "Internal::" in the exported symbols: % nm --extern-only --demangle ./lib/qtcreator/plugins/libCppTools.so | grep "Internal::" CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) Change-Id: I167c21a6dc03cf02230c95fde66cf404e40df36f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Cpp{Editor,Tools}: Move tests for IncludeGroups to CppToolsNikolai Kosjar2014-06-101-0/+4
| | | | | | | | They belong there. This will also kill the CppSourceProcessor dependency from CppEditor. Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Rename CppPreprocessor to CppSourceProcessorNikolai Kosjar2014-06-041-4/+4
| | | | | | | | | | ...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++: Fix Macrouse::utf16charsBegin()Nikolai Kosjar2014-06-031-0/+1
| | | | | | | | | | This caused displaced highlighting of macro uses after #if constructs. MacroUse::utf16charBegin() was based on the last "continuation token", which was wrong. Change-Id: I89983d82fcf804ba853c04a59a7533c489785d05 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: use a global string table for SearchSymbols.Erik Verbruggen2014-05-281-0/+4
| | | | | | | | | This string table uniques strings, so that multiple identical strings share their contents. It is used by the locator and the symbol searcher, and will later be used by the class view. Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Add all diagnostic messagesNikolai Kosjar2014-03-101-0/+1
| | | | | | | | | | | | ...of type 'No such file or directory' to the CPlusPlus::Document. Only the first one was added and as a result, the editor only wavely underlined that one. Add also diagnostic messages if it's not possible to get the file contents. Change-Id: I8389d8e6af9480ea6712759ce5e130e1dd8912f1 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Avoid self-includeNikolai Kosjar2014-02-241-0/+1
| | | | | | | | | ...in CPlusPlus::Document due to cyclic includes. Task-number: QTCREATORBUG-11457 Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Cleanup test_cpppreprocessor_includesNikolai Kosjar2014-02-201-1/+1
| | | | | | | Use QCOMPARE instead of QVERIFY where appropriate. Change-Id: I7965a00fd004b8c3a20186bb692bf541f154d12b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Add support for prefixes in switch header/sourceOrgad Shaneh2014-01-211-0/+2
| | | | | | | | Task-number: QTCREATORBUG-11031 Change-Id: I93cce0ebf46984eb06094e1f1519717be2bbaa79 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Cleanup header/source testOrgad Shaneh2014-01-211-0/+4
| | | | | | | | | Dynamically create data files in tempPath and clean them up when finished. Change-Id: Ie78f557b185b264acc0d0f5814646c203d8a93f4 Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@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>
* | CppTools: Make completion tests data-drivenOrgad Shaneh2013-12-231-98/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly done using the following Ruby script: Fname = 'src/plugins/cpptools/cppcompletion_test.cpp' s = File.read(Fname) mod = s.gsub(/(?<declaration>void CppToolsPlugin::test_(?<test_name>[^(]+)\(\)\n\{)(?<body>.*?\n)\}/m) { |func| match = $~ declaration = match['declaration'] body = match['body'] test_name = match['test_name'].sub('_data', '') final = body.gsub(/(?:completions.clear\(\);\s+)?(?: +)[^\n]* =\n(?<code>.*?);\s*(?<completions>(?:completions.append\(QLatin1String\("[^"]*"\)\);\s*)*)QTest::newRow\("case: (?<name>.+?)"\)\s*<< code << _\("(?<prefix>[^"]+)"\) << completions;/m) { m = $~ res = " QTest::newRow(\"#{test_name}: #{m['name']}\") << _(\n#{m['code'].rstrip}\n ) << _(\"#{m['prefix']}\") << (QStringList()" m['completions'].scan(/completions.append\((.+)\);/) { |comp| res << "\n << #{comp[0]}" } res + ');' }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?, "(?<prefix>.+?)"\);\s*QStringList expected;\s*(?<completions>(?:expected.append\(QLatin1String\("[^"]*"\)\);\s*)*)const QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions, expected\);/m) { m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(\"#{m['prefix']}\") << (QStringList()" m['completions'].scan(/expected.append\((.+)\);/) { |comp| res << "\n << #{comp[0]}" } res + ');' }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*(?:const )?QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\n/m) { |mm| m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(#{m['prefix']}) << (QStringList()" m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp| res << "\n << #{comp[0]}" } res + ");\n" }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*bool replaceAccessOperator = false;\s*const QStringList completions = test.getCompletions\(\&replaceAccessOperator\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\s*QVERIFY\((?<replace>!?)[^)]*\);\n/m) { |mm| m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(#{m['prefix']}) << (QStringList()" m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp| res << "\n << #{comp[0]}" } res + ")\n << #{m['replace'].empty?};\n" } if final == body or final['QTest::addColumn'] declaration + final + "}" else final end }.gsub(/QTest::newRow\("([^"]+)"/) { |m| name = $1 if name.size > 73 space = name[0..73].rindex(/[ _]/) "QTest::newRow(\"#{name[0..space]}\"\n \"#{name[space+1..-1]}\"" else m end }.gsub(/\s+QTest::newRow/, "\n\n QTest::newRow") if mod != s File.open(Fname, 'wt').write(mod) end Change-Id: Id6bfb03cdf31ac27b36028fcdc861c340a5398f4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>