Commit Graph

157 Commits

Author SHA1 Message Date
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
Leena Miettinen
b9e45d7b30 UI text: Fix spacing in multi-line messages
You need an empty space at the end of a line (before quotes),
but no empty space after \n.

Task-number: QTCREATORBUG-28334
Change-Id: I192836cb10b819a359778879c64e6b80aaa059f2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-20 07:02:52 +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
Orgad Shaneh
1748c6e80b VcsManager: Fix detection of top level
Amends 42377c21e4.

Fixes: QTCREATORBUG-28253
Change-Id: Ia10b88790ad02e9be4ff3c84b67c36239c3adf7d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-05 21:10:09 +00:00
Jarek Kobus
42377c21e4 VcsManager: Use even more FilePath
Change-Id: Ia9dd3de67eb9dc8f5c0331ec9ffe44c993395c33
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-05 18:25:49 +00:00
Jarek Kobus
64db0009d5 VcsManager: Use more FilePath
Change-Id: I255372c47e6d3ea55e5f8060c3c2fdd9bd155c75
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-05 18:25:33 +00:00
Jarek Kobus
3d70de9382 VcsInfo: Remove unneeded c'tor and operator==
Change-Id: I6b2a797290854bd34abc6680d5377749678ef687
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-04 14:06:16 +00:00
Jarek Kobus
c666c93882 VcsBasePlugin: Use more FilePath
Change-Id: I7bc80245b093b210439efdf3ea353b52b288dcc0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-04 11:51:20 +00:00
Eike Ziller
656731d549 VcsManager: Fix crash when input directory is /
If the input directory in VcsManager::findVersionControlForDirectory is
just "/", that slash gets chopped off by absoluteWithNoTrailingSlash,
and the resulting string is empty. So we need to handle that case.

Change-Id: I7970043a16e587c803e94c16b71bea481ea21c09
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-21 12:53:54 +00:00
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58: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
Marcus Tillmanns
04205d1225 FileUtils: Adds toFilePathList function
Change-Id: Ie3137751135fdb6c3161cc886f307323fcce6b72
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-04 11:33:53 +00:00
Marcus Tillmanns
cd252e4d90 warnings: Fix -Wdeprecated-copy
Change-Id: Iec5f5edf3752372fd7a0ce94dc26cbf7e75dd8f4
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 10:22:21 +00:00
Jarek Kobus
ae9a330344 VcsManager: Avoid using sender()
Change-Id: I09cca9c85b4300f25aa195be3c399d1511e2da11
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-19 20:22:00 +00:00
Artem Sokolovskii
f4e943bda3 CorePlugin: Remove foreach / Q_FOREACH usage mostly in dialogs
Task-number: QTCREATORBUG-27464
Change-Id: Iad47e9cb0b2fa7590dba2d26d0a33a83d2909bb7
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-04 14:18:24 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
hjk
0781379345 Core: Use FilePaths in IVersionControl::additionalToolsPath()
Change-Id: I3c7d03b8695152f0830e809ce7a0709f48d8178b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-11-11 12:19:27 +00:00
hjk
66bf957618 Vcs: FilePath-ify VcsManager::promptToAdd
And adjust users a bit.

Change-Id: Idb31030b208403e88c5be0171b3ca9d4d7ded35d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-09-29 07:44:17 +00:00
hjk
bbde6ac9bf VCS: Use more FilePath in ShellCommand and surroundings
Change-Id: Ie8c5fac09b45a54bcbe9a876044b653e7fccede5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-17 07:16:04 +00:00
hjk
ff57cb548d Vcs: Use more FilePath for file paths
Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 14:40:33 +00:00
hjk
ecbd9f4558 VCS: Partially use FilePath in VcsBaseClient
Change-Id: I024b051ab98ece42ec011bd1c92887a946925c1a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-30 13:10:59 +00:00
hjk
edcedabed9 Vcs: Use FilePath in IVersionControl API
Adapt first level of users.

Change-Id: Ifcd7bff45631ff3b9e26a9e3176daa6cf0cf2e56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-29 13:20:23 +00:00
David Schulz
b6367b6359 Core: use FilePaths to notify files changed internally
Change-Id: I2fce65ad340f18292fc0286233e78aaf769a130d
Reviewed-by: hjk <hjk@qt.io>
2021-06-23 12:03:10 +00:00
David Schulz
43b6ada0db Core: filepathify FileIconProvider
Change-Id: Id6fcc05317f3f5144c662fb4826438407f8d9d21
Reviewed-by: hjk <hjk@qt.io>
2021-06-09 12:25:19 +00:00
Leena Miettinen
ce0574b61e VCS: Fix typo in UI text
Change-Id: If0328293a83ac50d388e81bbd06f4e2959e30a26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-18 15:10:11 +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
Jarek Kobus
2c919c43be Use QHash instead of QMap when key is a pointer type
Ordering in container by pointer to memory doesn't make much sense.
QHash is faster for lookups in this case.

Change-Id: I0d4bdac7f5bb9afffdeaef70b99326547c080f55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-17 14:38:17 +00:00
Leena Miettinen
8362c3924c VCS Manager: Fix UI text style
We are trying to move to using shorter text.

Task-number: QTCREATORBUG-24873
Change-Id: I984c1cbc7fe31e74fc1ec90e500bbec3bd2b429c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-09 09:07:06 +00:00
Orgad Shaneh
b1cd859219 VcsManager: Fix adding files to VCS from locator
The files are listed by file name without path, so git add was executed
from the user's working directory instead of the target directory.

Amends commit 48c56416f5.

Change-Id: Iba7c5ff33378265d3c22479d7abb6ccf8db75d07
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-22 12:59:01 +00:00
Orgad Shaneh
48c56416f5 Git: Do not prompt to add files in a submodule
Fixes: QTCREATORBUG-23845
Change-Id: Ibf20eed26469b5a8599927e5ac2d458bbff9a156
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-04 17:06:23 +00:00
Christian Kandeler
3b415f5ebd Vcs: Add "bulk delete" feature to API
... and use it to improve the user experience when removing several files
at once from a project.

Fixes: QTCREATORBUG-24385
Change-Id: I8e8c39ee9dc0046f1715a5143a7649fab06e5ad8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-04 13:41:08 +00:00
Robert Loehning
7ce989a306 VcsManager: Tell user which file is going to be deleted
Change-Id: I72a853cf65d0bd697379c1738657f098243b814d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-23 15:48:13 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Eike Ziller
7c5ed6f7d9 Move InfoBar to Utils
The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-18 06:39:54 +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
Christian Kandeler
bb5727de17 Vcs: Introduce IVersionControl::unmanagedFiles()
... and use it in VcsManager::promptToAdd().
This is purely a refactoring. The different IVersionControl subclasses
can (and should) override the naive base class implementation in the
future.

Change-Id: Ifdf49852a98f53a95dad1a89131243b21052bc66
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-11-14 12:55:35 +00:00
Andre Hartmann
b292c30a13 Core: Make InfoBar::GlobalSuppressionMode an enum class
Change-Id: I859a727196a887f7699a667fbe07e1bfead4cb2b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-12 06:45:06 +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
Tobias Hunger
19c9194b11 VcsManager: Register IVersionControls with VcsManager
Get some more objects out of the pool.

Change-Id: Id93021b712307c4777dc39b9d15aa18a46318885
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 08:44:47 +00:00
Tim Jenssen
9a4394fa2d VcsManager: Simplify caching
Use value types in the cache and remove the code used to manage the
pointers.

Change-Id: I3babc69d571de161e161037da7cd731f70d0695d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-10 08:38:36 +00:00
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
Tobias Hunger
abdc6790ee VcsManager: Use nullptr and member initialization
Change-Id: I7a04d609f62d1a221eb2b814a67b2dd816d90e6c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-16 13:39:28 +00:00
Tobias Hunger
5e0d4e65db VcsManager: Remove dead code
Change-Id: If23eadb7368824cf1cf6f77602ef056d6d0bcb88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-12 09:32:35 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Christian Stenger
e952b9d4f3 Replace occurrences of QStringList() << pattern
Change-Id: I598d8c06193c2e72435a76165d1afc9ee3465b48
Reviewed-by: hjk <hjk@qt.io>
2017-02-09 13:17:49 +00:00
hjk
56409f5afa Replace a few occurrences of QStringList() << ...
... by something shorter.

Change-Id: I363b4e509adb07997517b2d233246a333aea4aea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-08 11:21:45 +00:00
Orgad Shaneh
caf2ca0a37 VCS: Chop trailing slash for cache
When the directory is root (on both Windows and Linux), it ends with a slash,
and yet it is valid (although unlikely to be managed by VCS).

Chop the slash to avoid soft assertions.

Change-Id: I0f206b5a7ee70e9c641ff872fa21662f9d92aab2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:42:31 +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