summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodestylesettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-262/+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>
* Use less nullptr for empty flagshjk2020-01-211-1/+1
| | | | | Change-Id: Ic4eafdc8f204a432a752a97593380609a408a7de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: ModernizeNikolai Kosjar2019-02-081-29/+5
| | | | | Change-Id: I78af9cd4ccddfa4ed744dce96b772ae5644c89d2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: modernizeAlessandro Portale2019-01-211-3/+3
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: Return proper tab settingsIvan Donchevskii2018-12-121-2/+2
| | | | | | | | We are always interested in currentTabSettings(). Fixes: QTCREATORBUG-21280 Change-Id: I5b739b516eb985074c27410113c244787dd8b52d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppTools: Simplify the currentProjectCodeStyle codeIvan Donchevskii2018-11-131-4/+5
| | | | | | | Use alias to shorten the repeating default return value. Change-Id: I673fc1d293c1612c945c80d554c6667a756108de Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Allow to check whether project code style existsIvan Donchevskii2018-11-121-6/+9
| | | | | | | | | | | The calling code can anyways fallback to the global style without extra help if no project style exists. It is useful when you want to get the project style if it exists and understand at the same time that it is not a global one. Change-Id: I265de3f436f90623385427fc8a1abad09c8c3577 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ClangFormat: Synchronize with C++ code style settingsIvan Donchevskii2018-11-081-0/+27
| | | | | | | | | And remove UI for default code style settings because it does not affect anything when ClangFormat plugin is enabled. Change-Id: Ie348b7d2691b09ea2b4868da987f2a27347ea0f3 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppTools: Allow prefering getter names with "get" prefixNikolai Kosjar2016-06-221-26/+38
| | | | | | | | | 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>
* 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>
* Clean exported headers of the CppTools plugin.Friedemann Kleint2015-03-051-0/+2
| | | | | 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>
* | Completely rework currentNode/currentProject handlingDaniel Teske2014-12-031-2/+2
|/ | | | | | | | | | | Centralize the handling inside a new class ProjectTree. React to moving focus and remove most special handling. This properly fixes the linked task. Task-number: QTCREATORBUG-13357 Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@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>
* CppTools: Fix "! condition" coding styleNikolai Kosjar2013-07-251-1/+1
| | | | | | Change-Id: Ic7e634e4249fb64edbc2daceb65ec8e9b5f0f8b9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Clean headers in CppTools.Friedemann Kleint2013-04-101-1/+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-5/+4
| | | | | | | | | | | ... 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>
* Fix Krazy warnings about includes/header guards in Cpp-Editor.Friedemann Kleint2013-03-121-1/+0
| | | | | Change-Id: I00a68d7f2b509e3934c3248765a78e9b47749127 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | CppTools: Fix qbs buildOrgad Shaneh2013-01-241-2/+1
| | | | | | | | | | | | | | Global include is wrong Change-Id: I34848ba4b92cfa047854abd476ed983f205bdf72 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: Add settings dialog for pointer declaration formattingNikolai Kosjar2013-01-241-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dialog is at Tools > Options > C++ > Code Style > Edit... > Pointers and References. Currently the settings are referenced when applying the following QuickFixes: - Adapting function signature in declaration/definition (FunctionDeclDefLink) - Inserting declaration from definition (InsertDeclOperation) - Inserting definition from declaration (InsertDefOperation) - Extracting a function (ExtractFunctionOperation) - Add Local Declaration (AddLocalDeclarationOp::Operation) In these cases the code style of the current project is used. If there is no current project open, the current global code style is used. Task-number: QTCREATORBUG-6169 Change-Id: I3e4e502b3103f7f754ac9b39594ad461d89d9304 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Replace some const char * with const char[]Orgad Shaneh2012-11-221-17/+17
|/ | | | | Change-Id: I7657792d9ebfcaede7b719400d239f837074290b Reviewed-by: David Schulz <david.schulz@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Add missing license headers.Christian Kamm2011-07-061-0/+32
| | | | | | Change-Id: I2dc5d18bfffc8389ad0b162b7dc3b5cc2406027f Reviewed-on: http://codereview.qt.nokia.com/1222 Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
* Make C++ code style configurable.Christian Kamm2011-05-241-0/+133
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b Done-with: Jarek Kobus Task-number: QTCREATORBUG-2670 Task-number: QTCREATORBUG-4310 Task-number: QTCREATORBUG-2763 Task-number: QTCREATORBUG-3623 Task-number: QTCREATORBUG-567 Reviewed-on: http://codereview.qt.nokia.com/74 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>