aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vcsbase
Commit message (Collapse)AuthorAgeFilesLines
* Core/Utils: Migrate further to Utils::Idhjk2020-07-068-15/+14
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Even more Qt6 portinghjk2020-06-231-0/+4
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Ib6ef0e521483153c9716c9a1870072e836d6b026 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Drop use of Qt::DefaultLocaleShortDatehjk2020-06-221-1/+2
| | | | | | | | Gone in Qt 6. Task-number: QTCREATORBUG-24098 Change-Id: Ie9fe1858406133fed6987de0e0a38fe86de15caf Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* VCS: Pass links to the correct VCSOrgad Shaneh2020-06-214-14/+27
| | | | | | | | | | | | | | Current implementation requires each VCS to connect to the referenceClicked signal. Only Git does it, but this is conceptually wrong. If other VCSs would connect to the same signal, all of them will act upon clicking a link, which can result in multiple editors, most of them are likely to be invalid anyway. By default executes vcsDescribe. Can be extended or modified by subclasses. Change-Id: Ib953009efd77446a4b2963f0aa8a2f3f3d26509f Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* OutputWindow: Do not activate links for empty referenceOrgad Shaneh2020-06-181-2/+6
| | | | | | Change-Id: I1d4fc0f25f1882a34058c66c51376982cc70238e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move Id from Core to UtilsEike Ziller2020-06-182-3/+2
| | | | | | | | | | | | | | | | And add a compatibility wrapper for Core::Id, so we don't have to rename all occurrences from Core::Id to Utils::Id. This allows us to use Id also in Utils, which makes it possible to e.g. move Core::InfoBar to Utils without work arounds. Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* All: Use Utils::SkipEmptyPartshjk2020-06-171-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ExtensionSystem: Remove PluginSpec::isHiddenByDefaulthjk2020-06-161-1/+0
| | | | | | | Not used anymore. Change-Id: Ic73ba3024b9e6157ff044cb23450fc9dad3c4c02 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-022-2/+2
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* Git: Fix filling commit selection combobox for logAndre Hartmann2020-05-164-5/+23
| | | | | | | | | | | | | | Broken by commit cbb70513bfa935, which changed the format for the normal log to override the highlighter. We still need the hightlighter for the log with diff. Therefore, a separation between highlighting and parsing the log is needed to populate the combobox for commit selection again. Change-Id: I902ce548fc25875f2cd67b165283ff1236329afa Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsOutputWindow: Modernize password obfuscationAndre Hartmann2020-05-161-14/+4
| | | | | | | | | Use QRegularExpression and the QString::replace() function with capturing groups to replace the existing loop. Change-Id: Ia9c0587dcdae40cff2b09379ac3ba84db4d30ce8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsBaseEditor: Reduce scope of local variableAndre Hartmann2020-05-161-2/+1
| | | | | | | As suggested by cppcheck. While at it, make it const. Change-Id: I7800291545f8f14f4d939152d9a184da6eadc1f5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsOutputWindow: Fix creating links from command outputAndre Hartmann2020-05-151-2/+2
| | | | | | | | | | | | | | | | | | After the refactoring of the output parsers in 1c6e4fbd3211bc180, NormalMessageFormat and ErrorMessageFormat are no longer parsed. To allow parsing and therefore generating links, the command output has to be declared as stdout or stderr, depending on the severity. Our own log and command messages are now (in contrast to Creator 4.12) no longer parsed for commit hashes and links, but this is acceptable. Parsing the command output is often more interesting. Change-Id: I7e7a96f4ff98edd88f5d9b8abddf94363768c0a6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* VcsBaseEditor: Make link colors theme-awareAndre Hartmann2020-05-121-2/+3
| | | | | Change-Id: I5323e0cd236276a5a74e7c55f81d9d9c9795d295 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge output formatters and output parsersChristian Kandeler2020-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Now only one piece of code needs to be written to both linkify output in an output pane and create tasks for it in the issues pane. The calling sites are also simplified. For instance, until now, build steps had to feed their output parsers manually and then push the created tasks up the signal stack in parallel with the actual output, which the build manager relied upon for cross-linking the output pane content. Afterwards, the output would get forwarded to the formatter (and parsed for ANSI escape codes a second time). In contrast, a build step now just forwards the process output, and task parsing as well as output formatting is done centrally further up the stack. Concrete user-visible improvements so far: - File paths in compiler/linker messages are clickable links now. - QtTest applications now create clickable links also when run as part of a build step, not just in the app output pane. Task-number: QTCREATORBUG-22665 Change-Id: Ic9fb95b2d97f2520ab3ec653315e9219466ec08d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Vcs: Fix output paneChristian Kandeler2020-04-171-5/+3
| | | | | | | Amends c0c2df203d. Change-Id: I77d022f2b3a4d3cab4713d9cbd2bc66102ee58a3 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* OutputFormatter: Take ownership of the line parsersChristian Kandeler2020-04-151-3/+4
| | | | | | | | For symmetry with IOutputParser. Task-number: QTCREATORBUG-22665 Change-Id: I92e93b32e87ff4f3fa163a2d2fe13768e56bfa24 Reviewed-by: hjk <hjk@qt.io>
* Utils: Split up OutputFormatter classChristian Kandeler2020-04-143-28/+21
| | | | | | | | | | | | | | | An OutputFormatter takes some string and prints it into a text edit. In addition, it can ask any number of registered OutputLineParsers whether they think any special formatting should be applied to the current line. This mechanism is now properly modeled by our class design, rather than being hidden in a monolithic class where everything had the same type, no matter what its purpose was. Prospective contributors can now simply be pointed to the OutputLineParser class and will see at one glance what they have to do. Change-Id: I9844499f062c94fb038ce73fd6f26576910148c2 Reviewed-by: hjk <hjk@qt.io>
* OutputFormatter: Do all formatting centrallyChristian Kandeler2020-04-142-16/+9
| | | | | | | | | | | | | | | Instead of working directly on the text edit, the specialized OutputFormatter classes now simply ask the base class to do it for them. In practice, the request currently always is "turn this part of the text into a link", but the interface can be extended to other types of formatting, should that ever be required. This is a win/win situation: Derived classes no longer have to fiddle with QTextCursor & friends (nor do they have to call any base class functions), while the base class can make strong assumptions about what the derived class does to the text edit (i.e.: nothing). Change-Id: Icc4bc52d4001b0359247563e39a206fa274833d7 Reviewed-by: hjk <hjk@qt.io>
* Utils: Replace FileChooser::path() by filePath().toString()hjk2020-04-091-4/+4
| | | | | | | | | | | Keep the old method for now to ease downstream porting. The change is kept mechanical, there's a lot of cleanup possible now on the user code side. Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-04-071-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/android/androidmanifesteditorwidget.cpp Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
| * VcsOutputFormatter: Allow ranges with three dots alsoAndre Hartmann2020-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | This can, for example happen after a forced push to Gitlab. The VCS output looks like this in that case: + 7c145ae...c301cc6 master -> master (forced update) Change-Id: I84bec1a6cf2bf875732461f767ebbf4703cdbadb Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-231-1/+2
|\| | | | | | | Change-Id: Ic741fdedc168430e5be6cb1645d9329dbc7a6b08
| * VCS: Capture more hashes with suffixesAndre Hartmann2020-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | Recognize multiple trailing carets and tilde/number combinations too. Amends 098ee51a9b9dd Change-Id: I91ea33f7e2dae61f18c2899c949034ebedca0157 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Remove the limitation that output formatters have to be exclusiveChristian Kandeler2020-03-203-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | Introduce an aggregating output formatter that forwards its input to a sub-formatter that feels responsible for it, or otherwise lets the base class handle it. Our output panes now use such an aggregating formatter. In particular, this means that in the future, we won't have to stuff all run control output formatting into the Qt output formatter anymore. Change-Id: I5498f200a61db10ccff3ec8974c6825da7f7072d Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-201-1/+1
|\| | | | | | | Change-Id: Ia8254720b2ba6e3e7b859017e1c2b6e289bed771
| * VCS: Capture hashes with trailing caretAndre Hartmann2020-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Push-to-Gerrit dialog calls git branch -r --contains 3fa72ff^ for example. Change-Id: I6c0bd792dd5bf85dec61fa576fbd8bba3aa9f06d Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Move some code from OutputWindow to OutputFormatterChristian Kandeler2020-03-173-8/+5
| | | | | | | | | | | | | | | | That's where it belongs: The logic there is applicable to all output formatters, not just those used via an output window. Change-Id: Idf4ca8d22631ca96feb97553f28724c0275e0bf8 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-047-44/+51
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/cmakeprojectmanager/tealeafreader.cpp src/plugins/cmakeprojectmanager/tealeafreader.h src/plugins/projectexplorer/miniprojecttargetselector.cpp Change-Id: I88d85be3903f57a55fddb7901e771a4822db1b85
| * SubmitEditorWidget: Inline two small functionsAndre Hartmann2020-02-292-14/+2
| | | | | | | | | | Change-Id: Ia9b2c451a587d418ccf39707c25d8aff062f6ed8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| * Git: Add actions for changes in output window context menuOrgad Shaneh2020-02-283-4/+35
| | | | | | | | | | | | Change-Id: I5aa46f87b82670286ac225d71a3a045133976e86 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VcsBaseEditor: Fix tr context for Copy actionOrgad Shaneh2020-02-281-1/+1
| | | | | | | | | | | | | | This amends commit 7677e3e197368bd206dc565368cb3f33d951d092. Change-Id: Ib07dc2a8110a8e09f43c035989d9ffa84e0427d3 Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VcsBaseEditor: Highlight default actions on context menuOrgad Shaneh2020-02-281-5/+6
| | | | | | | | | | Change-Id: Idc493658dbc829394bd2898a59ba5686036bc3fe Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VcsBaseEditor: Remove default actions when right-clicking a referenceOrgad Shaneh2020-02-281-2/+6
| | | | | | | | | | | | Change-Id: I2e8abd4487756be2535934ca8ab4d6b9105e6088 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VcsBaseEditor: Remove unused functionsOrgad Shaneh2020-02-282-19/+2
| | | | | | | | | | | | Change-Id: Ida1df50aee0c146d8070e62292163d34cd53f65a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-02-271-0/+1
|\| | | | | | | Change-Id: I4523ea36332772a310fd462df55683c93c61bb18
| * VCS: Set repository for VcsCommandOrgad Shaneh2020-02-261-0/+1
| | | | | | | | | | | | | | Makes file names right-clickable. Change-Id: I96ba21e73d54819148f13fcb033a144146b00418 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-02-267-42/+91
|\| | | | | | | Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
| * Globally disable WindowContextHelpButtonHintKai Koehne2020-02-252-2/+0
| | | | | | | | | | | | | | | | | | | | | | Do set the global application flag AA_DisableWindowContextHelpButton to avoid having to unset the default WindowContextHelpButtonHint in every single dialog. AA_DisableWindowContextHelpButton was added in Qt 5.10. Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * VCS: Fix broken annotation changes detectionOrgad Shaneh2020-02-241-1/+1
| | | | | | | | | | | | | | isValid() is true for empty regexp... Change-Id: I0af92574181736d5dde2ca48d3a8ab75ff6f14dc Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VCS: Replace QRegExp with QRegularExpression in VcsBaseEditorOrgad Shaneh2020-02-214-45/+54
| | | | | | | | | | | | Change-Id: I8e8a6649e441597e29e88506d494ec69260bebd1 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * VCS: Refactor annotationChanges() in VcsBaseEditorOrgad Shaneh2020-02-202-1/+42
| | | | | | | | | | | | | | Devirtualize the function, and use QRegularExpression with globalMatch. Change-Id: I18c92cb37b535c616f03f45dff8b18249c961d5d Reviewed-by: hjk <hjk@qt.io>
| * VCS: Fix connect failureOrgad Shaneh2020-02-201-0/+1
| | | | | | | | | | | | | | QObject::connect(Git::Internal::GitSubmitEditorWidget, Git::Internal::GitSubmitEditor): invalid null parameter Change-Id: Iaf9a46d9922c7d4e124b94146d85bc5374a2195c Reviewed-by: hjk <hjk@qt.io>
* | VcsBase: Don't use QObject inheritance in VcsEditorFactoryhjk2020-02-242-3/+0
|/ | | | | | | | The only remaining use is a setProperty that's never read back anymore after 9c96a1c4d. Change-Id: I2c49b044bb97a123e72070df5e83909c53e40881 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsOutputFormatter: Fix multiple regexp matchesAndre Hartmann2020-02-182-24/+16
| | | | | | | Fixes: QTCREATORBUG-23614 Change-Id: I86e548a1f727113782afbc6b934d6dddc92c92ea Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Add grep and pickaxe filtersOrgad Shaneh2020-02-171-4/+5
| | | | | | | Fixes: QTCREATORBUG-22512 Change-Id: I98eed9a7f9da15e163804a0fd81713149a06c5b0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Allow clicking references in VcsOutputWindowAndre Hartmann2020-02-164-8/+39
| | | | | | Fixes: QTCREATORBUG-16477 Change-Id: If1f36bec0826a3116e5261a270cd63a1536e13f5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Vcs: Remove unneeded VcsBaseClient::StatusItem ctor implementationhjk2020-02-132-5/+0
| | | | | Change-Id: Idab6f76e86b9ea50b345547017640253a9183126 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/master' into 4.12Eike Ziller2020-02-132-19/+21
|\ | | | | | | Change-Id: I60aa7c97c13144d3c31989244517c21a72202ab9
| * Vcs: Remove some indirection in BaseVcsSubmitEditorFactoryhjk2020-02-132-19/+21
| | | | | | | | | | Change-Id: I6ddc818412c9104a06495e2dd8f245de1132e7c2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>