Commit Graph

35 Commits

Author SHA1 Message Date
Andre Hartmann
d21f72d0dd Git: Simplify action in branch view
Change-Id: Ic1a604baa7b83b7244febde776c95896b56a1467
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-20 18:46:13 +00:00
Orgad Shaneh
dec8113377 Git: Fix accelerator for reflog
R is already used for Rebase.

Change-Id: I64575c98bf22aef0a2825b68b1c9a92061821923
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 17:48:19 +00:00
Orgad Shaneh
c728d04b52 Git: Support reflog also for branches
Change-Id: I9321ba4964d086d90aaf540a2006f95b94de8375
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 07:23:11 +00:00
hjk
eb1226df68 Git: Partially move plugin pimpl to .cpp
Same procedure as for ClearCase.
Unfortuately, some deep accesses are not easy to get rid of. Make them
available by static functions in the plugin itself. Definitely not the
favorite setup, but allows to proceed with the QObject removals.

Change-Id: Id85ed07bc7a6c1c053431a14dd7f68892f7ebea0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-07 12:56:10 +00:00
Alessandro Portale
2234c517c0 Utils: Add a non-toolbar variant of the "RELOAD" icon
New icon is: Utils::Icons::RELOAD. And the toolbar variant is now
Utils::Icons::RELOAD_TOOLBAR.

Change-Id: I811d83c7340a717968430ac1ce4a5c708c8ddcf9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-07 09:22:07 +00:00
hjk
1cd936c531 Vcs: Pimpl plugins
Essentially rename all *Plugin into *PluginPrivate, and pull out
the actual IPlugin related pieces into new *Plugin classes.

Shift the construction of the PluginPrivate to initialize(),
following the general pattern.

I tried to keep the patch as mechanical as possible, giving
room to some obvious but less mechanical cleanup needs,
that are intentionally left out of this here.

Change-Id: Iac662bf73338f9f7669064ed67b960246875c23c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 09:47:28 +00:00
Andre Hartmann
da6972e0a9 Git: Update current branch after some operations
... to refresh the branch view upstream status.

No need for a full model update here, only the current
branch is influenced.

Change-Id: I6bd17a841988b36221e5015a5858071d33a7b5e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 11:51:45 +00:00
Andre Hartmann
d29650b3ea Git: Remove unneded indirection from branch view
Change-Id: I273889ffe921a0312d9220aa0e3b339de764def8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 11:48:00 +00:00
Andre Hartmann
00e04d5022 Git: Allow removing stale remote branches
... from the Branch View context menu on a
specific remote.

Change-Id: Ic7772abe32795a5d11bd4cae989f8d66cc4322e0
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-19 07:43:49 +00:00
Orgad Shaneh
a1ba347fa5 Git: Fix popping of branch-stash after checkout
Checking out a branch that has a saved stash, when
Pop branch stash is checked, is broken since checkout
became asynchronous.

We must wait for checkout to complete before popping
the branch stash.

Change-Id: Ia4d43649e742ced0121ffe106986b4d6ed1e7b38
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-07-01 19:57:02 +00:00
Orgad Shaneh
a33386e014 Git: Support different reset types in branches view
Change-Id: Idce57062cbb92edd4c26647aabef040ec92b9f3c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-04-06 17:58:58 +00:00
Andre Hartmann
0161729c23 Git: Add tags from log window
Fixes: QTCREATORBUG-22202
Change-Id: Id6cbaf036d25fe5e9e8fcf2fe4d131649746e128
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-04-03 19:44:11 +00:00
Andre Hartmann
e77729a05a Git: Allow direct checkout in add branch dialog
Avoid one modal message box by adding a checkbox in the
dialog. In case the user misses to check the box, the
branch can still be checked out later with the context
menu action "checkout".

Change-Id: I51262e694aad9f55511beefa0d8d23ea66429664
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-11-26 11:20:06 +00:00
Eike Ziller
3d1d9aae2e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/winrt/winrtdevicefactory.cpp

Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
2018-11-19 10:00:18 +01:00
Orgad Shaneh
e38c8724e4 Git: Fix checking out a branch after adding it
Fallout from a9ac438ad8.

Change-Id: I07b36dd1bc5e9fb63f7d4552d9cb6ccd7ea2e22d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-15 09:46:07 +00:00
Orgad Shaneh
92431932e3 Git: Show detached HEAD in branches view when applicable
Fixes: QTCREATORBUG-21311
Change-Id: Ia4297d23a965d83ea2814bd1e41f35a3017b8e9b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-12 09:48:25 +00:00
Eike Ziller
1473bc5891 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp
	src/plugins/qbsprojectmanager/qbsbuildstep.cpp
	src/plugins/winrt/winrtdevicefactory.cpp
	tests/unit/unittest/gtest-creator-printing.cpp
	tests/unit/unittest/gtest-creator-printing.h
	tests/unit/unittest/unittest.pro

Change-Id: Ie9b80b87a8a4fa81baf72a2daa7919b21371c15e
2018-11-06 09:20:00 +01:00
Orgad Shaneh
7d888d58fc Git: Add accelerators to branches context-menu
Change-Id: Ife79519fbd5b006838b09a3d45bd44461aec8d59
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-11-05 19:55:11 +00:00
Orgad Shaneh
a82dd10518 Git: Enable renaming local branches by direct editing
Change-Id: I7edab94d949a6e48642f280af52fd156c803cafb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-11-04 20:37:44 +00:00
Andre Hartmann
44205a961e Git: Add push to branch view
Allows pushing the selected local branch to any remote branch.

Change-Id: I6fb9ee8e1659070c1c759fe64b713fb2235c8816
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-28 17:33:30 +00:00
Orgad Shaneh
8278b4a24d Git: Remove wrong soft assertion
There is no restriction of renaming the current branch.

Change-Id: I51f3f8d69d1fb108a23a9e9f98364361828531d3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-28 11:51:52 +00:00
Orgad Shaneh
ce15a0f447 Git: Fix detection of current selected index
Comparing the row is not enough. Row is relative to the parent, so the
second row in locals was wrongfully considered identical to the second row
in a remote.

This amends commit 299c777c01.

Change-Id: I4c5e43e3107a1f01bbed7abf9b7e2a2d3feb4feb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-28 11:51:33 +00:00
Orgad Shaneh
a9ac438ad8 Git: Add quick filter for branches panel
Change-Id: Idef4ab2db69f24bb004c00fa010b814fdaa7d56d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-18 12:26:26 +00:00
Andre Hartmann
4e0f14b8a5 BranchView: Add ellipsis to rename and remove action
Both open a new dialog to perform the action.

Change-Id: Ie93b99b1ff64927de24de49cd5e30ee729d749b2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-18 08:16:23 +00:00
Andre Hartmann
299c777c01 Git: Fix context menu actions in BranchViews second column
m_branchView->indexAt(point) returned another model index
[column 1] than m_model->currentBranch() [column 0], if the
context menu was requested in thesecond (date/time) column.

The failed comparison then gave a lot of invalid actions
(like merge) for the current branch.

Change-Id: Icefc084c81f9b573cd151460db793d3c5a01eb2b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-13 16:36:14 +00:00
Andre Hartmann
81a4c1d934 Git: Simplify conditions in BranchView
index.isValid() is already checked in line 165,
so it does not need to be checked afterwards
because it is always true there.

isLeaf is only used once, so join the assignment.

Change-Id: I5f21486fd440b82d8e99be1248adf023da664c1e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-13 16:34:22 +00:00
Andre Hartmann
546956a302 Git: Allow creating a new repository from branch view
... when clicking "Add Branch" in a project that is not
under git version control.

The "Add Branch" serves no purpose here, so re-use it
to call this (already existing) function.

Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: Ib23d2cbeec0598e0b6f00cbde265793cc25e6142
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 05:37:09 +00:00
Andre Hartmann
017f4d7c4d Git: Add shortcut to "manage remotes" to branch view
Change-Id: I36d9196a41869176f8ad602f1ba406402fc5b77c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 05:36:53 +00:00
Nikolai Kosjar
8b93eee3b1 Git: Double click on branch shows log
...instead of allowing to rename inline. Renaming can still be done with
the context menu.

Inspecting the log is a more common operation.

Change-Id: Idb3fb8fe01b6a5ae57a2eba09b27a36f677e566a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-27 14:15:40 +00:00
Andre Hartmann
260750cc24 Git: Disable branch view if no git repository found
Also provide a proper label like the old branch dialog did.

Change-Id: I78490f66ccbc6bbc58117ea86030d7c1450f8329
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-20 04:42:32 +00:00
Andre Hartmann
8c8f166535 Git: Add fetch to branch view
Allow fetching from a single or from all remotes.

Change-Id: I2e0e69a092c3a8bb58f65af877c9af8bb59c92d9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-15 19:05:23 +00:00
Andre Hartmann
758f9cfef7 Git: remove superfluous curly braces in branch view
Change-Id: I649c8835d5a4eb30d1f77cfd3e9da33fe017ec9f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-15 17:31:00 +00:00
Andre Hartmann
673d22b8e3 Git: Improve branch view reload icon
Change-Id: Iaef65946130ab35f4c9b25deabc5b8829975c8cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-15 17:29:15 +00:00
Andre Hartmann
bb6851632a Git: Inline BranchUtils in BranchView
It is the only user now, after the branch dialog was removed.

Change-Id: I3aa8409efeb52427cdc13799146c4aa87273b169
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-12 19:49:51 +00:00
Andre Hartmann
e543ef5eb1 Git: Replace branch dialog with branches side panel
This allows all kind of typical Git workflow (rebasing,
merging, cherry-picking) without having the branches dialog
on top of all windows.

Task-number: QTCREATORBUG-19618
Change-Id: Iab078d79a589ff60fa8385c98ec2a23b352c084c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-12 18:24:52 +00:00