Commit Graph

1228 Commits

Author SHA1 Message Date
Tobias Hunger
db72d6f5f6 Git: Initialize some member variables in constructor
Detected by CppCheck

Change-Id: I4dfafc75349a6f14e050cbf405f0b2dc9fce5cef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-08-04 14:50:01 +02:00
hjk
d7c2b0b681 TextEditor: Consolidate document access functions.
There was document(), textDocument() and baseTextDocument().
Two should be enough...

Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-08-04 10:43:56 +02:00
hjk
3e830a781f Git: Simplify action callback handling
Change-Id: I5fbf0c3c89ee66b8d4339ee9100f63b53aae41f4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-07-29 15:55:32 +02:00
hjk
ae844bdf9e Git: Simplify code for action generation
Instead of returning (Action, Command) pairs for further modification,
pass in everything to setup the Command, and return only the Action.

Change-Id: I85695f2f35a9b9a1f34b00db7de5135909045e05
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-07-29 09:41:05 +02:00
hjk
4ddcb7505d Git: De-noise gitplugin.cpp
Following suit.

Change-Id: I88c1164136e76451c56a21915ed087f4d5ebe594
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-07-29 08:51:29 +02:00
hjk
49b5502a18 GitEditor: Rename GitEditor into GitEditorWidget
This makes it consistent with the BaseText terminonlogy

Change-Id: I4073169a19eaa75df7a29f96d74a85ab96bc352d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-28 10:38:19 +02:00
Alessandro Portale
17ce7d4ad5 Replace set[Plain]Text(QString()) with clear()
...where applicable. Shorter, faster, more semantic.

Change-Id: Ifb1cf200f489f62a79e12c761e98a846992744dc
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-23 10:57:49 +02:00
hjk
c1a741022f Git: Remove unused declarations
Change-Id: I733aa001a721376ad69c0ae492290e37c71b6f84
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-23 07:12:41 +02:00
Eike Ziller
0374a9782e Merge remote-tracking branch 'origin/3.2' into HEAD
Change-Id: I257bb9310bb3bde493aff4cd43091ec63fcb5203
2014-07-22 16:11:40 +02:00
Orgad Shaneh
933fd51225 Git: Fix soft assertion on Abort Rebase
When a rebase was initialized in a previous session or by
command-line.

Change-Id: I1a185f1bf1a9caeeba0d8358debc855cbd926d48
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-22 07:51:58 +02:00
Eike Ziller
c571ecbd51 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/plugins/git/changeselectiondialog.cpp
	src/plugins/git/changeselectiondialog.h
	src/plugins/git/gerrit/gerritplugin.cpp
	src/plugins/git/gitclient.cpp
	src/plugins/git/gitclient.h
	src/plugins/git/gitsettings.cpp
	src/plugins/git/gitsettings.h
	src/plugins/git/mergetool.cpp

Change-Id: Icd1b2741da96395ed1b41903f453049a303e4791
2014-07-18 14:04:51 +02:00
Orgad Shaneh
febdfeb92f Git: Rename gitBinaryPath => gitExecutable
Avoid confusion with gitBinDirectory

Change-Id: I335cf6bc82284e02e0652b057f0b80f292d6ddc0
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-18 11:19:54 +02:00
Leena Miettinen
7eeaa6851f Git: replace "Url" with "URL" in UI text
Change-Id: I6cf721e84b33183c97c9db8f98842a461af2f0d1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-17 18:00:38 +02:00
Eike Ziller
bc823443ea Fix broken merge
Change-Id: I21822285d2213a24ea80bb4a03c75a2cee5d4a9c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-07-17 12:55:01 +02:00
Eike Ziller
e7ea94b688 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/plugins/git/gerrit/gerritparameters.cpp
	src/plugins/git/gerrit/gerritplugin.h
	src/plugins/git/gitclient.cpp

Change-Id: Ie7719cfe45489b72d64260e729dcce3760f33bec
2014-07-17 12:42:04 +02:00
Orgad Shaneh
71b56d2b9c Some QString -> FileName transformation
Change-Id: I4a8a8f68bb1e52750380218793ec3029b488c01f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-07-16 12:44:01 +02:00
Orgad Shaneh
c5d34eb6b3 Git: Use Git bin directory as an additional path
Change-Id: I4738a4aec3b1b83b6d596497842086aeb1278f27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-16 12:43:36 +02:00
Orgad Shaneh
54db877297 Git: Factor out resolving of bin directory on Windows
Change-Id: Ifbafa0f5cb8329faedfd1da3674b87e46001acc3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-16 12:43:32 +02:00
Andre Hartmann
f6bfd75320 Git: Fix suggested directory for clone
For:
* remote paths with port number
* local repositories

Task-number: QTCREATORBUG-12651
Change-Id: I7fef5c78499291047781ab48a7fef31d52613198
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-16 12:00:15 +02:00
Orgad Shaneh
616ea2e5bb Git: Fix opening repository log when commit editor is open
Opening a commit editor inside a submodule then executing
Local Repository Log opens the log for the supermodule.

Change-Id: I264925e0f23e2372a09a28e788174a747f5870a8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-15 10:42:29 +02:00
Andre Hartmann
c30856e657 Git: Add auto tests for CloneWizardPage
Change-Id: I6b186731eba56a70ce799f17fdf538bb674a5439
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-13 20:15:31 +02:00
jkobus
5ebd59d12b Rename some methods and variables in DiffEditor
Change-Id: Ic6db2882c9468b9451a785e4657e4255b40fca4c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-07 10:34:17 +02:00
jkobus
91e4271069 Hide reload button for diff editor when there is no reloader
Refactor code a bit. Now DiffEditorController has a pointer
to DiffEditorReloader.

Change-Id: I224579127f112923bc665cd59717b0c4d833981b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-07-07 10:34:11 +02:00
Orgad Shaneh
0544f9dd05 Git: Replace findRepository with VcsManager::findTopLevel
Take advantage of its cache

Change-Id: Ibf3b3b59821a92cd4475c6f8d6dd8212983d5c96
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-03 11:04:49 +02:00
Orgad Shaneh
a0c7b208cc Git: Factor source directory resolving to a function
Change-Id: Ica2f6ad01052fb7130397740fcf2396de7cbbf9d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-03 10:46:39 +02:00
Orgad Shaneh
7ba734162c Git: De-noise GitClient
Change-Id: I9b001bd47af826a3c4611071ca0b3a0674079b01
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-07-03 10:21:10 +02:00
Orgad Shaneh
44f9e3678c Git: Fix double-clicking a diff chunk in Show invoked from Blame
Change-Id: I31ba36245b8b62b9d1e3c4a9125dec5ce6610766
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-03 10:15:30 +02:00
Christian Kandeler
93304df038 Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.

Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-01 11:52:08 +02:00
Orgad Shaneh
398872bcdc Git: Fix showing commits from rebase-todo editor
We used to need the repository root in order to resolve the file.

This is no longer needed, since the raw patch is parsed instead.

Change-Id: Ifdbbcd686a5ef7bbbd472f37b20190b9e9abebe7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-30 11:19:33 +02:00
Orgad Shaneh
f3106ebafe Git: Use a separate thread for updating commit data
Task-number: QTCREATORBUG-12449
Change-Id: I3057ca458272daac72c54abce1d6f9acf6a5d4af
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-24 12:00:22 +02:00
Orgad Shaneh
aaa7cd5851 Git: Fix sha1 resolving when a branch is added from detached HEAD
Change-Id: I0d8ad988411256fc284b84f78be6f54362ab19ea
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-24 11:25:10 +02:00
Orgad Shaneh
c297510d93 Git: Remove diff editor
Not used anymore

Change-Id: Ie1c79583938e24c3bad8acad7acc2f0574234450
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-24 11:20:59 +02:00
Orgad Shaneh
d6583f0f47 Git: Add on-demand branches expanding
Make "branches expanding" on demand and asynchronous.
After "git show" there is clickable text: "Branches: <Expand>" in
description. If user clicks this text then branches for commit is
triggered and done asynchronously.

Task-number: QTCREATORBUG-11293
Done-with: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Change-Id: I772cfef823d3f95e2b3060dfb5973157d81fc11a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-24 11:19:28 +02:00
Orgad Shaneh
a6d8bbbb14 VCS: Discard commit if submit widget is disabled
Change-Id: I8f11f56565f46919e93a30f754465de3bc44437e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-23 15:29:55 +02:00
Friedemann Kleint
3c13f9484f Gerrit: Display dependent changes as tree.
Add a depth member to GerritChange indicating the tree depth
and populate it by searches over the dependent changes.
Display the root changes sorted by date and add dependent changes
to their deph=1 parent, avoiding deeply nested items.

Change-Id: I66ccf392ce47514841c661820797e81996e9e5cc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-06-23 13:58:14 +02:00
Orgad Shaneh
49b0b5d3eb Gerrit: Use magic branch options to specify reviewers
Enables specifying reviewers over http[s].

Supported since gerrit 2.6 (specifying reviewers will be broken for
earlier versions).

Prepare for supporting other options (draft, publish, topic...)

Change-Id: Id0b6508409123cddb9dec5ea9e78d7a6a1423057
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-23 13:55:12 +02:00
Alessandro Portale
8173961e05 Git: Remotedialog, replace QTableView with QTreeView
QTreeView is a better list view with columns than QTableView.
One special reason for this change is that QTreeView
finds a proper default row height regardless of the system
DPI.

Change-Id: I3342e2295a3782b480ea811bfe335e3a77482891
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-06-20 15:41:07 +02:00
Friedemann Kleint
bb4031dccf Gerrit: Refactor preparing the introduction of a hierarchical model.
Change model and dialog methods to use QModelIndex and remove
obsolete methods. Split out method to populate a list of standard items
from a change. Change GerritModel::itemForId() to recurse
over the tree.

Change-Id: I9393f498ffbdf63ba3ad78146d041bcda3835527
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-06-20 15:24:53 +02:00
Friedemann Kleint
ded93b43d2 Gerrit: Read out dependency information.
Pass on the command line argument --dependencies to the client,
read out dependent/needed by changes and display them in the
detailed text view. Move the toHtml() method from GerritChange to
GerritModel to be able to display titles of dependent changes.

Change-Id: I1d0b67a995d45a9fe5b7bdb3ff51cc905d58478f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-19 15:11:24 +02:00
Nikita Baryshnikov
12103e0f67 Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-19 14:00:32 +02:00
Alessandro Portale
fe08cb8902 Centralize error/warning/info icons
There are multiple copies of these pngs in different plugins.
Let's have one version in core, also as @2x variant.

Change-Id: Iedff1a6190a72c1947dd202ae1ee46f59f9fb13c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-06-17 22:45:09 +02:00
Tobias Hunger
836e17a57c Revert "VCS: Open diff/blame editors in other split"
This change has lead to complaints about diff views opening
in apparently random places for users with several splits.

This reverts commit 02b3a79c5f.

Conflicts:
	src/plugins/diffeditor/diffeditorplugin.cpp
	src/plugins/subversion/subversionplugin.cpp

Change-Id: I2eab8ff2d88a9e12f4dc7ec3a9ca65455daf15e2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-06-17 15:40:40 +02:00
Orgad Shaneh
4df7656394 Git: Preserve author on cherry-pick
Change-Id: Ib3184631145ed6c6eb72dd5b7c33e415fc0cc799
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-12 13:26:30 +02:00
Orgad Shaneh
e0196e38e2 Git: Replace string literal with constant
Change-Id: I457d69f1eac9810e2746d9f544151e421c147fac
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-12 13:24:00 +02:00
jkobus
8cad94534f Implement unified diff editor
Change-Id: I93e0bfd71a8a650afbe2ca9e0f1f3dbfc9d57db0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-06-06 12:33:59 +02:00
Alessandro Portale
c3cb944eec Git: Native separators in GitClient::StashInfo::stashPrompt
Change-Id: I5090d8eb8f5e262785735ced81a12b9473721204
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-06-03 14:58:38 +02:00
Orgad Shaneh
b79449bedd Git: Fix mergetool prompt replies
Task-number: QTCREATORBUG-12335
Change-Id: I68c36412f517072f551102b53cac2eeeff22f1e6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-03 12:03:43 +02:00
Eike Ziller
7c34567cb2 Merge remote-tracking branch 'origin/3.1' 2014-05-28 11:03:18 +02:00
Tobias Hunger
7e47a8a453 Cleanup: Remove searchKeywords from optionspage widgets
If no specialization is provided then the UI strings are searched.

So get rid of extra code collecting all those strings in a lot of
places.

Change-Id: Ibcb48a67e5c7b74e5960fe38b1cb2f74259b503a
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-05-26 15:24:24 +02:00
Orgad Shaneh
a3da1dfce5 Git: Fix handling of Enter key on LogChangeDialog
Broken in 7e59415f

Change-Id: Ibbcd784965d101207ef873b1ba4d6d45e865c8b9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-05-26 15:23:47 +02:00