...with an extra parse.
Previously, the creation of an e.g. "Qt Widgets Application" from the
wizard could show code model errors in mainwindow.cpp. Depending on
timing issues, the first error is either
1. 'ui_mainwindow.h' file not found (QTCREATORBUG-15187)
The parse happened before the in-memory ui_mainwindow.h was
generated by uic. The file system watcher can't help here as the
#include was not resolved successfully. And libclang's reparse does
not handle this case (it would need to remember all failed #include
stats...).
==> Detect this case with the help of the include paths and trigger
a full parse.
2. or: allocation of incomplete type... (QTCREATORBUG-15187)
The parse happened after the generation of the in-memory
ui_mainwindow.h, but before the clangbackend received the unsaved
file.
==> Fix this by also writing the content of the unsaved file to our
behind-the-scenes-created ui_mainwindow.h.
Fixes: QTCREATORBUG-15187
Fixes: QTCREATORBUG-17002
Change-Id: I4f3a81adaa3d604746977a402c29f83fbc5b0e44
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...as it is not needed. Just provide the compilation arguments as part
of the Document.
As a side effect, re-initializing the backend after a crash is cheaper
and will not freeze the UI anymore (referenced bug).
Task-number: QTCREATORBUG-21097
Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The ones that were already dirty were not taken into the account and
used the old project configuration.
Change-Id: I949d1ca8c23bbdb18eec78e5a708199beff6f735
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...with new project arguments.
Reproduce with:
1. Open a file with some #ifdef
2. Edit the file, e.g. type space.
3. Change the build configuration so that the highlighting flips in the
editor.
4. Edit the file again, the configuration flips again [repeat].
Change-Id: Ib97c18fc46538d74c63972e682a348ae2736a4e6
Reviewed-by: David Schulz <david.schulz@qt.io>
...because the flag can be set for needed parses, too.
Change-Id: I8b328afefb282cb6bd1cf88711af3d08a56808db
Reviewed-by: David Schulz <david.schulz@qt.io>
Slow and very slow tests have now their own test category. We add SlowTest
for tests which are slower than ~5ms and VerySlowTest if they are slower
than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster
machine than most developers simply try lower values. The aim is that most
developers can execute the tests in under ~2s.
In the long run we should use dependency breaking and data sharing to
reduce the count of the slow tests.
Change-Id: I8578071258d7f89b2052709f3dd526ced811483f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...if the registered document comes with unsaved content.
This can easily happen if the document is opened and modified by a
refactoring action.
Task-number: QTCREATORBUG-17295
Change-Id: I3a95fb495b6122248ceaa80985e838851ba2c0e5
Reviewed-by: David Schulz <david.schulz@qt.io>
1. Open document foo.h
2. Create a split and open foo.cpp (#including "foo.h")
3. Edit foo.h (e.g. by introducing a syntax error, so that foo.cpp will
indicate header errors in the toolbar or as info bar)
=> Actual: foo.cpp will be reparsed immediately.
Expected: foo.cpp should be reparsed after a delay.
This saves resources (cpu time) and minimizes poping up of the header
info bar while editing header files in splits.
Regression introduced by
commit 380d756a03
Clang: Hook up supportive translation unit on first edit
Change-Id: Ib5fd90e49415dfc3aefacab7cd627b0e1937f5fc
Reviewed-by: David Schulz <david.schulz@qt.io>