Commit Graph

229 Commits

Author SHA1 Message Date
Artem Sokolovskii
7954c4cc69 ProjectExplorer: Add a common template for project settings
- Added base widget class for common options among project settings tabs
- Added usage new template class to all pages used in project settings

ToDo
- Make CodeStyle tab standardized

Change-Id: I8f70413b6ee764c5e43fbeae104b9389237c582f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 10:02:45 +00:00
Artem Sokolovskii
51be3be2ea ProjectExplorer: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: Ibfacf5a3b9789a3cf0ea229d1b0d22639101bf9a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-12 11:12:03 +00:00
Alessandro Portale
03d4fdc602 ProjectExplorer: Remove Icon from main panel
Only a few panels come with an icon, and then the icon is unthemed and
only for standard dpi (original design file is unavailable).

The gained space benefits the vertical output pane on the right.

Fixes: QTCREATORBUG-21917
Change-Id: Ie717ee7a08cbd21292a8e051c41406df58cad6d6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-14 12:44:29 +00:00
Eike Ziller
29df497d25 Add text search functionality to output window centrally
All output windows should be searchable with Edit > Find/Replace
(Ctrl+F), no reason for every single instance setting that up
individually.

Add a find placeholder for the build system output in Projects mode, so
the search functionality is available there as well.

Change-Id: Idad6824bfb21e6ae9ab923191a7e83b43256e68b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-20 13:58:45 +00:00
hjk
8885ef7e5a Utils: Pass dialog parent to Utils::* file dialog
Amends 3edc5673b5.

Turns out quite a few potential uses have other parents than
ICore::dialogParent().

Use a nullptr parent to mean ICore::dialogParent() to keep the
caller side simple.

Change-Id: Icfe1daafd710ae273d286679e0c8e2a3a27da552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 12:54:08 +00:00
hjk
b8f369c436 Use the new file dialog wrappers in some places
Change-Id: I326c883f2f76593e6fcb0f3e376d387273312982
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-06 08:56:51 +00:00
Eike Ziller
e895a0380b Fix lupdate issues
Some tr functions missing, some places where we need full qualification
because lupdate gets confused with namespaces.

Change-Id: Ic1d6ef3b31960dda02bc0788a255857117acdca9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-07-09 13:05:03 +00:00
Eike Ziller
6261e9917f Add zoom buttons and use editor font in build system output
in Projects mode.

Change-Id: I4adee900651192c83de5b3a851c1766f3cb35200
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:12:27 +00:00
Eike Ziller
c70d4ae243 Add filter input to build system output
in Projects mode.

Change-Id: I69f40d38606b724ba07833141ce9f2f60239e0e7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:12:17 +00:00
Eike Ziller
f3997c565e Add clear button to build system output
in Projects mode.

Change-Id: I7ab5b460228f6c8a2c68ece87ccfbdef3608bd9c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:11:56 +00:00
Eike Ziller
3c9da87f33 CMake: Duplicate CMake output in Projects mode
There is some space on the right side there, and in Projects mode it is
nice to have the output directly visible without opening the General
Messages pane (without intermangling with other output there).
This is a first step that duplicates the output in a very simple manner.

Fixes: QTCREATORBUG-25522
Change-Id: Id53b21d629b1f1bbc46ebf3d38bcec1fd83a6360
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-04 11:07:28 +00:00
hjk
d32cc4bd38 ProjectExplorer: Replace project mode main window splitter by dockwidget
The main window of the project mode is already a QMainWindow,
using a dock window also for the empty space on the right makes
it consistent with the separation of the project tree on the left.

Change-Id: Ida42f267b87eb45cd1692ebcc16ded2ee6c1e523
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-03 08:27:28 +00:00
Christian Kandeler
97744a071a ProjectExplorer: Fix project mode layout issue
Window state save/restore was undermined by code that added and removed
the central widget, leading to inconsistent data.
Fix this by making sure that we (de-)serialize if and only if a central
widget is present.
Also remove the hacky workaround that was supposed to fix this, but
didn't.

Fixes: QTCREATORBUG-25551
Change-Id: I6e7f2aff7455db476f870ead64b09a9716f3558b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-04 14:46:06 +00:00
Alessandro Portale
30aec82285 Add missing "final" to unexported/unshared classes
Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 15:40:29 +00:00
Christian Kandeler
247a432f74 ProjectExplorer: Fix project window layout restore behavior
Steps to trigger the problem:
1) Start Creator with some fresh settings path.
2) Open an unconfigured project.
3) Observe a normal-looking target setup page.
4) Configure the project.
5) Close the project.
6) Remove the .user file.
7) Re-open the project.
8) Observe a target setup page whose left part takes up almost all the
   space, leaving the main project widget practically invisible.

Conclusion: The configure page does something to the widget state that
breaks the restored layout. I don't know what it is exactly.

Fix: Slightly delay restoring the widget layout.

Change-Id: Id88ea12267a7dd0fe54749c18b0761d0e873d646
Reviewed-by: hjk <hjk@qt.io>
2020-10-30 09:11:31 +00:00
Christian Kandeler
a8a6a9e774 ProjectExplorer: Make project window state persistent
Task-number: QTCREATORBUG-24690
Change-Id: Ia261fc5a98681676e8d67e6d840f2f48073cdbb2
Reviewed-by: hjk <hjk@qt.io>
2020-10-26 13:54:04 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Christian Kandeler
08d16332f2 ProjectExplorer: Do not activate kits via right click
... in the target selector. When requesting the kit context menu by
right-clicking, we get extra mouse events on Windows that activate the
kit, which is annoying to users. Suppress these events.

Fixes: QTCREATORBUG-24156
Change-Id: I8a5de927634dfdfafb54d265ab31763c6120a527
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-29 08:02:45 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
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>
2020-06-02 11:44:53 +00:00
hjk
b4ee6eb3c0 ProjectExplorer: Move some of the BuildInfo setup code to central places
Change-Id: I8893366acb187ea1a94a8ca272ded2c46cb521d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-14 13:56:10 +00:00
Eike Ziller
6fc85b49fa Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/designer/codemodelhelpers.cpp

Change-Id: I78906f2fbbfd27d254589a272ebca423b0b80699
2019-11-28 08:24:10 +01:00
Nikolai Kosjar
b2f5ed78e1 ClangTools: Add "go to project settings" toolbar button
With the introduction of the "Analyze Current File" action the widget to
configure the diagnostic config was moved to the project panel (Project
mode > Project Settings > Clang Tools).

As not too many users are aware of the project settings there and
navigating there involves more user interation now (mode switch, looking
for the "Clang Tools" item), add a toolbar button as a shortcut.

Change-Id: I4c864045ef41ff501d925d3175ce604def213f29
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-27 14:42:12 +00:00
Christian Kandeler
58da82835b ProjectExplorer: Add shortcut for switching active project
... when in project mode.
We re-use the "GotoPreviousInHistory" action, which is semantically not
equivalent, but still seems like the most natural fit.

Fixes: QTCREATORBUG-19719
Change-Id: If00a90ce93ac3bd7e079d47eefa69e4f4aeb30cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-11-19 16:43:05 +00:00
Nikolai Kosjar
6c1b11dd3e ProjectExplorer: Simplify
bugprone-branch-clone
readability-simplify-boolean-expr

Change-Id: Iaaac21e96a3e9db6b9819d77fdae623ede373e59
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-01 09:31:32 +00:00
hjk
09e5c167bd ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kit
Less noise on the user side.

Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-01 16:16:29 +00:00
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
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>
2019-05-28 12:23:26 +00:00
hjk
9bb936499d ProjectExplorer: Collapse BuildInfo hierarchy
... to pass it around as real values, avoiding, among others,
the need of occasional explicit deletion.

The formerly extra members of the derived stuff are handled via
an extra variant (for data) and via a functor in the build
configuration factory.

The change is mechanical.

Change-Id: I19ca4e0c5f0a5b196fc16dfb98bb005dc679f855
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-30 16:51:05 +00:00
Tobias Hunger
80c2ce118d ProjectExplorer: Modernize even more
Use unique_ptr for all *Private classes, except for those
in singletons.

Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-24 09:04:54 +00:00
Alessandro Portale
8d19333075 ProjectExplorer: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: Iebed22caa2e733d292f334e956e3d16b844e14e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:01:53 +00:00
Tobias Hunger
bcbb6e61ef ProjectExplorer: Use unique_ptr to hold targets in projects
Change-Id: I8f793f5e552b65939d6c7c5e0eb42b89f9f45c3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-24 11:39:49 +00:00
hjk
f8937daf71 ProjectExplorer: Make "Manage..." kits button work again
When configuring a newly opened or created project you are
able to press a 'Manage...' button that brings up the
options page of the kits. Was broken with the rework done
on the global object pool.

Change-Id: I87d91351c5769655c1192431a53784de1bca77aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-24 13:42:30 +00:00
Tasuku Suzuki
ff155a2e42 Improve "Import Existing Build..." in project pane
The action is for active project. The button should be under active
project.

Change-Id: Ie0029bff02f58dbd5cb4c2a17bc086c168a522dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 02:06:24 +00:00
Ulf Hermann
1b0d6e3c26 Avoid some memory leaks at shutdown
StatusBarManager needs to delete its contexts when dropping them,
QActions should be parented, and in ProjectWindow we can save an
allocation.

Change-Id: Idee075d4f2ce8014f22f73453987d1ab6539cf18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-07 09:02:29 +00:00
Vikas Pachdha
5364140529 iOS: Fix crash on startup when a device is connected
In a rare but plausible scenario panel might be updated on device
connection while project is not yet loaded. The panel update will
happen again when project loading is complete.

Task-number: QTCREATORBUG-18226
Change-Id: I566e2d23adee529f0536ae644cef420c66578d54
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-24 08:55:26 +00:00
Tobias Hunger
b913e9d548 ProjectExplorer: Make imported buildconfiguration active
Make the new buildconfiguration active after it was imported via
Project Mode. Before the buildconfiguration was added but the
current one was still set, which lead people to believe that the
build directory was wrong.

Task-number: QTCREATORBUG-18082
Change-Id: I10412d94326d9e21820dfcac89adbe2c5da948ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:14 +00:00
Leena Miettinen
778d711393 Project explorer: Fix UI text capitalization
Change-Id: I59c391b1d910ad74e30592217451a956463bd804
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:23:12 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
hjk
196dbbe0e7 Utils: Introduce TreeItem::{begin,end}
... and use this to reduce the number of explicit uses of m_children.

Despite of being shorter code by itself it is a step towards having
an explicit LeafItem object that doesn't explicitly store a(n empty)
vector of child nodes.

Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-08 16:08:42 +00:00
hjk
8c3307a51a ProjectExplorer: Add space between treeview entries
Task-number: QTCREATORBUG-17481
Change-Id: I27c304d1a63477c6ad081dd843ec3a6e9b6b2a4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-03 15:26:31 +00:00
Tobias Hunger
25fbcca96b KitManager: Get rid of KitMatcher class
Use std::function instead. Clean up API while at it.

Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-18 10:39:16 +00:00
hjk
02dd37d30a ProjectWindow: Add a PanelsWidget convenience constructor
... combining default construction plus a single invocation of
addPropertiesPanel(), the only way it is ever used.

Change-Id: I2080e8b8fa25a2d7e429b7c18f5272466bc4eb79
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-15 10:23:01 +00:00
hjk
6bb0880a6b ProjectWindow: Rename SelectorModel to ProjectWindowPrivate
Less quirky, and that's what it is now.

Change-Id: Iae18f289ab498eb409579235e96325a7d0341e1a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-12 14:00:50 +00:00
Eike Ziller
c175f1e62f Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/plugins/ios/iosdevice.cpp
	src/plugins/ios/iossimulator.cpp
	src/plugins/projectexplorer/projectwindow.cpp
	src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp
	src/shared/qbs

Change-Id: Ie98e2401a2259903141a13170c78388f2da467d2
2016-12-09 12:42:01 +01:00
Eike Ziller
c226d311b7 Projects mode: Disable "Import" button if not supported by project
Task-number: QTCREATORBUG-17399
Change-Id: I79b64298c902776282d54d70efdc0eef03415a51
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-08 14:16:05 +00:00
hjk
98e0b4b0b5 ProjectWindow: Add a buttons to import builds to project tree
... to a shortcut to the Kits setup page.

This duplicates the functionality from the context menu but can
be directly spotted.

Change-Id: Ia5c2e1208346dc7191a04fbb9c2569ccab9aab31
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-06 11:53:15 +00:00
Tobias Hunger
7c4d993640 ProjectExplorer: Avoid possible nullptr dereference
Change-Id: I1c82c4187e075055a44746879df1513e48853c22
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-01 14:50:54 +00:00
hjk
757153fce5 ProjectExplorer: Don't show context menu when it makes no sense
Task-number: QTCREATORBUG-17152
Change-Id: Ic67386bdfd6d6d79e8a15bc6394a22cb46305335
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-15 13:25:09 +00:00
Sergey Belyashov
874683a15e Fix lacks of Q_OBJECT macro
Change-Id: I0de19ed983c45260c957ea88422093bf7faca6a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-11 13:15:49 +00:00
Tobias Hunger
6486cc8127 ProjectExplorer: Fix possible use-after-free in Project combobox
Make sure the combobox values are set to null. Otherwise the ComboBoxItem
might try to read from that value while it is being removed from the model.

Task-number: QTCREATORBUG-17223
Change-Id: I6588aaddf39736846878593a8e6844dab96de408
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 14:34:22 +00:00