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>
Simply link to Core instead of duplicating all the files.
There is a warning on Windows because one translation unit
is present twice, but it seems to work anyway.
Change-Id: I6c5af590a6051f5c2d810d9449ff5410cf94e78a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The Lexer can handle it now.
Task-number: QTCREATORBUG-7356
Change-Id: I8c4b03a247656e013d44c3cedca4835e133d4036
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...and not byte offsets anymore. This is necessary in order to calculate
the line and column numbers correctly with respect to unicode code
points.
Change-Id: I5d79857b3eaefeb8d563b4f1e3938a64debc5e08
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
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>
...by adding capabilities that allow a better differentiation between
Qt4 and Qt5 object structures.
Change-Id: I025d8301c13922e369862eefaad848bbecc76030
Reviewed-by: hjk <hjk121@nokiamail.com>
This will avoid confusion when later more length and indices methods are
added.
In Token:
length() --> bytes()
begin() --> bytesBegin()
end() --> bytesEnd()
Change-Id: I244c69b022e239ee762b4114559e707f93ff344f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...by just calling selectBuildConfig.
Change-Id: I8f07b3d874c22ebeca8e5cf658d754cf231c7ad0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Some files were missing, which did not manifest itself with qbs 1.2
due to files being accidentally picked up from other locations.
Change-Id: I9ed91246483f4f53bc21a79a9e2029fedb8a702d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* set a random expiry for the paste
* make sure server side errors are handled
Change-Id: I28feab982fefbb97a9f603144943a57cc268538c
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Without, I get German output from git which breaks tests.
Change-Id: Ic12a3d31908193b4bac3283eb02b06fc945c5fd8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This time with autotests.
Task-number: QTCREATORBUG-12193
Change-Id: Id91eecd38eb4ac76c68be8e9969651407a68ebf4
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Additionally moved common code of tst_*_externally to project.py.
Change-Id: I056e0dc6749cf92e1416ce313a8f058639981609
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Just like for QtcPlugin, QtcLibrary etc.
Change-Id: I395f5863f31abba589864be3ad41ad7fc893787f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Heads up: This switches the argument order to allow a default
argument for the inner type if it can be determined from the
base pointer.
Change-Id: I9bf80fcdd51b5db8e7c65adba551ca667912cd86
Reviewed-by: Christian Stenger <christian.stenger@digia.com>