Commit Graph

51 Commits

Author SHA1 Message Date
hjk
a5b93b54c8 CPlusPlus: Add missing line and column info for lambda functions
Task-number: QTCREATORBUG-25242
Change-Id: I5032bb04879e30f5516471e2038dc4b6bb3477f8
Reviewed-by: hjk <hjk@qt.io>
2021-02-05 08:51:09 +00:00
Eike Ziller
d54f7b0eb2 Fix building tests with Qt6
Task-number: QTCREATORBUG-24098
Change-Id: I192245125f04f8350597bbe481d80d3f8ba0cae0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-30 15:15:25 +00:00
hjk
7ab6783e24 Standardize on int for line and column values
Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.

The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.

Because it reduces friction further, also do it in libcplusplus.

Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-26 09:23:48 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00
Nikolai Kosjar
fe27f947b9 C++: Avoid inline namespaces in generated code
Task-number: QTCREATORBUG-16086
Change-Id: Ic2f3fd38ae6cc93725bc214c24320f40a0a519a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-23 14:49:31 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Nikolai Kosjar
0498fb68ff C++: Revert lookup to 3.4.2
...which was least buggy.

The bugs fixed by the changes we revert here (highlighting/completion
for code involving templates) were minor compared to ones we currently
have. Those bugs will be addressed by the clang code model anyway.

Relevant commits were collected via:

  $ cd ${QTC}/src/libs/cplusplus
  $ git log \
   --no-merges \
   --format=oneline \
   v3.4.2..HEAD \
   -- LookupContext.* ResolveExpression.* TypeResolver.* TypeOfExpression.* \
      ../../plugins/cpptools/cppcompletion_test.cpp

From this list the following were skipped due to irrelevance:

  88c5b47e53 # CppTools: Minor cleanup in completion tests
  e5255a1f5c # CppTools: Add a test for ObjC not replacing dot with arrow
  5b12c8d63a # CppTools: Support ObjC in member access operator tests
  9fef4fb9ca # CPlusPlus: Fix warnings about overriding visit(...) methods

There were only minor conflicts while reverting those.

This changes touches so many files because there were quite some
cleanups and renames after the 3.4.2 release.

Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-15211
Task-number: QTCREATORBUG-15213
Task-number: QTCREATORBUG-15257
Task-number: QTCREATORBUG-15264
Task-number: QTCREATORBUG-15291
Task-number: QTCREATORBUG-15329
Change-Id: I01f759f8f35ecb4228928a4f22086e279c1a5435
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-11-19 14:48:38 +00:00
Orgad Shaneh
cb350bfeb2 C++: Rename ClassOrNamespace -> LookupScope
Change-Id: Ide74482b133dd1fec40a725d9aa81bd749385f37
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-20 14:51:56 +00: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
69504c25ca C++: Document::functionAt provides line information
Needed for the debugger.

Change-Id: I6465f6dc53017df212e403ea8a9a1c7977ac1671
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-12 12:29:51 +01:00
Nikolai Kosjar
cefd1832ce C++: Include class name for inline functions in functionAt
The code that constructed the fully qualified name used
enclosingNamespace() which skips classes.

Use LookupContext::fullyQualifiedName() instead.

Change-Id: Ic03a91c0fe120c52dc69f3e78e82a574458d8314
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-11 11:50:46 +01:00
Nikolai Kosjar
079e7a500f C++: Tests: Make document_functionAt data driven
Change-Id: I8e811b21c584e7b6a2b8eb61830cb680f6fefa95
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-11 11:23:13 +01: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
Alessandro Portale
551f7e1caf QString(QLatin1String()) -> QString::fromLatin1()
Change-Id: I93bdd926ca1c7a37a298335711069d985f1f91dd
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-09 09:03:19 +02: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
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
Erik Verbruggen
ca291fbc7b C++: fix functionAt(), moved it, and added test.
Thanks to Jesper K. Pedersen for the fix!

Change-Id: Ie49c3352e26a9632b1500596b00d559bfe932dff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-06-04 15:24:33 +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
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
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Leandro Melo
c287d90604 C++: Rename source/setSource to utf8Source/setUtf8Source
Continuinng a previous commit... This is in order to make
the interface clearer.

Change-Id: Ic1b05217f878578bc84a064927507b75981c47d6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-13 11:22:28 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
hjk
a322bd606f Replace qt-info@nokia.com with info@qt.nokia.com
Change-Id: I61e7cf189a1c4ea04e2a88a80a4f15e43cd3c018
Reviewed-on: http://codereview.qt.nokia.com/1187
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-07-06 11:14:01 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Bill King
3593fe08ae tests: add licence headers 2011-02-18 14:48:16 +01:00
Bill King
524a9ac4a8 tests: more test project cleanup 2010-10-21 14:49:58 +10:00
Bill King
54c8a2e5b5 Tests: Get autotests compiling again. 2010-10-20 14:16:04 +10:00
Erik Verbruggen
e4de305b02 C++: Fixed regression in autotests. 2010-09-15 11:17:05 +02:00
Bill King
1f0b600b82 Autotests: More cleanup of tests, and initial marking of components belonged to. 2010-09-02 15:32:04 +10:00
Roberto Raggi
05f2fd6669 Renamed Symbol::scope() to Symbol::enclosingScope(). 2010-08-26 16:16:22 +02:00
Roberto Raggi
d21de8c621 Fixed the objc auto tests 2010-08-13 16:55:43 +02:00
Roberto Raggi
13ebe7e46c Compile. 2010-08-11 16:06:40 +02:00
Roberto Raggi
fff4203a46 Introduced helpers to rewrite types and names.
Done-with: Erik Verbruggen
2010-07-16 11:04:52 +02:00
Bill King
f823c4810e Add "make check" support to testcase makefiles. 2010-07-13 11:59:37 +10:00
Erik Verbruggen
8d5dde66c0 Fixed qualified name creation for ObjC classes and protocols.
Also fixed the tests for it.
2010-05-20 12:13:44 +02:00
Roberto Raggi
41882862a2 Compile. 2010-05-18 10:33:35 +02:00
Erik Verbruggen
d7994a886f Added tests for FindUsages in Objective-C code. 2010-02-11 10:02:00 +01:00
Roberto Raggi
3fb1bc46ae Compile. 2009-12-07 12:00:35 +01:00
Roberto Raggi
f2c4d84c6c Compile 2009-11-17 14:30:01 +01:00
Erik Verbruggen
72d4493fc2 Added scope calculation for Objective-C classes. 2009-11-11 09:21:06 +01:00
Roberto Raggi
485dec6d2b Link with cplusplus library. 2009-10-26 14:40:36 +01:00
Roberto Raggi
13675cf6ed Cleanup the C++ front-end.
Removed CPLUSPLUS_BEGIN/END_NAMESPACE & co and made it possible to compile the parser with CPLUSPLUS_WITHOUT_QT.
2009-10-20 11:21:25 +02:00
Rohan McGovern
f1f46be2f1 Make tests follow Qt conventions by starting all unit tests with `tst_'.
Some scripts make use of this convention to differentiate unit tests
from applications which happen to link to testlib.

Reviewed-by: ossi
2009-09-22 00:36:25 +10:00
Roberto Raggi
9d52a72534 Made it possible to compile libCPlusPlus without `gui'. 2009-02-10 10:48:19 +01:00
Roberto Raggi
ea981d5025 More annotations. 2009-02-09 12:19:17 +01:00
Roberto Raggi
34efcf3194 More testing. 2009-02-09 11:56:21 +01:00
Roberto Raggi
6672f89ff5 Annotate the ClassSpecifierAST node with the class symbol. 2009-02-09 11:35:57 +01:00