That is, make SearchResultItem the one data type for adding search
results.
This will allow us to add additional properties to search results
without adding more and more parameters to a bunch of functions.
Change-Id: Ic2740477ae47449cee75caa2525727fe2b460f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
On many cases, GitPlugin is not required at all, and is only used as
a proxy for GitClient.
Change-Id: I246012658ab3e8c7a12f1a459b1b1748ff358e0b
Reviewed-by: hjk <hjk@qt.io>
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>
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>
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.
Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
If the line has multiple occurrences of the search pattern, all occurrences
got the same capture groups.
For example, text:
Foo(1); Foo(2);
Search for Foo\((.)\) and replace with \1, the result was:
1; 1
Change-Id: Idd4dc21397d5331b1e31a2860eca39d9bc407437
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Use auto
* Use override
* Use some member initializers
Change-Id: I3ca000d1c8e4d02331d58b85e68e4d771c636b29
Reviewed-by: André Hartmann <aha_1980@gmx.de>
All files with full file path matching one of the exclusion patterns are
ignored in the search.
Searching with "git grep" now requires git >= 1.9
Change-Id: Ied5d11499bc1ff21247e50f8e146e8e5011dd2c1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This fixes searching for patterns that start with dash.
Change-Id: I824f64151842008a034757de6a00fd8a6cc46d72
Reviewed-by: André Hartmann <aha_1980@gmx.de>
In this way we minimize the chance of
generating non-unique id.
Change-Id: Idd177c5a4b44b17a58c2a944ec77b9517e91964e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
IFindFilter: Separate enabledChanged and validChanged
SearchEngine: Add enabledChanged
GitGrep: Enable widget based on enabled state
FindInFiles: Update validity on search engine enabledChanged instead of
hardcoding it to when the search path changed
Change-Id: I0c684423b871a3a4f1f164574f42e23b64cf9da0
Reviewed-by: David Schulz <david.schulz@qt.io>
We need multi line support, multi text range support. This is only adding
enablers and adds later the multi line and multi text support because this
triggers larger changes because you have to know the text document.
Change-Id: I44e46d9d80d7d73b2650c69cc83657c20c85bfae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This change adds a possibility to add more than
one external tool which can be used instead of internal finder.
Currently there is one extension: 'gitgrep'.
By default we use internal finder.
Change-Id: If644358552f3cea9ebda8308539322a1b6d3ab77
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>
Make sure we pass --no-full-name to counter the grep.fullname=true
option that the user may have set. Otherwise, Creator will complain that
it can't find the files that matched the search terms if the search
directory was not the root of the Git repository.
Change-Id: I149e0540c00745fe8119fffd14628a3d7887e55e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
* 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>
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>
* 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>
* Logs the command in the Version Control pane
* Simplifies the client code
Change-Id: I398d57ab12ed6ba6bab1878934b929083f0bf6cb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
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>