summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcompletionassist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Code assist: Fix memory leak in completionLeandro Melo2011-09-121-0/+1
| | | | | | | | | | | | One fix is in the runner, which is part of the completion engine itself. The other is specific for C++. Task-number: QTCREATORBUG-5947 Change-Id: Ib8fff1eb5adad1ffb2a11da66c50b545e1457df8 Reviewed-on: http://codereview.qt.nokia.com/4355 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com> (cherry picked from commit e15443e9523df0e40414b1baf7d8182f641f7f2c)
* C++: Fix duplicate items in C++ completion for Qt methodsLeandro Melo2011-09-121-28/+26
| | | | | | | | | | | | | | | In the old code completion engine items were created on the stack and passed around by value. With the refactoring of the code assist API they became heap objects manipulated through pointers. This patch fixes one reminiscence not caught during the refactoring in which the same actual pointer was being used more than once to be appended on the list. Change-Id: I2009fb0b6aa18df57aa5ca9bde0591536ca2cd74 Reviewed-on: http://codereview.qt-project.org/4444 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com> (cherry picked from commit a1fa169219423641e65f81e3fbc27f0f9fb84dd5)
* C++ editor: Share the model data acrross completion itemsLeandro Melo2011-05-261-22/+9
| | | | | | | | | More than one proposal item could be accessed during an iteration. So they should not take ownershipt of the data, but simply share it. Change-Id: I7b81b8772cd8ad4d6c2332ba6b5bc320055cd5a2 Reviewed-on: http://codereview.qt.nokia.com/136 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++ editor: Check _ to accept idle editor completionLeandro Melo2011-05-261-1/+1
| | | | | | | | In addition to letters and numbers. Change-Id: I89ec68c50a62516cc0b91d267fd96bb908cbf8bc Reviewed-on: http://codereview.qt.nokia.com/131 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Completion: Don't propose when there's a "good" candidateLeandro Melo2011-05-201-22/+0
| | | | | | | | This also generalizes some code previously specific to C++. Change-Id: I5774d04a45f28a4e276a0ef282ce0aa5a2f2e552 Reviewed-on: http://codereview.qt.nokia.com/48 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++ editor: Fix potential crash in completionLeandro Melo2011-05-191-24/+44
| | | | | | | | | | There was still a problem in the previous change (that's why it was reverted) which should be fixed now. Task-number: QTCREATORBUG-4940 Change-Id: I8a0d993b9f313fc98494cf93fed1f87939a358b1 Reviewed-on: http://codereview.qt.nokia.com/27 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* Revert "C++ editor: Fix potential crash in completion"Leandro Melo2011-05-191-17/+13
| | | | | | | | | | This reverts commit a395022a84149884771eefee9577ba2441ba45a4. There are some undesired side effects... Change-Id: I001ed375911a4ffda5bd25c804ce06f99be40e3c Reviewed-on: http://codereview.qt.nokia.com/25 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* C++ editor: Fix potential crash in completionLeandro Melo2011-05-191-13/+17
| | | | | | | Task-number: QTCREATORBUG-4940 Change-Id: If55c2ddc7949cbd31029eef8317b4d0a015f272e Reviewed-on: http://codereview.qt.nokia.com/17 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* c++ editor: Fix automatic completion for includesLeandro Melo2011-05-181-1/+15
| | | | Reviewed-by: Roberto Raggi
* C++ editor: Remove scanning/caching of includesLeandro Melo2011-05-181-5/+23
| | | | | | | With the completion now in a separate thread this should no longer be necessary. Reviewed-by: Roberto Raggi
* New code assist APILeandro Melo2011-05-181-0/+1866
This is a re-work of our completion engine. Primary goals are: - Allow the computation to run in a separate thread so the GUI is not locked. - Support a model-based approach. QStrings are still needed (filtering, etc), but internal structures are free to use more efficient representations. - Unifiy all kinds of *assist* into a more reusable and extensible framework. - Remove unnecessary dependencies on the text editor so we have more generic and easily "plugable" components (still things to be resolved).