Commit Graph

491 Commits

Author SHA1 Message Date
Jarek Kobus
3daec60eb3 Drop Qt5: CorePlugin: Remove code below Qt 6.0.0
Change-Id: Ib00643f43ae1dfa42ae7ce6b4275fd50dd572765
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-25 13:57:57 +00:00
Alessandro Portale
afe0b5a42d Utils: Use FilePaths alias instead of QList<FilePath>
Change-Id: I2eb0956377e46a34e73208b301eb662704a25e8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 16:05:38 +00:00
Marcus Tillmanns
3462bc67be filesystem: Add QFSEngine for filepaths
Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c
Reviewed-by: hjk <hjk@qt.io>
2022-07-21 13:14:01 +00:00
Jarek Kobus
0dae822ca3 Drop Qt5: Core: Get rid of QOverload
Change-Id: Ibaebd83304680156e13a9ebc473075ad2a4bfed4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-20 10:30:34 +00:00
Christian Stenger
b9ceefe918 Core: Fix build with Qt5
Amends 5b683c53c3.

Change-Id: I80b8b6d1b508e42f81e022fee19117285a4c9687
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-07-07 14:07:09 +00:00
Cristian Adam
5b683c53c3 Change log browser: Use the markdown renderer for the .md files
Change-Id: I8a419b746b4b88a89ea77de8bd160acebd595655
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-07 12:52:11 +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
Eike Ziller
2e8d6661ca Change log browser: Make bug numbers clickable links
And use monospace font

Change-Id: Ib847045150e4c3fcf1a9ef74f207ef9eb2415e71
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-07-04 12:43:01 +00:00
Eike Ziller
91fb0cf123 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp

Change-Id: I5106bb632c2a3a144287097137be45b0894b9ee4
2022-07-04 08:53:22 +02:00
Eike Ziller
6063f5c89c Fix mnemonic conflict between Edit > Preferences and Paste
Change-Id: Ib9a991c960c694338a1f75148a1715f669caaa45
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-07-01 07:25:20 +00:00
Eike Ziller
b364cfde23 Install and ship change logs
And add a menu entry Help > Change Log... (macOS: Qt Creator > Change
Log...) for looking at them.

Change-Id: If444b3ff2465290b9beb4ccbb8d0ddf32a636db4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 12:04:37 +00:00
Thomas Hartmann
53cd1f1ea2 Move the options to the edit menu
This is more consistent with many other tools.
Visual Studio is one of the few tools that
have the options under tools.
and allows to hide tools in the context of Qt Design Studio.

Renaming options to preferences.

Change-Id: I4bb554f00005eb415a203faa8bf7340d047b5a84
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-16 07:52:19 +00:00
Eike Ziller
351f0301de Un-virtualize Command and remove an inheritance
This was a left-over from times where we had a QShortcut variant of
Command, which was removed in Qt Creator 3.2.

Change-Id: I62a728f3af352c61bc137461232fc1ed8debccf2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-31 14:19:38 +00:00
Artem Sokolovskii
85d2159e41 CorePlugin: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: I4767c333c2724c954e63a7297c5013d11ae71777
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-05-13 13:35:04 +00:00
Eike Ziller
f562ebf239 Mimetypes: Make implementation switchable between new and old
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
  utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
  wrappers, that also includes the "public" headers for MimeType et al
  from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
  utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
  back to utils/mimetypes/mimedatabase.h

Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 07:19:58 +00:00
Eike Ziller
c6fdb66b2b Collect Qt Creator debug menu items into common submenu
instead of spreading them over the place.

- rename "Logger..." to "Show Logs..."
- create "Tools > Debug Qt Creator" menu and put "Show Logs", "Inspect
Language Clients" and "Inspect C++ Code Model" there
- add missing ellipsis

That gets rid of the otherwise not useful "Language Client" submenu, and
creates a nicer place for the "Show Logs" item.

Change-Id: I2588b4c93327669579979dfbfce37005ada29dab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 12:59:21 +00:00
Christian Stenger
5eafa345ed Core: Add LoggingView support
Add a way to inspect QC internal loggings. This is basically
useful for inspecting issues while running QC and facing them
without the need to restart and set appropriate logging rules.

Change-Id: Ic647ba1abfb2611c4e4e99a375413d399c71886d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-17 06:08:58 +00:00
Christian Kandeler
03499bd619 Fix some compiler warnings
Change-Id: I1ac0cbba1b47c429a752c545b1475c8d7d23c5dd
Reviewed-by: hjk <hjk@qt.io>
2021-12-15 16:10:08 +00:00
Eike Ziller
d097314873 Split "New File or Project" into "File" and "Project" parts
This was non-standard to begin with, and splitting it makes it
possible to have different designs for New Project and New File dialogs
that are more tailored for the different needs (as is done in
Design Studio)

Change-Id: Ie6246e3c3f3527702c4562ec6f8fcbf5fae6c6ad
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-12-02 11:02:35 +00:00
Thomas Hartmann
55c21cecdf QtDesignStudio: Split "New Files" from "New Project"
Just having the "New Project" dialog there is confusing to many users
and they do not know how to add new files.
Upstream in master we can remove the condition and split the dialog
also for Qt Creator.

Task-number: QDS-5494
Change-Id: I9a21f27fad932759fcfc412ecfac7f3f6d2bcfee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-11-16 11:24:19 +00:00
Samuel Ghinet
a850b1b866 Implement the New Project creation wizard for QDS
Task-number: QDS-4490
Change-Id: Ie8073e8838ec14a7f11ad972acc6fca4456adf58
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-09 18:21:22 +00:00
Eike Ziller
f16589f969 Fix that Restart Now might not close Qt Creator
The call of QWidget::close() on the main window is blocked by Qt if
there are modal windows open. First close/accept all currently open
modal dialogs, then close the main window.

Reverts a8bc9774f9 which was specific to
the Link with Qt functionality, and generalizes the code in
MainWindow::exit().

Fixes: QTCREATORBUG-26525
Task-number: QTCREATORBUG-24098
Change-Id: I4c62f684cdfd749dfb3d3c18bd513b9fee10ddda
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-11-08 13:05:16 +00:00
Samuel Ghinet
4e7ee4687b Allow the NewDialog to be overridden by other plugins
So that Qt Design Studio can set its own implementation for the New
Project dialog box.

Task-number: QDS-4490
Change-Id: Ie04b041a5b6e25b38416f53b0ee4943839c2f64f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-07 07:04:56 +00:00
Artem Sokolovskii
5805208cec CorePlugin: Use FilePath istead of QString
Task-number: QTCREATORBUG-2616
Change-Id: Iaa5bc7946a7bddfd8adffe51906d90b2e76f5837
Reviewed-by: hjk <hjk@qt.io>
2021-08-30 10:39:41 +00:00
hjk
ef1653698e ProjectExplorer: Use FilePath for ProjectNode::{path,directory}
... and let the fallout trickle down a bit.

Change-Id: I1a2f79e281725c4a121cc2fbbc0377e881616ce5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-06 08:09:26 +00:00
hjk
622a03f63c Core: FilePathify MainWindow::openFiles()
Change-Id: I2d63d9099a7eb5d7c9ea9f1b7d23555a90e737ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 09:37:39 +00:00
hjk
5731965045 Utils: Use FilePath in DropSupport
Change-Id: Id048d0dab4c58be367a081bb8041214abd6dbf98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 06:59:53 +00:00
hjk
44e841c453 Core: Use FilePath in preferredEditorFactories
Change-Id: I16f50b2a5cabc9eed9d895ce6b46efc62fcb336c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:07:29 +00:00
hjk
64c9384cb8 Core: Use FilePath in IDocumentFactory::open()
Change-Id: I369f3bba2e0d1d33fed3a29f3c1408429cc7d8f8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:07:18 +00:00
hjk
16e8cc7748 Core: Use FilePath on findDocumentFactory
Change-Id: I0308379c89f49051e8f6e753a91d756a758c5765
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:23:24 +00:00
hjk
906cfb060b Core: Use FilePath in some functions related to opening files
Change-Id: I9610855a914d315d7934996c755fb69ad399320f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:14:46 +00:00
Eike Ziller
6bc9cddb9e Merge remote-tracking branch 'origin/4.15' into 5.0
Conflicts:
	src/plugins/cmakeprojectmanager/projecttreehelper.cpp
	src/plugins/coreplugin/mainwindow.cpp

Change-Id: Ie3a281b8635e79ca5fa794a127ed0039f33fe2ee
2021-06-24 10:43:10 +02:00
Kai Köhne
10420d4e5e Replace Freenode with Libera.Chat
Change-Id: Ia4a54b72f522a02c734273630c8217af75e4ea92
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-06-23 14:40:50 +00:00
hjk
10af72100d Core: Update contact from freenode to libera.chat
Change-Id: Ia5dff84029dd7011ddc370e1493d02bafd41b9e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-23 11:45:07 +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
David Schulz
95a7dc4857 Core: Use FilePaths for recent documents
Change-Id: I453e7dd2c5d8d357b651392fa7d7f0baf07173f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 04:38:36 +00:00
David Schulz
4b19decaa7 Core: Remove EditorManager::CanContainLineAndColumnNumber
In preparation of just supporting Utils::FilePath to open editors.
Opening editors at specific locations is still supported via
openEditorAt with Utils::Link, but the caller has first to parse the
file name via Utils::Link::fromString.

Change-Id: I17e5a28aeb50779cef9948fe72e37122d1020c50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-07 10:09:04 +00:00
hjk
2ccf5e2795 Core: Use FilePath in ExternalEditor interface
Change-Id: If3360eb7db9cec373551c2eb0fcffaf3bc5460e6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-28 09:13:23 +00:00
hjk
76db1e3746 Core: Add FilePath based overloads to EditorManager::openEditor{,at}
Part of the overall FilePath migration. Keep the original version for
a while to allow using code to catch up.

Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 09:55:50 +00:00
hjk
61a0b2b2b3 Add some basic contact information in a new Help->Contact dialog
Change-Id: I5a01c3d3c9fd467ed7b48869b66617adf2b11fed
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 16:36:07 +00:00
Orgad Shaneh
dad2b3d84b Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
2021-02-08 12:56:36 +02:00
Eike Ziller
8875c59021 Core: Do not remove context objects during shutdown
Like we suppress context updates during shutdown also disconnect from
the context object's destroyed signal. At that point we don't care
anymore.

This also avoids issues if the context object lives as the child of a
widget in the MainWindow geometry. These widgets (and respectively their
children) are destroyed only in the QObject destructor, i.e. after the
MainWindow itself already destroyed all its members, including the
m_contextWidgets map.

Amends 6d97c1fcb1

Fixes: QTCREATORBUG-25310
Change-Id: I75db6f8783b5f62aa9805b69d4d2bba07b906a5b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-05 11:27:43 +00:00
Jarek Kobus
be1d33299e Use invokeMethod instead of single shot timer with 0 timeout
Refactor it in coreplugin.

Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:24:41 +00:00
David Schulz
018d49f417 Core: Do not open documents for all dropped files
Only open one visible editor and add all other dropped files as
suspended documents to the document model.

Change-Id: Iade95b3891fb90c06cc8852859346bbfe10bc292
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-13 11:21:59 +00:00
Alessandro Portale
3e9385bf1b Core: Make member functions const/static
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.

readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.

Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-11 08:28:25 +00:00
Eike Ziller
a40e5b5382 Core: Save less settings
Try to not save settings that weren't changed from their default, and
make it possible for defaults to change in the future.

Task-number: QTCREATORBUG-24762
Change-Id: If469b72573791bc92ed535edf00271ef09b55386
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-11 08:02:57 +00:00
Alessandro Portale
b2a766a79a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-19 08:42:14 +00:00
Eike Ziller
5cb5d8e585 Remove usages of Core::Id
It moved to Utils.

Change-Id: Ia4d12bb07db2d59b1cb084b2ebdea20e6e3b40ad
Reviewed-by: hjk <hjk@qt.io>
2020-09-21 13:06:21 +00:00
Antonio Di Monaco
6e4ca8b6af MainWindow: ask confirmation before closing Qt Creator
When working with multiple windows, pressing the close button multiple
times can close Qt Creator too.

This patch adds a system option, asking for a confirmation before
closing the IDE. By default it's not enabled.

Fixes: QTCREATORBUG-7637
Change-Id: Ifc5e8c97511f9227ce0634c8a7064d95775c76c2
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-08-14 14:19:45 +00:00
hjk
736e6eada0 Various Qt6 compile fixes
Task-number: QTCREATORBUG-24098
Change-Id: Ia0fe92d82d4477bd8f14ee25754b114316fc878a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-22 07:04:12 +00:00