Commit Graph

2031 Commits

Author SHA1 Message Date
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-27 13:26:07 +00:00
Jarek Kobus
2341609719 Avoid signal overloading
Choose a different name for them.

Change-Id: Ie2cc2c85dca72b7f7ff84c95fb0abd0a0e99a63d
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-11-19 09:48:38 +00:00
David Schulz
1984ebcf51 Git: fix assert when comparing GerritApproval
When compiling a debug msvc build std::stable_sort verifies that the
compare function returns the inverted result when switching the left
hand side with the right hand side argument.

Change-Id: I34549d69144966c1b74f368e9af35ec565dc791e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-11-16 14:00:05 +00:00
Andre Hartmann
86a5f81414 Git: Fix initial focus in LogChangeDialog
Make it possible to use the cursor keys
without having to click into the list first.

Change-Id: I47861a5a1df7cbfe65a020299b0455e5833492d5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-11-06 06:27:21 +00:00
Jarek Kobus
34c97ac868 Fix a build with Qt 6
In Qt 6 implicit conversion between QFuture and other types
is forbidden. Make it explicit instead.
See ff0ba7e2d7b91fd5809cb314935a1ca1a436f6c9.

Change-Id: Ie42e6b9b5047ba5eeec9f63fd03179e73f95314d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-05 08:46:43 +00:00
Andre Hartmann
2bc736a4f7 Git: Do not refresh branch view when hidden
Change-Id: Ia2e327b6396657255f9b40b792d794a647fc5745
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-10-27 13:56:14 +00:00
Orgad Shaneh
e3ace00a43 Git: Deduplicate stderr output on commit
It appears while the process is running, then printed again when it's done.

Change-Id: I86737eccfcf34d82ccca1ec4b9a7f42fc66bf86c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-14 16:49:51 +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
Eike Ziller
f811b87c66 EditorManager: Small API clean-up
- Move private enum to private header
- Add missing parameter to openEditorAtSearchResult
- Remove convenience singular close* methods, we have {} nowadays

Change-Id: Ic5b6d831a9f506ffee09b89b3358874433d62998
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-30 14:57:20 +00:00
Orgad Shaneh
52d1b31a67 Git: Enable push also for detached HEAD
Task-number: QTCREATORBUG-24508
Change-Id: I326b701c79b21f2d4495d752c7928fadd80901d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-30 08:40:57 +00:00
Orgad Shaneh
eb6a2f2b89 Git: Enable Show for file in a specified revision
Fixes: QTCREATORBUG-24689
Change-Id: Ic4ceb1c59f39009c28be7f34ee62f65fd41506c1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-29 07:09:18 +00:00
Eike Ziller
f8ae051816 VCS: Fix build with Qt6
QStringRef is gone.

Task-number: QTCREATORBUG-24098
Change-Id: I38dd1602294fcabf5cf7c1553bcfd93f3c47b601
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-21 06:56:58 +00:00
Eike Ziller
df97d40a0d Merge remote-tracking branch 'origin/4.13' into master
Change-Id: Iab93dc48b4a38fb4c698481bbf02a5a65e08206b
2020-09-07 13:19:38 +02:00
Orgad Shaneh
f73f11d8c6 Git: Highlight newly added keywords in interactive rebase editor
Change-Id: I571e9576fcb781fda4dc5ce2df8a6bbc3a8abf9e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-07 08:32:37 +00:00
David Schulz
339db00f85 Core: replace QString with Utils::FilePath to get documents
Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-04 10:14:14 +00:00
Tasuku Suzuki
367d0dc4f7 Improve git archive userbility
Archive should be saved at one level upper directory from repo dir.
When user change archive name to e.g. project-v1.0, Qt Creator saves it
to project-v1.tar.gz now. It should be project-v1.0.tar.gz

Change-Id: Ibcd3c6bd8413bbb28fcdae13e5eb43016dc2b6a3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-03 15:34:14 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Orgad Shaneh
354f628052 Git: Filter out commits according to active remote
... in the Push to Gerrit dialog.

Fixes: QTCREATORBUG-24436
Change-Id: I2f1ab49d9fbeb09ffb66de23d34a2facd53cb725
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-10 05:51:33 +00:00
Orgad Shaneh
be16ac2371 Git: Avoid translation of git commands
Fixes: QTCREATORBUG-24390
Change-Id: I9bb041045d6adf0ae91f6d22723846f058662275
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-08-07 13:32:14 +00:00
Orgad Shaneh
3552c95980 Git: Make Add Branch dialog wider
Give it enough space for subject-based branch names.

Change-Id: If6ace5434903553330e802ff41f92083b0aee874
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-05 08:56:08 +00:00
Orgad Shaneh
7919fd550a Git: Replace subsequent invalid characters with a single underscore
... in the Add Branch dialog.

Change-Id: I7644cba6bf58316431e2daa9db5d2c26823c2711
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-05 08:55:01 +00:00
Orgad Shaneh
14e3a379c1 Git: Suggest branch name based on the commit subject
... when the checked out commit is not a remote branch.

Fixes: QTCREATORBUG-24006
Change-Id: I175a3aedba88bd9e3b5cf298c5c161c56e9d0acd
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-04 20:23:45 +00:00
Orgad Shaneh
4bfdc125ef Git: Sort includes in LogChangeDialog
Change-Id: I7005339456057be7b9c132088f74f243d71bdbff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-02 05:01:25 +00:00
Orgad Shaneh
a48cde86f3 Git: Show full description on tooltip in commit chooser dialogs
Like Push to Gerrit, Rebase, Reset, Fixup Commit.

Fixes: QTCREATORBUG-24366
Change-Id: I0f596f84661a1a4f37fe971683cc0d985a6c9b1f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-02 05:00:50 +00:00
Andre Hartmann
e903f9e350 Git: Fix quoting of repository name
... in the "Uncommited Changes Found" dialog.

Change-Id: I7f987786f4aada47983b849419e2443311dec75f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-24 14:04:15 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
Orgad Shaneh
c0c5773345 Git: Add new files with --intent-to-add
Sometimes the file is modified after adding it, either by Qt Creator itself
or by the user.

Running Diff on such a file may look strange. Instead of showing the entire
file, it shows the diff since it was added with its initial content.

Fixes: QTCREATORBUG-23441
Change-Id: I712cc574053f39753250685aec148d2b6d7db192
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-07-19 03:59:45 +00:00
Christian Stenger
4ad5fc51ba Git: Fix compile on Linux
Amends 228f6d04af.

Change-Id: I7a839bf89798c4fa3249d0538c7ddbb36b69400c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-14 11:33:11 +00:00
Christian Stenger
228f6d04af Git: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I77a2e9959981b2e173142253baf1668d57982a2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-14 09:09:42 +00:00
Eike Ziller
770b07f71c Merge remote-tracking branch 'origin/4.13'
Change-Id: I0125351c7c6fa33f9fc7171469493e4fa53e87c4
2020-07-06 16:43:39 +02: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
Andre Hartmann
c9eedbe0f3 Git: Port colorful log to text colors
Fixes: QTCREATORBUG-24198
Change-Id: Icde06da5ac848fb0f7faf02a8e55fb26136f318c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-07-06 10:55:43 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Andre Hartmann
884de236be Git: Fix whitespace
Change-Id: I9b61d018179449f61fd38de7957fabc1c9bc917d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-04 19:12:05 +00:00
hjk
03838decb9 More QRegularExpression and include for Qt 6
Task-number: QTCREATORBUG-24098
Change-Id: Ia537e26efd3f37319c38d906e569b255768371f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-25 07:13:43 +00:00
hjk
37a28c1726 Git: Compile with Qt 6
Change-Id: I64d6cbb8fc65ba63a2cdb26246ff0efd29f864b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-23 14:53:08 +00:00
hjk
e6d1f08642 Drop use of Qt::DefaultLocaleShortDate
Gone in Qt 6.

Task-number: QTCREATORBUG-24098
Change-Id: Ie9fe1858406133fed6987de0e0a38fe86de15caf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-22 06:43:39 +00:00
Orgad Shaneh
92a4c0d38a VCS: Pass links to the correct VCS
Current implementation requires each VCS to connect to the referenceClicked
signal. Only Git does it, but this is conceptually wrong. If other VCSs
would connect to the same signal, all of them will act upon clicking a
link, which can result in multiple editors, most of them are likely to be
invalid anyway.

By default executes vcsDescribe. Can be extended or modified by subclasses.

Change-Id: Ib953009efd77446a4b2963f0aa8a2f3f3d26509f
Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-21 06:47:20 +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
Orgad Shaneh
5ebe34a332 VCS: Add vcsDescribe
Already exists in all implementations, but there was no common declaration.

Change-Id: Ieb3d10d1936c207722b5001712bce41e8114dcdc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:17:59 +00:00
Orgad Shaneh
e9df7825fa IVersionControl: Change vcsAnnotate return type to void
All implementations return true unconditionally, and the return
value is never read anyway.

+ Remove superfluous function with the same name in Perforce.

Change-Id: I83f361ec7fd8be3177cb4be52e6276e295cd4279
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-06-18 05:16:24 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Alessandro Portale
0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
Orgad Shaneh
bfcd1149eb Git: Do not read working directory before it is set
This amends commit c17767c78e.

Change-Id: Ide6f9de2420dd1262b27aed83351b76404cdba30
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-06-08 13:18:28 +00:00
Eike Ziller
227904d4a6 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic39945a0e3e140a9467b4b4f572929257ff3a324
2020-05-26 09:00:05 +02:00
Orgad Shaneh
af455fa40c Git: Fix upstream status for branches with slash
Like wip/foo

Change-Id: Ia2816660f7878e872b2e49c4811f5893a1b8dc75
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-05-19 14:06:48 +00:00
Andre Hartmann
79766caf52 Git: Use internal log highlighter for old git versions
Git didn't have RGB color support before version 2.3.0.
If an older version is used, fall back to the internal
log highlighter, i.e. don't disable it.

Amends commit d1b096699

Change-Id: I66f84dc4e79f7374d02f6d76c6f912c43e7f04bd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-19 12:00:52 +00:00
Andre Hartmann
d1b0966996 Git: Fix filling commit selection combobox for log
Broken by commit cbb70513bf, which changed the
format for the normal log to override the highlighter.

We still need the hightlighter for the log with diff.

Therefore, a separation between highlighting
and parsing the log is needed to populate the
combobox for commit selection again.

Change-Id: I902ce548fc25875f2cd67b165283ff1236329afa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-16 19:47:46 +00:00
Andre Hartmann
cbb70513bf Git: Allow colorful logs
Requires Git 2.3 or higher for RGB colors.

Can be enabled for the normal or graph log
with the "Color" tool button. For the diff
log, the old behavior is kept (highlighter
is used for the "normal" log, no colors at
all for the graph log)

Fixes: QTCREATORBUG-19624
Change-Id: I8a42a7ad0ebf99ceb459355310311d702dcf9977
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-13 14:03:46 +00:00
Andre Hartmann
d5cbdde11f Git: No else after return
Change-Id: I1c054bbb3b7a7060775e8015a74ee396cf84cca1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-09 18:09:13 +00:00