Don't store diff file index, chunk index and diff editor
controller anymore. Pass needed indices by value,
retrieve them when needed as lambda copy.
Change-Id: I3a81f1ab6d131c0b1d9899ac4b061b6e25582f51
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Allows to split a remote URL and performs
some validation checks on the elements.
Change-Id: I048373076b1a1553fdd7bed2986a41cc087138b0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* 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>
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>
* Remove some more QLatin1String/QStringLiteral
* Use algorithms
Change-Id: Iaa1042684c58be5ff0a42b9126b63ec681053fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
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>
For repositories with many refs the dialog takes a few seconds to open.
Change-Id: I82154ad8a77cc304db941f9d41e36e32aa7043cd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* pragma once
* member initialization
* s/struct/class/
* Introduce a static GitPlugin::client() method and use it
Change-Id: Ifdcac86dd16f3cdba11d564d03e9a15f00a6afdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
- If the git config contained old entries for submodules that were
removed (they are not cleaned from the config automatically),
it would add submodules with empty "dir", which lead to infinite
recursion
- When recursing into submodules, we need to prepend the paths from the
git output with the relative path from the main repository
Change-Id: I0bc6a1973f4cdeb1c3f09c05cd7736c25471f72e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Right-clicking a commit on blame shows the parent commit relevant for this file.
In case the file was renamed, fetching the parent can fail (since the file with
this name did not exist before the requested commit).
Using the direct parent is good enough, and should work for all cases.
What the user is really interested in is "how did the file look before this
commit", and the exact "previous" commit is not really interesting.
Change-Id: I7d74efce5f2b065f62e978ba5f14d3010a5f2c7f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
The config variable is not required, as Git will get the user's name
from other system settings, like the gecos field in /etc/passwd. So
adapt Qt Creator to use the same mechanism that Git does.
Change-Id: I255870833a024a36adf6ffff13ecb43cc0c45bbf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
VcsBaseClientImpl::createVcsEditor does do the same check.
Change-Id: I89c8d954e8d104261d8ee51a098b97110b4538f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This name makes it more clear what the method does.
Refactor to use VcsBaseClientImpl::vcsExec.
Change-Id: I4cf742c2b172d2589bd7d6740461e4a4c8d470ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
and rename it to vcsExec. Accept a QVariant to set as cookie on the
command instead of a int for the linenumber.
Change-Id: I8240b53e775ac3883f92bdbf7b111abeeeb39426
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Use that in the gitplugin in favor of fullySynchronousGit.
Change-Id: Ifd981f3fc5e87e16ad52caf32c204f81acffe586
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
... and use that in the Git client.
Change-Id: Ie70ec0d5908776d11eb69613d45f565d4f0ce32b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
... and update users of that functionality accordingly.
Unexpected plus: Now every supported VCS actually saves their setting
when requested.
Change-Id: I02db7b2ce14e5f52d26409b2a01aea290c2a294a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Introduce VcsBaseClientImpl class that is a base for both GitClient
and VcsBaseClient.
The idea is to slowly move code from VcsBaseClient into VcsBaseClientImpl
and reuse that in GitClient. Ideally GitClient would become a full
VcsBaseClient at some point, but let's see how far we can get with this
conversion process:-)
Change-Id: I2e63ba0dcf8a61128d5abf7c1453625e1b9f4e7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Make createVcsEditor in GitClient have the same signature as
createVcsEditor in VcsBaseClient.
Change-Id: I652175cbbf90b5bccd007fe8f028e364fe61a9aa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Use the same signature for the createCommand method in both.
Change-Id: I948a9fd1af2850730736731c53ee8d1b0b9b30bc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Integrate that into readConfigValue and use that instead.
Change-Id: I47f860a49f1528ff1aa5f4dc645497034ab87d5b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Move all data handling into DiffEditorDocument
* Move much of the logic of how to update views into the
DiffEditor.
* Introduce a base class for the different views on the diff
to implement.
* Remove DiffEditorGuiController
* Make DiffEditorController smaller and merge the DiffEditorReloader
into the class
* Simplify communication between the classes involved
* Make much of the implementation private to the plugin
Change-Id: I7ccb9df6061923bcb34cf3090d6d8331895e83c7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>