aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Plugins: Fix that mimetype definition was not valid JSONEike Ziller2017-07-251-10/+10
| | | | | | | | | | | | | JSON officially does not support multiline strings, so we should use the same mechanism that we already use for the plugin description (i.e. additionally support arrays of strings which are interpreted as lines). This just happens to work because Qt's JSON parser eats it without choking. Change-Id: I25ef04600b209775c5a7af916c687fda4a8b1a4d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterOrgad Shaneh2017-05-232-12/+8
|\ | | | | | | Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
| * Resources: List .qrc-files with the other filesTobias Hunger2017-05-221-0/+1
| | | | | | | | | | | | | | | | | | List .qrc-files with the other files, even though they can be expanded to reveal the resource files contents. Task-number: QTCREATORBUG-18234 Change-Id: Iad05fb358c35eb81c4f74b7a0524447801981ae5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| * Resources: Trigger watcher when changing qrc fileTobias Hunger2017-05-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | Trigger the filesystem watcher when changing qrc files. This in turn triggers a reload and with that a refresh of the project tree. Task-number: QTCREATORBUG-17930 Change-Id: If1aa0ee6ded86594a8c35880b56e76e05e0fa214 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| * Resources: Read qrc file contents from file if that is readableTobias Hunger2017-05-172-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/4.3'Eike Ziller2017-05-152-2/+4
|\| | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
| * ProjectNodes: Sprinkle QTC_ASSERT over code looking at parentFolderNodeTobias Hunger2017-05-122-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/4.3'Eike Ziller2017-05-093-5/+8
|\| | | | | | | | | | | | | Conflicts: src/plugins/debugger/cdb/cdbengine.cpp Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
| * ResourceTopLevelNode: Enable marking this node as generatedTobias Hunger2017-05-043-5/+8
| | | | | | | | | | Change-Id: I298d405cd3f1a822949619beb6a0eae59dcfc143 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.3'Eike Ziller2017-05-041-1/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/debugger/tst_dumpers.cpp Change-Id: Id8b53b000f94a1b5ab923db79f67bad3276d09dc
| * ResourceNode: Set proper fileType based on file nameTobias Hunger2017-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | Set the fileType of ResourceFiles based on their file name. This makes sure that QML files will be treated as QML, which fixes e.g. QTCREATORBUG-18032 (and probably other strange bugs). Task-number: QTCREATORBUG-18032 Change-Id: I05b1048d998ea1bed196611d529771c582bce441 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | Reduce usage of qApp in favor of static function callsAlessandro Portale2017-04-241-1/+1
|/ | | | | | | | | | | | Q*Application classes have unusually many static functions. In many cases in our code, these functions are unnecessarily called as instance functions, using the qApp helper. This patch replaces many occurencies of qApp with the according Q*Application classname. Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124 Reviewed-by: hjk <hjk@qt.io>
* ProjectNodes: Handle supported actions one-by-onehjk2017-04-053-39/+38
| | | | | | | | | | | | | | | | 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>
* ResourceEditor: Complete transition to Qt5-style connectOrgad Shaneh2017-03-202-8/+7
| | | | | Change-Id: I39380ed83f3d554d326b956cf729bc5f69f612c1 Reviewed-by: hjk <hjk@qt.io>
* Resources: Register as tree managerTobias Hunger2017-03-101-0/+14
| | | | | Change-Id: I400c1d77b23e465de7acbc517530f6c080549c5e Reviewed-by: hjk <hjk@qt.io>