summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpppointerdeclarationformatter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-472/+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>
* C++: fix built-in code model to work with shared_ptr on MSVC 2017Volodymyr Zibarov2020-05-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | These changes target Find Usages feature to work with shared_ptr. Improve libs/3rdparty/cplusplus and plugins/cplusplus: parse __declspec() attribute, call to variadic function template without specified template arguments, if constexpr, c++11 attributes [[value]], function templates with default parameters, resolve order for function vs template with default parameter, template operator->() with default arguments, template specialization with numeric values, find best partial specialization, fix partial specialization for non-first specialized argument Fixes: QTCREATORBUG-7866 Fixes: QTCREATORBUG-20781 Fixes: QTCREATORBUG-22857 Fixes: QTCREATORBUG-17825 Change-Id: I31a080f7729edfb2ee9650f1aff48daeba5a673b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
* Standardize on int for line and column valueshjk2019-07-261-2/+2
| | | | | | | | | | | | | | | Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-18/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Clean exported headers of the CppTools plugin.Friedemann Kleint2015-03-051-0/+3
| | | | | Change-Id: I0144ac33e88980c431c54a6d69bbde28da4b1967 Reviewed-by: Orgad Shaneh <orgads@gmail.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++: Better names for Scope's iteratorsNikolai Kosjar2015-01-141-1/+1
|/ | | | | | | | Scope::lastMember() was misleading. Change-Id: I953d489b8a2a9b86321f73cad3b7b371c4acf91f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Unify Utils::ChangeSet usagesOrgad Shaneh2014-06-021-3/+3
| | | | | | | | | * Remove using Utils::ChangeSet from header files * Remove unused typedef for Range * Add it only in source files that contain many occurrences Change-Id: I60a8b77e2d5a46431507f53b6d60186d511ccf30 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Cpp{Tools,Editor}: Expect UTF-8 encoded literalsNikolai Kosjar2014-05-231-2/+2
| | | | | Change-Id: I9843c4163aad3fa3f1bfa33060c76328fc2dc25a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Pass some const variables by referenceOrgad Shaneh2014-05-211-1/+1
| | | | | Change-Id: I3e703c923f6e1a14a89c76f394a070184db0c7bf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* 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>
* Merge remote-tracking branch 'origin/2.8'Eike Ziller2013-09-271-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/extensionsystem/pluginmanager.cpp src/libs/extensionsystem/pluginspec.cpp src/plugins/coreplugin/basefilewizard.cpp src/plugins/coreplugin/coreplugin.pro src/plugins/coreplugin/coreplugin.qbs src/plugins/coreplugin/editormanager/ieditor.cpp src/plugins/coreplugin/externaltool.cpp src/plugins/coreplugin/icore.cpp src/plugins/cpptools/cppmodelmanager.cpp src/plugins/fakevim/fakevimhandler.cpp src/plugins/find/ifindfilter.cpp src/plugins/projectexplorer/buildstep.cpp src/plugins/projectexplorer/devicesupport/idevice.cpp src/plugins/projectexplorer/runconfiguration.cpp src/plugins/vcsbase/vcsbaseeditor.cpp tests/system/suite_debugger/tst_simple_analyze/test.py Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
| * Doc: edit cpptools docsLeena Miettinen2013-09-091-14/+14
| | | | | | | | | | | | | | | | | | | | Remove \briefs from function descriptions and use standard wording in them. Use standard wording for \enum. Replace \param with \a. Change-Id: If429b6fc67ef6d1313c18f6111aa84f9c996189f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Fix "! condition" coding styleNikolai Kosjar2013-07-251-5/+5
|/ | | | | | Change-Id: Ic7e634e4249fb64edbc2daceb65ec8e9b5f0f8b9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* CppEditor: Respect whitespace in operator names for more quick fixesNikolai Kosjar2013-06-251-29/+7
| | | | | | | | | * Affected quick fixes: InsertDefFromDecl, MoveFuncDefOutside * Fix also reformating pointer declaration of operator functions for qualified name ids Change-Id: I6a7578f496221557d103f5fdbb5dacc9540ee779 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Handle operator functions when reformatting */& declarationsNikolai Kosjar2013-06-111-7/+26
| | | | | | | | | Respect also whitespace within the operator names (e.g. "operator=" vs "operator ="). Change-Id: Ibdfc77e9eebf7e3db31ccce7d8959b226dcda765 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Clean headers in CppTools.Friedemann Kleint2013-04-101-3/+0
| | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: Ic8464ea084ca1ab401e9f4a7d0183b92b4038902 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-1/+1
| | | | | | | | | | | ... and adjust INCLUDEPATH accordingly. while i'm at messing with include statements, also re-order the include blocks according to policy and sort them within bigger blocks. Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* C++: Make pointer declaration formatter more robustNikolai Kosjar2013-02-121-20/+82
| | | | | | | | | - Abort on expanded tokens - Abort on simple declarations starting with "class"/"struct"/"enum" - Abort if rewritten declaration does not contain '*'/'&' Change-Id: Ifddb6f20d6bc5c0afc3fcd1d742615198515a04c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Introduce PointerDeclarationFormatterNikolai Kosjar2013-01-241-0/+417
For a given AST, CppRefactoringFile and Overview this will create a ChangeSet for rewriting the pointer or reference declaration according to the Overview. Task-number: QTCREATORBUG-6169 Change-Id: If6f824c1ea5e9f53a11a58ec8b6d696d01f0723e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>