summaryrefslogtreecommitdiff
path: root/tests/unit/unittest/filepathstorage-test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove ClangRefactoring and ClangPchManagerEike Ziller2021-06-151-674/+0
| | | | | | | | | | | | This removes the plugins and tools, and removes all the tests that would fail to build because of that. Fixes: QTCREATORBUG-25659 Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Sqlite: Move result count to class declarationMarco Bubke2021-03-261-104/+105
| | | | | | | | It move the magic number of column results to the sql statement and improves the mock a little bit. Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Clang: Improve file path cacheMarco Bubke2019-08-271-0/+71
| | | | | Change-Id: I940dc63c0fc95fbb826ed7d19a1ac1e4db5a542c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Optimize file path cacheMarco Bubke2019-08-271-10/+6
| | | | | | | | We now fetch all directories and sources from the database at file path cache creation. Change-Id: I92510b49a234128f4c82b840611db82ead3f1a54 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Watch directories instead of filesMarco Bubke2019-06-271-12/+70
| | | | | | | | Because there a limited resources to watch files we watch now directories. So we need much less resources. Change-Id: Iac558832e9521a7a1a67c5ea99b42ad1b0b5129c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Improve project part updatingMarco Bubke2019-04-011-6/+8
| | | | | | | | | | | | The project part ids are now already created very early in the database. This removes some checks because we can assume that an id already exists. The project part are now completely persistent, so we can read them from the database and compare them with new generated from a new creator session. This should help to not recreate the same PCH again and again. Task-number: QTCREATORBUG-21151 Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Improve dependency buildingMarco Bubke2019-03-061-9/+17
| | | | | | | | | We want to use the cached values in the database because it is faster than to parse the the files again. Task-number: QTCREATORBUG-22035 Change-Id: I7ada7073887b1d89a06332fdb617701cb69ccd68 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Introduce PchTaskQueueMarco Bubke2018-12-101-1/+1
| | | | | | | | With the PchTaskQueue the pipeline is almost complete. Task-number: QTCREATORBUG-21346 Change-Id: I5f05d525db1679eb37dd1d462076c1ed42958099 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Refactor FilePathIdMarco Bubke2018-11-081-61/+61
| | | | | | | | We don't need the directory id any more. It's not used widely any way. Task-number: QTCREATORBUG-21443 Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Cleanup transaction statements in the databaseMarco Bubke2018-04-091-1/+18
| | | | | Change-Id: I795248492fe952c230fd3a9cf8bf16f3c831f161 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Handle constraint exceptions in the file path storageMarco Bubke2018-04-041-2/+89
| | | | | | | | | | It can be happen that the entry is written by an other connection after we tried to read and before we write. This would lead to a double entry which be prevented by the unique index in the database. In that case we simply try again and read the id from the database. Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Handle all busy states in the file storageMarco Bubke2018-04-041-11/+40
| | | | | | | | It can be happen if different connections try to write and read at the same time. Change-Id: I30e9120fdb8f6963f5440eed48e2cfdf8803b2be Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use PCHs for indexingMarco Bubke2018-03-221-3/+1
| | | | | | | | | | | | As generating the AST is quite expensive it would be very useful to cache the not changed include. So we generate PCHs for include outside of a project part. With this change this PCHs are used by the indexer. For that they are save to the symbol database by the PCH manager and when fetched by the symbol indexer. Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add source dependency saving to the symbol storageMarco Bubke2018-02-011-1/+1
| | | | | | | | The source dependencies are simply a table which connects the include file with the included file. Change-Id: I5454e81a2b5b98f05c7ff3f6740a6d45e01772c3 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: On the road to update and preprocessor supportMarco Bubke2018-01-291-39/+37
| | | | | | | | | | | | | | | | | This patch has grown in a quite big change set and it is really hard to divide it in different parts. V2::ProjectPartContainer is now using FileIds instead of file paths. This cleans code up because it is a big step in the direction that internally only file ids are used. But it is depending on the file cache, so the file cache has to be provided as an argument. There is now an interface for transactions too which are ease the testing of them and enables the support of preprocessor. It adds macros as symbols and is saving used macros. The used macro support is enabling update improvements because only if a changed macro is used it needs to be recompiled. This is still in flux and can be changed in later patches. Change-Id: I492a2c9af1201d40fdd9f46a0045f7878bbbaa3d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add file cacheMarco Bubke2017-10-051-0/+409
The database is using file path integer ids to handle file paths because otherwise we would save many redundant data. This patch is improving it further with the introduction of a database based file path cache. The entries are now divided in a directory path and file name. This is quite handy for directory based file watching. Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>