aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
Commit message (Collapse)AuthorAgeFilesLines
* CPlusPlus: Code cosmeticshjk2022-11-292-17/+15
| | | | | | | | Rename a few 'fileName' into 'filePath'. Remove unneeded includes. Change-Id: I850e06cb4f58ec8dc70aa389f2521be8f5247b5c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtcProcess: Set Starting state a bit laterJarek Kobus2022-11-291-3/+3
| | | | | | | | | To avoid resetting it back again to NotRunning in case an assert triggered. Change-Id: I4ba52bb64fd3b782013cf47d9149bef7f8a231af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Utils: FsEngine micro-optimizationshjk2022-11-295-42/+33
| | | | | | | | | | | | 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>
* Utils: Use .path() instead of .toString() in some local caseshjk2022-11-291-2/+2
| | | | | | | | | Same effect, but "better" conceptionally. Change-Id: Ic33bdc097b38176e81413736b2eb44d1fb7d0a3f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CppEditor: Remove Snapshot::remove(QString) overloadhjk2022-11-291-2/+0
| | | | | | | | ... and fix fallout. Change-Id: Ibbf865c3e4158fc98bb9b5372ce0633807b85576 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Fix expansion of macros in FilePathhjk2022-11-291-4/+2
| | | | | | | | | | | In the New Project wizards, we do have e.g. %{ProFile} that should expand to {scheme}://{device}//{path-to-pro}, not to {}://{}//{schemedevicepath-to-pro} or similar. Task-number: QTCREATORBUG-28355 Change-Id: Idbad709f3fce583f21186a1d43f27ecac15be2ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/9.0'Orgad Shaneh2022-11-281-3/+4
|\ | | | | | | Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
| * FilePath: Do not strip macros when normalizing pathOrgad Shaneh2022-11-251-1/+1
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-28484 Change-Id: Id6bcd2aef048bd355c196013c54799e4944135bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
| * FilePath: optimize comparisonThomas Hartmann2022-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | * The QTC_ASSERT in pathView() is quite expensive * Constructing the scheme using scheme() is not required Change-Id: Ibea33dd6abf67c8bd184d118f23e2598075c362c Reviewed-by: hjk <hjk@qt.io> (cherry picked from commit e47141753995f91565f8e3781315b40fe620d16c) Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| * FilePath: Backport some pathView() changeshjk2022-11-242-4/+10
| | | | | | | | | | | | | | | | | | | | After the change to a single-string representation, the QString construction for path() is expensive for the comparison operators and simple convienience functions. Change-Id: I643c7115d3ad52f971d1692230b6eab82645b810 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | CPlusPlus: Migrate Macro to FilePathhjk2022-11-283-10/+9
| | | | | | | | | | Change-Id: I94e8702e81e809e4d8318572cc070a0531edaefa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Utils: Make FilePath::refersToExe(...) return the found itemhjk2022-11-284-18/+24
| | | | | | | | | | | | | | ... and use in on the CMake side. Change-Id: Ib215ebc4f87beb67b6a302d0c42e7b955a2fa5b7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | MathUtils: Add exponential interpolationJarek Kobus2022-11-282-5/+23
| | | | | | | | | | Change-Id: I58bb26a6e921cbd1f5532bddcd6a6700ff80b94f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | MathUtils: Add tangential interpolationJarek Kobus2022-11-282-2/+20
| | | | | | | | | | | | | | | | Reuse it in TaskProgress and in ProgressTimer. Rename MathUtils::interpolate() into interpolateLinear() Change-Id: Iff4cda1e3b8782cd26277ec75046ca5526be92c0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Utils: Move DiffUtils::interpolate into MathUtilsJarek Kobus2022-11-284-0/+45
| | | | | | | | | | Change-Id: Iac4a21a6c760d8fbf0dce380b1a9a587a9d3468e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | InfoBar: Do not synchronously delete widgets in updateFabian Kosmale2022-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting the widgets can trigger use after free errors if those widgets are stil supposed to handle events. This can for instance be observed with an ASAN build of Qt when pressing the "Link Qt" button - the button still has a pending MouseReleaseEvent, when update is called, and by deleting the InfoBarWidget that contains the button, we run into the use-after-free. That might also be relevant to the comment about a "complictated crash" in infoBarDestroyed. Change-Id: I9f807aa26db1169a5a749692922e580dc5874254 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CppEditor: Remove WorkingCopy::get(QString) overloadhjk2022-11-253-2/+7
| | | | | | | | | | | | | | ... and fix fallout. Change-Id: I8fe67616f8f327428b1c166ae69ec34c2924ee9f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | AdvancedDockingSystem: WorkspaceDialog: Use LayoutingJarek Kobus2022-11-258-282/+119
| | | | | | | | | | | | Change-Id: I998147908941b4390c810983a5676628f07b1250 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | CppEditor: Switch to FilePath in IndexItemhjk2022-11-251-2/+1
| | | | | | | | | | | | | | ... and fix fallout. Change-Id: I45d27146806bdcb5ceb728b710eca51c7cd32ee2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Use M_PI for 3.14Jarek Kobus2022-11-252-2/+2
| | | | | | | | | | | | | | Change-Id: I19078a791afa1c74cd34e59b033525e029755d7e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CPlusPlus: Return FilePaths from Document::includedFilehjk2022-11-253-22/+28
| | | | | | | | | | | | | | | | ... and fix fallout. Change-Id: Ieaad57700fa48d0c4a0dd9bf2c284315579b9473 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | CppEditor: Proliferate FilePath usehjk2022-11-253-7/+7
| | | | | | | | | | | | | | | | | | Remove SnapShot::{find,contains}(QString) overloads and fix fallout. Change-Id: I50c415826939e09ac111f33def611c7478fa5d97 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ModelingLib: Replace foreach with range-based for loopsJarek Kobus2022-11-249-101/+124
| | | | | | | | | | | | Change-Id: I3e51c9477b6995ec06b119fb4518a53aa1d71ec9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Utils: Add FilePath::{suffix,fileName}View functionshjk2022-11-242-7/+19
| | | | | | | | | | | | | | Can save a few cycles in some cases. Change-Id: I0da3ad9ae2127e20f8e90d68f924e87661028071 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | GLSLEditor: Replace foreach with range-based for loopsJarek Kobus2022-11-241-1/+0
| | | | | | | | | | Change-Id: Ie28411ec0f69a4cee0feff61b11ed73a897174ea Reviewed-by: hjk <hjk@qt.io>
* | CppEditor: Proliferate FilePath usehjk2022-11-247-31/+32
| | | | | | | | | | | | | | | | | | | | | | 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>
* | GenericDirectUploadService: Reuse TaskTreeJarek Kobus2022-11-241-2/+2
| | | | | | | | | | Change-Id: Ib450274d3e73059bbc5e8f8e0d586ebb2a7a0dc4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CppEditor: Let users check for unused functions in (sub-)projectsChristian Kandeler2022-11-242-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Wizards: Let "new file" wizard create subdirectoriesChristian Kandeler2022-11-241-0/+1
| | | | | | | | | | Change-Id: I1267025ab3db3803e10c6a5ebf78bb945fe19c71 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | "New Project" wizard: Create project parent directory, if neededChristian Kandeler2022-11-242-2/+8
| | | | | | | | | | | | | | | | | | | | There's no reason to force users to the terminal if they want to create their project in a new subdirectory. Fixes: QTCREATORBUG-28346 Change-Id: Id92b2194c018274aac6f7f29c7304efa8c1d2d9e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | TaskTree: Fix destruction of running task treeJarek Kobus2022-11-232-1/+11
| | | | | | | | | | | | | | Delete all storages that were created before. Change-Id: I8cbeb571424086b77fa7b19611c5b3f6cc1f4db1 Reviewed-by: hjk <hjk@qt.io>
* | TaskTree: Introduce Storage itemJarek Kobus2022-11-232-20/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | TaskTree: Introduce TreeStorage classJarek Kobus2022-11-232-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TreeStorage enables delayed creation of instances of StorageStruct. It encapsutates recipe on how create / delete instance of StorageStruct. It doesn't create any instance of StorageStruct when TreeStorage is created. These instances will be created later, by TaskTree. It will enable getting StorageStruct instance inside task / group handlers (passed by lambda argument). Change-Id: Id707353f196aa5ba3e7876d6c601e04ca08d6e63 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-232-3/+8
|\| | | | | | | Change-Id: I69ebd63cbd780ed4edb3873acfc8aac208933032
| * tst_tracing_*: Fix build in certain configurationsEike Ziller2022-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are Linux distributions that (at least for building packages) separate the development packages for the various Qt modules. So, to find the include <QtQml/qqml.h> in timelinemodel.h when building the test, a dependency on QtQml is required. Pass the dependency down to everyone depending on the tracing lib. Fixes: QTCREATORBUG-28434 Change-Id: I58a534a9c25f1f6ecfc10a9ce8292b5983cdcbae Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Utils: Fix StyleHelper::drawArrow workaround for 6.4.0v9.0.0Alessandro Portale2022-11-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The workaround that fixed the drawing of arrows after a change between 6.4.0 and 6.4.1 broke the drawing of arrows with Qt 6.4.0. This change add another enforced detachment of the palette (leading to a modified cache key) that works with Qt 6.4.0. It still works with 6.4.1. Amends: 9d32093421adec260a8abc0920257564d45c12bf Change-Id: I8917c99488cec4fb17ed148bb3b0f95d4ed7127c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Utils: Introduce a FilePath::fromPathPart()hjk2022-11-232-0/+9
| | | | | | | | | | | | | | | | | | ... as shortcut for the fromParts({}, {}, x) case. Less noise on the user side, and saves a few cycles. Change-Id: Ie5b2a76c7261a049a3e600f29c4edaff37ab3828 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Utils: Replace Environment::isSameExecutable()hjk2022-11-232-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by FilePath::isSameExecutable(). The only non-mechanical case is the use inside QmakeBuildSystem::testToolChain using a build environment instead of the FilePath's device environment. This make a difference in theory due to the use of PATHEXT in the actual check, but I believe the case that someone creates a 'qmake.foo' and a 'qmake.bar', adds .foo and .bar to PATHEXT and then complains that there's a warning missing about not-matching mkspecs has zero likelihood in reality (and will break other places in Creator anyway). Change-Id: Id6a8d1e4dc2eb74ca81610ccb1c4ee94c6f47e12 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CPlusPlus: Proliferate FilePath usehjk2022-11-2210-42/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove unused ProxyCredentialsDialogJarek Kobus2022-11-225-201/+0
| | | | | | | | | | Change-Id: I8f234ba6e851edc4a5cb41cfabd76cf05670eef2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Utils: Add "addCommandLine..." functionsMarcus Tillmanns2022-11-222-0/+23
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Utils: Reduce scope of Environment::appendExeExtensions()hjk2022-11-222-9/+8
| | | | | | | | | | | | | | | | | | | | The general idea is to use FilePath as entry point for this kind of functionality. Change-Id: Id6ade8809229d119eb6af44baa7d4e473676f6f9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Utils: Introduce a FilePath::refersToExecutableFilehjk2022-11-224-3/+68
| | | | | | | | | | | | | | | | | | ... to avoid the need in user code to care for .exe and .bat suffixes. Change-Id: Ic249f14273f72c663912482555f98be1af923823 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Utils: Don't resolve relative paths in ProcessArgs::prepareCommandhjk2022-11-211-4/+2
| | | | | | | | | | | | | | | | | | Part of an attempt to disentangle streamline environment creation/setup. Searching is expensive and needs currently the proper environment. Change-Id: I95d93abf6c0cedeb8ba0b7a447345cd033ac2f25 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Utils: Introduce FilePath::isSameExecutable()hjk2022-11-212-0/+37
| | | | | | | | | | | | | | | | | | | | ... to replace Environment::isSameExectuable(). New code is a filepathified copy of the orginal. Change-Id: Iebf61cd183c9a5c03a5b8a90a33b5e074af9ecbe Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-211-1/+3
|\| | | | | | | Change-Id: Idd9c2b1bf787040b7b415b7cda29035227ca1011
| * Utils: Workaround StyleHelper::drawArrow for Qt 6.4.1Alessandro Portale2022-11-181-1/+3
| | | | | | | | | | | | | | | | | | | | A change in Qt 6.4.1 influences the behavior of QPalette::setColor, so that the arrows appear in a wrong color. An enforeced detachment of the palette in style option works as a workaround. Fixes: QTCREATORBUG-28470 Change-Id: I4a44ff59c368105fdf448152d83e96cdedd46495 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | AsyncTask: Add async task adapter for task treeJarek Kobus2022-11-181-0/+15
| | | | | | | | | | | | Change-Id: I9fd90fef0d9eedfaca6e405ada5aa26006f06e33 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Utils: Introduce AsyncTaskJarek Kobus2022-11-184-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-182-0/+19
| | | | | | | | | | | | | | | | 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>