Commit Graph

226 Commits

Author SHA1 Message Date
Christian Kandeler
3fc1b5f57b Core: Let callers specify which part of an options page to pre-select
... and use it for the "Manage kits" functionality.
We will make use of this in other contexts as well.

Task-number: QTCREATORBUG-25077
Change-Id: I79c622075b9385b060aed73534d39acc23fd765e
Reviewed-by: hjk <hjk@qt.io>
2024-01-19 11:27:11 +00:00
hjk
6c5cd8216a Core: More ActionBuilder use in icore.cpp
After introducing ActionBuilder::setSeparator().

Change-Id: I54e89aae66c4e4a6f2073df6287140c41da887d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-18 15:36:05 +00:00
hjk
b442ca3873 Core: Rename ActionBuilder::setOn* to addOn*
There could be multiple connections.

Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-13 13:00:00 +00:00
hjk
e17f0b6164 Core: Rename ActionBuilder::setContainer to addToContainer
An action/command can be used in several places.

Change-Id: Ifa26f64f7d200d93ada13f272de0fa833f886997
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-13 08:37:10 +00:00
Eike Ziller
2e280e1c50 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/clangcodemodel/clangdfollowsymbol.cpp
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I45b7fee1a1d784c44f2139fb1ede69190d23d6fd
2023-12-06 16:50:15 +01:00
Alessandro Portale
a71b33944b Core: Restore opening of files that are dropped on the MainWindow
The code to handle dropping unintentionally got commented out, then
fixed, then commented out again.

This change restores it.

Amends: e5f74d217b
..which amended: 5da1f14903
..which amended: e34762c844

Fixes: QTCREATORBUG-29961
Change-Id: Iccc8a9b7bc24bc3475ed4fa37a7c231a1f575c1c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-28 14:03:21 +00:00
Eike Ziller
a35deb1532 Use sidebar buttons for hiding/showing dock areas
So far, if a mode includes navigation widget placeholders, these are
used for the sidebar toggle buttons, otherwise the buttons are disabled.

Now, if a mode does not include navigation widget placeholders, but the
mode has a FancyMainWindow attached, use the buttons to hide or show the
corresponding dock widget area (left or right).

Since QMainWindow does not really support "hiding a dock widget area",
the FancyMainWindow needs to track that state manually, by tracking the
dock widgets that were visible before "hiding the dock widget area".

Also, if a dock widget is dragged into a "hidden" area, or a widget is
made visible or "unfloated" into that area, show the other widgets in the
area again as well, "unhiding" the area.

Since the mode widgets that have a mainwindow somewhere usually wrap
that into a splitter for the output panes, and the Design mode is
actually a stack widget, IMode needs another method that returns the
appropriate FancyMainWindow if available.

The patch implements this for Widget Designer.

Change-Id: I03531f4d5130c846ff5d65831b1c9be210e1c561
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-28 13:17:22 +00:00
Cristian Adam
1a37da15c7 Debugger: Add our lldb to the system search paths
This way the user doesn't have to manually register lldb.exe

Change-Id: Id0a19de0962d8ba47a66a8d1909dfe2eb5ca0a6f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-21 14:38:33 +00:00
Alessandro Portale
1f5f76cdf9 Core: Move generation of "about" text to ICore
This introduces ICore::aboutInformationCompact() and
ICore::aboutInformationHtml() and moves the existing code there. The
former is used in the "System Information" dialog, the latter in
"About".

aboutInformationCompact() will be used for the "Copy and Close" feature
in an follow-up patch.

Task-number: QTCREATORBUG-29886
Change-Id: Iec818e376b3f02f52da00428285ad69b94d8adea
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-15 12:24:17 +00:00
Alessandro Portale
ac121149b1 Core: Make strings in ICore::versionString() non-translated
Change-Id: I462bab0160cb4b574da5a5ae6147915706a9f43e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-15 12:07:48 +00:00
Eike Ziller
ab549936f8 Core: Remove commented code that adds About Qt action
This is better handled via the `System Information` action nowadays

Change-Id: I220ba9e7db433f0c644dd3a04cc1cc6bf13aa56d
Reviewed-by: hjk <hjk@qt.io>
2023-11-13 13:51:55 +00:00
hjk
ab8ba7f264 Core: Replace new "Action" by an "ActionBuilder"
This needs not be stored somewhere but does its work latest
at destruction automatically.

Change-Id: If929f5a5ccc15b085f110d8d9db8f72ff2a5fac5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-11-10 14:33:15 +00:00
hjk
ef9be25469 Core: Have Core::Action for Help->Contact and Change Log
Change-Id: I606bc69c860222c66b241d25363941dd71aeab85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-10 07:09:23 +00:00
hjk
d391c0c74e Core: Use Core::Action for 'About...' stuff
... and add the necessary Action::setMenuRole()

Change-Id: I2bb309ae115c1e015ff848e0712327360ead23cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-10 06:54:35 +00:00
hjk
f8bbdf6f07 Core: Inline ICore::init() into ICore constructor
More natural setup.

Change-Id: I5a51cdec3f955e4b887613bd3dea4b25d485e844
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 13:38:40 +00:00
Eike Ziller
1a398a83b5 Core: Fix dialogParent for separate windows
The dialog parent is supposed to fall back to the main window, if there
is no modal window and the active window is not a popup or a splash
screen.

But testing for "popup or splash screen" does not work with
`testAnyFlags(Popup | SplashScreen)` because these flags are combined
flags - e.g. "Popup" is "Window + something", so when using
testAnyFlags(Popup), that returns true for _any_ Window, regardless of
popup or not.

Amends 60f11cf637

Fixes: QTCREATORBUG-29741
Change-Id: I9e8defc6dd7193f5008decda0eda04dedc62f9df
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-26 12:07:08 +00:00
Eike Ziller
e51b378ac9 Core/Tr: Fix menu bar action
It is "menu bar", and use placeholder for shortcut instead of
concatenation.

Change-Id: I60094a5fac3893663180f7ef573b6dece7670111
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-18 14:11:13 +00:00
Tim Jenssen
85ea2758ac Merge remote-tracking branch 'origin/qds/dev' into 12.0
Conflicts:
	share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml
	share/qtcreator/themes/dark.creatortheme
	share/qtcreator/themes/default.creatortheme
	share/qtcreator/themes/flat-dark.creatortheme
	share/qtcreator/themes/flat-light.creatortheme
	share/qtcreator/themes/flat.creatortheme
	src/libs/utils/CMakeLists.txt
	src/plugins/CMakeLists.txt
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: Idd87c281e1aa7b7fd2702473ad55e18563cbfb21
2023-10-05 15:53:42 +02:00
hjk
4e8bcc40e7 ModeManager: Remove unused constructor argument
Change-Id: I7856a832db61a27ab5fdabf79ff9a359acdb866a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-05 06:27:29 +00:00
hjk
58efc778f5 Core: Swap ICore/MainWindow "ownership"
Change-Id: Iba387781624d88f814293af0f7b7ed697da1d822
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-05 06:26:21 +00:00
Tim Jenssen
97ca8cc270 Core: add ICore::isQtDesignStudio()
Change-Id: I3aed97b62abd05b283ac327be210af75f173383d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-04 14:39:39 +00:00
hjk
ae4852a3ea Core: Rename MainWindowPrivate to ICorePrivate
Mechanical, plan is to move m_mainWindow there and switch
around construction.

Change-Id: Ic7936623586ac68c2cdd69a40042262802579d23
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 13:48:14 +00:00
Eike Ziller
ce291a0bc2 Core: Fix appearance of mutltiple status bars
There should only be one.

Fixes: QTCREATORBUG-29691
Change-Id: I02b4aaec35d6a35b0130cdbc9d933aed9cfb8132
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 09:02:47 +00:00
Cristian Adam
895c588dd6 Core: Brings back revision in About dialog
The revision is part of the Utils::appInfo() structure. Make sure to
display it when is set.

Change-Id: I0dece3bdd011127f63974b963e35f73834416b6c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 06:46:12 +00:00
hjk
3d7cf53a1e Core: Ramp down MainWindow in it's ICore::pimpl function
Change-Id: I7c4934248ea4794f7d4eb95f98d19994b56fa0f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-02 13:27:04 +00:00
hjk
61270e910f Core: Swap ICore and MainWindow "ownership"
Change-Id: Ibfa223da0f4d5195ae2f2783352346ca72b920bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-29 12:11:38 +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
d6fe357d81 Utils: Use a proper class as Key
The Key encapsulates now a QByteArray.

Plan is to use QByteArray::fromRawData on literals, but that's not
active yet due to an unclear ASAN report, see the gerrit discussion.

For now we also paddle back when interfacing QSettings, instead of mimicing
writing a QVariantMap (and fail in some corners), always convert
the Store. This is meant to go away in the future when code paths
are better controled.

Change-Id: Id1206a434d511f8003903d5322c7c9bd5f5fb859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 09:41:44 +00:00
hjk
e5f74d217b Core: Merge mainwindow and icore file pairs
So far the main window acted a bit like ICore's pimpl.
Aim at making that a bit more similar to other places.

The files are kept for now to not have to adjust #includes
all over the place and there's some hope to move code back there.

Change-Id: I150e2dd0971bfab44cba89e0c51bb3f37062b8d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-26 09:41:45 +00:00
hjk
41856dd254 Core: Disentangle SettingsDatabase access
There's nothing inherently tied to the main window here.

Change-Id: I48ae09777a4408fc4c955d23fdee3483d8a97dd0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-21 13:50:02 +00:00
Artem Sokolovskii
f4e50126b1 Core: Add clearAboutInformation function
Change-Id: Ib6dcc3b963917c096756cbff09541f4e13c8184b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-07 12:12:26 +00:00
hjk
900ea82fd1 Core: Don't save settings on startup anymore
Amends a68352f013.

This is getting in the way, it does not look needed, and it is lost
in history why it ever was.

Change-Id: I68ebdafc78e3259c73c64364607aef6eb74d2869
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-29 06:46:05 +00:00
Eike Ziller
dff9e1463b Reduce usage of app_version header
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.

This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.

Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-26 06:57:46 +00:00
Jarek Kobus
a78720060e FindFlags: Move it into Utils lib
It's going to be reused in filesearch.h API.

Change-Id: I7ef133368536a647e19949ba8623134cf078a87d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-26 07:59:41 +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
Tim Jenssen
b619f24396 crashpad: change chrashpad dumps location to user directory on macOS
This is necessary to not pollute the signed and notarized .app
bundle.

Task-number: QDS-9113
Change-Id: I74e0bced5679faac94b27d2a31ea10a7949fb21f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-06 04:46:03 +00:00
hjk
015b1ee53c Core: Tr::tr
Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-17 14:34:16 +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
Jarek Kobus
5769fd82d3 CorePlugin: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: Id664cfc3b46685f63fb205beaf16a7c271ad95d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 08:50:07 +00:00
Jarek Kobus
c37ee615a6 ICore: Fix possible crash in raiseWindow()
Don't call else branch with nullptr when window is nullptr.

Amends 79be19a8a0

Change-Id: I4c1ee3783d36374cbc6ad9555328b5737f2ce348
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-02 14:00:07 +00:00
Christian Stenger
60f11cf637 Squish: Avoid potential crashes
The control bar of the Squish plugin is used as top level
widget, but may get destroyed out of the sudden under several
circumstances.
If some dialog is using the control bar as parent QC will crash
at this point.
Redo 0d7bbb8480 to avoid all crashes instead of just
this specific one.

Change-Id: I5c5de737d748fe8eee724e9fa489696a27300978
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-14 10:50:40 +00:00
Eike Ziller
a2f21d40f5 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/debugger/debuggerdialogs.cpp
	src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
	src/plugins/texteditor/fontsettingspage.cpp

Change-Id: I5a6accd2065e0d8320045b57ade7b54a9a09aae0
2022-08-31 11:03:13 +02:00
Eike Ziller
54bce73089 Core: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).

Change-Id: Idfc8a7e255b4a0527f4651d6f9e5334e95b4351f
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-31 06:27:33 +00:00
Sona Kurazyan
60a045299d Prepare for moving qVersion() from qglobal.h to qlibraryinfo.h
Include qlibraryinfo.h where it's used.

Change-Id: I31afbca9c69e39eb05175704487ade1e8ae42eee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-30 13:56:41 +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
hjk
df4155f617 App: Use more local methods to trigger memory trim timer
The global event filter function is executed often, for events
originating deep in the widget hierarchy even multiple times.

Triggering the timer only by mouse and key presses on the main
application and on texteditor is less intrusive and still happens
often enough (TM).

Change-Id: I848d55a347bd62d12e8523965d1750c59da33116
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-02 11:18:12 +00:00
hjk
4f4d77e797 Core: Avoid #include of fileutils.h in icore.h
filepath.h is sufficient.

Change-Id: Ibd865020f7820a6c6478eca6cf7b8065cf8c8cf3
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>
2022-07-22 13:07:43 +00:00
Sergey Levin
4a1a0eaa39 Core: Close ICore::showWarningWithOptions dialog on pressing Esc button
Change-Id: Ic09202799bde9cb4fbc3ca4e9836ca0c0cc499f2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-13 13:03:33 +00:00
Eike Ziller
ae0032dfd5 CorePlugin: Use Tr::tr instead of QCoreApplication::translate("Core"...
Change-Id: Idf0b8e9effedbacda7a4eedb5bf0f78918fce631
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-06 06:41:24 +00:00
Cristian Adam
a5a06fe355 Core: Display build cpu architecture in about dialog
Previously we were displaying the word size: 32 bit, 64 bit, but
nowadays we could have x86_64 and arm64 and "64 bit" doesn't cut
it anymore.

Change-Id: I02c1942eae2b93726554561fa4eb83ac8a97dfa0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-25 09:23:42 +00:00