aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppeditorplugin.h
Commit message (Collapse)AuthorAgeFilesLines
* CppEditor: Fix Typedef Handling with 'Remove Using Directive' QuickFixLeander Schulten2020-10-121-0/+2
| | | | | | | | Previously, typedefs were ignored and the new code became invalid after applying the quickfix. Change-Id: I0d4295e90d02dfacc3edac5ac3f96d9edbeaf662 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Implement remove using namespace QuickfixLeander Schulten2020-08-121-0/+4
| | | | | | Fixes: QTCREATORBUG-24392 Change-Id: Iaf4df4ebf161a4a757f59f22e692e0f9b99cd63c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Fix following signals/slots in old-style connectsChristian Kandeler2020-08-101-0/+1
| | | | | | | | | ... if the first argument is a call to a function returning a pointer to QObject. Fixes: QTCREATORBUG-13265 Change-Id: I12c2d07331a0c6dca56ad55c518240fd74be3dca Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Let users create implementations for all member functionsChristian Kandeler2020-07-291-0/+2
| | | | | | | | ... in one go. Fixes: QTCREATORBUG-12164 Change-Id: Ifc81c8b1caf4319ce57882375f513d72e4c0ea52 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Add class member from member initializationChristian Kandeler2020-07-231-0/+3
| | | | | | | | | That is, if a class member being initialized is not yet declared, offer to add the declaration. Fixes: QTCREATORBUG-11842 Change-Id: I1d2a56ab99543e996e220aa26b7923023dd163f7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Fix possible wrong location for function definitionsChristian Stenger2020-07-161-0/+1
| | | | | | | | | | Having no namespace when inserting generated functions may insert explicitly at the end of a header which is not always desired as we need to take care of e.g. header guards as well. Change-Id: I3b154ae936a96f2f8e7e34cda6b5bcdfcbc83faf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Ensure "inline" specifierChristian Kandeler2020-07-151-0/+1
| | | | | | | | | ... when creating functions in header files. Otherwise, we will likely cause linker failures in non-trivial projects. Fixes: QTCREATORBUG-15052 Change-Id: Ic0fff8779ba924f8b9943ab233a0cda409e73e9d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Ensure proper namespace for new getter/setter functionsChristian Kandeler2020-07-141-0/+2
| | | | | | | | | | If the class is in a namespace and the cpp file does not yet have any implementations in that namespace, then we would erroneously put the getters in the global namespace. Fixes: QTCREATORBUG-14886 Change-Id: I836537abddfdd92ced783d60e1226b082bbc238e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Offer to create getters and setters for all class membersChristian Kandeler2020-07-101-0/+2
| | | | | | Fixes: QTCREATORBUG-14504 Change-Id: I12c687492b12c6997064eb7f137b6ccb189d2009 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Make "Add curly braces" quickfix more robustChristian Kandeler2020-07-071-0/+2
| | | | | | | | | | Anchor the opening brace at the closing parenthesis, rather than at the statement. This way, we won't get troubled by macro weirdness in the statement part. Fixes: QTCREATORBUG-13921 Change-Id: I05af24d1642e6b62c78bb2f47a1ef0b1fea326d0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Do not underline leading whitespaceChristian Kandeler2020-06-231-0/+3
| | | | | | | | | ... when visualizing the range of a code model warning. Otherwise, warnings covering multiple lines can get too noisy. Fixes: QTCREATORBUG-18659 Change-Id: Ieff7729d8069e791027f7bdde5fca13f4c7f7163 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Do not treat friend declaration as member functionChristian Kandeler2020-06-051-0/+1
| | | | | | | | | | | ... when trying to create definitions from declarations. Instead, we completely ignore friends in this context, arguing that the respective function normally should have a proper declaration somewhere else. Fixes: QTCREATORBUG-7164 Change-Id: I3ddb89cefecbc494f9c7e63600b65fd6288b7169 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CppEditor: Add quickfix for creating a forward declarationChristian Kandeler2020-05-271-0/+3
| | | | | | | | | In header files, a forward declaration is often preferable to including another header file, so let's offer this as a quickfix. Fixes: QTCREATORBUG-23444 Change-Id: Ib50550abb5337098e4122e65e2af42a66742d6f6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Transfer noexcept specifier for refactoring actionsNikolai Kosjar2019-10-081-0/+1
| | | | | | | | | | | | | | This applies for e.g. * "Add Definition..." (on function decl) * "Move Definition..." (on function decl) * "Insert Virtual Functions of Base Class" (on class specifier) Fixes: QTCREATORBUG-11849 Fixes: QTCREATORBUG-19699 Change-Id: I0d259bc1782470f3b3f19617230005a5594a5cca Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ExtensionSystem: Move away from QListEike Ziller2019-05-271-1/+1
| | | | | | | | Qt 6 API will move away from it. Use QVector for API and some std container for internal things. Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8 Reviewed-by: hjk <hjk@qt.io>
* CppEditor: ModernizeNikolai Kosjar2019-02-081-1/+1
| | | | | | | | | | | | | | modernize-orgad modernize-return-braced-init-list modernize-use-auto modernize-use-default-member-init modernize-use-equals-default modernize-use-nullptr modernize-use-override modernize-use-using Change-Id: Ifa862782fb7b56ed3f93d9f98685c3af616797c2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move find usages to TextEditorDavid Schulz2018-11-281-1/+0
| | | | | | | | | In preperation for supporting find usages by the language client plugin Task-number: QTCREATORBUG-21577 Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditorPlugin: Partially pimpl and avoid use of global object poolhjk2018-02-091-30/+3
| | | | | Change-Id: I1e55848a9947ff0b4bffcdca717419db8f6f2fa5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Clean forward declarationLaurent Montel2017-09-271-2/+0
| | | | | Change-Id: Id2a4d203e7a0c3405ca612aeb294b25be8a37323 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppEditor: refactor FollowSymbolIvan Donchevskii2017-09-151-0/+3
| | | | | | | | Create an interface to get the ability to use another FollowSymbol implementation Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Add enclosing template on "Add Definition"Orgad Shaneh2016-09-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | The template id for the class name is missing, but it's better than nothing. For example: template<class T> class Foo { void func(); // Add Definition }; // The following lines are added template<class T> void Foo::func() // Should be Foo<T>::func { } Change-Id: I60a0cbd348985def3dfb7037067786e942278593 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Add template enclosing scope on "Insert Declaration"Orgad Shaneh2016-08-191-0/+2
| | | | | Change-Id: Iff4893193b56c2ed86b4b9515a1a1df847528369 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Prevent "Add Declaration" for existing template functionsOrgad Shaneh2016-08-191-0/+1
| | | | | | | | | | | | | | class Foo { template<class T> void func(); }; template<class T> void Foo::func() {} // Add Declaration should not be triggered at all Change-Id: Ifff733d8381177300dae017ae419200cfdf5c425 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Fix "Move Definition to Class" for template member functionsOrgad Shaneh2016-08-191-0/+1
| | | | | | | | | | | | | | | | class Foo { template<class T> void func(); }; template<class T> void Foo::func() {} // Move to class It currently doesn't trigger at all. Change-Id: I63d561771a8dd455f01e99dd836abbd23eec71b7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Fix "Move Definition to Class" for function in template classOrgad Shaneh2016-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | template<class T> class Foo { void func(); }; template<class T> void Foo<T>::func() {} // Move to class Prior to this change, this currently leaves behind `template<class T>` where the definition used to be: template<class T> class Foo { void func() {} }; template<class T> Task-number: QTCREATORBUG-14354 Change-Id: I8e1f75a3ae50619a7bae9c63d3798b16bcfea545 Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Add a failing test for move outside class with templateOrgad Shaneh2016-07-221-0/+1
| | | | | | Task-number: QTCREATORBUG-16649 Change-Id: I29c42c23f4dc44b0401fb07c0dc6d0008dcaf096 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Allow prefering getter names with "get" prefixNikolai Kosjar2016-06-221-0/+1
| | | | | | | | | We default to "foo()" for e.g. a member variable "m_foo", but other coding styles require "getFoo()". Task-number: QTCREATORBUG-16452 Change-Id: I9ccfdf88e4c469bc1c06fde855ad754faf2bd238 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* CppEditor: Use Qt5-style connectsOrgad Shaneh2016-05-301-2/+2
| | | | | | | The heavy lifting was done by clazy. Change-Id: I5ee3678f8293486cccfc634aaab5c75b066ed011 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Add auto completer test.David Schulz2016-05-121-0/+10
| | | | | Change-Id: I21ab7e3754ab0801fb8219a1c92cd4b526cd618e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* 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>
* CppEditor: Fix ConvertQt4Connect for different namespaceOrgad Shaneh2015-12-151-0/+1
| | | | | Change-Id: I152d7cda02bb034bf817eeeb4b467667e1188b2f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppEditor: Add missing override modifiers.Christian Kandeler2015-08-201-3/+3
| | | | | Change-Id: I88c7c6c2e344e1ecfb8b6be3814cc900eff6b0b2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppEditor: Tests: Revive tests depending on loaded projectsNikolai Kosjar2015-07-291-2/+11
| | | | | | | | | | | | The tests were broken since the qmake project manager switched to an asynchronous loading. We can't simply check if there are loaded projects because at time the tests are executed there are not any. The user has to set some environment variable in order to make these tests run. Change-Id: I94778578dea5562ee5dad2c565c7b877c18996a7 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* cppeditor: s/Q_DECL_OVERRIDE/override/gTobias Hunger2015-06-041-1/+1
| | | | | Change-Id: Ie0b75ea64ec3927732b484983311990c8ca0d057 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppEditor: Add basic test for ExtractFunctionNikolai Kosjar2015-03-131-0/+3
| | | | | Change-Id: I44f2edb2905e202669630ab5da85066011491fae Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* CppEditor: override -> Q_DECL_OVERRIDEDaniel Teske2015-02-161-1/+1
| | | | | | | Pre g++4.7 compilers don't know override. Change-Id: I07306ebe4f9161bb3806e9b4d1d4a143448c0033 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
* | CppEditor: Create only getter or setter member functionLorenz Haas2015-02-091-0/+4
| | | | | | | | | | | | | | | | | | In addition to create both getter and setter member functions at once it can now be decided to only create a getter or setter member function. Task-number: QTCREATORBUG-13874 Change-Id: I9127a31b7d87dc91619abb2e2335bd8221f170a2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | CppEditor: Tests: Move doxygen tests in separate test classNikolai Kosjar2015-02-041-5/+3
| | | | | | | | | | Change-Id: If27b4e11deafaefd95a5815466fc5fdac23ba30a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | CppEditor: MoveAllFuncDef now ignores generated function definitionsLorenz Haas2015-02-031-0/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-13900 Change-Id: I394ed96072c590df627bc29f1962cdab4f7d34d7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | CppEditor: Make CppEditorOutline independent of CppEditor pluginNikolai Kosjar2015-01-261-7/+0
| | | | | | | | | | Change-Id: I1cafcd8daf93ffc2f672bf7e2ba5d1c8ea5e8652 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* | CppEditor: Add new QuickFix MoveAllFuncDefOutsideLorenz Haas2015-01-261-0/+5
| | | | | | | | | | | | | | | | This QuickFix behaves like MoveFuncDefOutside except it moves all member function definitions. It is triggered on the class name. Change-Id: I1393a51cad521a7bb58a1ed6223ab0fe4db0e592 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | CppEditor: Tests: Make AddIncludeForUndefinedIdentifier tests data drivenNikolai Kosjar2015-01-231-28/+2
| | | | | | | | | | | | | | | | ...as far as possible. Change-Id: Ida039df7fbd4f1a9fce354dd8541c32255752082 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | C++: Do not compare flags when matching typesOrgad Shaneh2015-01-211-0/+1
|/ | | | | | | | Trust the matcher to do the job. Task-number: QTCREATORBUG-13564 Change-Id: I4ff14608a1ce12d3f4424242e50ba71233ac9bfd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppEditor: Avoid duplicate "Add #include XYZ"Nikolai Kosjar2014-11-281-0/+1
| | | | | | Task-number: QTCREATORBUG-13422 Change-Id: I3648bf44760fdac4e8e1e79652519136af6032c8 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* C++: fix follow symbol for const argumentsPrzemyslaw Gorszkowski2014-11-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Fixed case: class Foo {}; void foo(int v) {} void foo(const char *v) {} void foo(const Foo &v) {} void foo(char v) {} void test() { foo(5); foo("hoo"); foo('a'); char *var = "var"; foo(var); // Jumps to last override, regardless of its type Foo f; foo(f); // Jumps to last override } Task-number: QTCREATORBUG-13128 Change-Id: I038553bb3bdbe1c300fc01573c14b6fedf0320cd Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppEditor: Merge AddIncludeForForwardDeclaration into ↵Nikolai Kosjar2014-10-221-0/+3
| | | | | | | | | | | | AddIncludeForUndefinedIdentifier * Fixes multiple addition of same include. * Takes over the check of AddIncludeForForwardDeclaration for forward headers. Task-number: QTCREATORBUG-9704 Change-Id: I84629d35ae433385942a9157e5d32ef04159d07f Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* C++: fix multi-line continuation handling.Erik Verbruggen2014-10-211-0/+2
| | | | | | | | | | When having doxygen enabled, but leading astriskses disabled, a comment continuation line did not insert an extra space for where the astrisks would have been, thus mis-aligning the second line. Task-number: QTCREATORBUG-12539 Change-Id: I47baa203fd5d9279fa89a06f526f3abed06ce443 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>