Commit Graph

73 Commits

Author SHA1 Message Date
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