summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus
Commit message (Collapse)AuthorAgeFilesLines
* C++: Add dumpers for common datatypes to simplify debugging.Christian Kamm2012-07-234-2/+208
| | | | | Change-Id: I03f907dd0e8d9d63f0dfd38499c98296b5c7871a Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* qbs files updatedJoerg Bornemann2012-04-181-0/+1
| | | | | | | | | Property bindings in ProductModules now need explicit Depends items. Also, some Qt dependencies were propagated wrongly and are now added explicitely. Change-Id: I58cd389eb0ab106004b1d575438d1ad2ff36189f Reviewed-by: Marco Bubke <marco.bubke@nokia.com>
* Qbs: Libraries capitalized and relocated in bin on WindowsOrgad Shaneh2012-04-041-2/+2
| | | | | | Change-Id: I994027ef50f5f7c4ff1b2bef06d9f8db037243e4 Reviewed-by: Marco Bubke <marco.bubke@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* CppEditor: Fix go to definition of macros.Francois Ferrand2012-03-131-2/+2
| | | | | | | | | | | | | | | | | | - Go to macro definition only on macro name (ie not in parameters). - Prefer macro definition over expanded code definition, as the preprocessor is executed first: when trying to go to definition, the user sees the macro, not the expanded code. Task-number: QTCREATORBUG-2240 Task-number: QTCREATORBUG-6175 Task-number: QTCREATORBUG-6848 Task-number: QTCREATORBUG-7008 Task-number: QTCREATORBUG-7009 Change-Id: I819c763524e79b20518c26a46a99a3a3b0a131bd Reviewed-by: Andre Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* [C++] Added object pool handling for CompletionAssistProvider.Erik Verbruggen2012-02-231-0/+5
| | | | | Change-Id: I89634989a7f360a30f7ed1bde4e67c93551ddfe4 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* C++: handle destructor names with template parameters.Erik Verbruggen2012-02-232-12/+0
| | | | | | 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-214-2/+28
| | | | | Change-Id: I7eef048a7952a79f031ae3d0abba68e3c5ffbfb8 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* add qbs filesJoerg Bornemann2012-02-201-0/+187
| | | | | Change-Id: If6bf71797ae81655d24a77e6badb86a77312af38 Reviewed-by: hjk <qthjk@ovi.com>
* Compile fix for windows.Bill King2012-02-171-2/+2
| | | | | Change-Id: Ibd1dac3ac1fdf25666eb3ec4c076a54e98548ec7 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* Supply c++11 flags and per-project info to c++ code model.Erik Verbruggen2012-02-162-13/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A manual squash/merge of the changes below, plus a couple of subsequent code fixes. 59085aa5fbb99e2d786cd2c1a06c24a111ccb49f: Modify CppModel::ProjectInfo Adding per project node information, to pass on the correct defines/includes for each file, instead of aggregating them incorrectly. Also split up SOURCES and OBJECTIVE_SOURCES. Also ask the toolchain to convert the compilerflags to flags the codemodel understands, for now only gcc and only c++11. Also make the toolchain aware of the flags used to compile, so that it can emit the correct defines. Note: No header files are passed on. 74028802314cd4e75b41b46407433e07090a304d: GCC: Evaluate cxxflags when checking for predefined macros ebaaa4957e4c02cc9637a998eddae1d0acd74f83: MSVC: Take cxxflags into account when checking for predefined macros 9bfce7e889bcf7bcc47bf880e3ea25945ca7d0d7: Compile fixes Change-Id: I9de94ad038dfc5dc1987732e84b13fb4419c96f5 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-1532-72/+72
| | | | | | | | 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++] Undo accidental commenting-out of NDEBUG flag.Erik Verbruggen2012-02-131-1/+1
| | | | | | | Thanks to Flex Ferrum for spotting it. Change-Id: I66d722a1da6c05c51a4a648453b1da6f2f445212 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++11: first set of changes for decltype.Erik Verbruggen2012-02-103-1/+11
| | | | | Change-Id: I49d6ff7eb1805cd07bdfcb27bb37d4c6cadc9115 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Compile with Qt 5.Friedemann Kleint2012-02-081-0/+2
| | | | | | | | | | | | - QtQuick1 renaming. - Start on qtconcurrent split (pending renaming of Qt Creator's qtconcurrent library). - QWinEventNotifier is a public class in Qt 5. - Metatype system: Classes need to be known. Change-Id: I5582e7cc2777bf791a08b049262217055769c80f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* C++: Moved completion/highlighting into the model manager.Erik Verbruggen2012-02-081-0/+5
| | | | | | | | | | 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>
* 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>
* C++11: add support for static_assert.Erik Verbruggen2012-02-022-0/+7
| | | | | Change-Id: I82d8d60acaa9265fd25e0a3734855b19bdef9c06 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++11: handle noexcept specifications.Erik Verbruggen2012-02-022-8/+12
| | | | | Change-Id: I7da3affea2758b2e01124105e2521e1f2c5f6678 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Type deduction for auto-declared variables implementedFlex Ferrum2012-01-311-4/+91
| | | | | | | | | | | Handled to major cases of 'auto' variable declaration: 1. auto var = someInitializer; 2. Q_FOREACH(auto item, collection) or foreach(auto item, collection) In first case type deducted directly from initializer. If variable has no initializer then corresponded error reported. In second case type deducted from '*collection.begin()' expression. Change-Id: Ie930add1648b99440281ae04d973fd6904bc9e46 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Find usage displays content of the first lineDavid Schulz2012-01-301-7/+11
| | | | | | | Task-number: QTCREATERBUG-6176 Change-Id: I1c45b951bfde0b0d33bf462f532da7cbdbaa3fe7 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Long live the king!hjk2012-01-2666-66/+66
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* C++: Improve file accuracy when finding symbolsLeandro Melo2012-01-232-248/+0
| | | | | | | | | | | | | | | | | | | | | | This patch introduces a priority-based mechanism when searching for certains symbols in the snapshot. The priority corresponds to how similar the file path from the "reference" symbol is to the file path from the "candidate" symbol. This solves a variety of issues when matching "equivalent" symbols but that are in another file/project, such as when following a function declaration, a forward class declaration, or adding a definition through a quickfix. There's now a symbol finder which will compute the "best" search order and cache the most recent results. A consequence is that following symbols in some cases is slower, but not apparently significatly. Note: The "find" functions were moved from the Snapshot to the new SymbolFinder class. Task-number: QTCREATORBUG-6697 Task-number: QTCREATORBUG-6792 Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Rename source/setSource to utf8Source/setUtf8SourceLeandro Melo2012-01-134-9/+9
| | | | | | | | Continuinng a previous commit... This is in order to make the interface clearer. Change-Id: Ic1b05217f878578bc84a064927507b75981c47d6 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Accept UTF-8 byte arrays in type of expressionLeandro Melo2012-01-133-30/+26
| | | | | | | | | | | The model uses UTF-8 internally and it makes more sense to only convert when necessary. A following commit will rename the source/setSource methods in document for more clarity too. Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Merge remote-tracking branch 'origin/2.4'Eike Ziller2011-11-251-1/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: qtcreator.pri src/libs/qmljs/qmljstypedescriptionreader.cpp src/plugins/analyzerbase/startremotedialog.ui src/plugins/qmldesigner/designercore/include/rewriterview.h src/plugins/qt4projectmanager/makestep.cpp Change-Id: If9d15a8c8f73106585fd8ce6ac47c253a40af6b1
| * centralize setting of "CONFIG += shared dll" for librariesOswald Buddenhagen2011-11-181-1/+0
| | | | | | | | | | | | | | | | | | | | "dll" and "shared" set each other, but too late to actually test for it in the project files, so include both. note that this will slightly modify the build of some of our imported qt solutions. Change-Id: I0bd4f41a68fd160f8e87eb0a0fa66096fe70ef3e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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++: Recognize C++11 nullptrLeandro Melo2011-11-184-0/+16
| | | | | | | | | | Change-Id: I5b7ac8f9b2137ffe9439ada4ec4aeb9cee8e249d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* | C++: Enabled C++0x in SimpleLexerLeandro Melo2011-11-182-0/+15
| | | | | | | | | | | | | | We should create a UI flag for C++0x... Change-Id: Iba30090aa580554af629c0fb59ae5fc22b306b80 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* | C++: Better resolution for typedef when resolving expr.Leandro Melo2011-11-172-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/2.4'Eike Ziller2011-11-1166-134/+137
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/qmljs/qmljsinterpreter.cpp src/libs/qmljs/qmljsinterpreter.h src/plugins/debugger/qml/scriptconsole.cpp src/plugins/git/gitplugin.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
| * C++: Fix crash in type hierarchy when anonymous in typedefsLeandro Melo2011-11-071-2/+5
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-6445 Change-Id: If62745b58cad330c1f6a8605a444ec13644a1f20 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
| * all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-0366-132/+132
| | | | | | | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* | Merge remote-tracking branch 'origin/2.4'Eike Ziller2011-11-014-74/+32
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/qmljs/qmljsinterpreter.cpp src/libs/qmljs/qmljsinterpreter.h src/plugins/madde/maemopackagecreationstep.cpp src/plugins/projectexplorer/buildmanager.cpp src/plugins/qmljstools/qmljsqtstylecodeformatter.cpp src/plugins/qmljstools/qmljsqtstylecodeformatter.h tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp Change-Id: I63ab2ba5dac006c37ccfbae55b023396a4676ff7
| * C++ insert def: Fix bug when minimizing name.Christian Kamm2011-10-313-71/+29
| | | | | | | | | | | | | | | | | | | | 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 findMatchingDeclaration for functions not in a class.Christian Kamm2011-10-311-3/+3
| | | | | | | | | | | | | | | | | | That fixes navigation and the 'function signature update' quickfix for global functions and functions in namespaces. Task-number: QTCREATORBUG-6413 Change-Id: Ifc68a88a34eb363f4e84c72e9f72444d22df1086 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* | C++: Handle multi-line if/elif directivesLeandro Melo2011-10-311-0/+11
|/ | | | | | | Task-number: QTCREATORBUG-5843 Change-Id: Ie32ed9daadf70f3b972a96fb53edcde9b1debb6c Reviewed-by: Christian Kamm <christian.d.kamm@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>
* CDB breakpoints: Fix line adjustment in case statements.Christian Kamm2011-10-042-7/+0
| | | | | | | Task-number: QTCREATORBUG-6207 Change-Id: I4df50a412dd960a0d53a824a6c4a93712bd743e8 Reviewed-on: http://codereview.qt-project.org/5964 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* C++: Fix bug in findMatchingDefinition.Christian Kamm2011-09-201-2/+4
| | | | | | | | In strict mode, don't give up after the first Document with candidates. Change-Id: I62ba59708a3501b31f79d979b1a85bede875eccb Reviewed-on: http://codereview.qt-project.org/5142 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++: Fix function return type printing.Christian Kamm2011-09-121-1/+8
| | | | | | | | We used to print T * foo(), but our style suggests T *foo(). Change-Id: Ie3b0ce6b620785ec98aeb394f7955ce959440619 Reviewed-on: http://codereview.qt-project.org/4634 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* add always defined macro Q_CREATOR_RUN to cpp parserBenito van der Zander2011-09-081-1/+2
| | | | | | | | | | Merge-request: 336 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com> Change-Id: Iefd0c60bb3e78047e28dcff33cc62c15ed11f711 Reviewed-on: http://codereview.qt-project.org/4292 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* QmlJS: Find setContextProperty calls in C++ and expose to QML.Christian Kamm2011-09-082-1/+9
| | | | | | | | Task-number: QTCREATORBUG-3199 Change-Id: I591490ceafadc0f5a07c63ec063f1bdfa7055f47 Reviewed-on: http://codereview.qt-project.org/4074 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* C++: More flexibility for string representation of macrosLeandro Melo2011-09-063-7/+59
| | | | | | | | | | | | | | | It's now possible to get the macro definition with the actual line breaks used on the code. This is particularly useful for tooltips in order for them to look nice. The preprocessor is changed so the macro also stores the breaks positions. This doesn't seem to have any impact on performance. In my machine, for example, the total time for parsing Creator's source code is approx. 18100ms with or without the patch. Change-Id: Ic7487236315c3567d26496315accdb2adfea894a Reviewed-on: http://codereview.qt.nokia.com/4253 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* C++: removed assert that could crash creator. Gracefully exit instead.Erik Verbruggen2011-09-061-1/+2
| | | | | | | Change-Id: Iab79b2548195feb83b3f408f0eb612878454bd47 Reviewed-on: http://codereview.qt.nokia.com/4246 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* C++: Export DiagnosticMessageLeandro Melo2011-08-311-1/+1
| | | | | | | | | This is now necessary due to the recent change that added the non-inline operator==. Change-Id: I62255ddeb09f1e312a802db9733575e73ea56478 Reviewed-on: http://codereview.qt.nokia.com/3928 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* QmlJS: Fix infinite loop when scanning for exported C++ types.Christian Kamm2011-08-313-0/+20
| | | | | | | | | | Setting extra diagnostics would call updateDocument which would in turn trigger another scan. Change-Id: I3810a380cdf716a12767d94ff82dc30f8ae3954d Reviewed-on: http://codereview.qt.nokia.com/3917 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++ preprocessor: Fix multiline tokens in ifdef'ed out blocks.Christian Kamm2011-08-312-12/+43
| | | | | | | Change-Id: If6f9819565f891e861f9e111423d99caa7c0f7aa Reviewed-on: http://codereview.qt.nokia.com/3884 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++/QmlJS: Warnings if C++ based QML type detection fails.Christian Kamm2011-08-301-0/+11
| | | | | | Change-Id: I1e206e09c4068cc541978ee148f9ed8c4138c249 Reviewed-on: http://codereview.qt.nokia.com/3579 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* C++: Don't strip comments from preprocessed source code.Christian Kamm2011-08-253-2/+24
| | | | | | Change-Id: I3a4817d36b9c724abca504c42914a73f97ab34c7 Reviewed-on: http://codereview.qt.nokia.com/3480 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>