Commit Graph

101 Commits

Author SHA1 Message Date
Eike Ziller
56aadc407d Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
2015-02-12 17:36:29 +01: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
Orgad Shaneh
75a943ef57 C++: Fix crash when #if[def] nesting is deeper than 512 levels
Change-Id: I5e86da3a36514545834f554470b147ad8be43344
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-03 12:03:29 +00:00
Orgad Shaneh
c24ffc4dee C++: Expand arguments in nested function-like macros
Task-number: QTCREATORBUG-13219
Change-Id: I319fe39d696ccc28230d421b1395faf4dd452b03
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-21 13:23:38 +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
6cafc424e8 CppTools: Tests: Stop writing into source dir
Instead, always write into a unique temporary directory in
QDir::tempPath().

Where applicable, read the test source from files instead of first
writing the file.

Some clean ups in test_codegen*.

Change-Id: Id48dc50c6ca16252edfd9fc8a86ba0de9f9be486
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:29:16 +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
2fc4acbc35 CppEditor: Avoid duplicate "Add #include XYZ"
Task-number: QTCREATORBUG-13422
Change-Id: I3648bf44760fdac4e8e1e79652519136af6032c8
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-11-28 14:01:10 +01:00
Orgad Shaneh
e871225057 C++: Add a failing test for pp concat bug
Task-number: QTCREATORBUG-13219
Change-Id: I6278d7977f0ce560e793838c90cfbc867e1af025
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 08:52:31 +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
Nikolai Kosjar
c2e5f1c819 C++: Pass on the byte offsets of macro arguments
...to the Document/Block.

Change-Id: I1a96dc70ac93254e6030326b36a5df9a2cdc2bd8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-10-08 09:51:17 +02:00
Oswald Buddenhagen
ca492c8fac use DISTFILES instead of OTHER_FILES in creator's own build system
it's the correct variable to use.

Change-Id: I9ec7795099097715a64969516cd3fae9e213a0f4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-15 12:10:01 +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
Nikolai Kosjar
c6358e5d38 C++: Add utf16 indices to Macro and Document::MacroUse
In most cases we need to work with the utf16 indices. Only in
cppfindreferences the byte interface is still needed since there we read
in files and work on a QByteArray to save memory.

Change-Id: I6ef6a93fc1875a8c9a305c075d51a9ca034c41bb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:34:01 +02:00
Orgad Shaneh
c6ca15dc15 C++: Record macro uses in #if defined(MACRO)
Change-Id: I4d99053f540073483c16ce842426bf8cd3def421
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-27 21:08:34 +01:00
Orgad Shaneh
5d2cd2e56d C++: Fix handling of #undef
* If the macro is defined before, track its reference
* Synchronize environment line before calling remove, which
  currently sets incorrect line
* Set macro offset

Task-number: QTCREATORBUG-10454
Change-Id: I480d16423a976a025bb8c71046610a46f9d7b0fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-27 16:13:51 +01:00
Orgad Shaneh
24a5c3e913 Tests: Record macro definition check
Change-Id: Ia2151ead6ba4ad2e2a3598d05dfc24a10e6a7cdb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-27 15:17:29 +01:00
Orgad Shaneh
67caa75c56 C++: Fix preprocessing of uncontinued line-escaping
The following snippet demonstrates the problem:

--- snip ---
// comment \

#include <something.h>
...

class Foo
{
    ...
};
--- snap ---

If there are >=9 empty/preprocessor lines, the preprocessed source
becomes
// comment \
# 12 "file.cpp"
...

The lexer considers the line marker as a continued C++ comment, and
highlighting is broken

Change-Id: I30a2fc7d19b279316e9273697179c90d81099573
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-24 21:56:52 +01:00
Orgad Shaneh
dabdb60299 C++: Preserve comments after preprocessor directives
Task-number: QTCREATORBUG-11216
Change-Id: Iac10e75f0f5c504b79e8466607dc1f478e578f99
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-24 21:56:40 +01:00
Orgad Shaneh
6133920bfe Preprocessor: Adjust lines also for multiline C++ comments
Change-Id: I87d6e76be3030e617603209c3a1b8b3c476cf1f6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-24 21:56:23 +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
Orgad Shaneh
7febebc294 C++: Fix indentation in preprocessor tests
Easier to compare when indentation is aligned

Change-Id: I216073dc167c0ed785616ae308b566db7f910592
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-04 11:34:03 +01:00
Orgad Shaneh
06592b28ad C++: Consolidate with/without comments preprocessor tests
Change-Id: Ib08569d642da51f6d51bb0763fc95d5a5c13d28c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-20 16:27:49 +01:00
Orgad Shaneh
0a817c4ef5 C++: Cleanup preprocessor tests
Change-Id: Ia1b7dee24a3d7e20440dca5040cf9ffdaaf066e2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-20 16:27:34 +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
Nikolai Kosjar
796fcaf1d2 Revert "C++: Fix highlighting for lines with predefined macros"
This takes too much memory. For qtcreator.pro the numbers are as
follows:

    Patch applied:  ~ 1600MB (RES)
    Patch reverted: ~  510MB (RES)

This reverts commit 4c2daa90ce.

Task-number: QTCREATORBUG-10973
Change-Id: I843bd7c1ea4a26a1ec55ddc14c2a34a98d040922
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-12-03 09:53:26 +01:00
Nikolai Kosjar
4c2daa90ce C++: Fix highlighting for lines with predefined macros
This adds definitions for the macros __FILE__, __LINE__, __DATE__ and
__TIME__ on demand.

As a side effect, this also introduces highlighting for the uses of
these macros.

Task-number: QTCREATORBUG-8036
Change-Id: Ib7546c7d45d2eecbc50c7883fc684e3497154405
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-29 15:11:27 +01:00
Nikolai Kosjar
4edfe87b58 Revert "Preprocessor Enginge: fix bug in pp-engine.cpp"
Breaks highlighting for macros using the predefined macros.

This reverts commit 1d834c1126.

Change-Id: Ic13c407e293a806a63ff30153864530df6a32e47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-11-29 15:11:10 +01:00
Simon Schäfer
1d834c1126 Preprocessor Enginge: fix bug in pp-engine.cpp
Preprocessor variables __LINE__,__FILE__,__TIME__,__DATE__ where destroying
the following systems when affected variables were standing  within the
same line with those variables:
* highlighting
* refactoring
* local renaming

Task-number: QTCREATORBUG-8036
Change-Id: I1a4b919d15812872ca5a8e63b1031ec1ab144c22
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-11-28 11:40:37 +01:00
Christian Kandeler
698144e32e Add qbs project files for autotests.
Note: Since not all autotests are able to run from an installed location,
we need to be able to start them from the build directory, which
in turn forces us to set a destination directory for libraries and plugins,
so they will be found at run-time.

Change-Id: Idcf7e1333dfa6e9dbf745391b78c035f842ccc5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 12:16:09 +02:00
Christian Kandeler
eecacbfbfe CPlusPlus: Some compile fixes for autotests.
Change-Id: Id2ced5e41686387e67a7bb8419fe1547b23779c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-08-26 17:45:54 +02:00
Nikolai Kosjar
8180f695f1 CppEditor: Check <include path>/QSomething
For the quick fix AddIncludeForUndefinedIdentifier, if no class is found
via the locator, check the "Qt include paths" for a header file with the
same name as the class name.

Task-number: QTCREATORBUG-9538
Change-Id: I13c86844c2ff653fa479dc91eb109af2a6d76fae
Reviewed-by: Lorenz Haas <lykurg@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-06-17 08:16:43 +02:00
Erik Verbruggen
271c3f45a4 C++: Fix preprocessor blocked macro bug.
By lexing the first token after a macro call (meaning: the token after
the closing parenthesis (which was passed to handleFunctionLikeMacro
which in turn pushed it back into the token buffer)), a token buffer
might be popped, which unblocks the macro that generated the actual
param pack. The effect was that if this happens in the expansion of a
recursive macro (with parameters!), the preprocessor ended up in an
infinite loop.

Task-number: QTCREATORBUG-9015
Task-number: QTCREATORBUG-9447

Change-Id: I0d83c59188ec15c4a948970e9fa944a17d765475
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-06-11 16:57:07 +02:00
Nikolai Kosjar
f3186690bd CppEditor: Improve finding position for new includes
...by detecting include groups (separated by new lines, include types
and same dir prefix).

Task-number: QTCREATORBUG-9317
Change-Id: I73e80fdc715104901cb2d4f5b15b4cab5d04d305
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-06-11 15:57:10 +02:00
Erik Verbruggen
f2631ad031 C++: do not strip trailing newlines in the preprocessor output.
Doing so resulted in an incorrect position for the EOF token when the
preprocessed output would be parsed. That in turn leads to incorrect
insertion positions for refactoring actions.

This is especially true when a file contains only preprocessor
directives: the EOF token would point to line 1 column 1, which is
usually not the place where code should be inserted.

Change-Id: I7d359aa7a6c04bc52c8b873fd49ad6afc3a77319
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-30 16:42:29 +02:00
Erik Verbruggen
aa3aa7c455 C++: Fix unused field warnings in test.
Change-Id: I898668a91eb7d3fa18c0a8d3e7e7507f0fb5a917
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-05-15 12:35:59 +02:00
Eike Ziller
bedc477943 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp

Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
2013-04-30 11:43:33 +02:00
Francois Ferrand
4d18710f46 C++: fix handling of empty va_args macro arguments.
Preprocessor did not correctly handle when variadic macro arguments were not
provided at all, if there were other arguments: macro was not expanded
in case only the non variadic arguments were given.

 #define MACRO(...)       used to work fine for 0 or more arguments.
 #define MACRO(ARG0, ...) used to work only for 2 or more arguments, now fixed.

Change-Id: I64e9199ceccae05618a49931c2adad8e4f9471ba
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-04-29 10:09:43 +02:00
Erik Verbruggen
82e347095c C++: Untangle include file resolving from loading.
Change-Id: Iacf8cb12dd623c908538d80ee2595297a9bdde71
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-04-09 11:56:02 +02:00
Oswald Buddenhagen
7923032022 fix include style relating to cplusplus libraries
... 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>
2013-04-03 13:40:39 +02:00
Oswald Buddenhagen
001a26a4bb include qttest.pri centrally
Change-Id: I05e85dac15e7de52ad04bde899dcc3cb8e603d3e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:11:37 +02:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
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
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Erik Verbruggen
dada2614d5 C++: add include-guard tracking.
Track the typical #ifndef/#define/#endif usage in header files to see if
the macro is an include guard. If so, store it in the Document. No
behavioural change, just recording the name.

This can be used in the future to track if a file needs to be re-parsed
when a macro changes: if it was used in the file, and not defined in it
nor being the include-guard, a file should be re-preprocessed and
re-parsed.

It can also be used to check if two files have the same include guard.

Change-Id: I2715f529997a7b24a11bdbc6150652e2669f1a46
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-18 14:58:07 +01:00
Francois Ferrand
4c43655cec C++: fix macro calls with comment before arguments
When in 'keep comments' mode, the preprocessor does not properly handle macro calls with
comments between the macro name and the opening parenthesis: "FOO /*something to say*/
(45)".

Change-Id: I6fe733242e4d2ccff2985d17399d0a084917415a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-18 14:56:47 +01:00
Nikolai Kosjar
492ca1cbcf Tests: C++: Make tests run from shadow builds.
For shadow builds some tests couldn't find their test data. Solved by
using the same pattern as in Qt tests: Inject $$PWD as SRCDIR via a
DEFINES statement.

Note: It was considered to use QFINDTESTDATA for Qt5, but this was
rejected due to:
 1) It's Qt5 only (would mean to introduce some wrapper...)
 2) As the doc states, it will not work with QTEST_APPLESS_MAIN tests.

Change-Id: Ie6cf59570fe61725b7f6f83b7da650331ddb38fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-11-07 14:10:24 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Leandro Melo
d1b65bbf83 C++: Discard comments in macro definitions
Task-number: QTCREATORBUG-7815

Change-Id: Id3e6b018bfd58b0f0072c637d69721a4bde1603a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-05 16:35:33 +02:00
Leandro Melo
d87835cc90 C++: Always skip unknown preprocessor "directives"
Task-number: QTCREATORBUG-7780

Change-Id: Ie93704feff17ad8229e50fb1133048f2c7598dea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-29 16:07:40 +02:00