summaryrefslogtreecommitdiff
path: root/src/plugins/git/gerrit/gerritserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Translations: Remove header includes of *tr.h in .h filesAlessandro Portale2023-02-081-2/+3
| | | | | | | | | The wrong Tr::tr could be executed by code indirectly including a *tr.h file from another module. To Translate in a header file, use QCoreApplication::tr(). Change-Id: I30e67245991d2c2f0eeb01ab356555bdb9841af0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Translations: Fix stray QApplication::translate() callsAlessandro Portale2023-02-081-4/+2
| | | | | | | | | For references to the module-own context, use Tr::tr(). For references to other modules, use the right context name (with "::" prefix). Change-Id: I6dce8f1ceccb23c44d93f1826402cd3be8e98e5a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* VcsBase: Move RunFlags into separate headerJarek Kobus2022-10-061-2/+2
| | | | | | | | | It is going to be used outside of VcsCommand, too. Use RunFlags enum as an argument to several functions instead of unsigned. Change-Id: I355c80a845a9b5982108fbde3412754392dce702 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* VcsBase: Rename vcsFullySynchronousExec into vcsSynchronousExecJarek Kobus2022-09-021-5/+5
| | | | | | | | Get rid of original vcsSynchronousExec(), as it was calling vcsFullySynchronousExec(). Change-Id: I911dc786d54c34c211d03661c37df9b58d60a20b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/8.0'hjk2022-08-031-1/+1
|\ | | | | | | Change-Id: I1dc664137eeecb7dd69f29af7a08164683d51077
| * Gerrit: Do not pass username to curl for REST requestsOrgad Shaneh2022-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | It is set in .netrc anyway, and there is a regression in curl that causes it to fail when passing the user name. See https://github.com/curl/curl/issues/8653 Change-Id: Ic7aa2d874884db71f71d162486acf4e054eab7e9 Reviewed-by: hjk <hjk@qt.io>
* | Gerrit: Show command and failures in testConnectionOrgad Shaneh2022-08-031-2/+1
| | | | | | | | | | | | | | Can be useful when authentication fails. Change-Id: Ibd3700c4ce9cc76b0d9c4cde32730a4e1906ccd6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Gerrit: Refresh server details also when authenticated is changedOrgad Shaneh2022-08-031-1/+2
| | | | | | | | | | | | | | | | | | For example, if the server was not authenticated, and .netrc was edited outside Qt Creator. Change-Id: Ib28b6e924e3fab958410da49ceb45ed4269e195b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Move ShellCommand into VcsBase pluginJarek Kobus2022-08-011-5/+7
| | | | | | | | | | | | | | | | | | | | Rename it to VcsCommand. Move also ShellCommandPage into VcsBase plugin. Change-Id: I335ac47e3090f2be497643ebcda0eaad2987ac81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | ShellCommand: Introduce CommandResult structureJarek Kobus2022-07-291-15/+14
| | | | | | | | | | | | | | | | | | Don't require QtcProcess instance when calling ShellCommand::runCommand(). Change-Id: Ie0287d91c1807465eab12be7eaa2eac561179af7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Remove Core::ShellCommandJarek Kobus2022-07-111-6/+4
|/ | | | | | | | Move the implementation into VcsCommand. Use Utils::ShellCommand inside coreplugin API. Change-Id: I74a34057b33832a138b05f1dfa6937565027edb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: use cleaned stdout all over the place againDavid Schulz2022-06-171-4/+4
| | | | | | | Amends 5ee880ce5e6998170823e6fc9afb6b6c36c6170a Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1 Reviewed-by: hjk <hjk@qt.io>
* Gerrit: Skip non-Gerrit remotes in Push to Gerrit dialogAndre Hartmann2022-03-281-8/+10
| | | | | | | | | In my case, I have a second remote gitlab which was always selected instead the expected remote gerrit. Change-Id: I7860ea4743dbfa5d1fd4375821474950549e0600 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* QtcProcess: Limit the inclusion of qtcprocess.hJarek Kobus2022-03-021-2/+2
| | | | | | | | | | Move the rest of QtcProcess enums to processenums.h. Move ExitCodeInterpreter into processenums.h. Remove superfluous Utils:: prefix. Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Git: Proliferate FilePath use in GerritModel a bithjk2021-08-171-5/+4
| | | | | | | Plus some code cosmetics. Change-Id: Idc07e881c09cbc7347396ef1bb60cce00539250c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: Introduce a FilePath constructor from char arrayshjk2021-08-171-3/+3
| | | | | | | | | | | | Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for decorations in user code. At the same time, drop some convenience constructors and functions in CommandLine and Icon essentially serving the same purpose. Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Vcs: Use more FilePath for file pathshjk2021-08-021-3/+3
| | | | | Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* All: Replace most SynchronousProcess by QtcProcesshjk2021-06-231-3/+3
| | | | | Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccesshjk2021-06-021-2/+2
| | | | | | | | | | | | To make clear that this is not just any finish. Also change FinishedError to FinishedWithError, to create symmetry. Also adapt enum member description to reality. Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Make process results accessible through QtcProcess objecthjk2021-05-141-17/+16
| | | | | | | | | | | | | | | | The result is fully stored in the object anyway. Using the extra SynchronousProcessResponse structure only causes copies of the data and complicates access on the user side in a lot of cases. The result bits are now also accessible individually. There's obvious room for follow-up changes on the topic, e.g. ShellCommand::runCommand's parameter list could shrink to just a SynchronousProcess parameter. Change-Id: I45aa7eb23832340be06905929280c012e1217263 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Merge {synchronous,qtc}process.{h,cpp} file pairshjk2021-05-101-1/+2
| | | | | | | | Mechanical to prepare merging the actual classes. Adapting #includes. Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Git: Store singleton instance in GitClientOrgad Shaneh2020-02-261-2/+2
| | | | | | | | 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>
* Remove apparently unneeded QtPlugin includeshjk2020-02-121-0/+1
| | | | | | Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Git: Partially move plugin pimpl to .cpphjk2020-02-071-2/+2
| | | | | | | | | | 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>
* Vcs: Pimpl pluginshjk2020-01-241-2/+2
| | | | | | | | | | | | | | | 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>
* Utils: Add CommandLine convenience constructorshjk2019-07-231-3/+3
| | | | | | | | | | | | | ... taking a QString for the executable. This weakens the very explicit QString -> FileName conversion via the named constructors for the special case of constructing a CommandLine. I think that's worthwhile here, as it reduces the noise on the caller site under circumstance where the nature of the thing is obvious. Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Use CommandLine in ShellCommandhjk2019-06-111-3/+3
| | | | | | | ... and adapt users. Change-Id: I218523ffe34720d5fe199aa0ca6892a8dc2985fc Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: Rename FileName to FilePathhjk2019-05-281-3/+3
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Git: Use ICore::dialogParent as dialog parentOrgad Shaneh2018-11-291-1/+1
| | | | | Change-Id: Idc3f2f4d27d3279f76b688fac635e8d38b2705f5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Gerrit: Unset authenticated on unknown errorOrgad Shaneh2018-06-191-0/+1
| | | | | | | | Let the server retry authentication on next update. Change-Id: I22d9fcde2b501fc7c9b9d86bb9b656c73d3ee840 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Gerrit: Resolve version also for valid serversOrgad Shaneh2017-10-171-0/+1
| | | | | Change-Id: I2d02aec89bf5d7afe1d173fb5054f92f9bf1c3bf Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Gerrit: Resolve and store gerrit versionOrgad Shaneh2017-10-131-2/+52
| | | | | | | | This can be used for enabling features that are available from a specific version. Change-Id: I4ce1c8684df2b8e194e8bbb02769ba99fc256408 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Gerrit: Workaround gerrit issue when origin has /p prefixOrgad Shaneh2017-06-271-0/+4
| | | | | | | | /p was used with older versions of gerrit. It is no longer required, but still supported. Change-Id: Ie7c6a941031c56cf805c13518deec0fadb2f69ab Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Gerrit: Move line back to correct caseRobert Loehning2017-05-021-1/+1
| | | | | Change-Id: I7d6ee5835d67fce21ea211099d9d6aa6061517b9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Gerrit: Support certificate validationOrgad Shaneh2017-04-251-3/+29
| | | | | | | | Certificate should be validated by default. Only if it fails, and the user approves, we may skip validation. Change-Id: I7696cd7dda2d6d7ef1aa616557d5619b63372028 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Gerrit: Replace magic numbers with an enumOrgad Shaneh2017-04-241-5/+13
| | | | | Change-Id: I591716865831877eda4a17e9c85169935d633b09 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Gerrit: Resolve also user name from gerrit responseOrgad Shaneh2017-03-141-2/+7
| | | | | | | | If gerrit provides it (version >= 2.10). Change-Id: I7087be338e954fa13eb4a9fcc4f848d6272a46d6 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Gerrit: Add a button for server revalidationOrgad Shaneh2017-03-141-2/+5
| | | | | | Change-Id: I0ef823aa562093e5e3d63bc2766ab1a95ae259d5 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Gerrit: Persist server detailsOrgad Shaneh2017-03-141-7/+66
| | | | | | | | Avoid repeating connection tests for the same server between runs. Change-Id: Iecea52af986a708f317878c171d4fcea088cbbde Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Gerrit: Minor cleanupOrgad Shaneh2017-03-131-13/+11
| | | | | Change-Id: I7bfa74053c41c68b956929b73a9b50bf77cbf6e4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Gerrit: Fix host/port resolvingOrgad Shaneh2017-03-131-1/+3
| | | | | | | Broke by b0ac6435b3786854e7a8d10cf4d8df49ca74618a. Change-Id: I66f9c598b5e7466b93857cb19c40d1d6c796793a Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Git: Add new class GitRemoteAndre Hartmann2017-03-091-22/+10
| | | | | | | | Allows to split a remote URL and performs some validation checks on the elements. Change-Id: I048373076b1a1553fdd7bed2986a41cc087138b0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* GerritServer: Using namespace Git::InternalAndre Hartmann2017-03-091-1/+2
| | | | | Change-Id: Ibce01855a8dcc2ca9dd3ca0a91b062508d42907c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Gerrit: Split GerritServer to its own fileOrgad Shaneh2017-03-081-0/+228
It became much larger than GerritParameters. No reason to keep them together. Change-Id: Ib125f124940e95b0e15616d150f6b44fdb428284 Reviewed-by: André Hartmann <aha_1980@gmx.de>