summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/LookupContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | C++: fix cloning of templatesPrzemyslaw Gorszkowski2013-04-171-0/+2
| | | | | | | | | | | | | | | | | | Fix instantiation of templates(by cloning original symbols). Assigning of scope for cloned symbol is taken from the symbol which is used to instantiate. Task-number: QTCREATORBUG-9098 Change-Id: I066cc8b5f69333fabdaf2d4466b205baf08bd3f1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Merge remote-tracking branch 'origin/2.7'Eike Ziller2013-04-111-20/+36
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppchecksymbols.h src/plugins/qmldesigner/components/formeditor/resizecontroller.cpp Change-Id: I887ba071fa637ad44e39bcae581738fa078a6612
| * C++: fixed code completion for namespace aliasesPrzemyslaw Gorszkowski2013-04-101-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-166 Change-Id: I7a19065a57bfb943e5fc4e2bd9bd81988c1175e3 Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
| * C++: name of function of class problemPrzemyslaw Gorszkowski2013-04-101-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fixes: * highlighing * find usage * follow symbol when function of class has the same name as: * local variable * template parameter * other struct/union/class/enum * function argument in function scope. Task-number: QTCREATORBUG-8902 Change-Id: Iddc0f764af689babb40d39460d174bac7b919b31 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
| * C++: fixed operator arrow of nested class of enclosing templatePrzemyslaw Gorszkowski2013-04-101-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: * code completion * highlighting * find usage * follow symbol Task-number: QTCREATORBUG-9005 Change-Id: I3fcc2638482ca1071c1aa7b6aab0d4dd128595bb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-6/+7
| | | | | | | | | | | | | | | | | | | | | | ... 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>
* | Merge remote-tracking branch 'origin/2.7'Eike Ziller2013-03-081-20/+58
|\ \ | |/ | | | | | | | | | | | | Conflicts: qtcreator.pri qtcreator.qbs Change-Id: Ie71d0d5aebdd1406d94de348bcd4cfcc203a1ba9
| * C++: cache fully qualified name lookupus in scopes.Erik Verbruggen2013-03-051-20/+58
| | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-8724 Change-Id: I00b0712cf5514bcec04b674052ad4b5b66cca506 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Merge remote-tracking branch 'origin/2.7'Oswald Buddenhagen2013-02-281-4/+67
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/qnx/blackberrydeployconfiguration.cpp Change-Id: I16d1c7717f4bc25ba7e8dbdd5be6580fafe3f33d
| * C++: performance improvement for template instantiationPrzemyslaw Gorszkowski2013-02-271-2/+9
| | | | | | | | | | | | | | Add cache for instantiated instantiations in base template class. Change-Id: I5c457ea4dfeab72cc3910f0092ca1bc14b8aa1ac Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
| * C++: fix 'using' for templates in typedefsPrzemyslaw Gorszkowski2013-02-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fix resolving typedef of templates which is from different namespace and there was 'using' used for it. Examples are in tests. Another step to bring code completion for stl containters. Task-number: QTCREATORBUG-7978 Change-Id: I2e9e71b45d60536c1e25cf2d371c4719b15edf79 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
| * C++: fix instantiation of template special. with pointer argumentPrzemyslaw Gorszkowski2013-02-211-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed code completion for instantiation of template specialization with argument as pointer, e.g.: template <typename T> struct Template { T variable; }; template <typename T> struct Template<T *> { T *pointer; }; Template<int*> templ; templ.pointer; Change-Id: I7c79fe0cd7119b1208f064aece0cafdf50e1a012 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
| * C++: fixed resolving complex typedefPrzemyslaw Gorszkowski2013-02-201-0/+11
| | | | | | | | | | | | | | | | Unit test describe this complex typedef. Another step to bring code completion for stl containers. Change-Id: I27985c4ea7c26c723d7a88ce42c5ecf164b6c903 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Qt5: Don't use the deprecated {QString,QChar}::fromAscii()Debao Zhang2013-02-261-1/+1
|/ | | | | | Change-Id: Ic1d302c2186b11ffec5139f4f491d477d334ec8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* C++: instantiate template with default argumentPrzemyslaw Gorszkowski2013-02-011-12/+21
| | | | | | | | Fix code completion for instantiation of template with default argument Change-Id: I57b0306cc4540400ae83724db6c8b6b1aa67c255 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@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 completion for Qt containersPrzemyslaw Gorszkowski2012-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change solves only problem with Qt containers. stl containers need separate change. Problem was with predeclaration of template class after declaration of this template class. (there is unit test added which shows the problem). Task-number: QTCREATORBUG-8228 (cover only Qt containers) Change-Id: If1f76c88c955b7b55347d302b353f5cd52b244a4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Conflicts: src/plugins/cpptools/cppcompletion_test.cpp Change-Id: I9f665276926f2e440ad0c92e94dd1aeee89005b3 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | C++: Fix code compl. for instantiation of template specializationPrzemyslaw Gorszkowski2013-01-301-5/+36
| | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/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>
* | C++: Fix code completion for nested classesPrzemyslaw Gorszkowski2012-12-201-12/+130
| | | | | | | | | | | | | | | | | | | | Fix code completion for nested classes when enclosing is template class. Unit tests Task-number: QTCREATORBUG-8245 (only standalone) Change-Id: Ib31ad4b799db927b56debd4dc3e7403404c1839d Reviewed-by: hjk <qthjk@ovi.com>
* | CPlusPlus: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-12-041-1/+1
| | | | | | | | | | | | Change-Id: I1cfb413b7e88e91e9c4719a8a7b81c752c40767e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | C++: Fixed code completion for nested classPrzemyslaw Gorszkowski2012-11-211-0/+1
| | | | | | | | | | | | | | | | fixed code completion for nested class when enclosing class is a template. It has also unit tests. Change-Id: Ia25b78a10fa5e1349b618a0e7010ddc502fa620f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: Fix code completion for Qt containersPrzemyslaw Gorszkowski2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This change solves only problem with Qt containers. stl containers need separate change. Problem was with predeclaration of template class after declaration of this template class. (there is unit test added which shows the problem). Task-number: QTCREATORBUG-8228 (cover only Qt containers) Change-Id: If1f76c88c955b7b55347d302b353f5cd52b244a4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Clean up ClassOrNamespace::nestedTypePrzemyslaw Gorszkowski2012-10-311-12/+0
| | | | | | | | | | | | | | Remove unused code Change-Id: I5d00acccf1d453cf08fbd4981d16bc12283437f1 Reviewed-by: hjk <qthjk@ovi.com>
* | C++11: Correct scoping for scoped enums.Christian Kamm2012-10-311-16/+17
| | | | | | | | | | | | | | Fixes completion, highlighting and find usages. Change-Id: I1ea12c6a9c7a4f8ba0f9d55e31d6b7986233e7d8 Reviewed-by: hjk <qthjk@ovi.com>
* | C++: Compile fixes in tests and tools.Nikolai Kosjar2012-10-231-1/+1
| | | | | | | | | | | | | | | | After some refactorings not all usages, especially in tests and tools, were adapted. Change-Id: I7ed24bb1c8e55e55ed74eda3a8fd7610e725f4cb Reviewed-by: hjk <qthjk@ovi.com>
* | Merge remote-tracking branch 'origin/2.6'Eike Ziller2012-10-221-4/+40
|\ \ | |/
| * C++: Fix typedef resolving when templates are involved.Erik Verbruggen2012-10-191-4/+40
| | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-7978 Change-Id: I27e6ebe56e410d509580a1e00f8986642cacc5ba Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | CppEditor: remove operator() overloads from OverViewhjk2012-10-171-6/+6
|/ | | | | | | Feels less obfuscated. Change-Id: Ide0ec1f38762038ddbb1eddb4f70f7d6acdf1ff7 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix member rewriting when doing template instantiation.Erik Verbruggen2012-10-111-16/+36
| | | | | | Task-number: QTCREATORBUG-7964 Change-Id: Icc7d87bb4f2d1ab0560a6c06187d9c23da9fe3e9 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>
* Fix crashes when cyclic inheritancePrzemyslaw Gorszkowski2012-10-021-1/+14
| | | | | | | Task-number: QTCREATORBUG-7933 Change-Id: I98469a092ff3ff0acc69800e9aade4ebb268332a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix crashes when typing codePrzemyslaw Gorszkowski2012-09-281-1/+22
| | | | | | | | | | | Problem was with cyclic recurrence. To solve it we need to check if derived class is different class than its base class. Keep completion corrected. Include some unit tests when base class has the same name as derived. Task-number: QTCREATORBUG-7887 Change-Id: I7973c0b06e3b62d2da3d06048f4327d18a0b8011 Reviewed-by: hjk <qthjk@ovi.com>
* C++: Fix endless recursion in base template lookupLeandro Melo2012-09-111-2/+5
| | | | | | | | When the template and base template are actually the same. Task-number: QTCREATORBUG-7830 Change-Id: Ibf8ab5f5ee8da544ec768a078bd272500d2dc604 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* C++: Fix crash when deducing auto (with invalid ids)Leandro Melo2012-09-041-3/+3
| | | | | | | Task-number: QTCREATORBUG-7801 Change-Id: I61436148ed1428a50a6840ba9109310a57dabaa4 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Improve lookup - collect more valid itemsLeandro Melo2012-09-041-3/+68
| | | | | | | | | | | | | | | | There was a fix for QTCREATORBUG-7730 in the case of nested forward declarations in commit 74a458bca09b5bd170b64e04bb68c8d958c61932. However, it introduced regressions and actually didn't solve the issue, since the behavior was hidden by another error fixed later. The patch should properly fix the issue and the regression pointed in QTCREATORBUG-7777. Task-number: QTCREATORBUG-7730 Task-number: QTCREATORBUG-7777 Change-Id: I27397fefdc7cc9a60111761df1f76a01407886f7 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Fix duplicate base classes in lookupLeandro Melo2012-08-281-17/+9
| | | | | | | | | | | Previously we detected the duplicates by name and then processed the missing ones, but this was not handling qualification properly. Now we process the bases and only after lookup (making sure we are talking about the *same* types) we add then if necessary. Change-Id: Ic318b174d2174e24c24a4f2f1b612fbcb3f20491 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Fix base template argument/param matchingLeandro Melo2012-08-271-5/+11
| | | | | Change-Id: I8c6be9e023a757c43eb4b8669ca8c37239ab579d Reviewed-by: hjk <qthjk@ovi.com>
* C++: Improve completion when forward declarations presentLeandro Melo2012-08-231-1/+4
| | | | | | | | | | This fixes one of the issues mentioned in the report below. THe other part will come in a separate patch. Task-number: QTCREATORBUG-7730 Change-Id: I9f56a9bcec8a881dab3ab60f40c5b71f296466da Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Completion for templates as base classesLeandro Melo2012-08-231-12/+121
| | | | | | | | | | This fixes a variety of issues regarding class completion when templates are used as base classes. The test cases show examples. Task-number: QTCREATORBUG-4357 Change-Id: I764d5ce817a78e1b19336e5beab758ca9e10f34b Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* rename QtDebug to QDebughjk2012-08-061-1/+1
| | | | | | | More uniform. Change-Id: I1c6057981f4c2b3170a4e69f0674fe4caf1143a2 Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-4/+4
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Fix semantic of C++ 11 inline namespaces.Roberto Raggi2012-02-031-0/+4
| | | | | | | | | | Add the declaring `inline' namespace to the `using list' of its enclosing namespace symbol. This should be enough to ensure the correct visibility of the symbols declarated in the inlined namespace. Change-Id: Id4de74577c498fe439a49709a306ef0deb145988 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* C++: Fix completion for namespace aliases at global or namespace scope.Christian Kamm2011-11-221-0/+8
| | | | | | Task-number: QTCREATORBUG-166 Change-Id: Ic0fe4067caad37e51f7e253fd6678a6680350870 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Better resolution for typedef when resolving expr.Leandro Melo2011-11-171-2/+0
| | | | | | | | | | | | Example: struct Bar { int m; }; typedef Bar *pBar; pBar b; b-> // completes correctly now Change-Id: I97cc67579b955fe47c68ab6c35be9a054b6d1be9 Done-by: ckamm Reviewed-by: Roberto Raggi <roberto.raggi@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>