Commit Graph

157 Commits

Author SHA1 Message Date
Tobias Hunger
45626216b4 CppTools: Initialize settings pointer
Change-Id: Ib12d4c67fc69a0e41f863f5679013edfd09008ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-29 15:32:33 +00:00
Oswald Buddenhagen
e426d08e54 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/debugger/debuggerruncontrol.cpp

Change-Id: I81b43480a1369e3d7be60ae26e812dda6b962b0b
2016-04-01 17:31:39 +02:00
Nikolai Kosjar
4de62a7349 C++: Fix completion for doxygen tags I
There are three cases that must be handled:

 1. Completion in C++ style comment
 2. Completion in first line of a C style comment
 3. Completion in non-first line of a C style comment

This change fixes case 1 + 2. Case 3 will be addressed in a follow-up
change, same goes for the duplication.

Task-number: QTCREATORBUG-15143
Change-Id: I449711f965ddcbbe6158870a8a5ae33218e0d238
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 06:51:34 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Daniel Teske
307061032c Fix changing "#include" lines after file renaming
Didn't work if there was any folded text before the #include.

Change-Id: I8f16205f06bfaa8b8541401a9ebd5995c15b2227
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-06 13:17:55 +00:00
Nikolai Kosjar
45194515c0 CppTools: Export CppCodeModelSettings
Needed for the ClangCodeModel tests, where we need to activate the clang
code model.

Change-Id: I368b840875ca2a46da4535338bf55967cbcdf5ea
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-03 09:16:24 +00:00
Nikolai Kosjar
d4bb5033b2 CppTools: Remove separate indexing revision
For indexing we used a custom revision that was updated on each
modelManager BuiltinIndexingSupport::refreshSourceFiles() call. This
could lead to rejection of updated documents triggered by refactoring
actions, like for the following case:

 1. Open a project containing a.h and a.cpp
 2. Open a.cpp, insert some new lines, save and close the document
 3. Open a.h and rename a function that is defined in a.cpp
    --> The refactoring action modifies a.h and a.cpp, so re-indexing
        of those is triggered. Since a.cpp has already a higher revision
        (step 2) than the updated document, the updated document is
        discarded. As a consequence find usages and follow symbol fails
        for the renamed function.

Now the document call back provided to CppSourceProcessor is responsible
for updating the document revision based on the latest revision in the
global snapshot.

Change-Id: I4dfa0a4d34991655acfa749109f00c47b0fbfdbe
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-24 08:35:13 +00:00
Nikolai Kosjar
f368294251 CppTools: Fix global completion after '&'
Regression introduced by

        commit 9fb5b0be15
        CppTools: Add basic completion support for qt5 style signals/slots

Change-Id: I0a8e5ef31c1394512a51a26ed08b0f445add5acd
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-13 10:55:44 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Nikolai Kosjar
e3977de08e C++: Finish gcc's include_next support
This implements the actual include_next logic and thus completes

    commit b934cc1
    C++: pass #include_next down to CppPreprocessor::tryIncludeFile

    commmit 140b502
    C++: Highlight argument to gcc's #include_next extension

Based on https://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html

Task-number: QTCREATORBUG-10225
Change-Id: I7eef7f5ea64a114f6d092304d32b72c55c2ce134
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-15 15:37:36 +01:00
Nikolai Kosjar
cb0d136926 CppTools: Update document on activation
...if the project was updated in the meanwhile.

If a project is updated mark invisible editor documents dirty and update
them if they get focus.

This also fixes document highlighting when restoring a session for
documents that the user "switched away" before the project info is
pushed to CppModelManager.

This completes

    CppTools: Update visible documents on project update
    commit c2eb91e053

which only takes care of visible documents.

Task-number: QTCREATORBUG-13270
Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-03 10:53:39 +01:00
Eike Ziller
ea27143239 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/libs/utils/ipaddresslineedit.cpp
	src/libs/utils/logging.h
	src/plugins/analyzerbase/AnalyzerBase.pluginspec.in
	src/plugins/android/Android.pluginspec.in
	src/plugins/android/androiddeploystep.cpp
	src/plugins/android/androiddeploystep.h
	src/plugins/android/androiddeploystepfactory.cpp
	src/plugins/android/androiddeploystepwidget.cpp
	src/plugins/android/androidpackagecreationfactory.cpp
	src/plugins/android/androidpackagecreationstep.cpp
	src/plugins/android/androidpackagecreationstep.h
	src/plugins/android/androidpackagecreationwidget.cpp
	src/plugins/android/androidpackagecreationwidget.h
	src/plugins/android/javafilewizard.cpp
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/baremetal/BareMetal.pluginspec.in
	src/plugins/bazaar/Bazaar.pluginspec.in
	src/plugins/beautifier/Beautifier.pluginspec.in
	src/plugins/bineditor/BinEditor.pluginspec.in
	src/plugins/bookmarks/Bookmarks.pluginspec.in
	src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in
	src/plugins/clangcodemodel/clanghighlightingsupport.cpp
	src/plugins/clangcodemodel/clangsymbolsearcher.cpp
	src/plugins/classview/ClassView.pluginspec.in
	src/plugins/clearcase/ClearCase.pluginspec.in
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in
	src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
	src/plugins/cmakeprojectmanager/cmakehighlighter.cpp
	src/plugins/coreplugin/Core.pluginspec.in
	src/plugins/cpaster/CodePaster.pluginspec.in
	src/plugins/cppeditor/CppEditor.pluginspec.in
	src/plugins/cppeditor/cppfilewizard.cpp
	src/plugins/cpptools/CppTools.pluginspec.in
	src/plugins/cpptools/cpphighlightingsupportinternal.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.h
	src/plugins/cvs/CVS.pluginspec.in
	src/plugins/debugger/Debugger.pluginspec.in
	src/plugins/designer/Designer.pluginspec.in
	src/plugins/diffeditor/DiffEditor.pluginspec.in
	src/plugins/emacskeys/EmacsKeys.pluginspec.in
	src/plugins/fakevim/FakeVim.pluginspec.in
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in
	src/plugins/git/Git.pluginspec.in
	src/plugins/git/gitorious/gitorious.cpp
	src/plugins/git/gitorious/gitorious.h
	src/plugins/git/gitorious/gitoriousclonewizard.cpp
	src/plugins/git/gitorious/gitorioushostwidget.cpp
	src/plugins/git/gitorious/gitorioushostwidget.h
	src/plugins/git/gitorious/gitorioushostwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.h
	src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwizardpage.h
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.h
	src/plugins/glsleditor/GLSLEditor.pluginspec.in
	src/plugins/glsleditor/glsleditorfactory.cpp
	src/plugins/glsleditor/glslfilewizard.cpp
	src/plugins/helloworld/HelloWorld.pluginspec.in
	src/plugins/help/Help.pluginspec.in
	src/plugins/imageviewer/ImageViewer.pluginspec.in
	src/plugins/ios/Ios.pluginspec.in
	src/plugins/macros/Macros.pluginspec.in
	src/plugins/mercurial/Mercurial.pluginspec.in
	src/plugins/perforce/Perforce.pluginspec.in
	src/plugins/projectexplorer/ProjectExplorer.pluginspec.in
	src/plugins/pythoneditor/PythonEditor.pluginspec.in
	src/plugins/pythoneditor/pythoneditorwidget.cpp
	src/plugins/pythoneditor/wizard/pythonfilewizard.cpp
	src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in
	src/plugins/qmakeprojectmanager/profileeditorfactory.cpp
	src/plugins/qmldesigner/QmlDesigner.pluginspec.in
	src/plugins/qmljseditor/QmlJSEditor.pluginspec.in
	src/plugins/qmljseditor/qmljseditorfactory.cpp
	src/plugins/qmljstools/QmlJSTools.pluginspec.in
	src/plugins/qmlprofiler/QmlProfiler.pluginspec.in
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in
	src/plugins/qnx/Qnx.pluginspec.in
	src/plugins/qtsupport/QtSupport.pluginspec.in
	src/plugins/remotelinux/RemoteLinux.pluginspec.in
	src/plugins/resourceeditor/ResourceEditor.pluginspec.in
	src/plugins/resourceeditor/resourcewizard.h
	src/plugins/subversion/Subversion.pluginspec.in
	src/plugins/tasklist/TaskList.pluginspec.in
	src/plugins/texteditor/TextEditor.pluginspec.in
	src/plugins/texteditor/basetexteditor_p.h
	src/plugins/texteditor/basetextmark.cpp
	src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h
	src/plugins/texteditor/codeassist/defaultassistinterface.h
	src/plugins/texteditor/codeassist/iassistproposalitem.cpp
	src/plugins/texteditor/itexteditor.cpp
	src/plugins/texteditor/itexteditor.h
	src/plugins/texteditor/itextmark.cpp
	src/plugins/texteditor/plaintexteditor.cpp
	src/plugins/texteditor/plaintexteditor.h
	src/plugins/texteditor/texteditoractionhandler.cpp
	src/plugins/todo/Todo.pluginspec.in
	src/plugins/updateinfo/UpdateInfo.pluginspec.in
	src/plugins/valgrind/Valgrind.pluginspec.in
	src/plugins/vcsbase/VcsBase.pluginspec.in
	src/plugins/welcome/Welcome.pluginspec.in
	src/plugins/winrt/WinRt.pluginspec.in
	tests/auto/debugger/temporarydir.h

Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
2014-10-14 15:36:16 +02:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
David Schulz
78c707760e Cpp: Adjust includes when files are renamed.
Change-Id: Ie6aaaa5d99ba3823d9d42331f45b2dcab397e1cd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-10-02 15:09:20 +02:00
hjk
b26a17f30d CppTools: Change CppModelManager implementation pattern
Replace the CppModelManagerInterface/derived CppModelManager
combo by a more common CppModelManager/CppModelManagerPrivate
pimpl pattern.

Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-19 13:17:55 +02:00
Oswald Buddenhagen
f3a61e8bf7 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/androidglobal.h

Change-Id: I3367bf2ea47c088989175dddeed2210294346f4c
2014-08-05 14:24:23 +02:00
Nikolai Kosjar
6a9ae7e25f CppTools: Auto-include pre-compiled headers
So far the pre-compiled headers were processed (thus defines from those
headers were visible), but the actual includes for the documents were
not added, which is necessary for lookup/completion.

Note that this will be only done if pre-compiled headers are not ignored
(Options > C++ > Code Model > [] Ignore pre-compiled headers).

Change-Id: I54a8e6b00597af164d958e3e9f2a1075ea187788
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-07-24 12:25:02 +02:00
Tobias Hunger
4d429751a4 CppTools: Export licensetemplate and licensetemplatepath as variables
Change-Id: Id86b72b275d3381a32003c0439ff2d6b3b6ab505
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-07-15 14:45:25 +02:00
Nikolai Kosjar
995d1f777f C++: Add basic LocalSymbols test
Change-Id: I199e912203f329ec9b8bed2eb105e4a56f729e7d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-07-04 12:35:05 +02:00
Nikolai Kosjar
11845cd3dc CppTools: Unexport some internal classes.
Unexports CppModelManager, CppSourceProcessor and CppToolsPlugin.

Now only some constructor signatures mention "Internal::" in the
exported symbols:

% nm --extern-only --demangle ./lib/qtcreator/plugins/libCppTools.so | grep "Internal::"
CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*)
CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*)
CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*)
CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*)

Change-Id: I167c21a6dc03cf02230c95fde66cf404e40df36f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-10 15:12:50 +02:00
Nikolai Kosjar
9921960a72 Cpp{Editor,Tools}: Move tests for IncludeGroups to CppTools
They belong there. This will also kill the CppSourceProcessor dependency
from CppEditor.

Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-10 15:12:38 +02:00
Nikolai Kosjar
ec97d967e6 CppTools: Rename CppPreprocessor to CppSourceProcessor
...since it does quite a bit more than only preprocessing, as the name
suggests. We use that class to process source files in general. The
output is not a preprocessed source, but a set of CPlusPlus::Documents
with symbols.

Change-Id: I787d0f22f9f042ddf0c99e8c2f0bdb9aa7001735
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-04 16:28:35 +02:00
Nikolai Kosjar
ff1203de9e C++: Fix Macrouse::utf16charsBegin()
This caused displaced highlighting of macro uses after #if constructs.

MacroUse::utf16charBegin() was based on the last "continuation token",
which was wrong.

Change-Id: I89983d82fcf804ba853c04a59a7533c489785d05
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-03 14:54:17 +02:00
Erik Verbruggen
a870c29a71 C++: use a global string table for SearchSymbols.
This string table uniques strings, so that multiple identical strings
share their contents. It is used by the locator and the symbol searcher,
and will later be used by the class view.

Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-05-28 15:54:38 +02:00
Nikolai Kosjar
aa796a9fc0 CppTools: Add all diagnostic messages
...of type 'No such file or directory' to the CPlusPlus::Document. Only
the first one was added and as a result, the editor only wavely
underlined that one.

Add also diagnostic messages if it's not possible to get the file
contents.

Change-Id: I8389d8e6af9480ea6712759ce5e130e1dd8912f1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-10 13:42:43 +01:00
Nikolai Kosjar
c2803b00be CppTools: Avoid self-include
...in CPlusPlus::Document due to cyclic includes.

Task-number: QTCREATORBUG-11457
Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-24 14:08:11 +01:00
Nikolai Kosjar
f785402972 CppTools: Cleanup test_cpppreprocessor_includes
Use QCOMPARE instead of QVERIFY where appropriate.

Change-Id: I7965a00fd004b8c3a20186bb692bf541f154d12b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-02-20 13:47:43 +01:00
Orgad Shaneh
1fd576c1f6 C++: Add support for prefixes in switch header/source
Task-number: QTCREATORBUG-11031

Change-Id: I93cce0ebf46984eb06094e1f1519717be2bbaa79
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-21 12:20:15 +01:00
Orgad Shaneh
f506104f29 CppTools: Cleanup header/source test
Dynamically create data files in tempPath and clean them up when
finished.

Change-Id: Ie78f557b185b264acc0d0f5814646c203d8a93f4
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-21 11:07:49 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Orgad Shaneh
0909c0295f CppTools: Make completion tests data-driven
Mostly done using the following Ruby script:

Fname = 'src/plugins/cpptools/cppcompletion_test.cpp'
s = File.read(Fname)
mod = s.gsub(/(?<declaration>void CppToolsPlugin::test_(?<test_name>[^(]+)\(\)\n\{)(?<body>.*?\n)\}/m) { |func|
  match = $~
  declaration = match['declaration']
  body = match['body']
  test_name = match['test_name'].sub('_data', '')
  final = body.gsub(/(?:completions.clear\(\);\s+)?(?: +)[^\n]* =\n(?<code>.*?);\s*(?<completions>(?:completions.append\(QLatin1String\("[^"]*"\)\);\s*)*)QTest::newRow\("case: (?<name>.+?)"\)\s*<< code << _\("(?<prefix>[^"]+)"\) << completions;/m) {
    m = $~
    res = "    QTest::newRow(\"#{test_name}: #{m['name']}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
    m['completions'].scan(/completions.append\((.+)\);/) { |comp|
      res << "\n            << #{comp[0]}"
    }
    res + ');'
  }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?, "(?<prefix>.+?)"\);\s*QStringList expected;\s*(?<completions>(?:expected.append\(QLatin1String\("[^"]*"\)\);\s*)*)const QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions, expected\);/m) {
    m = $~
    res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
    m['completions'].scan(/expected.append\((.+)\);/) { |comp|
      res << "\n            << #{comp[0]}"
    }
    res + ');'
  }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*(?:const )?QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\n/m) { |mm|
    m = $~
    res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
    m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
      res << "\n            << #{comp[0]}"
    }
    res + ");\n"
  }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*bool replaceAccessOperator = false;\s*const QStringList completions = test.getCompletions\(\&replaceAccessOperator\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\s*QVERIFY\((?<replace>!?)[^)]*\);\n/m) { |mm|
    m = $~
    res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
    m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
      res << "\n            << #{comp[0]}"
    }
    res + ")\n        << #{m['replace'].empty?};\n"
  }
  if final == body or final['QTest::addColumn']
    declaration + final + "}"
  else
    final
  end
}.gsub(/QTest::newRow\("([^"]+)"/) { |m|
  name = $1
  if name.size > 73
    space = name[0..73].rindex(/[ _]/)
    "QTest::newRow(\"#{name[0..space]}\"\n                  \"#{name[space+1..-1]}\""
  else
    m
  end
}.gsub(/\s+QTest::newRow/, "\n\n    QTest::newRow")
if mod != s
    File.open(Fname, 'wt').write(mod)
end

Change-Id: Id6bfb03cdf31ac27b36028fcdc861c340a5398f4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-12-23 13:46:49 +01:00
Nikolai Kosjar
273192759b CppEditor/CppTools: Move FunctionHelper to CppTools
...and rename it to FunctionUtils.

Change-Id: If076ec01fd82e8ba728764bdeab7e87e8bc1ff3b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-12-11 11:46:33 +01:00
Przemyslaw Gorszkowski
4836fa0106 C++: fix auto completion for member of classes accessed by using
Example:
namespace NS { struct S { int member; void fun(); }; }
using NS::S;
void S::fun()
{
mem// ctrl+space
}

Task-number: QTCREATORBUG-9037
Change-Id: I5a568be1b5c44deb02caa04996167a88a9c5d4d7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-11-22 16:12:53 +01:00
Nikolai Kosjar
7eeb87295b CppTools: Add basic test for TypeHierarchyBuilder
Change-Id: I7a82f2b22105d4e096fc0bd69679adacdde2c731
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-11-12 16:40:41 +01:00
Nikolai Kosjar
e58906a9ed C++: Limit typedef resolving depth
This reverts commit 5be56c0 except for its tests. While it fixed the
problem described in the bug report, it also introduced regressions.

For now, we use a hard limit.

Change-Id: I19a85be454e3d7969371707e3eb1c3d42a16ecee
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-10-18 14:07:00 +02:00
Przemyslaw Gorszkowski
5be56c073e C++: fix endless loop during template instantiation
This is the first phase of fixing bug QTCREATORBUG-10320.
This change resolves typedefs of template parameters(and resolves
problem with endless loop).

The next step will be matching appropriate template specialization
(this is needed to solve problem with missing code completion).

Missing matching: template specialization with the same parameters,
e.g.:
template <class T1, class T2, class T3>
class T
{
};

template <class T1, class T2>
class T<T1, T2, T2>
{
};

Task-number: QTCREATORBUG-10320
Change-Id: Icb6b539c021b2a67a66db9011a2e627f7d96526b
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-17 11:43:27 +02:00
Erik Verbruggen
8c79d5bc23 C++: add code-model support for defines-per-editor.
The UI side will come in another commit.

Change-Id: I1038a438587fe4cef70408f7f627d08837fc192d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 13:03:47 +02:00
Erik Verbruggen
507452f097 CppTools: honor pre-compiled headers in the code-model.
Task-number: QTCREATORBUG-476

Change-Id: I82ed92acdcda551d2c6a9ca221832ac20117a08f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 13:02:45 +02:00
Erik Verbruggen
ba2d7a4fa7 C++: Only parse with appropriate defines for open editors.
If two files from different (sub-)projects include the same header file,
and the defined macros differ for both files, the header file will be
parsed with only the appropriate macros for the including file.

Task-number: QTCREATORBUG-9802
Task-number: QTCREATORBUG-1249

Change-Id: I560490afa287b3bb1e863bce1bb4f57af36ad56e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 10:33:51 +02:00
Erik Verbruggen
c9f5a14bdd C++: add code-model settings to choose one by mime-type.
The model-manager now supports multiple code models for semantic
highlighting and code completion, and will choose one based on the
mime-type of the editor.

The settings page is currently disabled. It will get enabled when a
second plug-in lands that has a ModelManagerSupport class.

Change-Id: I10023f52322ed6860397da15dba1c231e80e6517
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-09-13 14:37:48 +02:00
Alexey Semenko
da4c4b80f3 Completions: move continuations upper in proposals list.
Since fuzzy completions are allowed, the lexicographically first proposal
is not necessarily most relevant. The patch modifies sorting of proposals
so that the exact match and continuations go first, and fuzzy completions
follow.

Moreover, being a continuation seem to be a more important characteristic
of a proposal, than being it a function argument or keyword etc. That's why
the check for continuation is placed before the check for order.

Task-number: QTCREATORBUG-8737
Task-number: QTCREATORBUG-9236
Change-Id: I89aae9d2ce6bfa59af7c2f75e6f3af00212008ca
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alexey Zhondin <lexxmark.dev@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-09-03 14:44:41 +02:00
Orgad Shaneh
adee8336bb C++: Custom directory list for Switch Header/Source
Some projects use separate directories for sources and headers.

An example tree:
*
|-- src
     |-- foo.cpp
|-- include
     |-- foo.h

Allow the user to specify directories for finding out-of-project related
header/source files, in addition to current directory

Task-number: QTCREATORBUG-8883
Change-Id: I57215c8f2feffcc246d0d161798290861bcfcdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-09-03 14:25:05 +02:00
Nikolai Kosjar
fd9293dd0a CppTools: CppPreprocessor: Track also unresolved includes
Change-Id: Ia36e7e7142dbc030a428369ed04e76e70e8eef0b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-08-22 11:57:27 +02:00
Oswald Buddenhagen
c2e90c360b Merge remote-tracking branch 'origin/2.8'
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
2013-08-21 14:39:18 +02:00
Nikolai Kosjar
d185849150 CppTools: Tests: Introduce basic BuiltinSymbolSearcher tests
Change-Id: I25f11e80747863f797d146980d8ee0e605acb6e5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-08-20 14:18:45 +02:00
Nikolai Kosjar
dcf618469d CppTools: Tests: Add basic tests for locator filters
Change-Id: Ie71aa8a39f4584a024a4f104841ad8e57947e489
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-08-19 14:43:58 +02:00
Nikolai Kosjar
8ea14767af CppTools: Rework handling of ProjectInfo changes
(a) The code model manager figures out by itself which files were added
    or removed from the project.

    If this was done successfully, check also the timestamp of the
    common files and reindex if necessary.

(b) A full reindexing is only triggered if the project configuration
    changes (defines, includes, framework paths).

(c) If project files were removed, the garbage collector is called.

Task-number: QTCREATORBUG-9730
Change-Id: Ib855614b070880576233a3525813617c967a72f3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-08-13 14:13:33 +02:00