aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor/resourcenode.h
Commit message (Collapse)AuthorAgeFilesLines
* PE: Allow skipping of compress on specialized folder nodesChristian Stenger2023-10-181-0/+2
| | | | | | | | Fixes wrong handling of multiple qrc files when having just a single prefix. Change-Id: Id5ac357d4ab6a7f7556b36a9fc44da398ede093c Reviewed-by: Christian Kandeler <christian.kandeler@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 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>
* PE: Move ResourceFileNode to ProjectExplorerChristian Stenger2022-06-141-14/+0
| | | | | | | Avoids additional dependencies later on. No functional change. Change-Id: Idc21ed856f4f31d68d55742b5796243227b254dc Reviewed-by: hjk <hjk@qt.io>
* Don't call DocumentManager::addDocument() from non-main threadJarek Kobus2021-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* ProjectExplorer: Use more FilePaths in ProjectNodeshjk2021-08-101-2/+2
| | | | | | | ... and related classes. Change-Id: I50844a0b60e4b0769727b17d5b3d544cd6d10f0d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Use FilePaths in project tree nodeshjk2021-07-161-6/+6
| | | | | Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: filepathify file renamingDavid Schulz2021-06-171-2/+2
| | | | | | Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Add special handling for removing filesVille Nummela2019-06-251-2/+4
| | | | | | | | | | | | | ... 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-3/+3
| | | | | | | | 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: De-virtualize FolderNode::showWhenEmptyhjk2019-03-041-1/+0
| | | | | Change-Id: Id3d019f449afcfe72b92d505c7822c3b10e2e8e7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Change signature of ResourceTopLevelNode ctorhjk2019-03-011-1/+2
| | | | | | | | | | 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>
* ProjectExplorer: De-virtualize FolderNode::addFileFilterhjk2019-03-011-2/+0
| | | | | | | | ... which interestingly enough is only used with Add Existing Directory, not with Add Existing Files. Change-Id: If76ba5f192dc49f3cb56e3d0c9ab249e47aa1c28 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Use Node::setIsGenerated setterhjk2019-02-261-1/+1
| | | | | Change-Id: I51029f4d92b6959da363dc9f4f5efddf63c57894 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Export all node typesUlf Hermann2017-10-191-5/+2
| | | | | | | | | We need the node types to figure out the qrc path a specific source file will appear under in the application. Change-Id: I712810a9fe8b64f9b03422000961f3c0622ec9ac Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-231-0/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/libs/utils/utils-lib.pri src/plugins/clangcodemodel/clangbackendipcintegration.h src/shared/qbs Change-Id: I240e89afc76d8f40ce69d66683014b603f714707
| * ProjectExplorer: Don't hide empty resource files like empty directoriesRobert Loehning2017-08-181-0/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-18748 Change-Id: I4de59743c42b99ce0b402f814b4cd0ba5d299338 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectNodes: Do not derive Project Nodes from QObjectTobias Hunger2017-08-011-3/+3
|/ | | | | | | | | | | | | | 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>
* Resources: Read qrc file contents from file if that is readableTobias Hunger2017-05-171-1/+1
| | | | | | | | | | | | | | Retrieve the qrc file contents from the file if that is readable. This is now necessary since the ResourceTopLevelNode now contains the QRC file contents itself so the QML code model has access to it, even if a qrc file is actually used. This fixes one part of QTCREATORBUG-17930 Task-number: QTCREATORBUG-17930 Change-Id: I0e8cc8828062f079d8634882a768ca60331a0e16 Reviewed-by: Eike Ziller <eike.ziller@qt.io> 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-3/+3
| | | | | | | | | | | | | | | | 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>
* ResourceTopLevelNode: Simplify useTobias Hunger2017-03-101-0/+3
| | | | | Change-Id: I1b01e63f219aceb97aaf9acda67d572ad3024eca Reviewed-by: hjk <hjk@qt.io>
* ResourceEditor: Code cosmeticsTim Jenssen2017-03-061-63/+1
| | | | | | | Slim down resourcenode.h, namespaces, unneeded friend. Change-Id: If2a01ea2242183c1f6b27847849309e063af7695 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ResourceEditor: Simplify Resource tree constructionhjk2017-02-131-2/+0
| | | | | | | | Instead of keeping track which nodes need to be created, create the tree on-the-fly directly. Change-Id: Iebb00c385f2abe42c7fd04547a7af85ad8f8f87b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectManager: Show .qrc contents againhjk2017-02-101-2/+1
| | | | | | | | This fixes the second regression introduced by 04a525877b. Change-Id: I5c5c72a036f139fa564c40e95ebf6acafc99792c Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ResourceEditor: use const reference for QMap argumentTim Jenssen2017-02-101-2/+2
| | | | | | Change-Id: I04d2c7de47bc91fd8f6fa355a03fc0d19681f451 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Merge FolderNode's m_{file,folder}Node fieldshjk2017-02-091-2/+2
| | | | | | | One step closer to direct use of Utils::TreeNode. Change-Id: Icd0dfd2fa4d12c2572a68f61ae43c5e906956a0e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Remove some unneeded declarationshjk2017-01-311-4/+0
| | | | | Change-Id: I7a73db3f01efb66a9de404c5da332e4d9bfbf672 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Fix display of .qrc contentshjk2017-01-301-1/+1
| | | | | Change-Id: I2779e12daa8a7972380f51b72a56de3466d453a5 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectManager: Add function to set a list of files in folder nodeshjk2017-01-261-4/+0
| | | | | | | | | ... instead of having to remove/add. Use it in some places in QmakeProjectManager and the ResourceEditor where the (sub)tree is rebuild anyway. Change-Id: I46b3c078c576b72dba6e87432570d030b7572026 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* make resource file handling able to deal with QMakeProject's VFSOswald Buddenhagen2016-11-011-1/+2
| | | | | | | | resources.prf may create virtual qrc files when RESOURCES contains non-qrc files. Change-Id: If591de9b32b775059d67e94bc3cb06d23ee44b08 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Resourceeditor: Enabled renaming of files in qrcVikas Pachdha2016-04-081-0/+1
| | | | | | Task-number: QTCREATORBUG-15786 Change-Id: I240c58951f2b1016bef694636f923322fc164009 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Remove unnecessary Q_OBJECT from IDocument subclassesOrgad Shaneh2016-03-241-1/+0
| | | | | | | They don't have signals, properties or translatable strings. Change-Id: Id27df47d1fb8d0530fdf0f5f0d33a2e7b70360af Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Core: Make IDocument concreteOrgad Shaneh2016-03-171-4/+0
| | | | | Change-Id: I8290943614ea4a2060cf09a71fb4f957852ab705 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* 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>
* Add default implementation for IDocument::fallbackSaveAs(Path|FileName)Eike Ziller2016-01-191-3/+0
| | | | | | | | | The methods are only relevant for documents without a filePath, and there was a mix of different irrelevant implementations present in subclasses. Change-Id: I4f57d306e5ddd913974cfe6ed0b4db062eb907a1 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* IDocument: Rename defaultPath and suggestedFileNameEike Ziller2016-01-141-2/+2
| | | | | | | | To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer what they are for, and that they actually belong to each other. Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Show folders as tree view for resourcesSvenn-Arne Dragly2015-11-161-2/+60
| | | | | | | | | | | | | | | This patch builds a tree view of the paths to files in resource files. Previously all files were shown in a flat structure under prefixes with the entire path as part of their displayed name. Because folders based on prefixes are different from folders in the paths, a new class, SimpleResourceFolderNode, was introduced. Change-Id: Ifc4773cff6a678b50e64b0d56713f80704e12f6f Reviewed-by: Svenn-Arne Dragly <s@dragly.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* FolderNodes: Specify filter for Add Existing DirectoryTobias Hunger2015-11-091-0/+2
| | | | | | | | | | Allow foldernodes to specify which files they care for when doing "Add Existing Directory". Before we used a fixed list with C++ header and source files, which does make no sense for e.g. adding to resources. Task-number: QTCREATORBUG-15278 Change-Id: I15dad133391485c2bcebd2d864623304b31b5f8f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* ProjectNodes: Sprinkle override over the Node classesTobias Hunger2015-10-301-15/+15
| | | | | Change-Id: I87db3a1b212aa0a3f140b8d299679f6c1f691004 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Add override to IDocument hierarchyEike Ziller2015-06-111-7/+7
| | | | | Change-Id: I6884f59fe0f06e380254c1f8076dd561d9df4ee3 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* ResourceEditor/Node: Add 'Remove missing files' featureDaniel Teske2015-06-011-0/+1
| | | | | | | Change-Id: I081ec83b8cdb4f7c29e754b95370b58865ca2993 Task-number: QTCREATORBUG-13941 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* ProjectExplorer: Use FileName for Node::pathOrgad Shaneh2015-02-131-2/+2
| | | | | | Change-Id: I4a41cfb629be8bb06b4b0616cd4475525e617a51 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | ResourceEditor: Remove unimplemented functionsDaniel Teske2015-01-201-3/+0
| | | | | | | | | | Change-Id: I72ba112682a6cb2eeca02f84ed3783febf0515f1 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* | ResourceEditor: Remove unused member from ResourceFileNodeTobias Hunger2015-01-151-1/+0
| | | | | | | | | | Change-Id: I98c9fe975a200728dcd32f18706b6bc2e59ca686 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* | Refactor ProjectExplorer::Node and remove NodesWatcherDaniel Teske2015-01-141-3/+0
|/ | | | | | | | | | | | | | | | | | | | | | | The idea behind NodesWatcher was that it was the central place to catch node related signals, so that users didn't need to connect to each individual node and the nodes didn't need to be QObjects. Somehow Nodes ended up being QObjects anyway. Both the recently added ProjectTree and the FlatModels consume the signals the NodesWatcher sends. Unfortunately there's a ordering dependency between the ProjectTree and the FlatModels. This patch removes all NodesWatcher and instead makes the ProjectTree singleton the emitter of various project tree related signals. The ProjectTree also ensures that the ordering between the FlatModel and itself is taken into account. And it makes Node not derive from QObject, saving some memory in that process. Task-number: QTCREATORBUG-13756 Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>