Merge lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot into lp://staging/ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Tim Peeters
Approved revision: 2070
Merged at revision: 2159
Proposed branch: lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot
Merge into: lp://staging/ubuntu-ui-toolkit/staging
Prerequisite: lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/outTheWindow
Diff against target: 218 lines (+99/-2)
7 files modified
src/UbuntuToolkit/quickutils.cpp (+9/-0)
src/UbuntuToolkit/ucmainwindow.cpp (+26/-0)
src/UbuntuToolkit/ucmainwindow_p.h (+7/-0)
src/UbuntuToolkit/ucmainwindow_p_p.h (+1/-0)
src/imports/Components/Popups/1.3/popupUtils.js (+6/-1)
tests/unit/mainwindow/VisualRoot.qml (+36/-0)
tests/unit/mainwindow/tst_mainwindow.cpp (+14/-1)
To merge this branch: bzr merge lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Tim Peeters Approve
Zsombor Egri Needs Information
Review via email: mp+314684@code.staging.launchpad.net

Commit message

Add visualRoot property to MainWindow

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

Let's add documentation in PopupUtils and the popup components on how to change the root item. Also an example/use case would be useful.

2067. By Cris Dywan

Merge lp:ubuntu-ui-toolkit/staging

2068. By Cris Dywan

Document the role of visualRoot in QuickUtils and popupUtils

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
2069. By Cris Dywan

Tweak quickutils header include in tst_mainwindow

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

some small suggestions for the docs in the inline comments below.

2070. By Cris Dywan

Reword documentation of visualRoot for clarity

Revision history for this message
Cris Dywan (kalikiana) wrote :

> > The property holds the window's visual root,
> > as opposed to the root item.
> Should we prepend this sentence with 'If set,'?
> To make it clear that visualRoot is ignored
> when it is null? Or say 'set to null in order
> to use the root item....'.

I moved the If to the start of the sentence.

> > If set, popups (popovers, dialogs, menus) will
> > reparent to it when opened via
> They won't be reparented, they will be created
> as children of visualRoot (as you say in the
> docs of popupUtils).

Yes and no. popupUtils.open creates them initially with the parent. show() on the other hand does reparent after the fact if reparentToRootItem is true.

I made this more explicit now.

> > - QQuickItem *testItem(QQuickItem *that, const QString &identifier)
> > + QQuickItem *testItem(QObject *that, const QString &identifier)
> why does this have to be changed?

A QQuickWindow is not a QQuickItem. Properties and children are however implemented in QObject and aren't specific to items at all. So we can use them with a window just fine, so long as we don't try to cast it to something unrelated that it isn't.

Revision history for this message
Zsombor Egri (zsombi) wrote :

A small comment about the property, perhaps we would want to use the QQC2 ApplicationWindow's contentItem as property name?

http://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#contentItem-prop

review: Needs Information
Revision history for this message
Cris Dywan (kalikiana) wrote :

> A small comment about the property, perhaps we would want to use the QQC2
> ApplicationWindow's contentItem as property name?
>
> http://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html
> #contentItem-prop

QQuickWindow already has a contentItem property and it's not the same as what we want for the visualItem to be.

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches