summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectmodels.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ProjectExplorer: Move some not-fully-session related bitshjk2023-03-011-9/+11
| | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: Tr::trhjk2023-01-161-20/+20
| | | | | Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a Reviewed-by: Alessandro Portale <alessandro.portale@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>
* VcsBasePlugin: Use more FilePathJarek Kobus2022-10-041-1/+1
| | | | | | Change-Id: I7bc80245b093b210439efdf3ea353b52b288dcc0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* 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>
* ProjectExplorer: Remove unneeded #include in projectexplorer.hhjk2022-07-271-0/+4
| | | | | | | | | And fix side effects. Change-Id: Ib6f0c5618092f80204b409edec0a92004f2350d2 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* filesystem: Add QFSEngine for filepathsMarcus Tillmanns2022-07-211-1/+1
| | | | | Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c Reviewed-by: hjk <hjk@qt.io>
* Drop Qt5: ProjectExplorer: Get rid of QOverloadJarek Kobus2022-07-201-2/+1
| | | | | | Change-Id: Id8b28efa7b31a92a5e24485803322c586a23802d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ProjectExplorer: Add a cancel option to the rename dialogChristian Kandeler2021-09-171-2/+10
| | | | | | | | | | ... in the project tree. Also properly handle the situation where the dialog is closed by other means than one of the buttons. Task-number: QTCREATORBUG-26268 Change-Id: Ic0b613be2413f96355c1b33bb4753bd1170e0671 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Do not list files more than once in the rename dialogChristian Kandeler2021-09-171-3/+5
| | | | | | | | | ... for project tree entries. The same file can occur more than once in the tree. Task-number: QTCREATORBUG-26268 Change-Id: I8af1e3a73d54e5a54c858fb3f7a8cf4afa83c7e2 Reviewed-by: hjk <hjk@qt.io>
* QmlDesigner: Fix project tree widget renamingHenning Gruendl2021-09-081-1/+1
| | | | | | | | | | | | | | | | | When renaming an item in the project tree widget which has concatenated filename extensions like *.ui.qml the selection in the LineEdit will reach till the last dot. * Extend FilePath suffix and completeBaseName function so they will treat the suffix *.ui.qml as one * Make use of the function in ProjectTreeWidget::editCurrentItem * Replace QFileInfo::suffix with Utils::FilePath::suffix in FlatModel::setData Task-number: QDS-2713 Change-Id: I30d0e6d87a7512d42fd3d40b2282b94e79b43684 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/5.0'Eike Ziller2021-08-261-1/+1
|\ | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs src/plugins/android/androidconfigurations.cpp Change-Id: If8dc2cdf131811e08ca147c6f58dbb3ed3bf7227
| * QmlDesigner: Show warning icons for each fileTapani Mattila2021-08-231-1/+1
| | | | | | | | | | | | Task-number: QDS-3797 Change-Id: Ibcbed1a221e762e0e6a3b4f9f538b8e4b1f144d3 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Projects: Fix deprecated iteratorMarco Bubke2021-08-231-1/+7
| | | | | | | | | | | | | | | | | | | | std::iterator is deprecated in C++ 17. The aliases should be set directly. The aliases are public too. Change-Id: Ib4dc259b03bd9386ba9d177340b89cc7208c8643 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Revert "Projects: Fix deprecated iterator"Alessandro Portale2021-08-201-7/+1
| | | | | | | | | | | | | | | | | | This reverts commit 328af3c08af56a64a98b29c4690da2355d25d1bd. Reason for revert: Breaks compilation with gcc 7 and 9 Change-Id: I1f5f00aadf71f8e0d1af7f7161b539fec4bb24f5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Projects: Fix deprecated iteratorMarco Bubke2021-08-191-1/+7
| | | | | | | | | | | | | | | | | | std::iterator is deprecated in C++ 17. The aliases should be set directly. Change-Id: Iafee0a76ce7368797288bab0ccbb2abaf74a7b54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Wojciech Smigaj <w.smigaj@gmail.com>
* | Vcs: Use more FilePath for file pathshjk2021-08-021-3/+3
| | | | | | | | | | Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Utils: Use FilePath in DropSupporthjk2021-08-021-2/+2
| | | | | | | | | | Change-Id: Id048d0dab4c58be367a081bb8041214abd6dbf98 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Vcs: Use FilePath in IVersionControl APIhjk2021-07-291-4/+4
|/ | | | | | | | Adapt first level of users. Change-Id: Ifcd7bff45631ff3b9e26a9e3176daa6cf0cf2e56 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Rename "Show Source and Header Groups"Wojciech Smigaj2021-07-161-4/+4
| | | | | | | | | This patch renames the "Show Source and Header Groups" filter to "Hide Source and Header Groups" for consistency with existing filters such as "Hide Generated Files". Change-Id: I34c204f7cae55bab60a50932cf307614987ef2ea Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Use FilePaths in project tree nodeshjk2021-07-161-29/+26
| | | | | Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectTree: Merge descendants of hidden Sources and Headers virtual foldersWojciech Smigaj2021-07-151-4/+99
| | | | | | | | | | | | | | | | | Unchecking the recently added "Show Source and Header Groups" option removes the Sources and Headers virtual folders from the Projects tree. This patch additionally merges descendants of these folders with identical priorities, display names and file paths. For example, if a project contains a folder including both source and header files, both the Sources and Headers virtual folders will have child nodes representing that folder. Previously, unchecking "Show Source and Header Groups" kept both these identically named nodes in the Projects tree (one containing sources, the other headers). With this patch, these nodes are merged into a single node containing both sources and headers. Change-Id: I4786eee4a528ea141a7fe117e14a050f68411890 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectTree: Add an option to hide Source and Headers file groupsWojciech Smigaj2021-06-241-1/+16
| | | | | | | | | | | | | A new checkbox "Show Source and Header Groups" is added to the filter menu in the project tree. It is checked by default. Unchecking it removes the extra level of virtual folders containing sources and headers. Change-Id: I25f4514e7f1f6cdfcb531a911e54cc6e7e42a3e2 Fixes: QTCREATORBUG-25313 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Core: filepathify expected document changesDavid Schulz2021-06-171-1/+1
| | | | | Change-Id: Ifa9341e55c79459db9ecef3c441da9b2816695bf Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: filepathify FileIconProviderDavid Schulz2021-06-091-1/+1
| | | | | Change-Id: Id6fcc05317f3f5144c662fb4826438407f8d9d21 Reviewed-by: hjk <hjk@qt.io>
* Utils: add FilePath::(complete)suffixDavid Schulz2021-06-041-2/+2
| | | | | | | The same as FilePath::(complete)baseName avoid some toFileInfo. Change-Id: Id1901ce2a4bef675215a9e020280df1c846df405 Reviewed-by: hjk <hjk@qt.io>
* Utils: more toFileInfo cleanupDavid Schulz2021-06-041-1/+1
| | | | | Change-Id: I78f501fb9a262a0866453fc2a66b56a78d6d82ab Reviewed-by: hjk <hjk@qt.io>
* Utils: add FilePath::completeBaseNameDavid Schulz2021-06-041-1/+1
| | | | | | | Removing some FilePath::toFileInfo() calls again. Change-Id: I6610beebf2c30754fde525b71f4c4a34ceb5e30b Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Don't enforce FlatModel::data's ForegroundRoleAlessandro Portale2020-12-231-4/+2
| | | | | | | | | | | | Only return a concrete color for the "pseudo disabled" state of the node, otherwise return QVariant(). This permits the theming of the projecty tree via palette or stylesheet (as the QmlDesigner does). Task-number: QTCREATORBUG-24402 Change-Id: I510faf4d58a12947dd665eef6f5c9da8845fc2dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix build with newest Qt 6Eike Ziller2020-11-201-1/+1
| | | | | | | | | No implicit casts from QString to QFileInfo anymore, and a few more QChar(int) fixes. Task-number: QTCREATORBUG-24098 Change-Id: I3326fc0701a9259c7bdd2d8c3025de0a4774f8aa Reviewed-by: hjk <hjk@qt.io>
* Use IDE_DISPLAY_NAMERobert Loehning2020-08-031-1/+3
| | | | | | Change-Id: If8ae9399a40a460b535faeec2320d1450e5099c5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ProjectExplorer: Fix indentationRobert Loehning2020-07-281-2/+2
| | | | | Change-Id: Ia38b19eb50f46917713766d3d1aa9308dcbe5a7c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Even more Qt6 portinghjk2020-06-231-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Ib6ef0e521483153c9716c9a1870072e836d6b026 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-3/+2
| | | | | | | | | | 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>
* ProjectExplorer: Factor out code for finding file nodesChristian Kandeler2020-04-221-29/+17
| | | | | | | | ... with the same base file name. We want to re-use this functionality in a follow-up patch. Change-Id: Ia9b5b3f003406c7451d59801c49679d9575d1222 Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()hjk2020-04-091-2/+2
| | | | | | | | | | It's returning a FilePath, so it's a better fit. Keep the old versions as inline function now to ease downstream migration. Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Disable project-editing actions when parsing is scheduledChristian Kandeler2020-03-191-0/+1
| | | | | | | | | | For the purpose of enabling context menu actions such as adding or removing files, there is no difference between "parsing" and "parse scheduled". Task-number: QTCREATORBUG-22508 Change-Id: I484a9257b4e4aeb6e0ff089c58be513e9fd7a9fd Reviewed-by: hjk <hjk@qt.io>
* Use less nullptr for empty flagshjk2020-01-211-1/+1
| | | | | Change-Id: Ic4eafdc8f204a432a752a97593380609a408a7de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-191-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Simplify FlatModel::data()Christian Kandeler2019-11-071-73/+54
| | | | | | | Get rid of unneeded variables, else branches, nesting. Change-Id: I8b4b1a8a32482d4017c57134da20f7b169a5ec82 Reviewed-by: hjk <hjk@qt.io>
* Project Tree: Allow to hide disabled filesChristian Kandeler2019-10-221-0/+10
| | | | | | | | | | | Project manager plugins can mark files as disabled, typically meaning they are not part of the project in the current build configuration. Let's allow users to hide such files altogether. Fixes: QTCREATORBUG-22821 Change-Id: Ie92d523d1f895bee8076de1d7eea1d7a739fe11f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Wizards: Make sure project combobox uses same sorting as project treeChristian Kandeler2019-10-011-4/+4
| | | | | | Fixes: QTCREATORBUG-22876 Change-Id: Ia8817851a263e6ba3aad7ac0d316b7277ad0240e Reviewed-by: hjk <hjk@qt.io>
* Utils: Add a FilePath::isDir() convenience functionhjk2019-09-111-1/+1
| | | | | Change-Id: I1df0ee1b136299ae6e4f2e5bd0bdc24bfeca33dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove usages of deprecated APIsSona Kurazyan2019-09-031-1/+1
| | | | | | | | | | | | Replaced: QPalette::ColorRole::Background -> QPalette::ColorRole::Window QPalette::ColorRole::Foreground -> QPalette::ColorRole::WindowText Qt::ItemDataRole::TextColorRole -> Qt::ItemDataRole::ForegroundRole QFontMetrics::width() -> QFontMetrics::horizontalAdvance() Task-number: QTBUG-76491 Change-Id: I1302e6b569e725daa6f7be1428ffe055657fc644 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Support bulk renamings in project treeChristian Kandeler2019-08-161-2/+46
| | | | | | | | | | | If a user changes the name of a file abc.cpp to def.cpp, and there is a file abc.h in the same directory, it's likely that the user wants to rename that file to def.h. Detect such circumstances and offer the user to automatically rename the sibling files. Fixes: QTCREATORBUG-21738 Change-Id: Ib3ece08698a3341ef4087066d2289048f6b0fa61 Reviewed-by: hjk <hjk@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-1/+1
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-181-2/+4
|\ | | | | | | Change-Id: I1193e94353c14492a9e7f093fbcd3fa53f83e390
| * Project tree: Add warning icon to unconfigured projectChristian Kandeler2019-07-151-2/+4
| | | | | | | | | | | | Task-number: QTCREATORBUG-22682 Change-Id: Ia44a1a518aa842cd13feae945dd87b9318d51f6e Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-06-281-5/+5
|\ \ | |/ | | | | | | | | | | | | Conflicts: CMakeLists.txt tests/unit/unittest/unittest.pro Change-Id: I64296ad31502d9b35012da129a28e9277e9fcf8e