Commit Graph

1494 Commits

Author SHA1 Message Date
Orgad Shaneh
fbffd3abae Git: Reduce grep approximated time to 5 seconds
It typically doesn't take more than that. On Windows it might be more,
but for this we have the slowly increasing progress.

Change-Id: I4cae5ec6d8488f31387a306f841798ca079cdac5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 11:13:18 +00:00
Orgad Shaneh
2d4ea0b623 Git: Shorten grep tree description
Task-number: QTCREATORBUG-15743
Change-Id: I2f18bef84a8284d03d68797d1fb70165df6628d4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-16 07:52:12 +00:00
Orgad Shaneh
ecdc2013cd Git: Fix tree validator in grep
Allow all non-space characters

Change-Id: I6f64392d80aed7ac560f9564d91305074ed0996d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 10:21:13 +00:00
Orgad Shaneh
4cf86a4f85 Git: Inline a signal connection
Change-Id: I973ad0dad22df95fccfaa0ed5190bed696233e8c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 10:20:53 +00:00
Orgad Shaneh
e868357107 VCS: Reslot describe functions
They're used by VcsEditorFactory

Change-Id: I9211f406b389649bf8ff9fe7f24522026b1711d4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-12 12:32:06 +00:00
Orgad Shaneh
ca108a84b9 Git: Show message on fetch success
Change-Id: Ibe9f020d21a0c5eee0ba044b99c62fb181fc173f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-02-11 20:47:24 +00:00
Eike Ziller
d3c23c3330 GitSubmitEditor: Simplify update of files model
Report the commit data fetch result, including success state and error
message, through the QFuture. That also removes the need for creating a
fetcher QObject and the logic to make sure it is deleted.
Also exchange QtConcurrent::run by Utils::runAsync.

Change-Id: I9c0c03eff2eaa32f577b4599ffda58b0c09de59b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-11 07:16:15 +00:00
Tobias Hunger
b4195d5174 Git: Modernize
* 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>
2016-02-10 15:01:57 +00:00
Orgad Shaneh
84f2875f6d Git: Support tree argument for Grep
Change-Id: Ic7dfcd8bad98223d68725f1a0c1f103ad8ea4e0f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 13:10:17 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Orgad Shaneh
b5987a6d49 Git: Require 1.8.0
Remove some workarounds for older versions

Git version in debian stable is 2.1.4, and in Ubuntu 14.04LTS is 1.9.1.

Change-Id: I8d558857a429149222b817401b98e90df10447b6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-09 13:01:47 +00:00
Orgad Shaneh
654aa3a0d7 Git: Use a progress timer for Grep
Change-Id: I579bd9bf9e4060f4620afcbd42ac866d0d19bd37
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-09 09:09:14 +00:00
Orgad Shaneh
d4816850f0 Git: Return QByteArray in synchronousShow
Will be used by Grep

Change-Id: I9346707eef2fe55085b0edf090e117fe45afe8bf
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-08 14:49:06 +00:00
Orgad Shaneh
71166d06d0 Git: Minor cleanup
* Remove unused includes
* Remove QObject qualification
* Use a raw pointer for widget instead of QPointer. It is owned by GitGrep.

Change-Id: I4e2c9878289ed3491bfd7b0565a683bc01e485f3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-08 14:49:02 +00:00
Orgad Shaneh
5db0ef191e Git: Do not report canceled for Grep when no results were found
Change-Id: Ib1916c345bd345ee3dd5179c84bb259c2992303e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-08 08:07:58 +00:00
Orgad Shaneh
36d5bc1e98 Git: Use VcsCommand for Grep
* Logs the command in the Version Control pane
* Simplifies the client code

Change-Id: I398d57ab12ed6ba6bab1878934b929083f0bf6cb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-05 11:55:20 +00:00
Robert Loehning
aa4dd98be8 Git: Always enable "Actions on Commits..."
User can provide a path to the dialog so this can be handy even without
an open project or file.

Change-Id: I1ed96fe56b6ab76ca98f8d81ef60b217e66d0661
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-04 20:54:05 +00:00
Orgad Shaneh
bc9c57756b Git: Use PathChooser for Actions on Commits
Change-Id: Id88648cd35856d2767a0ba7a09e2c9171ba22b34
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2016-02-04 12:57:33 +00:00
Orgad Shaneh
558c08e2c5 Git: Hook grep into Find In File System dialog
Change-Id: I0fc77ad61c8874a21afd5b5135df4d30fa795a8e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-04 11:58:29 +00:00
Orgad Shaneh
1b9b1541d3 Git: Un-slot private slots
Change-Id: If88d7e1b501daf6f0dfc696cb20e5f1eb4aa83fe
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-04 11:29:05 +00:00
Friedemann Kleint
97af238656 Preferably use QStringRef::toInt().
Avoid allocations for converting to int.

Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-04 07:56:58 +00:00
Robert Loehning
fa3a35e346 Git: Make "Create Repository" action local
Change-Id: Id52d145ca6a8120fb28c6a800bfd4ac497e4260d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 16:30:15 +00:00
Orgad Shaneh
6a3e687d14 Git: Fix crash on Grep
If the process is already finished, and cancel is triggered Creator crashes.

For example, search for "q" in qt-creator, wait for >200K popup, then wait a few
seconds for the process to finish and press Cancel.

The reason for the crash is that reportFinished() is called twice - one from
GitGrepRunner::finish() and another one from Utils::runAsyncImpl().

Change-Id: I61d379f5e3a5ae86c9a48a3751dbb2e00203516d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 08:13:58 +00:00
Orgad Shaneh
f26a4c2954 Git: Default to * file pattern in Grep
Change-Id: I5f763b7b2f8c0bc2373bf1151691b3e8b4cff757
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-27 08:19:24 +00:00
Orgad Shaneh
6fee5a88f3 Git: Support Git Grep
Task-number: QTCREATORBUG-3556
Change-Id: Ieca1bdaa39281a2e085340f045e5a48b875f7967
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-25 14:43:00 +00:00
Eike Ziller
a6f5548331 Git/Clean: Fix issues with submodules
- 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>
2016-01-25 12:20:31 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Nikolai Kosjar
05e372c6ea Git: Fix build with Qt 5.4
Change-Id: Ibbbf80eb50aa3226d7f953033edcc7d2458fe237
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-06 12:38:34 +00:00
Orgad Shaneh
70958c4c07 Git: Reduce indirection in submit editor
Change-Id: Ic4e897d5c8ec82dbbffd5bd9fe9af84491c4402f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-06 10:08:34 +00:00
Orgad Shaneh
eb375d734d Git: Do not suggest to continue command when commit editor is active
When executing mergetool from the commit editor it is unlikely that the user
wants to do anything but to commit.

Change-Id: I1302951c4afee554b35a261d60f402b56c077681
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-06 10:06:53 +00:00
Orgad Shaneh
1dc90bcf44 Git: Force update file model when mergetool is done
Flow:
* Open a commit editor with unmerged files
* Double-click an unmerged file
* Resolve the conflicts with the mergetool, save and close it
* The window is activated and the file model is refreshed immediately, before
  the mergetool process has exited.

When the mergetool exits, repositoryChanged is emitted. Use it to refresh the
file model again.

Task-number: QTCREATORBUG-15569
Change-Id: Ibce7301bc46fe3a5a378a4c15b882e1bb6bbf3c3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-06 10:06:22 +00:00
Andre Hartmann
8d336756ee Git: BranchDialog: Remove unneeded copy
Change-Id: Ice31081fa11f73fa1e13287dcd3935c88b207b65
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-04 18:24:25 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Tobias Hunger
7b3aa16dc6 Git: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I60dcd378419b92f96dc681921701c9231ef8ee57
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 14:48:09 +00:00
Tobias Hunger
8f8c1052a2 Git: Simplify action creation methods
* Use a common method to do the basic setup for all the different
  actions.

Change-Id: I92e1d959c45e70c8145b7665dde8827edaf2331d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:32 +00:00
Tobias Hunger
a01a8e7452 Git: Simplify createChangeRelatedRepositoryAction
Change-Id: I0d374b071b73565bb3e48b4a1f32bc7baf988a28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:18 +00:00
Tobias Hunger
dda9380052 Git: Simplify createRepositoryAction usages
Change-Id: I53047333e2591b9e2aca7931a1e809f99baf6f31
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:10 +00:00
Tobias Hunger
6a80b43e30 Git: Get rid of SLOTs for createProjectAction
Change-Id: Iee54656c54255912314ded0fa970e228b7e5d54c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 10:24:26 +00:00
Tobias Hunger
c3fdaa12e1 Git: Get rid of SLOTs for createFileAction
Change-Id: Idcdf20c6c9187103cfb6eb3172b3777f5dbe9876
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 09:47:16 +00:00
Tobias Hunger
6e9e8ebd14 Git: Simplify repository related action creation.
Change-Id: I4928e5424356f27af79999d39b2e2ea5a1440264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 09:05:34 +00:00
Tobias Hunger
a1c2a0fde4 GitPlugin: Remove dead code
Change-Id: I5841bf5a7ae8523874d3a2f15aa7044b41350845
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 09:01:40 +00:00
Eike Ziller
1dc8d0f032 Merge remote-tracking branch 'origin/3.6'
Change-Id: Ibee24c1c80984cdc45e7bcf3e4fbb5f1e6b81454
2015-11-17 09:38:05 +01:00
Orgad Shaneh
f910742979 Gerrit: Initialize all members
dependeOnNumber and neededByNumber were not initialized.

Change-Id: I12b90b842d540ae0e8ac9ff5be1be2ace2473ba8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-16 08:27:41 +00:00
Eike Ziller
d13b22e6bc Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: Ibdf433b54e36e58182b7094f78d47ed3e8c81684
2015-11-12 13:43:17 +01:00
Orgad Shaneh
1fd8760789 Git: Do not use file name when retrieving parent commit
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>
2015-11-11 13:24:06 +00:00
Orgad Shaneh
bd858d9753 Git: Mute commit description fetching on right-click
Change-Id: I7f7b1b1cdc4e557748b4c9781c96be65f57156e3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-11-11 13:22:56 +00:00
Orgad Shaneh
d8d7acbe75 Git: Scroll to active file on Show invoked from file log
Change-Id: I0935bf8b8b30ee78716a14ee0a88c21b9caf62dc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-11-03 08:45:41 +00:00
Eike Ziller
310ae09996 Merge remote-tracking branch 'origin/3.6'
Change-Id: I68512c775ed25b51c8b0abe1818c9c7c5955874c
2015-10-30 16:08:03 +01:00
Orgad Shaneh
78ba92516d Gerrit: Index by number instead of Change-Id
Change-Id is not unique. It can be reused on several branches of the same
project, or across projects.

Change number is unique.

Change-Id: Id68ae63b4d745817a2cac764fdc8ceebdcb3faa4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-30 14:16:35 +00:00
Orgad Shaneh
9a27b73d44 Git: Show success message on rebase --continue
Change-Id: Id9f3bc7fc04831d47e17948891e34bdba768a170
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-10-30 06:57:25 +00:00