[Merge] lp:~nick-dedekind/qtubuntu/menuTheme into lp:qtubuntu

Nick Dedekind nick.dedekind at canonical.com
Thu Sep 29 15:07:11 UTC 2016


> +    // queue the windowPropertyChanged signal. If it's emitted directly, the
> platformWindow will not yet be set for the window.
> +    QMetaObject::invokeMethod(mNativeInterface, "windowPropertyChanged",
> Qt::QueuedConnection,
> +                              Q_ARG(QPlatformWindow*, this),
> + Q_ARG(QString, "persistentSurfaceId"));
> 
> Why pass the PlatformWindow, why not the QWindow? I see you only using the
> QWindow in the appmenu stuff:
> 
> +        connect(nativeInterface,
> &QPlatformNativeInterface::windowPropertyChanged, this,
> [this](QPlatformWindow* window, const QString &property) {
> +            if (property != QStringLiteral("persistentSurfaceId")) {
> +                return;
> +            }
> +            if (window->window() == m_window) {
> +                registerMenuForWindow(m_window, m_path);
> + }

Because the QPlatformNativeInterface::windowPropertyChanged signal takes a QPlatformWindow,* not a QWindow*.
-- 
https://code.launchpad.net/~nick-dedekind/qtubuntu/menuTheme/+merge/296997
Your team Ubuntu Phablet Team is subscribed to branch lp:qtubuntu.



More information about the Ubuntu-reviews mailing list