Commit Graph

514 Commits

Author SHA1 Message Date
Eike Ziller
b6c452d59d Terminal: Clean up settings
Qt Creator <= 10 accidentally wrote the default terminal into the
settings on macOS instead of leaving the values empty. So the change
from "openTerminal.py" to just "Terminal.app" might not be correctly
reflected in the settings.

Make sure that the terminal setting is removed in all cases, if it is
set to the default.

Amends f003234510

Change-Id: I9d099999f55b4003ac6e7f4a4b679b893eaffc90
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-08 11:33:20 +00:00
Eike Ziller
a353e9fde1 Markdown: Reuse Markdown highlighter from change log viewer
Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 11:48:15 +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
Thomas Hartmann
39434062a2 Add option to hide tools
This allows hiding the tools menu by default.
Power users can enable it again.

Change-Id: I5465f0c525bb5b4954e13cb42a941ac8b6b7cf37
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-01-27 12:34:29 +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
hjk
f939f968ea Utils: Consolidate Link::from{FilePath,String}
The input is more unparsed-string-ish in nature, so FilePath is not
appropriate.

Change-Id: I85efb5813b8f5fbbc4127be1c936d5487637b75c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-17 09:46:58 +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
Marcus Tillmanns
26f07c62a0 Core: Remove unused Key
Change-Id: Ic3e9e7b994e010fe1b65b8273e74124dc957bdef
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 11:15:39 +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
Orgad Shaneh
157f2bcd39 Merge remote-tracking branch 'origin/9.0'
Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
2022-11-28 17:29:19 +02:00
Eike Ziller
2ff5f18bff Transform doc.qt.io/qt-creator links to internal qthelp links, for links
that are found locally in the documentation. That opens such links in Qt
Creator, instead of in the web, if possible.

Change-Id: I2270c6947db22f4aeb4968bf5b7245de57521c92
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-11-24 15:10:05 +00:00
hjk
722312f62f Core: Combine two code paths creating absolute paths
Remote and local can use the same nowadays.

Change-Id: I218aafb0293dadbbf75f248f4076cabfa4a0f3da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-21 13:25:26 +00:00
hjk
e567cb313b Core: Use FilePath for working dir in MainWindow::openFiles()
Change-Id: Ifc8e167a1734115fa7a23f7aefa45fc52e4a70cc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-21 12:46:11 +00:00
Marcus Tillmanns
7e0d545e64 Utils: Allow mimetype deep-scan for remote files
Text editors need to know the actual mimetype of a file to be able to
open the correct editor view. Just checking the extension is not
enough. Especially on linux there are many text files without
an extension.

Change-Id: I7e5c935b0619f5d86e97f10bfd7ff9b65da62f4b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-04 09:52:15 +00:00
Eike Ziller
6e8087a1b1 macOS: Fix missing "Search" item in help menu
Define the menu as the help menu directly in the the NSApplication,
since the OS built-in heuristics based on the menu name easily fails.

Fixes: QTCREATORBUG-24751
Change-Id: I9aa50a46099e295ec0c38ee8a9e88d75d41c74ad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-01 07:28:26 +00:00
Eike Ziller
06402e0dc6 Re-add "Toogle Bookmark" icon into touch bar
Instead of "Edit Bookmark" which was not intended to be there.
Also move it behind the "navigation" items, since these are probably
used more often.

Amends ac47d51bfb

Fixes: QTCREATORBUG-28108
Change-Id: I47c443772488b7f9e29c8fadf01011d4ddfd5686
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-17 11:14:05 +00:00
Marcus Tillmanns
35de9566b6 MainWindow: Use FileUtils::get... functions
Changes the MainWindow to use FileUtils::getFilePaths function
to access files on devices instead of QFileDialog.

Change-Id: I0981c960b643edd69510cfed1cce16346962d75a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-13 05:17:15 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Jarek Kobus
3885b936b6 CorePlugin: Limit the usage of qMakePair and std::make_pair
Change-Id: Ibf96ca29d2570841955366371f1bab11198b3e67
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-30 11:23:54 +00:00
Marcus Tillmanns
5d4bbd38d4 MainWindow: Disable TrimTimer on non Linux Host
Timers showed up a lot during cpu profiling on macOS.
This is one of them. Since its only used on Linux,
this patch makes sure that its only started there as well.

Change-Id: I0da35473b622c92e39a7e45677441f1cd8aa3344
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-27 08:24:43 +00:00
Eike Ziller
2c51e4bc17 FilePath: Return optional bytearray for file contents
For differentiating between "error" and "empty file".

Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d
Reviewed-by: hjk <hjk@qt.io>
2022-09-12 11:57:04 +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
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