aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor/resourceeditorplugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Also rename parameteraction.{h,cpp} to action.{h,cpp}hjk2024-01-291-2/+1
| | | | | | Change-Id: I203909d9b2d460012b9347d507ac7a701700c48a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Rename ParameterAction into Actionhjk2024-01-291-2/+2
| | | | | | | | It became the defacto-type for action when ActionBuilder started creating them as default. Change-Id: I1008d60b78ea83919ce1c80a7ef828527fe9902c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Use ActionBuilderhjk2024-01-191-65/+85
| | | | | Change-Id: Ibc6c114555d7b31f0a87a9727543313f50ab91d0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Code cosmeticshjk2024-01-171-37/+38
| | | | | Change-Id: Ic051cc76162bfc7c24f78505adc801f6f7fbc47c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Drop the plugin pimplhjk2024-01-171-79/+64
| | | | | | | Not really needed anymore as separate class. Change-Id: I16c3248a34a448935b4a92f484c4f18ac2b53790 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Rename oddly-named resourceeditorw fileshjk2024-01-171-1/+1
| | | | | Change-Id: Idfa59b2562e30c80eed5ffe378f1b2a8743463b9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Hide ResourceDocument class definitionhjk2024-01-171-2/+0
| | | | | | | | ... and simplify setup a bit. Change-Id: Ib9aedbf9ed8449d76e2e6ceb7b4cc9063e4756ea Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Hide plugin class definition in .cpphjk2024-01-161-52/+60
| | | | | Change-Id: I43969235a6003cfa800c621447d6c754bbad4262 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Move editor action setup closer to editorhjk2024-01-161-47/+0
| | | | | | | | Not yet business as usual, but moving closer and cutting some dependencies. Change-Id: I6331b256cbbde0abcc67251b1d32521f234fca2b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Move editor factory close to editorhjk2024-01-161-7/+5
| | | | | Change-Id: Ie49a35e7c5de5793b25ed49de5e58b0d4a5c5621 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Use simpler Plugin::initialize() when feasiblehjk2023-01-201-6/+1
| | | | | Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use more Utils::isMainThread()Jarek Kobus2022-10-111-2/+0
| | | | | Change-Id: Ia3c6f6dca53c5d7487b0813de16f06c52af47aa5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Convert to using Tr::trhjk2022-08-221-33/+27
| | | | | | Change-Id: Ia9a04dc76bf84e9e9078894be3459fe65fcd5fff Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Use setClipboardAndSelection more broadlyhjk2022-07-151-7/+8
| | | | | | | | Basically everywhere besides the EmacsKeys plugin. Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Don't expand qrc items recursivelyJarek Kobus2021-10-201-0/+2
| | | | | | | | | This fixes the recursive expansion of e.g. "qtbase/tests/auto/corelib/io/qfile/copy-fallback.qrc" which includes itself. Change-Id: Ib345a2d6de4fa2eefd76eed58b99a72fcb8c84b5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Don't call DocumentManager::addDocument() from non-main threadJarek Kobus2021-10-201-15/+28
| | | | | | | | | | | | | | | | | | | | Detect that constructor of ResourceTopLevelNode is being run from non-main thread and omit creation of ResourceFileWatcher in this case. The construction of ResourceFileWatcher will be postponed until the node tree returns back to the main thread. This happens later inside Project::setRootProjectNode() when ProjectTree::applyTreeManager() is called for the second time - this time it's done from the main thread. In order to setup the lacking resource file watchers we install an additional folder node visitor only in case when the handler is called from main thread. The visitor sets up the lacking resource watchers if that's still needed. Amends: 0bcab32657f1511892eda53194dce259e40edf21 Fixes: QTCREATORBUG-26417 Change-Id: Ia1bfb7f284afb833b6b4291accc4d0a91bd0d6c5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Use more FilePath in EditorManagerhjk2021-08-021-1/+1
| | | | | Change-Id: I21661fd93d0452519c4061ee77fa02b453db9e58 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Use FilePaths in project tree nodeshjk2021-07-161-4/+5
| | | | | Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Pass the new node in ProjectTree::currentNodeChangedEike Ziller2021-06-281-3/+2
| | | | | | | | Avoids some roundtrips asking for ProjectTree::currentNode() which traverses the project tree every time. Change-Id: I650728eab5a47a7f4760cf88844a4b7106365255 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix that disabled QRC files were enabled by QRC expansionEike Ziller2021-06-231-0/+1
| | | | | | | | | | | | The automatic expansion of QRC files to the tree of their contents didn't preserve the "enabled" property of the original QRC node. For CMake projects that resulted in the file system tree still being shown, with only the QRC nodes, when "Hide Disabled Files" was on, instead of hiding the file system tree completely. Change-Id: If1eb88478955dc8635def844cfc501befcbfc329 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use qAsConst with non-const Qt containers in range-loopsAlessandro Portale2021-02-171-1/+1
| | | | | | | ... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+0
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-4/+7
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* Remove apparently unneeded QtPlugin includeshjk2020-02-121-1/+0
| | | | | | Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Pimpl pluginhjk2020-02-101-44/+103
| | | | | | | | Also, do not use the plugin object as QObject parent for the editor factory. Change-Id: I6ab421d778fb53215a35f125753586752733b915 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add special handling for removing filesVille Nummela2019-06-251-1/+1
| | | | | | | | | | | | | ... from a project which are pulled in via wildcards. Such files cannot be removed from a project file, because they are not listed verbatim. This kind of failure should not be reported to the user if the file is also deleted, as the file list will have the correct state after the next reparse. Fixes: QTCREATORBUG-22586 Done-with: Christian Kandeler <christian.kandeler@qt.io> Change-Id: I3dc66fe9a6594be7d0b86f46d830cd099ee49fd7 Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename ProjectTree::findCurrentNode to currentNodehjk2019-04-301-9/+9
| | | | | | | | For consistency, it's straight forwards access, similar to currentProject, not much to search and find. Change-Id: I7ce696bdc24b6a8713d6f11e02443a6f94c605f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Change signature of ResourceTopLevelNode ctorhjk2019-03-011-1/+1
| | | | | | | | | | Replace the parent node by the only data item it is used for to make it more clear that this is not about tree structure. Also move the parameter with possible default to the last position. Change-Id: Ibf62328dea335b5999595e5cebb36051ec84bc3a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Use Node::setIsGenerated setterhjk2019-02-261-2/+3
| | | | | Change-Id: I51029f4d92b6959da363dc9f4f5efddf63c57894 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: ModernizeAlessandro Portale2018-12-111-11/+6
| | | | | | | modernize-* Change-Id: Ib9411aa2478a762854e4f5f23900a8cf6c0c2d41 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ProjectExplorer: Make FolderNode::replaceSubtree take a unique_ptrTobias Hunger2018-05-021-2/+2
| | | | | Change-Id: I8e853c00ec24838bdca342e3f1a1b1213f32ef93 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ResourceEditor: Remove unneeded use of global object poolhjk2018-02-121-2/+1
| | | | | Change-Id: Ie293314c034d679dee82fc15f7d4a71a5bdbacb7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: fix remove fileNikita Baryshnikov2017-09-211-1/+1
| | | | | Change-Id: I02a1a5376b0ec0d8013f75dcdec6e4b8992f5f15 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectNodes: Do not derive Project Nodes from QObjectTobias Hunger2017-08-011-13/+13
| | | | | | | | | | | | | | That should save some memory per node, and since creator has a lot of nodes (e.g. opening the LLVM project adds about 1 000 000 nodes) this should be noticeable:-) Calling update inside ProjectTree::currentNode() and rename it to findCurrentNode() to make sure it is an still existing pointer. Also, try to reduce the somehow more expensive currentNode() calls and sprinkle some const around that usage. Change-Id: I6a7c5db01a71d53d39544d3013cad557d5b96cdc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectNodes: Sprinkle QTC_ASSERT over code looking at parentFolderNodeTobias Hunger2017-05-121-0/+1
| | | | | | | | | | | | Not checking the parentFolderNode triggered a crash elsewhere already, so double check other uses of parentFolderNode and use QTC_ASSERT to make sure no nullptr is going to be accessed. This is necessary now that we have a forest of project trees and no longer have a sessionnode anymore. Change-Id: Ibc380c2ec9b12b983e709d2eeb03a8b741fe1058 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ResourceTopLevelNode: Enable marking this node as generatedTobias Hunger2017-05-041-1/+2
| | | | | Change-Id: I298d405cd3f1a822949619beb6a0eae59dcfc143 Reviewed-by: hjk <hjk@qt.io>
* ProjectNodes: Handle supported actions one-by-onehjk2017-04-051-2/+2
| | | | | | | | | | | | | | | | Getting the full list for a node can get quite expensive e.g. in cases of recursive calls of QMakeProjectManager::findPriFile. However, the FlatModel needs to decide quickly on whether an item is editable to potentially allow renaming. So split up QList<Actions> supportedActions() into individual bool supportsAction(action) calls and make sure Rename is not on the critical path. Task-number: QTCREATORBUG-17953 Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ResourceEditor: Prevent possible nullptr accessTobias Hunger2017-03-241-0/+1
| | | | | Change-Id: Iad958d26272f471530a8494bee0e326ce9835aa9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Resources: Register as tree managerTobias Hunger2017-03-101-0/+14
| | | | | Change-Id: I400c1d77b23e465de7acbc517530f6c080549c5e Reviewed-by: hjk <hjk@qt.io>
* ResourceNode: Add some tests for actual node typeshjk2017-02-281-8/+16
| | | | | Change-Id: I20297df727adf2058583b64975e7a6848bc80263 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Move mimetype definitions to plugin specsEike Ziller2017-02-271-2/+0
| | | | | | | | | | | | - Avoids the hassle of QRC files and manually registering mime types - Avoids performance regressions because of mime types that are registered after mime database has been used - Makes it technically possible to detect that a disabled plugin could handle a mime type if it was enabled Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Remove arguments from node change signalshjk2017-02-241-1/+2
| | | | | | | | This discourages storing the pointers needlessly. The items are still easy accessible by the static ProjectTree::currentNode() Change-Id: I3c0cd019e9fdc382afacbc9d9de3b97d5f58ae1e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ResourceEditor: Add text for keyboard shortcuts settingTakumi ASAKI2016-08-161-2/+2
| | | | | | | Change-Id: Ifb6954c3fd203e3c9fae17a3ad2505b43ac35d98 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ResourceEditor: Use Qt5-style connectsOrgad Shaneh2016-07-041-15/+15
| | | | | | | The heavy lifting was done by clazy. Change-Id: I74e7371cccd6578217722b4b7717cad66db258f7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* ProjectNode: Rename path() to filePath()Tobias Hunger2015-11-031-3/+3
| | | | | Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>