Update the unit tests while at it. Add some new tests, rearrange
existing ones.
Change-Id: Icc2db644f8fe9752c1bf8e66b134738c27b0fb25
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Show a nice spinner while waiting for data from Gerrit.
Change-Id: Ia35d7408e6a65126d40e8cff5278a442f4b5c760
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Same test as the first version, but without having the header open in
the editor. This one is also skipped since we can't make it reliable
without adding extra messages.
Follow up changes will improve the names of both tests and will make
them both reliable so that the can be activated again.
Change-Id: Ie3ca52e01aedd612bc07e7429dd64d92eb1a23b5
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
...with the clang code model.
In updateProjectInfo() we lock the project mutex and emit a signal.
However, the correspondig slot in the clang code model will call back
into a function that needs to lock the mutex, too:
CppTools::CppModelManager::workingCopy // dead locks here
CppTools::BaseEditorDocumentParser::InMemoryInfo::InMemoryInfo
ClangCodeModel::Internal::ClangEditorDocumentProcessor::run
ClangCodeModel::Internal::ModelManagerSupportClang::unregisterTranslationUnitsWithProjectParts
ClangCodeModel::Internal::ModelManagerSupportClang::onProjectPartsRemoved
...
CppTools::CppModelManager::projectPartsRemoved
CppTools::CppModelManager::updateProjectInfo // emits here
Fixed by emitting the signal after releasing the mutex.
Change-Id: Id3f3cd22b0604f343ada56ea13c26f0dc1a75bd6
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This can not be triggered right now, but somebody might run into this
later.
Change-Id: Ibc635e7dca1db7ab77376b5373db67dcdd2bb46e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This now works the same way as with qmake.
Change-Id: I8e6b7f32ffff19e6f4fe9d83ffe804984e33f298
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This reverts commit 67cfdbd224.
We cannot just resolve symlinks when opening files.
The resolved name might not have much to do with the name of
the symlink (e.g. some version control systems do that).
Change-Id: I373bfc3d4474fe6b7ef4723de254293665fe87ea
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Symlinks need to be resolved, similar to project paths resolving.
Task-number: QTCREATORBUG-15145
Change-Id: I034b99d2a34ddaa664ec6d97b9be76bd4131d706
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The file format does not longer contain object IDs because references are
not used. This simplifies the file format, leads to shorter files and
supportes merges between model files much better - changes in model are
reflected by minimal changes in the file.
Change-Id: I8c76b7899306eec9a493c6cf61add02111229760
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This change unfortunately contains many single changes because it is an
update of the 3rd party component:
* Introduce new Parameter class for better serialization of containers
and other future enhancements
* Delete dead code
* Introduce user data in base archive class
* Fix minor source code issues and typos in comments
* Remove unused and conceptionally broken support of forward refernces
* Fix a memory leak in QXmlInArchive
* prefer load()/save() methods over stream operators
* throw exception on unsuported forward references in QXmlOutArchive
* refactor serialization of pointer types into own header
* remove unneeded specialisation for serialization of free functions
* check for default value of serialization using a getter
Change-Id: Ic197a92b00b22b85dab4a1b88c431cf4da8b3c3b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
...to avoid compilation errors for projects that include the *.pri file.
This fixed the compilation of tests/unit/unittest/unittest.pro.
Change-Id: Ia50322d3a7b7a9d05b7f17239e772f013ffe2ff5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
"Duplicate product name 'StringUtils autotest" - looks like a copy/paste
error from coming from tests/auto/utils/stringutils/stringutils.qbs.
Change-Id: Ibf6088eea4471e6248581a02839a4d8ba9bc73ef
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
If an editor is changing all translation units independent of their project
part they must be updated too. So we introduce a new message to update all
translation units with the same file path.
Change-Id: I70d0ea2bbca9fa880111ff7219573e54f3277026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Make sure the widgets get updated. This used to work implicitly for
QComboBoxes, but not for other widgets.
Task-number: QTCREATORBUG-14774
Change-Id: I84440090e459b60fee268693ba0857ea1c0fe5c2
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Rename the code that evaluates the text and make it a public
slot.
Change-Id: I843bf505fa6e33661fc840a1fd2ec13ceb210037
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This makes some of the more obscure KitInformation useable in that place.
Task-number: QTCREATORBUG-14774
Change-Id: I55f39f2275d96782ee6490d7160ade0c3a5623e1
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Start the timer after a translation unit change and stop after every
diagnostic is sent. We should decrease the interval as we are
sending the diagnostics because otherwise the sending is delayed to much.
If the file watcher is emitting a file change we should only react
to changes of files which have no editor open.
Change-Id: I5431b4bf6b4c0b825bfc74bb9c697bb2d198fa26
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This enables macros in snippets as well as if/else to select/deselect
lines to have in the snippet.
Change-Id: Ic88fb3277a0f5ac803bcab486b245c688c00822a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
If a file is deleted the translation unit should be not updated. It will be
later removed anyway.
Task-number: QTCREATORBUG-15070
Change-Id: I40c9c70629dab1d35b713d54442ffdbb2df3db43
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
We get in crashes in clang if we not check if the file exists.
Change-Id: I78a20507db6403247c02f8c1e69cd872e3e8f774
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diagnostics should be not computed after a file change but after creator
is requesting them. Now we wait for the dialog if the file should be
reloaded.
Change-Id: Id0d51874b95e0f8743002a91511d07e0ed47ecdc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
...in order to profit from its file iteration cache.
Change-Id: I3b7c3e7bd3fd24b0a4dfa29f83158baa9414cc06
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Finding the class definition for a forward declaration or finding the
function definition from its declaration is mostly determined by the
file iteration order. Documents with the most common path prefix are
checked first.
This works fine as long as the files of your project have a common
ancestor. If that's not the case, FollowSymbol might take you to the
definition within another project.
Fix that issue by considering the project part id when constructing the
file iteration order. Since the cached file iteration order now depends
on the projects, ensure to clear it if projects are added, changed or
removed.
Task-number: QTCREATORBUG-15116
Change-Id: I529166bac363959c9fee0b946747fd0370a88809
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
...to it can be reused by other clients more easily. Also, in a
follow-up change it will have a project part dependency that can be
cleared inside the CppModelManager more easily.
Change-Id: Ic9f2ce5212a94fd05ab0571e9ad99d0a25f5bc5c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>