Commit Graph

33 Commits

Author SHA1 Message Date
Orgad Shaneh
11e8ce65db Gerrit: Force remote refreshing on 401 error
Can happen if the password was changed.

Change-Id: If0f0fa047c376c193ceda50e5465d016e16b61a3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-14 13:02:40 +00:00
Orgad Shaneh
69f978efca Gerrit: Split GerritServer to its own file
It became much larger than GerritParameters. No reason to keep them
together.

Change-Id: Ib125f124940e95b0e15616d150f6b44fdb428284
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-08 18:57:20 +00:00
Orgad Shaneh
f7a778690d Gerrit: Support REST query for HTTP servers
Change-Id: Icc164b9d84abe4efc34deaa5d19dca167fdb14e1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-02 06:23:49 +00:00
Orgad Shaneh
0995cf22ab Gerrit: Store full user details in server
This is needed for REST, which never returns user name (only account id,
full name and email)

Change-Id: Ia4e3cca15a80a26b26f5f69edfc83a18e4c1fa1b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:31 +00:00
Orgad Shaneh
1418d6ab1c Gerrit: Factor out user parsing
This has several advantages:
1. It removes duplicate logic.
2. It is now clear where we use username and where full name.
3. Reviewers now appear with full names (broke by
   9f697128c3).

Change-Id: I5729abc9006cec0d0cb615b01c8ace5def60ce27
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:16 +00:00
Orgad Shaneh
f3f5a16f27 Gerrit: Fix initial refresh
when the fallback host matches the remote.

Change-Id: I2c630739db4b698acdcf51f6b663070cfd5ecc4d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 12:15:26 +00:00
Orgad Shaneh
f7bd558883 Gerrit: Simplify query context
Run only a single query per context.

Change-Id: Icf86e06ab60f8d74ab1de092c6c7e41570423d2e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-15 10:04:35 +00:00
Orgad Shaneh
4253588b96 Gerrit: Replace 0 with nullptr
Change-Id: I5e644c36ddd8a018dc2c8a3170e3d556d0ebefee
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-02-13 21:24:22 +00:00
Orgad Shaneh
0fbe2a125b Gerrit: Use short user name for marking owned changes
Gerrit provides this data. There's no reason to wait for the query's
result to determine who I am.

Change-Id: Icd0f08fd08cf428dfbadf88224ae21bd4dbc207f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-02-13 21:24:14 +00:00
Orgad Shaneh
b2b1f6bec1 Gerrit: Append " (Draft)" to draft changes
Similar to the web UI.

Change-Id: I596a116a85536c010089afd9c8a0686a75d29dde
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 08:50:01 +00:00
Orgad Shaneh
34504ad797 Gerrit: Determine server by git remote
Currently SSH only.

Change-Id: Ic29ca20e4c63cb5c692e9dc196ba205f0cbc9c6f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-26 12:00:23 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +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
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
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
Tobias Hunger
2a014eaee6 Gerrit: No need to subclass FancyLineEdit
Change-Id: I9b25c1e0a72e8a7e5ba268e539cf71f5b28d420b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 11:08:50 +00:00
Orgad Shaneh
4eb2224f47 Git: Add override
Change-Id: Iae0779c1efa8b3b46cf504f7bda00d614a4a157e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-04-12 20:03:04 +00:00
Tobias Hunger
6546a292c2 Gerrit: Properly sort timestamps in Gerrit dialog
Task-number: QTCREATORBUG-13602
Change-Id: Iba4b2d85d6b75752214b4f53684b9e90df9b1b69
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-17 13:46:02 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +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
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
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Friedemann Kleint
9393335c1d Clean headers in Git.
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.

Change-Id: Ib2afbc530760684db96888b927c5153b29fe24aa
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-05 15:10:02 +02:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Orgad Shaneh
cb8c8ca19e Gerrit: Allow custom query
Change-Id: I8ee0967a8f0013c785bc4d6e98ff7b634f488e97
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-04 09:20:27 +02:00
Friedemann Kleint
f1b52256cd Gerrit: Add 'Details' text to dialog.
- Add a splitter and a text browser containing detailed text
  for the change using HTML links for email and URL, allowing
  for removal of 'Open', 'Copy URL' buttons.
- Remove large tooltip from list, rename methods to toHtml()
  and use them for the details text.
- Parse out reviewer email.
- Display approval level with sign.

Change-Id: I2d71a80bbe19643e5bfa9deeaaeb3650976f00b4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-05-16 17:38:02 +02:00
Friedemann Kleint
37def2aa1c Gerrit: Differentiate by approval type.
- Parse approval type and description.
- Format tooltip as HTML table, listing approvals by type
- Format the approval column similar to the web view by
  type character.
- Fix the special character issue in Qt 4.8 (query tool
  actually outputs UTF8 instead of escapes).

Change-Id: I803f289a03c5a8ede0029d972a19381b5e783d36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-05-16 14:26:59 +02:00
Friedemann Kleint
d681bc10c9 Gerrit: Introduce bold marking of changes.
Owned changes: Mark using bold if approval != 0,1.
Changes for review: Mark using bold if review is missing.

Derive verbose user name from first query.

Change-Id: I0ba85c1c7fff088846261b3ba8c5dbaaf259db9a
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-04-30 14:00:41 +02:00
Friedemann Kleint
2193915cca Start on a gerrit plugin as a sub-plugin of git.
- Add a gerrit window that shows a list of changes
  and buttons to display, apply or check out
  a change.
- Uses the new Qt 5 Json API or the utils/json
  classes for Qt 4.

Tested-by: Tobias Hunger <tobias.hunger@nokia.com>
Tested-by: Orgad Shaneh <orgads@gmail.com>

Change-Id: I14c6c2c2de8f95fb785752c7319be8638b386a1e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-04-26 14:34:41 +02:00