Commit Graph

20 Commits

Author SHA1 Message Date
Nikolai Kosjar
655470cc0c C++: Tests: Fix unicode tests with MSVC
Change-Id: I5575826558bf60982ecc964e4dd85a3f4e920197
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-06-05 08:14:57 +02:00
Nikolai Kosjar
57ff992961 C++/CppTools: Pass UTF-8 encoded source to Lexer
The Lexer can handle it now.

Task-number: QTCREATORBUG-7356
Change-Id: I8c4b03a247656e013d44c3cedca4835e133d4036
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:41 +02:00
Nikolai Kosjar
70122b3061 C++: Support for UTF-8 in the lexer
This will save us toLatin1() conversations in CppTools (which already
holds UTF-8 encoded QByteArrays) and thus loss of information (see
QTCREATORBUG-7356). It also gives us support for non-latin1 identifiers.

API-wise the following functions are added to Token. In follow-up
patches these will become handy in combination with QStrings.
    utf16chars() - aequivalent of bytes()
    utf16charsBegin() - aequivalent of bytesBegin()
    utf16charsEnd() - aequivalent of bytesEnd()

Next steps:
 * Adapt functions from TranslationUnit. They should work with utf16
   chars in order to calculate lines and columns correctly also for
   UTF-8 multi-byte code points.
 * Adapt the higher level clients:
    * Cpp{Tools,Editor} should expect UTF-8 encoded Literals.
    * Cpp{Tools,Editor}: When dealing with identifiers on the
      QString/QTextDocument layer, code points
      represendet by two QChars need to be respected, too.
 * Ensure Macro::offsets() and Document::MacroUse::{begin,end}() report
   offsets usable in CppEditor/CppTools.

Addresses QTCREATORBUG-7356.

Change-Id: I0791b5236be8215d24fb8e38a1f7cb0d279454c0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:15 +02:00
Nikolai Kosjar
60c4235bec C++: Tests: Allow comparing specific members of Token
A follow-up patch will enhance this.

Change-Id: Ie92ae3542098d8b7c996110152cd83eb85c398e7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-16 15:48:36 +02:00
Orgad Shaneh
e600424648 C++: Fix support for incremental input with \n
Also fix false positive line continuation on blank line

e.g.
"foo \

bar"

Change-Id: Ic6d345a4b578c955411d119b8438c8dc5065c072
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-04 11:33:54 +01:00
Orgad Shaneh
0f4e3c356a C++: Support multiline strings and comments
Task-number: QTCREATORBUG-662
Change-Id: I0997fe2afaba71998d5da549b7141df0c023ff12
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-21 10:54:56 +01:00
Orgad Shaneh
e51fbd2009 C++: Fix debugging of lexer test
spell() crashes if identifier is not properly created

Change-Id: I1c3949c3fed2282d893914fa2922f6c281d1f8cd
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-20 12:30:29 +01:00
Orgad Shaneh
15680ebe0c C++: Minor cleanup in lexer tests
Use a typedef for the list

Change-Id: Ie921226f9b72fdbedd9926ae166979a4cd1ad540
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-20 12:30:17 +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
Nikolai Kosjar
af995ca1b8 Tests: Rename test function in tst_lexer.cpp
...to a more generic name since it is not any more limited to doxygen.

Change-Id: I0fca5dab9b5ab8850b2cfba5758b51f0451c199d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-12-10 15:07:10 +01:00
Nikolai Kosjar
223ecc70a2 C++: Compile fix for tst_lexer
The trigraph sequence somehow confused qmake. The moc file was not
generated.

Change-Id: I4016947b5c8efa350d1813737651143d8687d299
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-12-03 10:54:15 +01:00
hjk
5c5240815a CPlusPlus: Fix parsing of ??< ??> ??( ??) trigraphs
Almost most useful feature ever.

Task-number: QTCREATORBUG-2474
Change-Id: If1ad661fab58ffb4a0b9ddb8ba771f2fde3b54ec
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-11-27 16:24:30 +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
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
Nikolai Kosjar
ceb314b3ec C++: Tests: More lexer tests for doxygen comments
Change-Id: Ib031eb791f0a089376d02cc75a62fcc7d1f859cb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-12 09:04:07 +01:00
Nikolai Kosjar
47d60ae89a C++: Consider '^//[/!][^\n]*' as doxygen comment
Now everything following '///' or '//!' is a doxygen comment.

This simplification fixes also the bug ('\n' was considered as part of
the doxygen comment and led to strange highlighting).

Task-number: QTCREATORBUG-8921

Change-Id: I6dae3b80ec11400f2f623897257782a80860a7f3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-12 08:31:05 +01:00
Jan Kundrát
4250b86a73 Fix build error (missing Q_DECLARE_METATYPE)
Change-Id: Iaba3ebbb3960dc6fe07b8382be29071ce7af5bfb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-03-04 10:25:52 +01:00
Nikolai Kosjar
61460951ce C++: Fix highlighting of doxygen's "///"
The color scheme changed for "///\n" lines:

 "///\n"       - "Doxygen Comment" (was "Comment")
 "/// hello\n" - "Doxygen Comment" (as before)
 "////...\n"   - "Comment" (as before)

Change-Id: I6bdaf471760bb05547385fd4821eded6cefed4d7
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-02-19 10:17:55 +01:00