aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
Commit message (Collapse)AuthorAgeFilesLines
* Remove bool return value from IEditor::restoreState()Eike Ziller2020-09-242-5/+3
| | | | | | | | It's never used, and actually there wouldn't be any sensible thing to do with it. Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9 Reviewed-by: hjk <hjk@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-023-6/+9
| | | | | | | | | | 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>
* Add some additional shortcuts for actionsEike Ziller2020-03-171-1/+1
| | | | | | | | | | | | | | | | | Add Cmd+Shift+- for decreasing font size on macOS. Do not add Cmd+= for increasing size, because it conflicts with the existing shortcut for "Replace and Find Next". Sprinkle some Backspace shortcuts in addition to Delete for removing items. There are (laptop) keyboards that either do not have a designated Delete key (requiring Fn+Backspace) or where the Delete key is not conveniently located/sized, and there is no benefit in making the distinction in that case anyhow. Fixes: QTCREATORBUG-706 Fixes: QTCREATORBUG-13733 Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e Reviewed-by: David Schulz <david.schulz@qt.io>
* QrcEditor: Add action for ordering resource listFederico Guerinoni2020-03-124-1/+30
| | | | | | Change-Id: I8c2d53649af420b324d6a0f57b09d1cd4ccd5e25 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Andrea Ricchi <aricchi95@gmail.com>
* 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-103-100/+109
| | | | | | | | 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>
* Core: Make IEditorFactory::createEditor use a function objecthjk2020-02-052-18/+5
| | | | | | | | Also, replace or remove unneeded Q_OBJECTs, and make base setters and adders protected. Change-Id: I212257ef53984d8852dc8c478537199fc9483486 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResoureEditor: Use themed color for deleted file in ResourceModelAlessandro Portale2020-01-281-1/+2
| | | | | | | Better legible, especially with dark themes. Change-Id: Id266a5b31436dbdaf0ac6b1ff6941f7341207438 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ResourceEditor: Fix priority for qrc sub-nodesChristian Kandeler2019-12-091-13/+18
| | | | | | | | | | | | When adding a new file to a qrc file via the context menu, the wrong project tree node was pre-selected in the wizard unless the user had run the context menu either from the ".qrc" node or a qrc prefix node that was *not* the one for the "/" prefix. Now this works correctly for all nodes at or below the ".qrc" node. Fixes: QTCREATORBUG-23210 Change-Id: Ia5e234e9861a480f973b76f8e3026ebc9c73ec35 Reviewed-by: hjk <hjk@qt.io>
* ResourceEditor: save and restore state of splitterTasuku Suzuki2019-08-152-0/+20
| | | | | Change-Id: Ief14ef729e5c559e77991e00b22cb25673609a4c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Improve layout of qrc editorTasuku Suzuki2019-08-093-143/+112
| | | | | | | Replace the toplevel horizontal layout with vertical splitter Change-Id: Ia02cb0fb23ff4cb9775ea68e70d7b6e0edfcd7f7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Some clang-tidy -use-modernize-nullptrhjk2019-08-011-1/+1
| | | | | Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-251-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/baremetal/iarewtoolchain.cpp Change-Id: I483e81d7e920e724fb7cde84a8f6fa9bce4cd518
| * ProjectExplorer: Do not hide empty qrc filesChristian Kandeler2019-07-231-1/+1
| | | | | | | | | | | | | | | | This broke with 92da9d1e67. Fixes: QTCREATORBUG-22737 Change-Id: Ic4ec9f298e3e7c1b35b1c94096e5684555f48b2b Reviewed-by: hjk <hjk@qt.io>
* | ProjectExplorer: Add special handling for removing filesVille Nummela2019-06-253-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* | ProjectExplorer: Remove dedicated "DuplicateFile" abilityChristian Kandeler2019-06-251-2/+0
|/ | | | | | | | | Duplication works for any file node whose parent project node can add files. No need to duplicate (!) this logic everywhere. This makes the "Duplicate File" action available for cmake, qbs, etc. Change-Id: Id1f0378c3b3d7e2dbca4d6bbcca5df1c2d33ee0b Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-286-18/+18
| | | | | | | | 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>
* Qt Creator CMake portCristian Adam2019-05-171-0/+16
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* More FileName::appendPath() -> .pathAppended()hjk2019-05-171-1/+1
| | | | | Change-Id: I403d34e4f52f758339c158efc7a11fd329e3e043 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Make tree compressableChristian Kandeler2019-05-131-11/+13
| | | | | | Fixes: QTCREATORBUG-15761 Change-Id: Ia0f4012a754347fcc17c8d3c1ce42163c8fb6973 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Fix renaming files in resourcesChristian Kandeler2019-05-021-37/+9
| | | | | | | | | | | | | | This amends commit e161b5d1cd, which fixed the problem only for top- level entries in the resource file. The underlying problem is that we have two different classes ResourceFolderNode and SimpleResourceFolderNode, which look suspiciously similar, with most of the latter's base class overrides being exact copies of the former's. For now, we just get rid of these copies. At some later point, we might want to drop one of these classes altogether. Fixes: QTCREATORBUG-22313 Change-Id: I80094ca12f4e534daf40ca2f3cbf01a0ae4808d9 Reviewed-by: hjk <hjk@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>
* ProjectExplorer: De-virtualize FolderNode::showWhenEmptyhjk2019-03-042-7/+1
| | | | | Change-Id: Id3d019f449afcfe72b92d505c7822c3b10e2e8e7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ResourceEditor: Change signature of ResourceTopLevelNode ctorhjk2019-03-013-5/+6
| | | | | | | | | | 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-012-7/+2
| | | | | | | | ... 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-263-6/+6
| | | | | Change-Id: I51029f4d92b6959da363dc9f4f5efddf63c57894 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Remove FileNode's isGenerated constructor boolhjk2019-02-251-1/+1
| | | | | | | Use setter of base class, similar to setListInProject() before. Change-Id: Id620f0084a5dec0410f29c80f8f6393a6bcd5050 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix warning: "Missing emit keyword on signal call"Alessandro Portale2019-01-171-1/+1
| | | | | | | [-Wclazy-incorrect-emit] Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ResourceEditor: ModernizeAlessandro Portale2018-12-1110-69/+53
| | | | | | | modernize-* Change-Id: Ib9411aa2478a762854e4f5f23900a8cf6c0c2d41 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Core: Change IEditor::document() to constOrgad Shaneh2018-09-261-1/+1
| | | | | | | All the implementations are const. Change-Id: Ib9753fe764dd482d4f4392eec70878d42edc737a Reviewed-by: hjk <hjk@qt.io>
* ResourceEditor: Remove stale qrceditor/testTobias Hunger2018-07-254-181/+0
| | | | | | | The code there does not build anymore, so remove it. Change-Id: Iff3f6c334e9a72e1764e3431b93cfd5b8a4ae98c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ResourceEditor: Consistently use nullptrTobias Hunger2018-05-085-8/+8
| | | | | | | Fixed by clang-tidy modernize-use-nullptr. Change-Id: I1b13a1da542fd2edc2af65f892b0c01937ab1481 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ResourceEditor: Use override consistentlyTobias Hunger2018-05-076-31/+31
| | | | | | | clang-tidy fixes from modernize-use-override check. Change-Id: Id6552ad0b704702fa7a839051714027b4f5ffc1d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ProjectExplorer: Remove FolderNode::addNode taking a raw pointerTobias Hunger2018-05-021-13/+12
| | | | | Change-Id: I53b765d2c3e71889386c76425662bfcc47bdf582 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ProjectExplorer: Make FolderNode::replaceSubtree take a unique_ptrTobias Hunger2018-05-022-4/+4
| | | | | 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>
* Move RemoveFileDialog to UtilsEike Ziller2017-12-121-2/+2
| | | | | Change-Id: I88892fc8d43ca3f59598b5b44e0daac0bfb439b5 Reviewed-by: Tobias Hunger <tobias.hunger@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>
* Treat .ui.qml mime type the same as .qmlUlf Hermann2017-10-181-0/+1
| | | | | | | | | Right now, the qmake project manager offers a "Build" context menu entry for .ui.qml files and various other things are off because the mime types are different. Change-Id: Icc966e56513b9c5aed05f929dc8cb728ed408723 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* ResourceEditor: Clean forward declarationLaurent Montel2017-09-262-5/+0
| | | | | Change-Id: I4bdf81b30b4b9c04f53ea2d11e56eec94821a15b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ResourceEditor: fix remove fileNikita Baryshnikov2017-09-211-1/+1
| | | | | Change-Id: I02a1a5376b0ec0d8013f75dcdec6e4b8992f5f15 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Core::FileIconProvider: Add helper method to get a directory icon with overlayTobias Hunger2017-09-081-2/+2
| | | | | | | | Add a helper method to request a directory icon with an overlay icon for the project tree. Change-Id: Idea2ea9ec2ea6790bf8d087723700364fbcafec6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-041-0/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/projectexplorer.cpp Change-Id: I7881fc51021c49b792a384ad9f8a4f71fc457ce2
| * Resources: List .qrc files in projectTobias Hunger2017-08-311-0/+1
| | | | | | | | | | | | | | | | List .qrc files (and the files contained) in the project. Task-number: QTCREATORBUG-18790 Change-Id: If23ffd42900d67bcc8d8c9d2ecfb0e82daf8c986 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Orgad Shaneh2017-08-301-1/+1
|\| | | | | | | Change-Id: I9ab2c68d2bd07b0dd89051a2f5f6fa51676d8594
| * Fix copyright year in plugin info, --version, and macOS infoEike Ziller2017-08-241-1/+1
| | | | | | | | | | | | | | | | By using the new QTCREATOR_COPYRIGHT_YEAR variable Task-number: QTCREATORBUG-18612 Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-232-0/+6
|\| | | | | | | | | | | | | | | | | | | | | 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-182-0/+6
| | | | | | | | | | | | 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-013-21/+21
|/ | | | | | | | | | | | | | 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>