Merge lp:~artmello/ubuntu-ui-toolkit/ubuntu-ui-toolkit-clipboard-dbus into lp:ubuntu-ui-toolkit/staging
| Status: | Merged |
|---|---|
| Approved by: | Christian Dywan on 2017-01-26 |
| Approved revision: | 2178 |
| Merged at revision: | 2164 |
| Proposed branch: | lp:~artmello/ubuntu-ui-toolkit/ubuntu-ui-toolkit-clipboard-dbus |
| Merge into: | lp:ubuntu-ui-toolkit/staging |
| Diff against target: |
842 lines (+675/-6) 14 files modified
src/UbuntuToolkit/UbuntuToolkit.pro (+2/-0) src/UbuntuToolkit/privates/uccontenthub.cpp (+218/-0) src/UbuntuToolkit/privates/uccontenthub_p.h (+68/-0) src/UbuntuToolkit/ubuntutoolkitmodule.cpp (+3/-0) src/imports/Components/1.3/TextArea.qml (+15/-0) src/imports/Components/1.3/TextField.qml (+23/-1) src/imports/Components/1.3/TextInputPopover.qml (+4/-3) tests/license/checklicense.sh (+1/-1) tests/unit/contenthub/TextAreaPaste.qml (+32/-0) tests/unit/contenthub/TextFieldPaste.qml (+31/-0) tests/unit/contenthub/com.ubuntu.content.MockService.xml (+17/-0) tests/unit/contenthub/contenthub.pro (+5/-0) tests/unit/contenthub/tst_contenthub.cpp (+254/-0) tests/unit/unit.pro (+2/-1) |
| To merge this branch: | bzr merge lp:~artmello/ubuntu-ui-toolkit/ubuntu-ui-toolkit-clipboard-dbus |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| ubuntu-sdk-build-bot | continuous-integration | Approve on 2017-01-26 | |
| Christian Dywan | Approve on 2017-01-26 | ||
| Zsombor Egri (community) | 2017-01-04 | Needs Fixing on 2017-01-12 | |
|
Review via email:
|
|||
Commit Message
Add support for interacting with Content Hub Clipboard UI via DBus calls
Description of the Change
Add support for interacting with Content Hub Clipboard UI via DBus calls
- 2154. By Arthur Mello on 2017-01-06
-
Disable check for activeFocus by now
- 2155. By Arthur Mello on 2017-01-12
-
Respect user decision on Clipboard UI to paste data as Plain Text or Rich Text
- 2156. By Arthur Mello on 2017-01-16
-
Make sure ImageData is pasted to TextField/TextArea
- 2157. By Arthur Mello on 2017-01-17
-
Add unit tests for the UCContentHub class
| Christian Dywan (kalikiana) wrote : | # |
> // TODO: In the future check if Paste Formats list has an interesting format
Do/ can we have a bug report for this? The word "interesting" is not all that descriptive and I imagine it might warrant some discussion leading to a follow-up merge request.
> #define CONTHUB_
If you don't mind my being a little nit-picky here, please make that CONTENT_HUB_TRACE.
> qDebug() << "[UITK ContentHub] AppArmor profile:" << appProfile;
This should be using CONTHUB_TRACE as well.
> target: Private.
> onPasteSelected: {
> //FIXME if (control.
What's with this?
> if (Private.
Wondering, is this "the" way any component would be implementing pasting? If so, perhaps make it Labs rather than Private, so it can be implemented by third party components.
Although I'm happy for it to be a FIXME with a bug number.
- 2158. By Arthur Mello on 2017-01-17
-
Improve trace define naming
Improve TODO message and add bug number for further discussion
Make all log messages to use trace output
| Arthur Mello (artmello) wrote : | # |
Thx for reviewing. Comments bellow
> > // TODO: In the future check if Paste Formats list has an interesting
> format
>
> Do/ can we have a bug report for this? The word "interesting" is not all that
> descriptive and I imagine it might warrant some discussion leading to a
> follow-up merge request.
As suggested LP #1657111 was created to trace this. Point is that ContentHub keeps trace of all available pastes data types and UITK Components could use that to decide what paste datas would be displayed for users. But how that would work (and if it is really something could to have) needs further discussion.
> > #define CONTHUB_
>
> If you don't mind my being a little nit-picky here, please make that
> CONTENT_HUB_TRACE.
fixed
> > qDebug() << "[UITK ContentHub] AppArmor profile:" << appProfile;
>
> This should be using CONTHUB_TRACE as well.
fixed
> > target: Private.
> > onPasteSelected: {
> > //FIXME if (control.
>
> What's with this?
That is an issue with current implementation. ContentHub pasteboard keeps track of the link between launched trust sessions and applications via appId. So whenever a paste is selected from a trust session, app is notified but all available TextField/TextArea get data pasted on it. For example, if we paste on messaging-app TextArea the destination TextField get same data pasted. I was trying to keep track of which component requested the data with looking for activeFocus but this does not seem to work. Suggestions on how to properly do that?
> > if (Private.
>
> Wondering, is this "the" way any component would be implementing pasting? If
> so, perhaps make it Labs rather than Private, so it can be implemented by
> third party components.
> Although I'm happy for it to be a FIXME with a bug number.
I have no strong opinion about it. I keep it as Private since there are (or at least we need to have) some discussion going on about integration of this ContentHub clipboard UI with other components (like where/how to paste an image or a pdf file) and with apps that do not use UITK for example. I imagine things here can still change in near future. But we can totally make it Lab if you guys prefer.
| Christian Dywan (kalikiana) wrote : | # |
> I was trying to keep track of which component requested
> the data with looking for activeFocus but this does
> not seem to work. Suggestions on how to properly do that?
window.
what you need is to check the activeFocus of the editor (instead of control)
> I imagine things here can still change in near future.
> But we can totally make it Lab if you guys prefer.
Labs is meant exactly for that: a feature that's experimental, which
may still change, before it becomes stable API. So anyone can play
with it, but without using it in a stable version just yet.
As I said, alternatively I'm also fine with leaving it for now and
filing a bug report to discuss and expose the API.
| Arthur Mello (artmello) wrote : | # |
> > I was trying to keep track of which component requested
> > the data with looking for activeFocus but this does
> > not seem to work. Suggestions on how to properly do that?
>
> window.
> what you need is to check the activeFocus of the editor (instead of control)
Tried both suggestions but still not working. It seems that when we return from Clipboard trust session neither component has activeFocus http://
> As I said, alternatively I'm also fine with leaving it for now and
> filing a bug report to discuss and expose the API.
https:/
- 2159. By Arthur Mello on 2017-01-17
-
Keep track of which QQuickItem was the target for a paste command.
It seems that when returning from the trust session activeFocus is wrong - 2160. By Arthur Mello on 2017-01-17
-
Change unit tests to fix SIGSEGV received on CI
- 2161. By Arthur Mello on 2017-01-17
-
Fix include declaration in UCContentHub to fix build issue on i386/arm64
- 2162. By Arthur Mello on 2017-01-17
-
Increase signal wait timeout from 1 to 5 seconds
- 2163. By Arthur Mello on 2017-01-18
-
Register QQuickItem* as a meta type to remove unit test fatal warning
| Christian Dywan (kalikiana) wrote : | # |
> Private.
You forgot to add the argument to the key events of the Text* components.
Perhaps the unit test should cover that.
- 2164. By Arthur Mello on 2017-01-18
-
Update requestPaste call when using keyboard shortcut
FAILED: Continuous integration, rev:2164
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2164
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2164
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2164
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2164
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2165. By Arthur Mello on 2017-01-24
-
Add a mock Content Service to be used by ContentHub tests
FAILED: Continuous integration, rev:2165
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2165
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2165
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2165
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2165
https:/
Executed test runs:
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2166. By Arthur Mello on 2017-01-24
-
Improve unittests for ContentHub clipboard
FAILED: Continuous integration, rev:2166
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 2167. By Arthur Mello on 2017-01-24
-
Add Qt Company as an expected license due to self generated files on the ContentHub clipboard unittest
| Christian Dywan (kalikiana) wrote : | # |
> Component.
Hmmm I might've expected you to do this from the unit test (eg. QTest::
And, too, you'll want to check that focus indeed there to avoid false negatives:
QTRY_COMPARE_
Is handling the base component good enough? If not, you might need to access the internal editor via its objectName text_input.
FAILED: Continuous integration, rev:2166
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2166
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2166
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2166
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2167
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2167
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2167
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2167
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2167
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2168. By Arthur Mello on 2017-01-24
-
Merge with trunk
- 2169. By Arthur Mello on 2017-01-24
-
Move some checks about activeFocus to cpp part of contenthub test
FAILED: Continuous integration, rev:2168
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2168
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2168
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2168
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2168
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2169
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2169
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2169
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 2170. By Arthur Mello on 2017-01-24
-
Skip ContentHub tests that are failing on CI with OpenGL errors
FAILED: Continuous integration, rev:2169
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2169
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2170
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2171. By Arthur Mello on 2017-01-25
-
Reenable Clipboard tests adding X11 support for it
FAILED: Continuous integration, rev:2171
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2171
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2171
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2171
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2171
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2172. By Arthur Mello on 2017-01-25
-
Use same test timeout on all tests
FAILED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2172
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2173. By Arthur Mello on 2017-01-25
-
Change focus check on ContentHub test
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2174. By Arthur Mello on 2017-01-25
-
Skip failing tests
- 2175. By Arthur Mello on 2017-01-25
-
Fix property name typo
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2176. By Arthur Mello on 2017-01-25
-
Do not skip tests anymore
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2175
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2175
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2175
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2175
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2175
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2177. By Arthur Mello on 2017-01-26
-
Remove deprecated code
FAILED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2177
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2178. By Arthur Mello on 2017-01-26
-
Try to fix issues related with running clipboard tests
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Christian Dywan (kalikiana) wrote : | # |
Sweet! Looking much better. Let's try and get this in!
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2178
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/

I would love to see some test cases to guard this :)