ubuntu-sdk-team team mailing list archive
-
ubuntu-sdk-team team
-
Mailing list archive
-
Message #00332
Re: [Merge] lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot into lp:ubuntu-ui-toolkit/staging
some small suggestions for the docs in the inline comments below.
Diff comments:
>
> === modified file 'src/UbuntuToolkit/ucmainwindow.cpp'
> --- src/UbuntuToolkit/ucmainwindow.cpp 2017-01-12 15:20:31 +0000
> +++ src/UbuntuToolkit/ucmainwindow.cpp 2017-01-16 17:44:53 +0000
> @@ -238,6 +238,29 @@
> return d_func()->m_actionContext;
> }
>
> +/*!
> + \qmlproperty Item MainWindow::visualRoot
> +
> + 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....'.
> + 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).
> + popupUtils.open().
> +*/
> +QQuickItem *UCMainWindow::visualRoot() const
> +{
> + return d_func()->m_visualRoot;
> +}
> +
> +void UCMainWindow::setVisualRoot(QQuickItem *visualRoot)
> +{
> + Q_D(UCMainWindow);
> +
> + if (d->m_visualRoot == visualRoot)
> + return;
> +
> + d->m_visualRoot = visualRoot;
> + Q_EMIT visualRootChanged(visualRoot);
> +}
> +
> UT_NAMESPACE_END
>
> #include "moc_ucmainwindow_p.cpp"
>
> === modified file 'tests/unit/mainwindow/tst_mainwindow.cpp'
> --- tests/unit/mainwindow/tst_mainwindow.cpp 2017-01-12 15:20:31 +0000
> +++ tests/unit/mainwindow/tst_mainwindow.cpp 2017-01-16 17:44:53 +0000
> @@ -90,7 +92,7 @@
> return window;
> }
>
> - QQuickItem *testItem(QQuickItem *that, const QString &identifier)
> + QQuickItem *testItem(QObject *that, const QString &identifier)
why does this have to be changed?
> {
> if (that->property(identifier.toLocal8Bit()).isValid())
> return that->property(identifier.toLocal8Bit()).value<QQuickItem*>();
--
https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot/+merge/314684
Your team Ubuntu SDK team is requested to review the proposed merge of lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/visualRoot into lp:ubuntu-ui-toolkit/staging.
References