summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/CppRewriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/2.8'Oswald Buddenhagen2013-08-211-0/+38
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppcompletion_test.cpp src/plugins/cpptools/cpptoolsplugin.h src/plugins/projectexplorer/customtoolchain.cpp src/plugins/vcsbase/command.cpp Change-Id: Ie7b3c9e136c0748b41320227c757471259339b48
| * CppRewriter: Replace std::__debug with std:: when beautifing typeshjk2013-08-161-0/+1
| | | | | | | | | | | | | | | | This only affects the visual presentation in Locals and Expressions and also lets more autotests pass it when compiled with -D_GLIBCXX_DEBUG Change-Id: I2672aa8610e8f6652606faefd858ecb450cef199 Reviewed-by: David Schulz <david.schulz@digia.com>
| * Debugger: Implement dumper for std::unordered_{set,map}hjk2013-08-161-0/+37
| | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-9855 Change-Id: I985745530d93e1c191442431a7a9449a1c4c059a Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* | Fix coding style for else statementsOrgad Shaneh2013-07-171-2/+2
| | | | | | | | | | Change-Id: I1309db70e98d678e150388c76ce665e988fdf081 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | C++: Fix names of functions dealing with enclosing scopesNikolai Kosjar2013-07-161-1/+1
|/ | | | | | | | | | | | ...in order to better tell apart the type related functions isScope()/asScope() and the functions dealing with enclosing scopes: * scope() --> enclosingScope() * setScope() --> setEnclosingScope() * resetScope() --> resetEnclosingScope() Change-Id: Id743a7d1b6a1a1a0ffcd8568cbd8ebbdfc16eaa1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* CppRewriter: Treat libc++'s std::__1:: as std:: for debugger displayhjk2013-07-081-0/+1
| | | | | | Change-Id: Iabc1330633e5568b7c94059d4286c93adfecb1a2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix indentationOrgad Shaneh2013-05-061-4/+4
| | | | | | | | | Mostly 3 leading spaces converted to 4 A few other indentation issues Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863 Reviewed-by: hjk <hjk121@nokiamail.com>
* fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-8/+11
| | | | | | | | | | | ... 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++: use argumentCount in loops in initializer.Erik Verbruggen2013-03-151-1/+1
| | | | | | | | argumentCount is a more expensive function, so try to call it only once, esp. in loops. Change-Id: I6f0d420352743ec444487ce3f506ef28e5282d1e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppRewriter: Handle std::ifstream in simplifySTLTypehjk2013-02-041-0/+8
| | | | | Change-Id: I1cdb193ac4a4a3ad9005c4445cd38406412cb058 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* | C++: Fix code compl. for instantiation of template specializationPrzemyslaw Gorszkowski2013-01-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | It works for full specialization. Instantiate of the partial specialization has to be implemented(finding appropriate partial specialization-on going) Added unit test. Change-Id: I8ef5ea963e7c665e0d67d390b3a833486773dab0 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-4/+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>
* | CPlusPlus: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-12-041-8/+8
|/ | | | | | Change-Id: I1cfb413b7e88e91e9c4719a8a7b81c752c40767e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Fix "Apply function signature change" for boost::shared_ptrPrzemyslaw Gorszkowski2012-10-021-1/+2
| | | | | | | | Problem was with nested template type(in this case shared_ptr<T> is nested template type) Task-number: QTCREATORBUG-6784 Change-Id: I8ea9203f2b1fbde73d9ac4e6c8cdeb2b6e0afcef Reviewed-by: David Schulz <david.schulz@digia.com>
* C++: Escape strings before using them in CppRewriter regexpshjk2012-08-241-6/+10
| | | | | Change-Id: Ia2aaf91c71e8406944085c5137b67317331cc898 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* C++: Use soft asserts in CppRewriterhjk2012-08-241-5/+10
| | | | | | | | | | | | | | | While a "real" C++ type rarely contains parantheses or other characters that are "special" for a regexp, gdb happily sprinkles in things like "(anonymous namespace)::". Killing Creator while trying to beautify such a name is inaccpetable. This should be followed up by patches handling the known problematic cases properly. Change-Id: I8cc8509f1d7df0a8780876cdba556e1cf7ec4a95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Compile after qt5/qtbase commit 75a0c7f9Bradley T. Hughes2012-04-301-1/+1
| | | | | | | | | | | Commit 75a0c7f9b52cde47f20fdc1b89e1264d60350848 in qt5/qtbase changed some QRegExp methods to be non-const (they were previously const). This change makes Qt Creator compile again. Change-Id: Ibc98c678126c3b3189df7fcc043463b940951445 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Daniel Teske <daniel.teske@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>
* 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>
* C++ insert def: Fix bug when minimizing name.Christian Kamm2011-10-311-32/+1
| | | | | | | | | | Constructors would not get the correct name before. Now rewriting the function's name is not done by going through the 'rewrite type' func- tionality but rather by minimizing the symbol's name directly. Task-number: QTCREATORBUG-6223 Change-Id: I3c25e414337937f5dd0f54570c899ca2ca21d2ef Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++: Fix a crash in debug builds when rewriting functions.Christian Kamm2011-10-251-0/+3
| | | | | Change-Id: I35266b69d1cc433c4d9176cc849efd03ea1cc1cd Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++ insert definition: Use minimally qualified names.Christian Kamm2011-08-081-7/+43
| | | | | | Change-Id: I633dbc77557fc2b6563888103350612a262536ee Reviewed-on: http://codereview.qt.nokia.com/2731 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* Update license.hjk2011-04-131-14/+13
|
* It's 2011 now.con2011-01-121-1/+1
| | | | Reviewed-by: hjk
* Merge branch '2.1'con2010-12-171-7/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/basemode.cpp src/plugins/coreplugin/basemode.h src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp src/plugins/debugger/debuggeragents.cpp src/plugins/debugger/debuggeruiswitcher.cpp src/plugins/debugger/debuggeruiswitcher.h src/plugins/projectexplorer/buildconfigdialog.cpp src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp src/plugins/qmldesigner/components/propertyeditor/colorwidget.h src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h src/plugins/qmldesigner/designercore/include/modelutilities.h src/plugins/qmldesigner/designercore/include/nodeinstance.h src/plugins/qmldesigner/designercore/include/propertymetainfo.h src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp src/plugins/qmldesigner/designercore/model/modelutilities.cpp src/plugins/snippets/inputwidget.cpp src/plugins/snippets/snippetscompletion.cpp src/plugins/snippets/snippetscompletion.h src/plugins/snippets/snippetspec.cpp src/plugins/snippets/snippetsplugin.cpp src/plugins/snippets/snippetswindow.cpp src/plugins/snippets/snippetswindow.h src/plugins/texteditor/snippetsparser.cpp src/tools/qml/qmldom/main.cpp tests/manual/trk/runner.cpp tests/manual/trk/trkolddevice.cpp tests/manual/trk/trkolddevice.h tests/manual/trk/trkserver.cpp
| * License headers.con2010-12-171-7/+11
| |
* | Debugger/CPP: Move helpers to simplify types to CPlusPlus-lib.Friedemann Kleint2010-11-251-8/+178
|/ | | | | | | Make available for log simplification, etc. Add autotest, fix broken std::set and MSVC. Rubber-stamped-by: Christian Kamm <christian.d.kamm@nokia.com>
* C++ Editor: check for method existing decl/def when inserting new ones.Erik Verbruggen2010-10-081-0/+2
|
* Merge CPlusPlus::NameId and CPlusPlus::Identifier.Roberto Raggi2010-09-021-2/+2
|
* Get rid of the prefix findOrInsert for the functions in CPlusPlus::Control.Roberto Raggi2010-08-111-1/+1
|
* Refactored CPlusPlus::Function.Roberto Raggi2010-08-051-1/+1
|
* Fixes testcase compilationBill King2010-07-231-1/+1
|
* Skip qualified and template name ids.Roberto Raggi2010-07-201-0/+3
|
* Sorry this was not supposed to be committed.Roberto Raggi2010-07-201-21/+83
| | | | | | Revert "Revert "Try to fix the type rewriter."" This reverts commit c9bc1e7c64fb73e8148b65dfe7a4521121331efc.
* Revert "Try to fix the type rewriter."Roberto Raggi2010-07-201-83/+21
| | | | This reverts commit 33b19f0210cd6ab1504071912caee91a95515c7c.
* Try to fix the type rewriter.Roberto Raggi2010-07-191-21/+83
|
* Disable the copy of SemanticEnvironment.Roberto Raggi2010-07-191-7/+7
|
* Introduced helpers to rewrite types and names.Roberto Raggi2010-07-161-0/+364
Done-with: Erik Verbruggen