Commit Graph

251 Commits

Author SHA1 Message Date
Alessandro Portale
6c57c51981 Use StyleHelper::UiFont()
Change-Id: I0c09578b76c48ddb255f44bb6117089dd092a72c
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 15:02:13 +00:00
Tasuku Suzuki
b19a26b135 ProjectExplorer: Not create Manage Kits button if Kit options are hidden
Project window doesn't use the button anywhere else.

Change-Id: I97537524b615b9fd523828bc540b5412578c69c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-14 18:19:59 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
hjk
c18de1ecb6 ProjectExplorer: Start with selected kit
If there's one; when clicking "Manage Kits..." in project mode.

Change-Id: I06a92d8e286f7b2b54844b7f41029d7c64684398
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-21 12:28:16 +00:00
Jarek Kobus
8d8e60436d ProjectExplorer: Simplify return statements
Change-Id: Ifef006cd2dcc567097ce16376eab9ccedb092f04
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-02 11:08:25 +00:00
Tim Jenssen
002d84cb15 Merge remote-tracking branch 'origin/11.0' into qds/dev
Conflicts: src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs
  tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp

Change-Id: I257f1908917bcc58805619b53b6866f2f73ca544
2023-06-02 19:26:05 +00:00
Miikka Heikkinen
d9cc2dc8c5 ProjectExplorer: Fix check for "Kits" page hiding
Fixes: QDS-9231
Change-Id: I53fc333fca2ec81edcb2b254a98613309e8335a9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-06-02 12:41:26 +00:00
hjk
d6111f2e1d ProjectExplorer: Remove some pointerage around KitOptionsPage
Change-Id: Ib1736a80739c6052372896bac03aa324fd807151
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-16 12:45:24 +00:00
Alessandro Portale
1d4228dfda ProjectExplorer: Prevent context menu on ProjectSelector
The context menu on the ProjectSelector (outside the "SelectorTree")
does not make much sense and pops up with an offset.

Change-Id: I79aa3157e04b9d343077fdbc87b8f7cd891426b4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 09:22:07 +00:00
Tim Jenssen
adb664f521 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/libs/utils/filepath.cpp
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/unit/unittest/CMakeLists.txt

Change-Id: I017a6075db41a5233487ac855ffe23de2b2bb0ee
2023-03-30 13:30:42 +00:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Miikka Heikkinen
67e5246be2 ProjectExplorer: Hide Manage Kits button if Kit options are hidden
Fixes: QDS-9231
Change-Id: I185a3f038ebd67fdc9aff60b860980d3c0f3cadb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-02 12:43:25 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... 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>
2023-03-01 09:26:50 +00:00
Alessandro Portale
226799858c Translations: Replace QCoreApplication::translate() with Tr::tr()
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.

Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:37 +00:00
hjk
c5f7f5ab0a ProjectExplorer: Tr::tr
Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-16 12:10:24 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
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>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Alessandro Portale
0ec7a3797d Utils: Add a non-toolbar variant of the MINUS icon
Make it consistent with Utils::Icons::PLUS and
Utils::Icons::PLUS_TOOLBAR

Change-Id: I2d5c69ec13ceba172c2c583895eea6fdff77a64e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-18 09:02:58 +00:00
Jarek Kobus
5b3927869c Drop Qt5: ProjectExplorer: Get rid of QOverload
Change-Id: Id8b28efa7b31a92a5e24485803322c586a23802d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-20 13:13:11 +00:00
Eike Ziller
4d72cb55ba Projects mode: Use "Show Right Sidebar" action to toggle build output
For users who want the full area for the configuration widgets or don't
see output there because their build system doesn't put it there.

Fixes: QTCREATORBUG-26069
Change-Id: I4ffa73be88e5c7cc058227bc681f87e4c0a642bd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-07-05 09:08:40 +00:00
Jarek Kobus
e981bedf68 BuildSystemOutputWindow: Don't leak actions on shutdown
Detected by memory analyzer.

Change-Id: I49f9f73b552ba89810105d79d98cfff035f7d37e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 12:41:49 +00:00
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