aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Utils: FsEngine micro-optimizationshjk2022-11-291-17/+11
| | | | | | | | | | | | Mostly for shorter code, but also save a few cycles due to less string construction and run time dispatch. Also, make testFilePathFromToString() test two paths instead one path twice. Change-Id: I50a3145bca1a4b262a15e96173ea7ebd9cb678ad Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/9.0'Orgad Shaneh2022-11-281-6/+10
|\ | | | | | | Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
| * CMake build: Make errors of execute_process fail the buildTim Jenssen2022-11-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | Instead of silenty failing and resulting in broken builds/packages. The property is only available since CMake 3.19, so limit the feature to that. Change-Id: I82b06e78540e81a809f7fdfe130648becfc9672e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | MathUtils: Add exponential interpolationJarek Kobus2022-11-281-0/+27
| | | | | | | | | | Change-Id: I58bb26a6e921cbd1f5532bddcd6a6700ff80b94f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | MathUtils: Add tangential interpolationJarek Kobus2022-11-285-0/+90
| | | | | | | | | | | | | | | | Reuse it in TaskProgress and in ProgressTimer. Rename MathUtils::interpolate() into interpolateLinear() Change-Id: Iff4cda1e3b8782cd26277ec75046ca5526be92c0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Tests: Replace foreach with range-based for loopsJarek Kobus2022-11-241-1/+1
| | | | | | | | | | | | Change-Id: If813702db78f05701f0ef9378843a474da0aae6a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CppEditor: Proliferate FilePath usehjk2022-11-248-10/+14
| | | | | | | | | | | | | | | | | | | | | | This includes one functional change: It drops some cleaning of the path used to create the CppDocument, which is now assumed to be done on the caller side. Change-Id: I5e2a182028e4d5b56282ad85f4a5c665f081754f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | CppEditor: Let users check for unused functions in (sub-)projectsChristian Kandeler2022-11-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that especially in C++, there can be a lot of false positives, especially in template-heavy code bases. We filter out the most notorious offenders, namely: - templates themselves - constructors and destructors - *begin() and *end() - qHash() - main() Since the code model does not know about symbol visibility, the functionality is quite useless for libraries, unless you want to check your test coverage. The procedure is rather slow, but that shouldn't matter so much, as it's something you'll only run "once in a while". Fixes: QTCREATORBUG-6772 Change-Id: If00a537b760a9b0babdda6c848133715c3240155 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Utils: Disable broken commandline tests on windowsMarcus Tillmanns2022-11-241-0/+7
| | | | | | | | | | Change-Id: I20e89877886b0f9416cca766a119b99191011d1b Reviewed-by: hjk <hjk@qt.io>
* | Utils: Make errors from CommandLine test better readablehjk2022-11-231-6/+15
| | | | | | | | | | | | Change-Id: Ibea4bbe7c1f7e502849f0ef6985cbf107fc236f0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | TaskTree: Fix destruction of running task treeJarek Kobus2022-11-232-0/+41
| | | | | | | | | | | | | | Delete all storages that were created before. Change-Id: I8cbeb571424086b77fa7b19611c5b3f6cc1f4db1 Reviewed-by: hjk <hjk@qt.io>
* | TaskTree: Introduce Storage itemJarek Kobus2022-11-231-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Storage item makes it possible to define the whole subtree as a self-contained, full-functional recipe, without a need for passing (together with recipe) a one-use only (disposable) pointer to storage object. That's the last closing element of making the idea of pure, value-based recipe real. It makes the TaskTree machinery ultimately powerful. Change-Id: Icd81bdd3e94251e8b241b2b550957d566fa4ab75 Reviewed-by: hjk <hjk@qt.io>
* | CPlusPlus: Proliferate FilePath usehjk2022-11-223-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The starts with CppDocument::filePath(), plus a bit of the fallout This is one patch of potentially many. It is hard to draw the line where to stop this kind of chunk, this here converts a few additional functions for which including it in the patch looked like less churn than without. Converting is mostly fromString/toString, with a few exceptions for "already seem" like caches, that use cheaper "path()" to avoid likely performance regressions (on Windows FilePath comparison is currently case-insenstive, and more expensive). There should be no difference for local operation with this patch. Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Utils: Add "addCommandLine..." functionsMarcus Tillmanns2022-11-225-1/+78
| | | | | | | | | | | | | | | | | | | | | | addCommandLineAsSingleArg allows to reliably create commandlines like "bash -c 'echo ...'" addCommandLineWithAnd combines two command lines by adding '&&' in between Change-Id: Ic5af34c90fd5271dced40ba1341a3df019ededb8 Reviewed-by: hjk <hjk@qt.io>
* | Add manual test for TaskTreeJarek Kobus2022-11-187-1/+558
| | | | | | | | | | | | Change-Id: I92ea4d949729f59d2d1e262ecd38fc3be4f463fe Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | AsyncTask: Add async task adapter for task treeJarek Kobus2022-11-181-0/+182
| | | | | | | | | | | | Change-Id: I9fd90fef0d9eedfaca6e405ada5aa26006f06e33 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Utils: Introduce AsyncTaskJarek Kobus2022-11-185-6/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AsyncTask encapsulates a function and arguments list for further asynchronous invocation (using Utils::runAsync). This is going to be a part of TaskTree hierarchy. It will enable keeping asynchronous tasks inside the tree. This means we will be able to construct a task tree consisting of a mixture of processes and asynchronous tasks. Implementation-wise this is a simple templated subclass of QObject, where template parameter is of asynchronous result's type. It holds QFutureWatcher object internally in order to track task's running state. Change-Id: I96f307cdf663cadc840465debb353ab55a2c3550 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | TaskTree: Add task tree adapter for task treeJarek Kobus2022-11-181-0/+17
| | | | | | | | | | | | | | | | Now it's possible to nest TaskTrees. A nested TaskTree is seen as one, singular task inside parent tree. Change-Id: Iad95de39c7b79580e0b589c222594de91d5b51a1 Reviewed-by: hjk <hjk@qt.io>
* | Remove unused includes of QLayoutJarek Kobus2022-11-181-1/+0
| | | | | | | | | | Change-Id: I12777e07f3d6fcc639b48f02080e73b1a0a3ea30 Reviewed-by: hjk <hjk@qt.io>
* | Remove unused includes of QFormLayoutJarek Kobus2022-11-181-1/+0
| | | | | | | | | | | | | | Change-Id: Ia877cb57037342f2a7b332b29d9cb45e9b01c4bc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | TaskItem: Move enums outside of TaskItemJarek Kobus2022-11-171-1/+1
| | | | | | | | | | | | Change-Id: If8a2b285bf9d9bd5a5b7222c13772c1a873daf23 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | TaskTree: Implement simple progress reportingJarek Kobus2022-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | The progressMaximum is the number of tasks in tree. The progressValueChanged signal is emitted whenever task is done (advance by one) or when some number of tasks were skipped or stopped due to workflow policy or dynamic setup group handler. Change-Id: I403059a6466ae0534ef647c3c1c61c0318f10325 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | TaskTree: Add taskCount() getterJarek Kobus2022-11-171-25/+31
| | | | | | | | | | | | | | | | Will be helpful when implementing progressMaximum. Change-Id: I9204b53425054a01c96f3b926b595f7888f81e3a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | TaskTree: Add DynamicSetup handler for groupsJarek Kobus2022-11-171-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DynamicSetup enables finishing group (with Done or Error) immediately before the group was even started. The handler is invoked dynamically, just before starting the group. The handler may also allow for running only selected children and omitting others, so it may serve as dynamic condition or dynamic multiplexer. This can be achieved by modifying QSet<int> childrenToRun field inside returned GroupConfig and setting the policy to ContinueSelected. Change-Id: I15bddbb866a89ae9f783c59cc4bca89dd6a81c75 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | CPlusPlus: Add new usage tag "Template"Christian Kandeler2022-11-171-4/+6
| | | | | | | | | | | | | | For use in follow-up patch. Change-Id: I49c057280be9b09862a89fa385a7396f1b1093bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2022-11-167-295/+470
|\ \ | | | | | | | | | Change-Id: I74bf2bfb1eacb60675640c47eb41ce51dd6eb99f
| * \ Merge "Merge remote-tracking branch 'origin/9.0' into qds/dev" into qds/devThe Qt Project2022-11-093-5/+6
| |\ \
| | * \ Merge remote-tracking branch 'origin/9.0' into qds/devTim Jenssen2022-11-093-5/+6
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
| * | | | QmlDesigner: QmlPuppet as standalone toolMarco Bubke2022-11-091-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qmlpuppet is now a standalone tool. There is new a library too with the communication code. That is shared between the designer and the puppet. It's in a .cmake file so it can be included by the standalone tool if it is not part of a designer build. Task-number: QDS-5879 Change-Id: I2bc2a0b463fbb3e0c8c23d182abfd368cf87e968 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * | | QmlDesigner: Workaround strange superClasses behaviorMarco Bubke2022-11-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | superClasses() return not only the super classes but the type itself. We should later fix that and introduce something like prototypes(). Change-Id: Ied9c1edad40754cb995bfb26b8d65b0aa3d17753 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| * | | QmlDesigner: Handles directories in Project storage updaterMarco Bubke2022-11-033-259/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All directories are searched for qml files and they are added to the meta data. If the directory is changed the qmldir is always parsed even if it was not changed. We can optimize that later but I think there is no big advantage fot this optimization. Task-number: QDS-5297 Change-Id: Ibe3102520bc18ac474380aad306486d8e25bc5db Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * | | Merge remote-tracking branch 'origin/9.0' into qds/devTim Jenssen2022-11-035-15/+19
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I5f72661f1fc54ff861e2cbbaa4cb32f867924c3b
| * | | | QmlDesigner: Improve ownership of QmlProjectItemMarco Bubke2022-11-031-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibfe4b0b5314dada85a601a8f27003af135df78f1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| * | | | QmlDesigner: Detach views outside of model destructorMarco Bubke2022-10-272-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modelAboutToBeDetached can still calling the model. So calling the function from inside the model destructor is a little bit undefined. To get around it we add a custom delete which call the detachAllViews() before it deletes the model. Change-Id: I38ff8283f4e1ac48b256aeb9fd5bb9f3fb6bfed1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | | | | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-165-22/+60
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | Change-Id: I2123e09f75199a63af6e8505fb8889e7f9d025d2
| * | | | Utils: Remove internal /./ relative path markerhjk2022-11-161-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some creeped into settings earlier, making the paths that were meant to be empty look non-empty. Also add a test for FilePath::isEmpty(). Change-Id: I99e3dd673294206558f9fee9b7c7874d2441327e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * | | | SquishTests: Improve tst_memberoperatorRobert Loehning2022-11-152-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update expected behavior - Update to ClangCodeModel replacing "." with "->" only after selecting a completion - Update to ClangCodeModel no longer announcing needed substitution in proposal widget - Added test for unchanged lines - Stabilize by using proper wait conditions - Fix surplus warning Change-Id: Ia90e0102d44fbd8abb41acaa83509657ad11bf4d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * | | | SquishTests: Update tst_installed_languagesRobert Löhning2022-11-152-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic06b6241df913ebcfe685936f3c509875a2897bc Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | | | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-142-2/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/clangcodemodel/clangdcompletion.cpp Change-Id: Iaa92bf057d7696d2da10802ff95e80863f3235d8
| * | | | Tests: Fix dumper tests on macOSChristian Stenger2022-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7827245017c285ff7c9eb4799a7b340061f3c4af Reviewed-by: hjk <hjk@qt.io>
| * | | | SquishTests: Enable clangd also on machines with low memoryRobert Loehning2022-11-111-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I92caa0da779aacf731a0aa23a86f55e659c51d2b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | | | Fix compilation of tasktree testsEike Ziller2022-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id20b581c53cc4f55735b4047bd9ba723b0e370da Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | | | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-102-18/+18
|\| | | | | | | | | | | | | | | | | | | Change-Id: Ie069f3b2a1200b3e665341b1d56ce836024b0d29
| * | | | SquishTests: Remove unused objectRobert Loehning2022-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 2acc90a0ba884230e2a2177763dfb8c3173c61bd Change-Id: Ie88fb9278c81b3c7a27df93a78978974d86e5377 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * | | | SquishTests: Update tst_basic_cpp_supportRobert Loehning2022-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the old code model used to jump to the "extern" line, clangd jumps directly to the linked variable. Change-Id: I2817d87697b6040afdd538e8e15b4b40ef17e124 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * | | | SquishTests: Stabilize tst_basic_cpp_supportRobert Loehning2022-11-091-17/+18
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Make sure the CppEditor is available before proceeding. Change-Id: I34ed4f581637cc3608283ac045ceb5b4e6ada55a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | | Tests: Fix compile with QbsChristian Stenger2022-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends c49de14c9dd. Change-Id: Ife37f6763b9039a46d63a7f1b4ef16fd0e787d01 Reviewed-by: David Schulz <david.schulz@qt.io>
* | | | Utils: Introduce TaskTree and Tasking namespaceJarek Kobus2022-11-098-0/+658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TaskTree class is responsible for running async task tree structure defined in a declarative way. Change-Id: Ieaf706c7d2efdc8b431a17b2db8b28bf4b7c38e5 Reviewed-by: hjk <hjk@qt.io>
* | | | ProcessTestApp: Make setupSubProcess constJarek Kobus2022-11-092-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1dd45baebb32135cba6a35040d8e87a0bcc5d3ac Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | | | Merge "Merge remote-tracking branch 'origin/9.0'"The Qt Project2022-11-073-5/+6
|\ \ \ \