Commit Graph

2048 Commits

Author SHA1 Message Date
Orgad Shaneh
8d14f76c10 Gerrit: Support pushing initial commit for review
Enable manual selection of target branch on this case.

Task-number: QTCREATORBUG-16780
Change-Id: I925ceef52ec56ebf77abcee58065c7b8afcc0854
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-12 14:21:07 +00:00
Orgad Shaneh
5b49ed506b Git: Return empty list for remote branches when there are none
The function currently returns "<Detached HEAD>"

Change-Id: I68786d5521549aacc29807632a5054593db24b3b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-12 14:21:02 +00:00
Eike Ziller
841778ed69 Merge remote-tracking branch 'origin/4.1'
Change-Id: I80f96f100046625f24b6ab5d13fdb05660365abc
2016-08-22 16:30:56 +02:00
Orgad Shaneh
5fcfe97e23 Git: Detect rebase even if rebase-apply does not contain "rebasing"
It might contains only autostash.

Change-Id: Ie95c63bde2314aac1b6d37f01301822e41df177c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-18 11:55:30 +00:00
Orgad Shaneh
cfc8ed41c7 Git: Some more QStringList cleanup
Change-Id: I0c6e8f768ee46985dab8ae14f88f2bc8d34fed26
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-08-15 07:30:06 +00:00
Orgad Shaneh
5bc8d10baa Remove uses of deprecated QProcess::error signal
This overload of error is deprecated in 5.6.

Replace with errorOccurred, which was introduced in 5.6.

Change-Id: Iccfba7e7103b7ce377471696f1f2ec217e52c840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-09 16:02:43 +00:00
Orgad Shaneh
670e54345c Remove use of deprecated Qt algorithms
Change-Id: Ib35cffa2d5762874feea9b1d4df7f569c0e5f496
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-09 13:41:25 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Nazar Gerasymchuk
90629108fc UI files: Fix tab order in lots of UI forms
For unknown reasons tab order in listed UI files was set incorrectly and
behave unexpectedly. Now tab order behave naturally.

Changes made for listed objects and touches only UI.

Change-Id: I057b95eb21943ddb29b108682618382661db7be9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 14:29:27 +00:00
Orgad Shaneh
9c72b5bec2 Merge remote-tracking branch 'origin/4.1'
Change-Id: If3b6ebdb2aeb6fabadea1d06a1fe1c9211adcb8e
2016-07-25 07:27:22 +03:00
Orgad Shaneh
a3bdafcbc8 Git: Fix MSVC compilation
Change-Id: Iaf9c168ec2b62abd945a800d3e99a5af9af2b864
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-24 06:44:26 +00:00
Orgad Shaneh
1b34f2a4b8 Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia90424d479936a898705c433e5810c77ae088b2c
2016-07-22 15:18:00 +03:00
Orgad Shaneh
53cbc9d30c Git: Save silently on undo actions
If the user wants to undo, first save the file silently. Then the user is
still able to cancel the undo operation.

Task-number: QTCREATORBUG-16647
Change-Id: I61ac42ff41f3f7758d662692bc92850766beab8e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-22 10:30:10 +00:00
Orgad Shaneh
516161c875 Git: De-noise
* Remove QLatin1{String|Char} where possible
* Use initializer lists for QStringList

Change-Id: I8479f87f4fc909b5d74d854956885564209538e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-22 10:12:59 +00:00
Nikita Baryshnikov
66142d94d2 Git BranchAddDialog: small fixes
Change-Id: I99910fdb3a646ad818ad58103beb5f63de57ec18
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-20 19:48:25 +00:00
Nikita Baryshnikov
9750a82445 Git BranchAddDialog: fix branch renaming
replace invalid characters with '_'. To allow pasting of text with
invalid chars inside

Change-Id: Ibc0d3dde2252235a931b51ad73ae2eef527be547
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-07-20 19:48:11 +00:00
Orgad Shaneh
b55e06716b Git: Suppress stderr output (for the output pane) on clone
It already appears in the wizard. No need to duplicate.

Change-Id: I74b1f7d9d5be44e95965bf2af3fee9727372995a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-20 09:22:24 +00:00
Thiago Macieira
cdf1c924a3 Git: make git grep not duplicate leading path names
Make sure we pass --no-full-name to counter the grep.fullname=true
option that the user may have set. Otherwise, Creator will complain that
it can't find the files that matched the search terms if the search
directory was not the root of the Git repository.

Change-Id: I149e0540c00745fe8119fffd14628a3d7887e55e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-19 05:23:08 +00:00
Orgad Shaneh
6567db9c5b Git: Delete unused cloneRepository function
It is now implemented by the wizard, using
GitVersionControl::createInitialCheckoutCommand.

Change-Id: Ie847402cf1bc22444d2142baa57bfac6a136fb8f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-18 07:37:46 +00:00
Orgad Shaneh
c125fbbe97 Git: Refix filtering of obsolete branches when adding a branch
It was fixed in 62c60c6d1c but broke again
by 04eb012267.

Task-number: QTCREATORBUG-16264
Change-Id: I1130d5c2eda3320714913570441499be0d55c8fe
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-07-17 18:12:21 +00:00
Tobias Hunger
7c910e8b16 Git: Some more cleanup
* Remove some more QLatin1String/QStringLiteral
* Use algorithms

Change-Id: Iaa1042684c58be5ff0a42b9126b63ec681053fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-15 14:27:22 +00:00
Tobias Hunger
ca7a924a06 VCS: VcsBaseClient::vcsFullySynchronousExec returns a SynchronousProcessResponse
Change-Id: Ic155da2ed1fd36f1f91327ac90f34a5cad3c210e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:16:29 +00:00
Tobias Hunger
5efd82468b SynchronousProcess: Store raw bytes from stdout/stderr of the process
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.

This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).

Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.

Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:16:03 +00:00
Tobias Hunger
bdff47afd5 Git: Sprinkle C++11 goodness over the code
Just initializer lists for QStringLists (mostly arguments) and nullptr.

Remove lots of QLatin1* while at it.

Change-Id: I0d8354bcbdb759db65da6153bb356fb4b8ed0e8d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-11 07:49:00 +00:00
Nikita Baryshnikov
ac5d84372a Git: fix compilation
comparison between QDialogButtonBox and QMessageBox enum values.
Introduced here: 34f75be322

Change-Id: I19b50e5a4da643e7917346af19170022ffe61f34
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-30 08:59:23 +00:00
David Schulz
34f75be322 Git: Add a do not ask again checkbox to the pre checkout message box.
Makes it possible to not query the user on every checkout if he wants to
create a local branch.

Change-Id: I22d8ef03fb98648cafb3f11a008bb24c291cb807
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-24 11:50:17 +00:00
Orgad Shaneh
573958e79f Git: Prompt for unchanged file after custom mergetool fails
To reproduce, create a conflict and configure a custom mergetool that does
nothing:

git config mergetool.my.cmd true
git config merge.tool my

Then execute merge tool from Qt Creator. The merge tool process hangs
while asking how to handle the unchanged file, and can only be killed
externally.

Change-Id: I4d2a91061bd7549e308f6a25f106e6a7afc5cadb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-06-24 03:00:43 +00:00
Orgad Shaneh
53c4b36e4a Git: Resize columns in branches dialog when data is changed
When setting a tracking branch, creating or deleting a branch.

Change-Id: I58dd06912fbf23900674a8714224ee414f1da4b7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-23 13:05:27 +00:00
Orgad Shaneh
3d63136836 Git: Show date and time for newly created branches
Task-number: QTCREATORBUG-16484
Change-Id: I18b262d2d03f6a793123cc655f415a1d46d1a4e3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-23 13:05:23 +00:00
Orgad Shaneh
7a5b45bdc2 Git: Limit blame range only for multiple lines selection
Selecting a word should not result in a single line blame...

Change-Id: I03e8b75c519eb555b77985e7c68b3429bfff9446
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-17 14:37:17 +00:00
Orgad Shaneh
3f879c0c79 Git: Use correct line numbers in limited range blame
Change-Id: I12f6fc77b532e5b01f2da6c1c1ff847445447c70
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-14 07:57:03 +00:00
Orgad Shaneh
3845c833fc VCS: Return the editor in VcsBaseClient::annotate
Will be used in a follow-up commit for setting base line number
for limited range blame.

Change-Id: Ibae90f3ac982ebe9f53aa282f70c2c703e9eeb9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-14 07:56:55 +00:00
Orgad Shaneh
e043741fe8 Git: Enable buttons by default on commit actions
Do not wait until the commit description appears. If the commit is
invalid, disable the buttons.

Change-Id: If9d28ae742433f453f4147af46dec81cbef902c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-09 08:23:09 +00:00
Orgad Shaneh
b59f9fd0b9 Git: Support blame for selected lines
Task-number: QTCREATORBUG-16055
Change-Id: Ib24b6d41d5eb12aa0c4ec55377c02c8ae6ea914f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-06-03 07:41:46 +00:00
Andre Hartmann
3a78b610d7 VCS: Colorize unmerged files in submit editor
So far, conflicted files were displayed like added ones.

Now they are marked obvious, as they disable the commit button.

Task-number: QTCREATORBUG-16297
Change-Id: Iedf834408a747c4fe5f2133790c5fb81e7fea265
Reviewed-by: Hugues Delorme <delorme.hugues@fougue.pro>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-05-20 12:15:53 +00:00
Andre Hartmann
9efdfde088 Git: Adapt argument append style
All surrounding lines use operator<<(), so be consistent.

Change-Id: I9b301d0d00a17f0281142dd2c67c43bd7f2a680d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-05-20 08:07:26 +00:00
Orgad Shaneh
82903ba124 Git: Do not append extraOptions twice in blame
Change-Id: I4e3bb13b597ee4a84848e70269d5618e0a41835a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-19 13:58:04 +00:00
Orgad Shaneh
04eb012267 Git: Show date and time in branches dialog
This helps discovering recently active branches.

Change-Id: Ic82e1257c2a3407149e62768ddf2fc25c1a54b6b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-19 13:39:59 +00:00
Orgad Shaneh
62c60c6d1c Git: Filter obsolete branch names when adding a branch
Task-number: QTCREATORBUG-16264
Change-Id: Ifcb04c7740ab274be590f53757e013da43ad96f1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-17 05:07:39 +00:00
Orgad Shaneh
43f8f04ed6 Git: Show current branch even if it is obsolete
Change-Id: I694284c359812d9d0030fcdd934af4b98722aaa0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-17 05:07:34 +00:00
Robert Loehning
494f4a7742 Git: Use numerous form
Change-Id: I5a5f8cc4f607f0dd80772eb97128bdefa753c201
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-05-10 09:32:15 +00:00
Eike Ziller
9e66ce48e4 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/autotest/testcodeparser.cpp
	src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri
	tests/unit/unittest/unittest.pro

Change-Id: I9db4fbea6ea7c9fdd0d8e1703735af20c92e754b
2016-05-09 16:37:41 +02:00
Orgad Shaneh
61d94c5ccd Git: Fetch completion refs asynchronously
For repositories with many refs the dialog takes a few seconds to open.

Change-Id: I82154ad8a77cc304db941f9d41e36e32aa7043cd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-09 07:40:30 +00:00
Orgad Shaneh
754b8ededb Git: Suppress failure message on grep
It fails when no results are found.

Change-Id: I3390f1119457bb47fb09a95a395cb68a0dd58e82
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-04 02:58:03 +00:00
Orgad Shaneh
dbdc3ab400 Git: Fix error message on run failure
The working directory appears twice.

Change-Id: I485f53420c58f677b864d7be7078c4871027831f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-02 08:53:38 +00:00
Eike Ziller
967177d3d8 SynchronousProcess: Change exit code interpreter to function object
Change-Id: Ic48d4f5810f171c070f0980581fb6e45f6fe6b4a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-27 08:48:32 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
hjk
9a4700aae6 Git: some cleanup in gitclient.{h,cpp}
Unneeded declarations, s/static const/const/, #include order, ...

Change-Id: Ie7970f1a0ec1989d79bac56e9bad87852dd036ea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-04-15 08:35:40 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Orgad Shaneh
c52f278573 Git: Save only current document on Undo Uncommitted Changes
Task-number: QTCREATORBUG-15622
Change-Id: I9927a344976aa323701cad0a58550e27fa552c08
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-10 11:47:49 +00:00