summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppchecksymbols.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | C++ editor: Highlighting static variablesPrzemyslaw Gorszkowski2013-01-291-0/+4
| | | | | | | | | | | | | | | | | | Fix highlighting, find usages, marking for static variables. Task-number: QTCREATORBUG-6822 Change-Id: I0c97c93c6c1024550907eec3820496df22a94e85 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++ editor: support nested class of enclosing templatePrzemyslaw Gorszkowski2013-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixing: * highlighting * tooltips * find usage * selecting Task-number: QTCREATORBUG-8245 Change-Id: I6e900799e43126706125b7e424567fca2b2c223e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk <qthjk@ovi.com>
* | Merge remote-tracking branch 'origin/2.6'Eike Ziller2012-11-271-2/+4
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: share/share.qbs src/plugins/cpptools/cppchecksymbols.cpp src/plugins/texteditor/behaviorsettingswidget.cpp Change-Id: Ia34060984f9c036b2f28a6411d796d41f55a3e37
| * fix QCoreApplication::translate usage in cppchecksymbols.cppJoerg Bornemann2012-11-261-2/+2
| | | | | | | | | | | | Change-Id: I4fdae811af1efde50705d857f222866af188885c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <qthjk@ovi.com>
| * Copile fix after f8645bb6hjk2012-11-261-2/+2
| | | | | | | | | | Change-Id: I3218ee94b414a4188c574bc63c9fa6c6d0d0a490 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Translate some stringsOrgad Shaneh2012-11-261-5/+7
| | | | | | | | | | | | Change-Id: I5eab1edbca591cc36813cd862d6ad93875b51a3c Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | CppTools: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-11-221-5/+5
| | | | | | | | | | Change-Id: I31a6117c2b4be3f8603c16a9f98b6937a0b9aeb2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/2.6'Eike Ziller2012-10-051-21/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessageloghandler.h src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/madde/maemodeployconfigurationwidget.h src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentinfo.h src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/ichecklib_global.h tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h tests/manual/ssh/tunnel/tunnel.h Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
| * Adjust license headershjk2012-10-051-21/+20
| | | | | | | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | C++11: More (expression-list) or brace-init-list.Christian Kamm2012-09-191-6/+7
| | | | | | | | | | | | | | | | | | This time in the 'new' expression. Changed it to make new C(1, abc...) and new C{1, abc} work. Change-Id: I7232798fd083b653ee04ef9ede386d6536133e16 Reviewed-by: hjk <qthjk@ovi.com>
* | C++11: Allow uniform initialization in ctor init lists.Christian Kamm2012-09-191-4/+11
|/ | | | | | | | | So class C { C() : _x{12}, _y({12}) {} }; now parses correctly. Change-Id: I4281dcb0541a86b550e74630cad6ae0a59fef1b4 Reviewed-by: hjk <qthjk@ovi.com>
* Editor: rename "Static" in Font & Colors settingsDavid Schulz2012-08-291-2/+2
| | | | | | | | to more clearer "Enumeration" Change-Id: I785edb6d31a4cd6a0875549f80bcf791ad61587a Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Fix display of default keyword in switch statement as a LabelDavid Schulz2012-08-171-1/+1
| | | | | | Task-number: QTCREATORBUG-7172 Change-Id: I08a89cbef183e33300f72ea8cc2c0da9a23c5413 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Added support for override/final and enum classesSergey Shambir2012-07-301-0/+39
| | | | | Change-Id: I6dfe9dd606781046ff5a1ed61315741d2f332cb8 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* C++: Change back highlighting of typesLeandro Melo2012-07-171-1/+1
| | | | | | | | | | | | | | | The type highlighting change part of the recent patch 4a2a17af8aa157cadb4ec230058d9ae34e11fd66 didn't seem to please much from a visual point of view. It's a better idea to keep the type highlighting as it was for now and in the future try again the approach with an explicit option and perhaps a more restrictive context. The other patch is not reverted entirely because it does fix a couple of bugs. Change-Id: I806afa3d8c1c4b241080b8704255d737f61ee12c Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Changes in semantic highlightingLeandro Melo2012-07-171-117/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix issues with virtual/non-virtual destructors. They were not being correctly identified in some cases - in particular on certain uses in derived classes. - Since now we do have a highlighting item for regular functions, constructors and destructors are now highlighted as such. This is more semantically correct and actually makes navigation and readiblity more distinguishable, since it cleary differentiates the type itself from its uses in expressions and declarators. (This seems to be what other IDEs like Eclipse, Visual Studio, KDevelop are doing.) NOTE: There's a switch to disable this item in the case it doesn't get good acceptance. Actually, the switch can be made a user setting...? - Change the default color scheme so regular and virtual functions have the same color (virtuals continue to be italic). This makes sense given the above mentioned changes in constructors/destructors highlighting behavior. (In other schemes virtual funcions don't have different color, so this shouldn't be necessary in those.) - Small renaming: "members" are now "fields" - consistent, since they apply for data and it's the term used in the UI. Change-Id: Ib1aa9c0bbf28a31d09f5696460b0095fbe29de80 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* CppHighlighter: highlight all functions/methods.Francois Ferrand2012-06-051-38/+72
| | | | | | | | | | | | | | - Highlight all function/methods (not just virtual methods). - Highlight as a function even if number of arguments does not match. In that case, add a diagnostic message to indicate there are too many/too few arguments. - Fix highlighting of parameters in function declarations. These used to be handled indiferently, and they could be mistaken for type or field references. - Properly highlight template method calls. Change-Id: I6e61c9ee47763db95c62314f9cc1c4d398df38b3 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* CppHighlighter: highlight macro references.Francois Ferrand2012-04-131-10/+15
| | | | | Change-Id: I7c90957aa67e03a109af0a722160d4e1c759d716 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Revert "CppHighlighter: highlight all functions/methods."Erik Verbruggen2012-03-291-84/+14
| | | | | | | | | This reverts commit e3e67467cfea5934f16a95385761455b0c495a0d Reason is that it shows errors for calls to function-like macros. For example, any use of Q_DISABLE_COPY results in invalid errors. Change-Id: I1fd1473ac5a30da5b9aebf6a3f0f11055bdbe8ad Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* CppHighlighter: highlight all functions/methods.Francois Ferrand2012-03-291-14/+84
| | | | | | | | | | | | | | - Highlight all function/methods (not just virtual methods). - Highlight as a function even if number of arguments does not match. In that case, add a diagnostic message to indicate there are too many/too few arguments. - Fix highlighting of parameters in function declarations. These used to be handled indiferently, and they could be mistaken for type or field references. - Properly highlight template method calls. Change-Id: I6ab463996dda47554839f482da47f561f76663a7 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* C++: handle destructor names with template parameters.Erik Verbruggen2012-02-231-8/+11
| | | | | | Change-Id: I74b4fd5e043db935abc18345b303d294b71e8fc2 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* C++: Add support for C++11 range-based 'for' loopsFlex Ferrum2012-02-211-0/+4
| | | | | Change-Id: I7eef048a7952a79f031ae3d0abba68e3c5ffbfb8 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-3/+3
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* C++: Added highlighting for labels.Erik Verbruggen2012-02-091-0/+17
| | | | | Change-Id: I559a3112d2aa0a3c09554f8da8b7917f9aa27944 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Move QtConcurrent library into Utils.Friedemann Kleint2012-02-091-1/+1
| | | | | | | | It causes a conflict with the new QtConcurrent library of Qt 5 and is quite small. Change-Id: Ib97ab6daf8f67a88300cf03f044ba3593a4cd270 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* C++: Moved completion/highlighting into the model manager.Erik Verbruggen2012-02-081-0/+1110
This way the editor does not need to know all the details of instantiating or maintaining classes for highlighting and/or completion, it can just ask the model manager. The change also enables different highlighting- or completion-engines without changes to the cppeditor. Change-Id: I8000d9d9fe446b292defddb2295493cf77d0f14a Reviewed-by: Leandro Melo <leandro.melo@nokia.com>