Use new clang_getFileContents to efficiently convert
utf8 byte offsets from line start to column numbers.
Also provide simplier backwards convertion to pass
resulting utf8 offset to clang.
Task-number: QTCREATORBUG-16941
Change-Id: If0e58fe01ad3e281b7e952e972b9e86f6e75aadb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Also bundle lifetime management into one object.
Also minor interfact cleanup.
Change-Id: I60eec84b0b28a20ce353fcdbfdff1c4848686ba0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also mention support for C++17 and renaming of local symbols.
Change-Id: I7bb72bd8741e7ddd3d45e23029696c09a654a3f6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Add a command to manually sync the current document and the project tree.
Task-number: QTCREATORBUG-19625
Change-Id: I2423853ca1a876c6203a004b465adde949eb6c5b
Reviewed-by: hjk <hjk@qt.io>
Some cmake generators create a set of different configurations of the project
at the same time (e.g. Visual Studio related ones). These typically contain
the same set of files.
Creator iterates over the configurations and adds files to the project tree.
For multi-configuration generators this does lead to the same file being listed
several times below a target (the targets themselves were already deduplicated!).
This patch adds deduplication of file paths already listed in the target's
subtree of the project, thus fixing the multiple files issue. New files (e.g.
those that get only built in debug/release mode) will still get added as before.
Task-number: QTCREATORBUG-19020
Change-Id: I5dd6012ea335d9946c78c25be258c8c4d60698f2
Reviewed-by: hjk <hjk@qt.io>
...and return -I for ones in project.
In case -isystem is set for all includes we don't get
proper reparse when the included file is in angle brackets
and is changed.
Change-Id: Iba912edfc488aed2a4484f6a742a7c36099e8a13
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Checkstate handling has been redone, which allows to simplify
these actions.
Change-Id: Ice89d2e9a1d8c3e38520ff2519d06fc4e6d67df9
Reviewed-by: David Schulz <david.schulz@qt.io>
The statistics view is not called "events" anymore.
Task-number: QTCREATORBUG-19658
Change-Id: Iff4375d3dc0cf5d82d118244698887818f924c07
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Instead of relying on addObject notification, provide a
StatusBarManager::addStatusBarWidget() method to create,
register and keep track of an IContext object.
That's essentially what was StatusBarWidget before, but does
not need to be known on the user side. For removal, this
provides a StatusBarManager::destroyStatusBarWidget(),
any not explicitly removed items are handled in response
to ICore::coreAboutToClose()
The StatusBarManager class is fully static now, could
be a namespace.
Change-Id: Ia2bd13b391c3f68c8dfd584b53524a9649cc0787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Lint message M127 (Expression statements should be assignments, calls
or delete expression only) is a warning and not an error.
Task-number: QTCREATORBUG-19534
Change-Id: Iff93cd77582c28f4160fe7a8dec42f19c22436cb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
While those only exist since Qt 5.10 I would like
to avoid Qt version checks all over the place.
Change-Id: I5750a93ef2e5bbc675ab9adcf35e356990b3059a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Allows adding of multiple files
* Files are copied
* Files are added to the project
* Supported file types can be extended
Change-Id: I41d1d18c4a3fc9c6c50e0629070d9a2cbf082976
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Due to the way JavaScript's split() function works, an empty string
could end up in the list of dynamic libraries, causing a warning when
building the pchmanagerbackend.
Change-Id: I5af834d4f98af379ee346556b47c57cabf8c98db
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...to see them in both qtcreator application output
and DebugView.
clangbackend is a separate process which provides
QtCreator stdout and stderr channels so we need to
have QDebug messages there in order to receive them.
Change-Id: I2edc4de1ca203b061395b0b3070e4471348eaad7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
When gathering information for running tests we need to
take the grouping into account if enabled.
This patch amends 4eabcda3a1.
Task-number: QTCREATORBUG-17979
Change-Id: I27c17a5de8596c95f3b207530560d2a7c2cb5e99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
For locating bookmarks (b) and triggering menu commands (t).
Change-Id: I4c2ee705a5e87a86a44bdeb8e2c9ca04cefff112
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Simplify and re-arrange to avoid wrong indirections and
unnecessary delegation.
Beside this ensure correct check states of group nodes
when adding them.
Change-Id: I24a32249d785e48c9d27111d062c2a06a17327ef
Reviewed-by: David Schulz <david.schulz@qt.io>
GTests can be registered across several files and so it is
possible to get different test sets for the same test case
from a lot of files. Make sure to generate group nodes only
for test cases to avoid getting senseless (inner) group nodes.
Change-Id: I8c3f959e0af62ce3fb8461db0b0c82decfe6fd4f
Reviewed-by: David Schulz <david.schulz@qt.io>
...so the dialog does not appear as a separate application.
Change-Id: I4e9b76bf70f860d7decf8836f6a9885fb5748028
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Kits are a central concept and structure in anything build and run
related in Creator, their organization is crucial for the functionality
of Creator and deserve to be emphasized over other, often more cosmetic
settings.
This is the first step of two, the second step would be moving
the Device (list) page also in this category, possibly after some
reorganization in the Device category.
Change-Id: I4abc89472d0575c691fc9e5051397833126e5456
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The targetName on QNX is the project file path.
Change-Id: Ie87b459c6d8d7637815796b3505833d7c65b3500
Reviewed-by: Adam Treat <adam.treat@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Mechanical in preparation of 'static pattern' and avoiding the
object pool objectAdded/objectAboutToBeRemoved use
Change-Id: I1e3fc7f67c785410686d0dc7c083024e305f4abe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QTC_CPU was broken in qmake and never worked there. Qbs never implemented
the override properly, so neither did it work there.
Use QSysInfo to retrieve information on CPU that Qt was built for and use
that in the hostAbi.
Change-Id: I298c15b2263c9eaf343a93037229de64e90c36ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Due to DummyBackendSender not overriding requestToolTip() the base
implementation was called which assumed a connected backend.
To avoid this in future, derive DummyBackendSender from
ClangCodeModelServerInterface so the compiler will warn about not
overridden functions.
Task-number: QTCREATORBUG-19644
Change-Id: Ifd846cbe581092e1688719119dad5003da66d0a3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Setting the collection file leaves the help engine in an invalid state.
It is important to invoke setupData() in order to setup the help engine
again.
Change-Id: I252d7999c113db4f584bcaf94d42c609f507c1cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>