Moved it from the handleIfDefDirective to the pre-defined macros, so
that #if defined() can also see it.
Task-number: QTCREATORBUG-9322
Change-Id: Icbecad5c885dd2374b559969c99631c3ddc73844
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
More sensible place, gotoLine is a method in IEditor anyhow.
Change-Id: I420a6bf17060c16e6f1a4f45e0bef89379fb6bf8
Reviewed-by: David Schulz <david.schulz@digia.com>
This is still way too much boiler plate code for the task at hand.
Change-Id: Ia03bff3d6947ea6372e3f5d0217c116728742b74
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This fixes a bunch of warning when building with the updated qbs
version.
Change-Id: I644b4a4d0225b2e23ff1d9e1bf6d9d0136d6bbb5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
It was missing colorizing and follow symbol template function parameters in case of:
* returning value
* use it as qualified name
Task-number: QTCREATORBUG-6861
Change-Id: I4226199e1f296cfe5a373783ebbc633e32fc9bcd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
ResolveExpression has to have a reference of ContextLookup. If not there
will be a crash because of deleted instanitated base template class.
Task-number: QTCREATORBUG-9329
Change-Id: I7f8c83da0d81ac6311e76d15a897adbc70b08d75
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Resetting the environment (after each *.cpp file) did not clear the
already seen files (m_included). Because of that the succeeding header
files were not parsed correctly - the environments of the mistakenly
already seen header files were not merged in.
Note that this change slow downs the parsing/indexing of files to its
original speed, as it was before the problematic commit (and it is in
2.7):
commit 82e347095c
C++: Untangle include file resolving from loading.
Task-number: QTCREATORBUG-9205
Change-Id: Iea57b7c59ea04a3c8843fd1291f4c375382958fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
When searching for functions/methods in the locator, also show function
and method declarations.
Task-number: QTCREATORBUG-8862
Change-Id: Ie86bfe82403d79a903d769860a472e2a20a2b9d0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If the file type (mime type) of an editor changes, it might need a
different kind of highlighter/highlighting-support.
Change-Id: I470dbf69e71856c9593d201416c4d4bd2958aaec
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Strict set to true, SymbolFinder::findMatchingDefinition will now also
check, if const and volatile matches.
Changed return type from 'Symbol *' to 'Function *' since only functions
are returned.
Change-Id: Ib55cb12b6c404e94fcefd0613b964e8caa425690
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This quick fix inserts (pure) virtual functions of base classes to the
current class. For selecting the functions which should be inserted and
for choosing the insertion mode (only declarations or with definitions
inside, outside or in the implementation file) a dialog is shown.
Task-number: QTCREATORBUG-2210
Task-number: QTCREATORBUG-2692
Task-number: QTCREATORBUG-3908
Task-number: QTCREATORBUG-5868
Task-number: QTCREATORBUG-7982
Change-Id: I8e94905afcae4778986f4c3925a494e0c6b3b8ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Will be used by ClangCodeModel, but native model also can use it by
disabling unused variable/parameter warnings when needed.
Change-Id: I184efb3c65e893a2d85a933385cc547b646e6826
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
When instantiate a template with anonymous class/struct/union
AnonymousNameId has to be cloned.
Task-number: QTCREATORBUG-9227
Change-Id: Iedca5e41589e68a94a35cd4387241052c70c50df
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If Creator switched to the Project mode on startup, the highlighting was
not started because the editor widget was not visible. Now we check if
the editor itself is or would be visible in the edit mode, which is
indepedent of the current mode.
Task-number: QTCREATORBUG-9260
Change-Id: I72373e09965fd1cded034ae4711df48798e7f0d8
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Now recalculateSemanticInfoNow is called only once instead of three
times when a new editor is opened/created.
Change-Id: Ife84fc9ca90cdbf2a417123e6a2b9e1e068dfdc4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Case: Opening a file that is not yet in the Snapshot
recalculateSemanticInfoNow() emitted the same SemanticInfo until the
indexer processed the document (Snapshot::contains()). That signal
caused CppEditorWidget::updateSemanticInfo() to call
semanticRehighlight() because of unequal revisions. That triggered
recalculateSemanticInfo() again.
Change-Id: I8fb7d7c42aad3d6a89876e743cd4e3c7aff643bf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Caused by a dangling pointer of a template instantiation which had been
cloned into the wrong control. The fix is to remove that control and
refer to the control of the bindings (which is the correct one).
Change-Id: I951a60f2e613aae1e4ac901ce99c820212018709
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Instead mostly postpone it until the contents are needed.
Task-number: QTCREATORBUG-9149
Change-Id: I83167537e97fbd965531d990c8073409ff7b0b32
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Also remove the introduced functions in CppEditorSupport. We can just
wait until the document is "Full Checked" via Document::checkmode().
Change-Id: I31d23016f5aa5d3c37e8e05078436ab901bfb2d7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Looking for using declaration when lookup a type
Task-number: QTCREATORBUG-2668
Change-Id: I11600c5be262840472dd4c9e72334760a35aa4a0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
At this moment each project manager duplicates code that reads C++ code
model information from ProjectExplorer::ToolChain.
This change provides unified way.
Change-Id: If9ecfc40991aab90768dd69f5f10f31bbf5fbc21
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Test cases are examples from
Working Draft, Standard for Programming Language C++
Document Number: N3242=11-0012
Change-Id: I624c315943d6a00e821abb52eef6e0ff4a40f0d7
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
CppTools.lib(CppTools.dll) : error LNK2005: "public: virtual __thiscall
QFutureInterface<class TextEditor::HighlightingResult>::~QFutureInterface<class TextEditor::HighlightingResult>(void)"
(??1?$QFutureInterface@VHighlightingResult@TextEditor@@@@UAE@XZ) already defined in moc_cppeditor.obj
Creating library ..\..\..\lib\qtcreator\plugins\QtProject\CppEditor.lib and object
..\..\..\lib\qtcreator\plugins\QtProject\CppEditor.exp..\..\..\lib\qtcreator\plugins\QtProject\CppEditor.dll :
fatal error LNK1169: one or more multiply defined symbols found
Change-Id: Id53a0f8a99dbd18a9cbdf2af57b4f3970f5c41a3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
- Moved document update handling into CppTools.
- Moved semantic info calculation into CppTools.
- Moved semantic highlighting into CppTools.
Change-Id: I253861bf074a64b1f657f7a4a8e6583871b5285f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This makes them align to the other "editor split" shortcuts.
Change-Id: I0b300ae495ffa17062a0a52b148f61015b965c29
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
After processing configurationFileName() the first time, it was added to
the already seen files (m_included). Thus, on parsing further files, it
was ignored and with that all the project defines.
Task-number: QTCREATORBUG-9107
Change-Id: Ia4817dfa3b30ed27d142f7f3eeb6f099d0653441
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Still crashes when opening the Qt Creator project,
g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 (Ubuntu 12.10).
This reverts commit 564c9b2842.
Change-Id: Ief5c0aad463d245f68805f747d277ac298796c3d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This operation is quite costly if a lot of files are involved, and in
case of exiting Creator, it's also useless.
Change-Id: I97d178d47a3a2f6b214f7ebc45c871edd26b8286
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().
Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>