Commit Graph

35 Commits

Author SHA1 Message Date
Christian Kandeler
35fcd96b85 TextEditor: Optionally auto-save refactored files
This is particularly helpful with clangd, which considers only the on-
disk state of header files when parsing dependent sources.

Fixes: QTCREATORBUG-25924
Change-Id: I41d313f8a203a576d3ed5fbe75bbe918334486d4
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-19 08:58:44 +00:00
hjk
59c01481d1 Core: PatchTool code cosmetics
Some more FilePath use, QLatin*, static, ...

Also fix default settings values, amends e2eab0e0 insofar.

Change-Id: I8e40ca9629351db3b3095636b4ea29a204f86da6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-17 11:55:11 +00:00
hjk
6418eb2dda Utils: Use EnvironmentChange instead of Environment in several places
For path choosers this makes it easier to change the actual base retrospectively
based on the device for the file path entered by the user.

In other cases "end user code" only knows that something needs to
be added to PATH to get a proper environment. This here lets this
code to specify the change alone without bothering about the base
environment this might be applied to.

Change-Id: I726aaa2fd2feb0bee7158f601aac660b0ac6327b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-11 13:33:52 +00:00
Tim Jenssen
7df65693f6 Core: Fix build with crashpad
Change-Id: I86d59702367b39d81da7b95f4d7e7f7802f3a822
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-03 08:56:23 +00:00
Christian Stenger
953689ec63 Core: Fix build with crashpad
Change-Id: Ie594666ca7315ba5d297b2bd0291bb1edbf50d8e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-03 06:53:12 +00:00
Christian Kandeler
1027b94fcb Fix some compiler warnings about unused variables
Change-Id: I9a9450eab68f53b08722adb9a5d33c4f318b2129
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-25 15:55:39 +00:00
Christian Kandeler
7a6aa75032 Fix various warnings about unused variables and functions
Change-Id: I430b87ab0afa8bf32115d44e8acb94271988d229
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-26 09:53:17 +00:00
Christian Stenger
def68ecd2f Core: Remove wrong include
Amends cc7be5724a.

Change-Id: I1b4dfd3f4f3de92f6f97591ca7ac6ca2e17a6f6d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 05:42:15 +00:00
Mahmoud Badri
cc7be5724a Add Crashpad to Qt Creator and Qt Design Studio
Fixes: QDS-2748
Change-Id: I87e25682f066d167eebfd7b78c46c166e5062e11
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-18 22:08:14 +00:00
Eike Ziller
e755094480 Add option for globally changing the base environment for tools
Fixes: QTCREATORBUG-22123
Change-Id: I00a5bbdf92e5dab513cb12f3518a2abb1adbb9cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-18 15:24:02 +00:00
Eike Ziller
4517edd894 Reduce clutter in System preferences
Vertically align some more things.

Change-Id: I6f106369252035e07a4b56e4b5b8f066b2338cb0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 13:55:05 +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
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
b0847af740 Fix some translation contexts
Change-Id: I5471cca06970bc01a77cd1e2fd00890d3f22349f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-24 14:46:17 +00:00
hjk
c181a53d01 Core, ProjectExplorer, Valgrind: Settingspage cosmetics
Change-Id: I79198c7d655b13dbd69d26b8e383a8eb57a8f9bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-04 14:47:51 +00:00
hjk
c75923756a Core: Provide empty implementation for IOptionPageWidget::finish()
Having it pure virtual only lead to a lot of unnecessary
re-implementation.

Change-Id: I37f71d1a160e21b93c7c73a6304b0eb6d5f0441d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-15 12:28:29 +00:00
hjk
0a33e0eebe Core: Actually create settings widget
Amends dae9cb13cf

Change-Id: I0f4bef0b84e3383860ac5d871dabf089badbcf11
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-09 13:35:14 +00:00
hjk
dae9cb13cf Core: Use IOptionPage convenience for SystemSettings page
Change-Id: Iaaafa9ad9d6b6644baea70722c50d1e18a7c0984
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-09 10:22:42 +00:00
Christian Kandeler
bf0d84074f Let users configure the number of recent files shown
Fixes: QTCREATORBUG-21898
Change-Id: Ie804e722f9bb88762da57f157833e4dc43d8ccbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-03 09:09:06 +00:00
Andre Hartmann
e2f7380708 ProjectExplorer: Add "Open Terminal Here" as default entry
Most often, a terminal with system environment is needed.
Provide it as direct context menu entry, and leave the
additional entries for build and run environment (which
are probably more seldom used) as sub-menu as before,
but rename it to "Open Terminal with >".

Change-Id: I148395ca1e62eafff8844ba91db269a12b053de9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-12 06:22:29 +00:00
hjk
19e1cf1520 Replace uses of qVariantFromValue with QVariant::fromValue
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.

Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 12:33:29 +00:00
Leena Miettinen
4d892acbbb Coreplugin: Fix UI text
The context menu command name is "Open Command Prompt Here" on Windows.

Change-Id: I250cbf464ae185e548733ce94769a52ec1c99dbc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-25 13:24:21 +00:00
Eike Ziller
4c88c1808c Make terminal settings more flexible
Currently "Open Terminal Here" and such expect the terminal
command without any arguments to be behaving correctly for this.
That is not the case for Konsole at least, since it just opens another
window in a running instance, with the same working directory, when
not convinced to do otherwise with additional command line parameters

Separate options for "Open Terminal Here" and "Run in terminal" in the
options.

Task-number: QTCREATORBUG-20900
Change-Id: I598d1f7f0bf22b5c21dc1c60333397bdf9fab1b4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-03 12:29:21 +00:00
Alessandro Portale
f36f04deba Core: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-08 16:04:21 +00:00
hjk
22428af750 Utils: Use free functions in OsSpecificAspects
Generates a bit less code in debug mode and is easier to read IMNSHO.

Change-Id: Ib9c0b9a0c058327facff16600a7014207167b050
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-24 05:59:57 +00:00
Eike Ziller
d1ec4c1204 Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.

Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-23 11:12:26 +00:00
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
Montel Laurent
9bccdb8885 Convert some 0 to nullptr
Change-Id: Ib3ca8e2cc0d63fd35582c73b3cf7c915fb64ddfb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-23 08:22:14 +00:00
Alessandro Portale
e809594fae Core: Make IOptionsPage::categoryIcon a Utils::Icon
This is necessary for themable + HighDPI icons in the options dialog.

Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae
Reviewed-by: hjk <hjk@qt.io>
2016-09-20 12:52:49 +00:00
Tobias Hunger
82a5320a42 Core: Stop crash in systemsettings
Do not crash when updating the Git path settings.

Task-number: QTCREATORBUG-16305
Change-Id: Ia6b7f529aa243b5e0b2778aeaddbbd86da9e265a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-24 08:14:38 +00:00
Eike Ziller
92e352f4f0 EditorManager: Auto-suspend editors
Adds an option (enabled by default) to close older documents when
opening new documents. These documents are put into "suspended" state,
similar to when restoring sessions: They editors and document are
removed, freeing the memory from their content and attached resources
(e.g. code model resources), but keeping the entry in the open editor
list (and history list, of course).
This is limited to editor/document types that can restore their UI state
when the document is reopened.

Task-number: QTCREATORBUG-10016
Change-Id: Icb5595aec950e3f666d42177fe2fd233954f2772
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-06-13 12:56:12 +00:00
Orgad Shaneh
5646480f27 Core: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I2dde14919d917816d02117338205f8f861d8af0a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 07:54:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
e1e7c542c6 OS X: Provide a setting for file system case sensitivity in preferences
Change-Id: Idaafb55ab4cf1fb1b525f3f911ecff291e035bb2
Task-number: QTCREATORBUG-13507
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-09-01 10:48:32 +00:00
Eike Ziller
2db21dc201 Split general settings page in two
It was too crowded to add anything to it. Split it into "interface" and
"system" related pages.

Change-Id: I2aa7984de4d672ca000e991b0cfb32a3f706c988
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-09-01 10:48:12 +00:00